@galacean/effects-plugin-spine 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +24 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.mjs +24 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects player spine plugin
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 十弦
|
|
6
|
-
* Version: v1.1.
|
|
6
|
+
* Version: v1.1.3
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -988,9 +988,8 @@ var MeshAttachment = /** @class */ (function (_super) {
|
|
|
988
988
|
var n = this.uvs.length;
|
|
989
989
|
var u = this.region.u, v = this.region.v, width = 0, height = 0;
|
|
990
990
|
if (this.region instanceof TextureAtlasRegion) {
|
|
991
|
-
var region = this.region;
|
|
992
|
-
var
|
|
993
|
-
var textureWidth = texture ? texture.width : 0, textureHeight = texture ? texture.height : 0;
|
|
991
|
+
var region = this.region, page = region.page;
|
|
992
|
+
var textureWidth = page.width, textureHeight = page.height;
|
|
994
993
|
switch (region.degrees) {
|
|
995
994
|
case 90:
|
|
996
995
|
u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;
|
|
@@ -11236,6 +11235,7 @@ var SpineVFXItem = /** @class */ (function (_super) {
|
|
|
11236
11235
|
(_a = this.content) === null || _a === void 0 ? void 0 : _a.update();
|
|
11237
11236
|
};
|
|
11238
11237
|
SpineVFXItem.prototype.setAnimation = function (animation, speed) {
|
|
11238
|
+
var _a;
|
|
11239
11239
|
if (!this.skeleton || !this.state) {
|
|
11240
11240
|
throw new Error('Set animation before skeleton create');
|
|
11241
11241
|
}
|
|
@@ -11243,13 +11243,19 @@ var SpineVFXItem = /** @class */ (function (_super) {
|
|
|
11243
11243
|
throw new Error('animationList is empty, check your spine file');
|
|
11244
11244
|
}
|
|
11245
11245
|
var loop = this.endBehavior === effects.spec.ItemEndBehavior.loop;
|
|
11246
|
+
var listener = (_a = this.state.tracks[0]) === null || _a === void 0 ? void 0 : _a.listener;
|
|
11247
|
+
if (listener) {
|
|
11248
|
+
listener.end = function () { };
|
|
11249
|
+
}
|
|
11250
|
+
this.state.clearTracks();
|
|
11251
|
+
this.skeleton.setToSetupPose();
|
|
11246
11252
|
if (!this.animationList.includes(animation)) {
|
|
11247
|
-
console.warn("animation ".concat(animation, " not exists in animationList: ").concat(this.animationList, ", set to ").concat(this.animationList[0]));
|
|
11253
|
+
console.warn("animation ".concat(JSON.stringify(animation), " not exists in animationList: ").concat(this.animationList, ", set to ").concat(this.animationList[0]));
|
|
11248
11254
|
this.state.setAnimation(0, this.animationList[0], loop);
|
|
11249
11255
|
this.activeAnimation = [this.animationList[0]];
|
|
11250
11256
|
}
|
|
11251
11257
|
else {
|
|
11252
|
-
this.state.
|
|
11258
|
+
this.state.setAnimation(0, animation, loop);
|
|
11253
11259
|
this.activeAnimation = [animation];
|
|
11254
11260
|
}
|
|
11255
11261
|
if (!isNaN(speed)) {
|
|
@@ -11259,13 +11265,23 @@ var SpineVFXItem = /** @class */ (function (_super) {
|
|
|
11259
11265
|
SpineVFXItem.prototype.setAnimationList = function (animationList, speed) {
|
|
11260
11266
|
var e_1, _a;
|
|
11261
11267
|
var _this = this;
|
|
11268
|
+
var _b;
|
|
11262
11269
|
if (!this.skeleton || !this.state) {
|
|
11263
11270
|
throw new Error('Set animation before skeleton create');
|
|
11264
11271
|
}
|
|
11265
11272
|
if (!this.animationList.length) {
|
|
11266
|
-
throw new Error('animationList is empty, check your
|
|
11273
|
+
throw new Error('animationList is empty, please check your setting');
|
|
11274
|
+
}
|
|
11275
|
+
if (animationList.length === 1) {
|
|
11276
|
+
this.setAnimation(animationList[0], speed);
|
|
11277
|
+
return;
|
|
11278
|
+
}
|
|
11279
|
+
var listener = (_b = this.state.tracks[0]) === null || _b === void 0 ? void 0 : _b.listener;
|
|
11280
|
+
if (listener) {
|
|
11281
|
+
listener.end = function () { };
|
|
11267
11282
|
}
|
|
11268
11283
|
this.state.clearTracks();
|
|
11284
|
+
this.skeleton.setToSetupPose();
|
|
11269
11285
|
var _loop_1 = function (animation) {
|
|
11270
11286
|
var trackEntry = this_1.state.addAnimation(0, animation, false);
|
|
11271
11287
|
if (this_1.endBehavior === effects.spec.ItemEndBehavior.loop) {
|
|
@@ -11549,7 +11565,7 @@ var SpineLoader = /** @class */ (function (_super) {
|
|
|
11549
11565
|
}(effects.AbstractPlugin));
|
|
11550
11566
|
|
|
11551
11567
|
effects.registerPlugin('spine', SpineLoader, SpineVFXItem);
|
|
11552
|
-
var version = "1.1.
|
|
11568
|
+
var version = "1.1.3";
|
|
11553
11569
|
console.info('[Galacean Effects Plugin Spine] version: ' + version);
|
|
11554
11570
|
|
|
11555
11571
|
exports.AlphaTimeline = AlphaTimeline;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.min.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects player spine plugin
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 十弦
|
|
6
|
-
* Version: v1.1.
|
|
6
|
+
* Version: v1.1.3
|
|
7
7
|
*/
|
|
8
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@galacean/effects")):"function"==typeof define&&define.amd?define(["exports","@galacean/effects"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ge=t.ge||{},t.ge.spinePlugin={}),t.ge)}(this,(function(t,e){"use strict";var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function i(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{h(r.next(t))}catch(t){a(t)}}function o(t){try{h(r.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}h((r=r.apply(t,e||[])).next())}))}function a(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(h){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,h])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var h=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp()},t.prototype.toString=function(){return"r: ".concat(this.r,", g: ").concat(this.g,", b: ").concat(this.b,", a: ").concat(this.a)},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp()},t.prototype.clamp=function(){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},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.fromString=function(e){return(new t).setFromString(e)},t}();function l(t,e,n){var r=new jt(t);return("skel"===n?new ge(r):new Ze(r)).readSkeletonData(e)}function c(t){return t.animations.map((function(t){return t.name}))}function d(t,n){var r=t.findAnimation(n);return e.assertExist(r),r.duration}function u(t){return t.skins.map((function(t){return t.name}))}var f,p,m=function(){function t(){this.entries={},this.size=0}return t.prototype.add=function(t){var e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)},t.prototype.addAll=function(t){for(var e=this.size,n=0,r=t.length;n<r;n++)this.add(t[n]);return e!=this.size},t.prototype.contains=function(t){return this.entries[t]},t.prototype.clear=function(){this.entries={},this.size=0},t}(),g=function(){function t(){}return t.arrayCopy=function(t,e,n,r,i){for(var a=e,s=r;a<e+i;a++,s++)n[s]=t[a]},t.arrayFill=function(t,e,n,r){for(var i=e;i<n;i++)t[i]=r},t.setArraySize=function(t,e,n){void 0===n&&(n=0);var r=t.length;if(r==e)return t;if(t.length=e,r<e)for(var i=r;i<e;i++)t[i]=n;return t},t.ensureArrayCapacity=function(e,n,r){return void 0===r&&(r=0),e.length>=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r<t;r++)n[r]=e;return n},t.newFloatArray=function(e){if(t.SUPPORTS_TYPED_ARRAYS)return new Float32Array(e);for(var n=new Array(e),r=0;r<n.length;r++)n[r]=0;return n},t.newShortArray=function(e){if(t.SUPPORTS_TYPED_ARRAYS)return new Int16Array(e);for(var n=new Array(e),r=0;r<n.length;r++)n[r]=0;return n},t.toFloatArray=function(e){return t.SUPPORTS_TYPED_ARRAYS?new Float32Array(e):e},t.toSinglePrecision=function(e){return t.SUPPORTS_TYPED_ARRAYS?Math.fround(e):e},t.webkit602BugfixHelper=function(t,e){},t.contains=function(t,e,n){for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1},t.enumValue=function(t,e){return t[e[0].toUpperCase()+e.slice(1)]},t.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,t}(),v=function(){function t(t){this.items=new Array,this.instantiator=t}return t.prototype.obtain=function(){return this.items.length>0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)this.free(t[e])},t.prototype.clear=function(){this.items.length=0},t}(),y=function(t){if(!t)throw new Error("name cannot be null.");this.name=t},x=function(t){function e(n){var r=t.call(this,n)||this;return r.id=e.nextID++,r.bones=null,r.vertices=[],r.worldVerticesLength=0,r.timelineAttachment=r,r}return r(e,t),e.prototype.computeWorldVertices=function(t,e,n,r,i,a){n=i+(n>>1)*a;var s=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(l){for(var c=0,d=0,u=0;u<e;u+=2){c+=(g=l[c])+1,d+=g}var f=s.bones;if(0==o.length)for(T=i,S=3*d;T<n;T+=a){var p=0,m=0,g=l[c++];for(g+=c;c<g;c++,S+=3){w=f[l[c]],C=h[S],E=h[S+1];var v=h[S+2];p+=(C*w.a+E*w.b+w.worldX)*v,m+=(C*w.c+E*w.d+w.worldY)*v}r[T]=p,r[T+1]=m}else for(var y=o,x=(T=i,S=3*d,d<<1);T<n;T+=a){p=0,m=0,g=l[c++];for(g+=c;c<g;c++,S+=3,x+=2){w=f[l[c]],C=h[S]+y[x],E=h[S+1]+y[x+1],v=h[S+2];p+=(C*w.a+E*w.b+w.worldX)*v,m+=(C*w.c+E*w.d+w.worldY)*v}r[T]=p,r[T+1]=m}}else{o.length>0&&(h=o);for(var w,b=(w=t.bone).worldX,M=w.worldY,k=w.a,S=w.b,A=w.c,I=w.d,B=e,T=i;T<n;B+=2,T+=a){var C=h[B],E=h[B+1];r[T]=C*k+E*S+b,r[T+1]=C*A+E*I+M}}},e.prototype.copyTo=function(t){this.bones?(t.bones=new Array(this.bones.length),g.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=g.newFloatArray(this.vertices.length),g.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment},e.nextID=0,e}(y),w=function(t){function e(e){var n=t.call(this,e)||this;return n.color=new h(1,1,1,1),n}return r(e,t),e.prototype.copy=function(){var t=new e(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t},e}(x),b=function(t){function e(e){var n=t.call(this,e)||this;return n.endSlot=null,n.color=new h(.2275,.2275,.8078,1),n}return r(e,t),e.prototype.copy=function(){var t=new e(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},e}(x);t.TextureFilter=void 0,(f=t.TextureFilter||(t.TextureFilter={}))[f.Nearest=9728]="Nearest",f[f.Linear=9729]="Linear",f[f.MipMap=9729]="MipMap",f[f.MipMapNearestNearest=9729]="MipMapNearestNearest",f[f.MipMapLinearNearest=9729]="MipMapLinearNearest",f[f.MipMapNearestLinear=9729]="MipMapNearestLinear",f[f.MipMapLinearLinear=9729]="MipMapLinearLinear",t.TextureWrap=void 0,(p=t.TextureWrap||(t.TextureWrap={}))[p.MirroredRepeat=33648]="MirroredRepeat",p[p.ClampToEdge=33071]="ClampToEdge",p[p.Repeat=10497]="Repeat";var M=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0},k=function(){function e(e){this.pages=new Array,this.regions=new Array;for(var n=new S(e),r=new Array(4),i={size:function(t){t.width=parseInt(r[1]),t.height=parseInt(r[2])},filter:function(e){e.minFilter=g.enumValue(t.TextureFilter,r[1]),e.magFilter=g.enumValue(t.TextureFilter,r[2])},repeat:function(e){r[1].includes("x")&&(e.uWrap=t.TextureWrap.Repeat),r[1].includes("y")&&(e.vWrap=t.TextureWrap.Repeat)},pma:function(t){t.pma="true"==r[1]}},a={xy:function(t){t.x=parseInt(r[1]),t.y=parseInt(r[2])},size:function(t){t.width=parseInt(r[1]),t.height=parseInt(r[2])},bounds:function(t){t.x=parseInt(r[1]),t.y=parseInt(r[2]),t.width=parseInt(r[3]),t.height=parseInt(r[4])},offset:function(t){t.offsetX=parseInt(r[1]),t.offsetY=parseInt(r[2])},orig:function(t){t.originalWidth=parseInt(r[1]),t.originalHeight=parseInt(r[2])},offsets:function(t){t.offsetX=parseInt(r[1]),t.offsetY=parseInt(r[2]),t.originalWidth=parseInt(r[3]),t.originalHeight=parseInt(r[4])},rotate:function(t){var e=r[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:function(t){t.index=parseInt(r[1])}},s=n.readLine();s&&0==s.trim().length;)s=n.readLine();for(;s&&0!=s.trim().length&&0!=n.readEntry(r,s);)s=n.readLine();for(var o=null,h=null,l=null;null!==s;)if(0==s.trim().length)o=null,s=n.readLine();else if(o){for(var c=new I(o,s);;){var d=n.readEntry(r,s=n.readLine());if(0==d)break;if(p=a[r[0]])p(c);else{h||(h=[]),l||(l=[]),h.push(r[0]);for(var u=[],f=0;f<d;f++)u.push(parseInt(r[f+1]));l.push(u)}}0==c.originalWidth&&0==c.originalHeight&&(c.originalWidth=c.width,c.originalHeight=c.height),h&&h.length>0&&l&&l.length>0&&(c.names=h,c.values=l,h=null,l=null),c.u=c.x/o.width,c.v=c.y/o.height,90==c.degrees?(c.u2=(c.x+c.height)/o.width,c.v2=(c.y+c.width)/o.height):(c.u2=(c.x+c.width)/o.width,c.v2=(c.y+c.height)/o.height),this.regions.push(c)}else{for(o=new A(s.trim());0!=n.readEntry(r,s=n.readLine());){var p;(p=i[r[0]])&&p(o)}this.pages.push(o)}}return e.prototype.findRegion=function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null},e.prototype.setTextures=function(t,e){var n,r;void 0===e&&(e="");try{for(var i=s(this.pages),a=i.next();!a.done;a=i.next()){var o=a.value;o.setTexture(t.get(e+o.name))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.dispose=function(){for(var t,e=0;e<this.pages.length;e++)null===(t=this.pages[e].texture)||void 0===t||t.dispose()},e}(),S=function(){function t(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}return t.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},t.prototype.readEntry=function(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;var n=e.indexOf(":");if(-1==n)return 0;t[0]=e.substr(0,n).trim();for(var r=1,i=n+1;;r++){var a=e.indexOf(",",i);if(-1==a)return t[r]=e.substr(i).trim(),r;if(t[r]=e.substr(i,a-i).trim(),i=a+1,4==r)return 4}},t}(),A=function(){function e(e){this.minFilter=t.TextureFilter.Nearest,this.magFilter=t.TextureFilter.Nearest,this.uWrap=t.TextureWrap.ClampToEdge,this.vWrap=t.TextureWrap.ClampToEdge,this.texture=null,this.width=0,this.height=0,this.name=e}return e.prototype.setTexture=function(t){this.texture=t},e}(),I=function(t){function e(e,n){var r=t.call(this)||this;return r.x=0,r.y=0,r.offsetX=0,r.offsetY=0,r.originalWidth=0,r.originalHeight=0,r.index=0,r.degrees=0,r.names=null,r.values=null,r.page=e,r.name=n,r}return r(e,t),e}(M),B=function(t){function e(e,n){var r=t.call(this,e)||this;return r.region=null,r.regionUVs=[],r.uvs=[],r.triangles=[],r.color=new h(1,1,1,1),r.width=0,r.height=0,r.hullLength=0,r.edges=[],r.parentMesh=null,r.sequence=null,r.tempColor=new h(0,0,0,0),r.path=n,r}return r(e,t),e.prototype.updateRegion=function(){if(!this.region)throw new Error("Region not set.");var t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=g.newFloatArray(t.length));var e=this.uvs,n=this.uvs.length,r=this.region.u,i=this.region.v,a=0,s=0;if(this.region instanceof I){var o=this.region,h=o.page.texture,l=h?h.width:0,c=h?h.height:0;switch(o.degrees){case 90:r-=(o.originalHeight-o.offsetY-o.height)/l,i-=(o.originalWidth-o.offsetX-o.width)/c,a=o.originalHeight/l,s=o.originalWidth/c;for(var d=0;d<n;d+=2)e[d]=r+t[d+1]*a,e[d+1]=i+(1-t[d])*s;return;case 180:r-=(o.originalWidth-o.offsetX-o.width)/l,i-=o.offsetY/c,a=o.originalWidth/l,s=o.originalHeight/c;for(d=0;d<n;d+=2)e[d]=r+(1-t[d])*a,e[d+1]=i+(1-t[d+1])*s;return;case 270:r-=o.offsetY/l,i-=o.offsetX/c,a=o.originalHeight/l,s=o.originalWidth/c;for(d=0;d<n;d+=2)e[d]=r+(1-t[d+1])*a,e[d+1]=i+t[d]*s;return}r-=o.offsetX/l,i-=(o.originalHeight-o.offsetY-o.height)/c,a=o.originalWidth/l,s=o.originalHeight/c}else this.region?(a=this.region.u2-r,s=this.region.v2-i):(r=i=0,a=s=1);for(d=0;d<n;d+=2)e[d]=r+t[d]*a,e[d+1]=i+t[d+1]*s},e.prototype.getParentMesh=function(){return this.parentMesh},e.prototype.setParentMesh=function(t){this.parentMesh=t,t&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)},e.prototype.copy=function(){if(this.parentMesh)return this.newLinkedMesh();var t=new e(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),g.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),g.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),g.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,t.sequence=null!=this.sequence?this.sequence.copy():null,this.edges&&(t.edges=new Array(this.edges.length),g.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t},e.prototype.computeWorldVertices=function(e,n,r,i,a,s){null!=this.sequence&&this.sequence.apply(e,this),t.prototype.computeWorldVertices.call(this,e,n,r,i,a,s)},e.prototype.newLinkedMesh=function(){var t=new e(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),t.timelineAttachment=this.timelineAttachment,t.setParentMesh(this.parentMesh?this.parentMesh:this),null!=t.region&&t.updateRegion(),t},e}(x),T=function(t){function e(e){var n=t.call(this,e)||this;return n.lengths=[],n.closed=!1,n.constantSpeed=!1,n.color=new h(1,1,1,1),n}return r(e,t),e.prototype.copy=function(){var t=new e(this.name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),g.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t},e}(x),C=function(){function t(){}return t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var r=Math.random(),i=e-t;return r<=(n-t)/i?t+Math.sqrt(r*i*(n-t)):e-Math.sqrt((1-r)*i*(e-n))},t.isPowerOfTwo=function(t){return t&&0==(t&t-1)},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();!function(t){function e(e){return t.call(this,e)||this}r(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}}(function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return r(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}()));var E,F=function(t){function e(e){var n=t.call(this,e)||this;return n.x=0,n.y=0,n.rotation=0,n.color=new h(.38,.94,0,1),n}return r(e,t),e.prototype.computeWorldPosition=function(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e},e.prototype.computeWorldRotation=function(t){var e=C.cosDeg(this.rotation),n=C.sinDeg(this.rotation),r=e*t.a+n*t.b,i=e*t.c+n*t.d;return Math.atan2(i,r)*C.radDeg},e.prototype.copy=function(){var t=new e(this.name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},e}(x),Y=function(t){function e(e,n){var r=t.call(this,e)||this;return r.x=0,r.y=0,r.scaleX=1,r.scaleY=1,r.rotation=0,r.width=0,r.height=0,r.color=new h(1,1,1,1),r.rendererObject=null,r.region=null,r.sequence=null,r.offset=g.newFloatArray(8),r.uvs=g.newFloatArray(8),r.tempColor=new h(1,1,1,1),r.path=n,r}return r(e,t),e.prototype.updateRegion=function(){if(!this.region)throw new Error("Region not set.");var t=this.region,e=this.width/this.region.originalWidth*this.scaleX,n=this.height/this.region.originalHeight*this.scaleY,r=-this.width/2*this.scaleX+this.region.offsetX*e,i=-this.height/2*this.scaleY+this.region.offsetY*n,a=r+this.region.width*e,s=i+this.region.height*n,o=this.rotation*Math.PI/180,h=Math.cos(o),l=Math.sin(o),c=this.x,d=this.y,u=r*h+c,f=r*l,p=i*h+d,m=i*l,g=a*h+c,v=a*l,y=s*h+d,x=s*l,w=this.offset;w[0]=u-m,w[1]=p+f,w[2]=u-x,w[3]=y+f,w[4]=g-x,w[5]=y+v,w[6]=g-m,w[7]=p+v;var b=this.uvs;90==t.degrees?(b[2]=t.u,b[3]=t.v2,b[4]=t.u,b[5]=t.v,b[6]=t.u2,b[7]=t.v,b[0]=t.u2,b[1]=t.v2):(b[0]=t.u,b[1]=t.v2,b[2]=t.u,b[3]=t.v,b[4]=t.u2,b[5]=t.v,b[6]=t.u2,b[7]=t.v2)},e.prototype.computeWorldVertices=function(t,e,n,r){null!=this.sequence&&this.sequence.apply(t,this);var i=t.bone,a=this.offset,s=i.worldX,o=i.worldY,h=i.a,l=i.b,c=i.c,d=i.d,u=0,f=0;u=a[0],f=a[1],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o,n+=r,u=a[2],f=a[3],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o,n+=r,u=a[4],f=a[5],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o,n+=r,u=a[6],f=a[7],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o},e.prototype.copy=function(){var t=new e(this.name,this.path);return t.region=this.region,t.rendererObject=this.rendererObject,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,g.arrayCopy(this.uvs,0,t.uvs,0,8),g.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t.sequence=null!=this.sequence?this.sequence.copy():null,t},e.X1=0,e.Y1=1,e.C1R=2,e.C1G=3,e.C1B=4,e.C1A=5,e.U1=6,e.V1=7,e.X2=8,e.Y2=9,e.C2R=10,e.C2G=11,e.C2B=12,e.C2A=13,e.U2=14,e.V2=15,e.X3=16,e.Y3=17,e.C3R=18,e.C3G=19,e.C3B=20,e.C3A=21,e.U3=22,e.V3=23,e.X4=24,e.Y4=25,e.C4R=26,e.C4G=27,e.C4B=28,e.C4A=29,e.U4=30,e.V4=31,e}(y),X=function(){function t(e){this.id=t.nextID(),this.start=0,this.digits=0,this.setupIndex=0,this.regions=new Array(e)}return t.prototype.copy=function(){var e=new t(this.regions.length);return g.arrayCopy(this.regions,0,e.regions,0,this.regions.length),e.start=this.start,e.digits=this.digits,e.setupIndex=this.setupIndex,e},t.prototype.apply=function(t,e){var n=t.sequenceIndex;-1==n&&(n=this.setupIndex),n>=this.regions.length&&(n=this.regions.length-1);var r=this.regions[n];e.region!=r&&(e.region=r,e.updateRegion())},t.prototype.getPath=function(t,e){for(var n=t,r=(this.start+e).toString(),i=this.digits-r.length;i>0;i--)n+="0";return n+=r},t.nextID=function(){return t._nextID++},t._nextID=0,t}();!function(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"}(E||(E={}));var R,P,D=[E.hold,E.once,E.loop,E.pingpong,E.onceReverse,E.loopReverse,E.pingpongReverse],V=function(){function t(t,e,n){if(this.timelines=[],this.timelineIds=new m,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=n}return t.prototype.setTimelines=function(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e<t.length;e++)this.timelineIds.addAll(t[e].getPropertyIds())},t.prototype.hasTimeline=function(t){for(var e=0;e<t.length;e++)if(this.timelineIds.contains(t[e]))return!0;return!1},t.prototype.apply=function(t,e,n,r,i,a,s,o){if(!t)throw new Error("skeleton cannot be null.");r&&0!=this.duration&&(n%=this.duration,e>0&&(e%=this.duration));for(var h=this.timelines,l=0,c=h.length;l<c;l++)h[l].apply(t,e,n,i,a,s,o)},t}();t.MixBlend=void 0,(R=t.MixBlend||(t.MixBlend={}))[R.setup=0]="setup",R[R.first=1]="first",R[R.replace=2]="replace",R[R.add=3]="add",t.MixDirection=void 0,(P=t.MixDirection||(t.MixDirection={}))[P.mixIn=0]="mixIn",P[P.mixOut=1]="mixOut";var L,N=0,O=1,_=2,q=3,W=4,U=5,z=6,G=7,j=8,H=9,K=10,Z=11,Q=12,J=13,$=14,tt=15,et=16,nt=17,rt=18,it=19,at=function(){function t(t,e){this.propertyIds=e,this.frames=g.newFloatArray(t*this.getFrameEntries())}return t.prototype.getPropertyIds=function(){return this.propertyIds},t.prototype.getFrameEntries=function(){return 1},t.prototype.getFrameCount=function(){return this.frames.length/this.getFrameEntries()},t.prototype.getDuration=function(){return this.frames[this.frames.length-this.getFrameEntries()]},t.search1=function(t,e){for(var n=t.length,r=1;r<n;r++)if(t[r]>e)return r-1;return n-1},t.search=function(t,e,n){for(var r=t.length,i=n;i<r;i+=n)if(t[i]>e)return i-n;return r-n},t}(),st=function(t){function e(e,n,r){var i=t.call(this,e,r)||this;return i.curves=g.newFloatArray(e+18*n),i.curves[e-1]=1,i}return r(e,t),e.prototype.setLinear=function(t){this.curves[t]=0},e.prototype.setStepped=function(t){this.curves[t]=1},e.prototype.shrink=function(t){var e=this.getFrameCount()+18*t;if(this.curves.length>e){var n=g.newFloatArray(e);g.arrayCopy(this.curves,0,n,0,e),this.curves=n}},e.prototype.setBezier=function(t,e,n,r,i,a,s,o,h,l,c){var d=this.curves,u=this.getFrameCount()+18*t;0==n&&(d[e]=2+u);for(var f=.03*(r-2*a+o),p=.03*(i-2*s+h),m=.006*(3*(a-o)-r+l),g=.006*(3*(s-h)-i+c),v=2*f+m,y=2*p+g,x=.3*(a-r)+f+.16666667*m,w=.3*(s-i)+p+.16666667*g,b=r+x,M=i+w,k=u+18;u<k;u+=2)d[u]=b,d[u+1]=M,x+=v,w+=y,v+=m,y+=g,b+=x,M+=w},e.prototype.getBezierValue=function(t,e,n,r){var i=this.curves;if(i[r]>t){var a=this.frames[e],s=this.frames[e+n];return s+(t-a)/(i[r]-a)*(i[r+1]-s)}var o=r+18;for(r+=2;r<o;r+=2)if(i[r]>=t){var h=i[r-2],l=i[r-1];return l+(t-h)/(i[r]-h)*(i[r+1]-l)}e+=this.getFrameEntries();var c=i[o-2],d=i[o-1];return d+(t-c)/(this.frames[e]-c)*(this.frames[e+n]-d)},e}(at),ot=function(t){function e(e,n,r){return t.call(this,e,n,[r])||this}return r(e,t),e.prototype.getFrameEntries=function(){return 2},e.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+1]=n},e.prototype.getCurveValue=function(t){for(var e=this.frames,n=e.length-2,r=2;r<=n;r+=2)if(e[r]>t){n=r-2;break}var i=this.curves[n>>1];switch(i){case 0:var a=e[n],s=e[n+1];return s+(t-a)/(e[n+2]-a)*(e[n+2+1]-s);case 1:return e[n+1]}return this.getBezierValue(t,n,1,i-2)},e}(st),ht=function(t){function e(e,n,r,i){return t.call(this,e,n,[r,i])||this}return r(e,t),e.prototype.getFrameEntries=function(){return 3},e.prototype.setFrame=function(t,e,n,r){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r},e}(st),lt=function(e){function n(t,n,r){var i=e.call(this,t,n,N+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.rotation=h.data.rotation);case t.MixBlend.first:h.rotation+=(h.data.rotation-h.rotation)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.rotation=h.data.rotation+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:l+=h.data.rotation-h.rotation;case t.MixBlend.add:h.rotation+=l*a}}},n}(ot),ct=function(e){function n(t,n,r){var i=e.call(this,t,n,O+"|"+r,_+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.x=h.data.x,void(h.y=h.data.y);case t.MixBlend.first:h.x+=(h.data.x-h.x)*a,h.y+=(h.data.y-h.y)*a}else{var c=0,d=0,u=at.search(l,r,3),f=this.curves[u/3];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+3]-p);c+=(l[u+3+1]-c)*m,d+=(l[u+3+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}switch(s){case t.MixBlend.setup:h.x=h.data.x+c*a,h.y=h.data.y+d*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.x+=(h.data.x+c-h.x)*a,h.y+=(h.data.y+d-h.y)*a;break;case t.MixBlend.add:h.x+=c*a,h.y+=d*a}}}},n}(ht),dt=function(e){function n(t,n,r){var i=e.call(this,t,n,O+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.x=h.data.x);case t.MixBlend.first:h.x+=(h.data.x-h.x)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.x=h.data.x+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.x+=(h.data.x+l-h.x)*a;break;case t.MixBlend.add:h.x+=l*a}}},n}(ot),ut=function(e){function n(t,n,r){var i=e.call(this,t,n,_+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.y=h.data.y);case t.MixBlend.first:h.y+=(h.data.y-h.y)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.y=h.data.y+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.y+=(h.data.y+l-h.y)*a;break;case t.MixBlend.add:h.y+=l*a}}},n}(ot),ft=function(e){function n(t,n,r){var i=e.call(this,t,n,q+"|"+r,W+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case t.MixBlend.first:h.scaleX+=(h.data.scaleX-h.scaleX)*a,h.scaleY+=(h.data.scaleY-h.scaleY)*a}else{var c,d,u=at.search(l,r,3),f=this.curves[u/3];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+3]-p);c+=(l[u+3+1]-c)*m,d+=(l[u+3+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}if(c*=h.data.scaleX,d*=h.data.scaleY,1==a)s==t.MixBlend.add?(h.scaleX+=c-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=c,h.scaleY=d);else{var g=0,v=0;if(o==t.MixDirection.mixOut)switch(s){case t.MixBlend.setup:g=h.data.scaleX,v=h.data.scaleY,h.scaleX=g+(Math.abs(c)*C.signum(g)-g)*a,h.scaleY=v+(Math.abs(d)*C.signum(v)-v)*a;break;case t.MixBlend.first:case t.MixBlend.replace:g=h.scaleX,v=h.scaleY,h.scaleX=g+(Math.abs(c)*C.signum(g)-g)*a,h.scaleY=v+(Math.abs(d)*C.signum(v)-v)*a;break;case t.MixBlend.add:h.scaleX+=(c-h.data.scaleX)*a,h.scaleY+=(d-h.data.scaleY)*a}else switch(s){case t.MixBlend.setup:g=Math.abs(h.data.scaleX)*C.signum(c),v=Math.abs(h.data.scaleY)*C.signum(d),h.scaleX=g+(c-g)*a,h.scaleY=v+(d-v)*a;break;case t.MixBlend.first:case t.MixBlend.replace:g=Math.abs(h.scaleX)*C.signum(c),v=Math.abs(h.scaleY)*C.signum(d),h.scaleX=g+(c-g)*a,h.scaleY=v+(d-v)*a;break;case t.MixBlend.add:h.scaleX+=(c-h.data.scaleX)*a,h.scaleY+=(d-h.data.scaleY)*a}}}}},n}(ht),pt=function(e){function n(t,n,r){var i=e.call(this,t,n,q+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.scaleX=h.data.scaleX);case t.MixBlend.first:h.scaleX+=(h.data.scaleX-h.scaleX)*a}else{var l=this.getCurveValue(r)*h.data.scaleX;if(1==a)s==t.MixBlend.add?h.scaleX+=l-h.data.scaleX:h.scaleX=l;else{var c=0;if(o==t.MixDirection.mixOut)switch(s){case t.MixBlend.setup:c=h.data.scaleX,h.scaleX=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=h.scaleX,h.scaleX=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.add:h.scaleX+=(l-h.data.scaleX)*a}else switch(s){case t.MixBlend.setup:c=Math.abs(h.data.scaleX)*C.signum(l),h.scaleX=c+(l-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=Math.abs(h.scaleX)*C.signum(l),h.scaleX=c+(l-c)*a;break;case t.MixBlend.add:h.scaleX+=(l-h.data.scaleX)*a}}}},n}(ot),mt=function(e){function n(t,n,r){var i=e.call(this,t,n,W+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.scaleY=h.data.scaleY);case t.MixBlend.first:h.scaleY+=(h.data.scaleY-h.scaleY)*a}else{var l=this.getCurveValue(r)*h.data.scaleY;if(1==a)s==t.MixBlend.add?h.scaleY+=l-h.data.scaleY:h.scaleY=l;else{var c=0;if(o==t.MixDirection.mixOut)switch(s){case t.MixBlend.setup:c=h.data.scaleY,h.scaleY=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=h.scaleY,h.scaleY=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.add:h.scaleY+=(l-h.data.scaleY)*a}else switch(s){case t.MixBlend.setup:c=Math.abs(h.data.scaleY)*C.signum(l),h.scaleY=c+(l-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=Math.abs(h.scaleY)*C.signum(l),h.scaleY=c+(l-c)*a;break;case t.MixBlend.add:h.scaleY+=(l-h.data.scaleY)*a}}}},n}(ot),gt=function(e){function n(t,n,r){var i=e.call(this,t,n,U+"|"+r,z+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case t.MixBlend.first:h.shearX+=(h.data.shearX-h.shearX)*a,h.shearY+=(h.data.shearY-h.shearY)*a}else{var c=0,d=0,u=at.search(l,r,3),f=this.curves[u/3];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+3]-p);c+=(l[u+3+1]-c)*m,d+=(l[u+3+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}switch(s){case t.MixBlend.setup:h.shearX=h.data.shearX+c*a,h.shearY=h.data.shearY+d*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.shearX+=(h.data.shearX+c-h.shearX)*a,h.shearY+=(h.data.shearY+d-h.shearY)*a;break;case t.MixBlend.add:h.shearX+=c*a,h.shearY+=d*a}}}},n}(ht),vt=function(e){function n(t,n,r){var i=e.call(this,t,n,U+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.shearX=h.data.shearX);case t.MixBlend.first:h.shearX+=(h.data.shearX-h.shearX)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.shearX=h.data.shearX+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.shearX+=(h.data.shearX+l-h.shearX)*a;break;case t.MixBlend.add:h.shearX+=l*a}}},n}(ot),yt=function(e){function n(t,n,r){var i=e.call(this,t,n,z+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.shearY=h.data.shearY);case t.MixBlend.first:h.shearY+=(h.data.shearY-h.shearY)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.shearY=h.data.shearY+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.shearY+=(h.data.shearY+l-h.shearY)*a;break;case t.MixBlend.add:h.shearY+=l*a}}},n}(ot),xt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r,j+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 5},n.prototype.setFrame=function(t,e,n,r,i,a){t*=5,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color;if(r<l[0]){var d=h.data.color;switch(s){case t.MixBlend.setup:return void c.setFromColor(d);case t.MixBlend.first:c.add((d.r-c.r)*a,(d.g-c.g)*a,(d.b-c.b)*a,(d.a-c.a)*a)}}else{var u=0,f=0,p=0,m=0,g=at.search(l,r,5),v=this.curves[g/5];switch(v){case 0:var y=l[g];u=l[g+1],f=l[g+2],p=l[g+3],m=l[g+4];var x=(r-y)/(l[g+5]-y);u+=(l[g+5+1]-u)*x,f+=(l[g+5+2]-f)*x,p+=(l[g+5+3]-p)*x,m+=(l[g+5+4]-m)*x;break;case 1:u=l[g+1],f=l[g+2],p=l[g+3],m=l[g+4];break;default:u=this.getBezierValue(r,g,1,v-2),f=this.getBezierValue(r,g,2,v+18-2),p=this.getBezierValue(r,g,3,v+36-2),m=this.getBezierValue(r,g,4,v+54-2)}1==a?c.set(u,f,p,m):(s==t.MixBlend.setup&&c.setFromColor(h.data.color),c.add((u-c.r)*a,(f-c.g)*a,(p-c.b)*a,(m-c.a)*a))}}},n}(st),wt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 4},n.prototype.setFrame=function(t,e,n,r,i){t<<=2,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color;if(r<l[0]){var d=h.data.color;switch(s){case t.MixBlend.setup:return c.r=d.r,c.g=d.g,void(c.b=d.b);case t.MixBlend.first:c.r+=(d.r-c.r)*a,c.g+=(d.g-c.g)*a,c.b+=(d.b-c.b)*a}}else{var u=0,f=0,p=0,m=at.search(l,r,4),g=this.curves[m>>2];switch(g){case 0:var v=l[m];u=l[m+1],f=l[m+2],p=l[m+3];var y=(r-v)/(l[m+4]-v);u+=(l[m+4+1]-u)*y,f+=(l[m+4+2]-f)*y,p+=(l[m+4+3]-p)*y;break;case 1:u=l[m+1],f=l[m+2],p=l[m+3];break;default:u=this.getBezierValue(r,m,1,g-2),f=this.getBezierValue(r,m,2,g+18-2),p=this.getBezierValue(r,m,3,g+36-2)}if(1==a)c.r=u,c.g=f,c.b=p;else{if(s==t.MixBlend.setup){var x=h.data.color;c.r=x.r,c.g=x.g,c.b=x.b}c.r+=(u-c.r)*a,c.g+=(f-c.g)*a,c.b+=(p-c.b)*a}}}},n}(st),bt=function(e){function n(t,n,r){var i=e.call(this,t,n,j+"|"+r)||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=h.color;if(r<this.frames[0]){var c=h.data.color;switch(s){case t.MixBlend.setup:return void(l.a=c.a);case t.MixBlend.first:l.a+=(c.a-l.a)*a}}else{var d=this.getCurveValue(r);1==a?l.a=d:(s==t.MixBlend.setup&&(l.a=h.data.color.a),l.a+=(d-l.a)*a)}}},n}(ot),Mt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r,j+"|"+r,H+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 8},n.prototype.setFrame=function(t,e,n,r,i,a,s,o,h){t<<=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a,this.frames[t+5]=s,this.frames[t+6]=o,this.frames[t+7]=h},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color,d=h.darkColor;if(r<l[0]){var u=h.data.color,f=h.data.darkColor;switch(s){case t.MixBlend.setup:return c.setFromColor(u),d.r=f.r,d.g=f.g,void(d.b=f.b);case t.MixBlend.first:c.add((u.r-c.r)*a,(u.g-c.g)*a,(u.b-c.b)*a,(u.a-c.a)*a),d.r+=(f.r-d.r)*a,d.g+=(f.g-d.g)*a,d.b+=(f.b-d.b)*a}}else{var p=0,m=0,g=0,v=0,y=0,x=0,w=0,b=at.search(l,r,8),M=this.curves[b>>3];switch(M){case 0:var k=l[b];p=l[b+1],m=l[b+2],g=l[b+3],v=l[b+4],y=l[b+5],x=l[b+6],w=l[b+7];var S=(r-k)/(l[b+8]-k);p+=(l[b+8+1]-p)*S,m+=(l[b+8+2]-m)*S,g+=(l[b+8+3]-g)*S,v+=(l[b+8+4]-v)*S,y+=(l[b+8+5]-y)*S,x+=(l[b+8+6]-x)*S,w+=(l[b+8+7]-w)*S;break;case 1:p=l[b+1],m=l[b+2],g=l[b+3],v=l[b+4],y=l[b+5],x=l[b+6],w=l[b+7];break;default:p=this.getBezierValue(r,b,1,M-2),m=this.getBezierValue(r,b,2,M+18-2),g=this.getBezierValue(r,b,3,M+36-2),v=this.getBezierValue(r,b,4,M+54-2),y=this.getBezierValue(r,b,5,M+72-2),x=this.getBezierValue(r,b,6,M+90-2),w=this.getBezierValue(r,b,7,M+108-2)}if(1==a)c.set(p,m,g,v),d.r=y,d.g=x,d.b=w;else{if(s==t.MixBlend.setup){c.setFromColor(h.data.color);f=h.data.darkColor;d.r=f.r,d.g=f.g,d.b=f.b}c.add((p-c.r)*a,(m-c.g)*a,(g-c.b)*a,(v-c.a)*a),d.r+=(y-d.r)*a,d.g+=(x-d.g)*a,d.b+=(w-d.b)*a}}}},n}(st),kt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r,H+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 7},n.prototype.setFrame=function(t,e,n,r,i,a,s,o){t*=7,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a,this.frames[t+5]=s,this.frames[t+6]=o},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color,d=h.darkColor;if(r<l[0]){var u=h.data.color,f=h.data.darkColor;switch(s){case t.MixBlend.setup:return c.r=u.r,c.g=u.g,c.b=u.b,d.r=f.r,d.g=f.g,void(d.b=f.b);case t.MixBlend.first:c.r+=(u.r-c.r)*a,c.g+=(u.g-c.g)*a,c.b+=(u.b-c.b)*a,d.r+=(f.r-d.r)*a,d.g+=(f.g-d.g)*a,d.b+=(f.b-d.b)*a}}else{var p=0,m=0,g=0,v=0,y=0,x=0,w=at.search(l,r,7),b=this.curves[w/7];switch(b){case 0:var M=l[w];p=l[w+1],m=l[w+2],g=l[w+3],v=l[w+4],y=l[w+5],x=l[w+6];var k=(r-M)/(l[w+7]-M);p+=(l[w+7+1]-p)*k,m+=(l[w+7+2]-m)*k,g+=(l[w+7+3]-g)*k,v+=(l[w+7+4]-v)*k,y+=(l[w+7+5]-y)*k,x+=(l[w+7+6]-x)*k;break;case 1:p=l[w+1],m=l[w+2],g=l[w+3],v=l[w+4],y=l[w+5],x=l[w+6];break;default:p=this.getBezierValue(r,w,1,b-2),m=this.getBezierValue(r,w,2,b+18-2),g=this.getBezierValue(r,w,3,b+36-2),v=this.getBezierValue(r,w,4,b+54-2),y=this.getBezierValue(r,w,5,b+72-2),x=this.getBezierValue(r,w,6,b+90-2)}if(1==a)c.r=p,c.g=m,c.b=g,d.r=v,d.g=y,d.b=x;else{if(s==t.MixBlend.setup){u=h.data.color,f=h.data.darkColor;c.r=u.r,c.g=u.g,c.b=u.b,d.r=f.r,d.g=f.g,d.b=f.b}c.r+=(p-c.r)*a,c.g+=(m-c.g)*a,c.b+=(g-c.b)*a,d.r+=(v-d.r)*a,d.g+=(y-d.g)*a,d.b+=(x-d.b)*a}}}},n}(st),St=function(e){function n(t,n){var r=e.call(this,t,[K+"|"+n])||this;return r.slotIndex=0,r.slotIndex=n,r.attachmentNames=new Array(t),r}return r(n,e),n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];h.bone.active&&(o!=t.MixDirection.mixOut?r<this.frames[0]?s!=t.MixBlend.setup&&s!=t.MixBlend.first||this.setAttachment(e,h,h.data.attachmentName):this.setAttachment(e,h,this.attachmentNames[at.search1(this.frames,r)]):s==t.MixBlend.setup&&this.setAttachment(e,h,h.data.attachmentName))},n.prototype.setAttachment=function(t,e,n){e.setAttachment(n?t.getAttachment(this.slotIndex,n):null)},n}(at),At=function(e){function n(t,n,r,i){var a=e.call(this,t,n,[Z+"|"+r+"|"+i.id])||this;return a.slotIndex=0,a.slotIndex=r,a.attachment=i,a.vertices=new Array(t),a}return r(n,e),n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.vertices[t]=n},n.prototype.setBezier=function(t,e,n,r,i,a,s,o,h,l,c){var d=this.curves,u=this.getFrameCount()+18*t;0==n&&(d[e]=2+u);for(var f=.03*(r-2*a+o),p=.03*h-.06*s,m=.006*(3*(a-o)-r+l),g=.018*(s-h+.33333333),v=2*f+m,y=2*p+g,x=.3*(a-r)+f+.16666667*m,w=.3*s+p+.16666667*g,b=r+x,M=w,k=u+18;u<k;u+=2)d[u]=b,d[u+1]=M,x+=v,w+=y,v+=m,y+=g,b+=x,M+=w},n.prototype.getCurvePercent=function(t,e){var n=this.curves,r=n[e];switch(r){case 0:var i=this.frames[e];return(t-i)/(this.frames[e+this.getFrameEntries()]-i);case 1:return 0}if(n[r-=2]>t){var a=this.frames[e];return n[r+1]*(t-a)/(n[r]-a)}var s=r+18;for(r+=2;r<s;r+=2)if(n[r]>=t){var o=n[r-2],h=n[r-1];return h+(t-o)/(n[r]-o)*(n[r+1]-h)}var l=n[s-2],c=n[s-1];return c+(1-c)*(t-l)/(this.frames[e+this.getFrameEntries()]-l)},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=h.getAttachment();if(l&&l instanceof x&&l.timelineAttachment==this.attachment){var c=h.deform;0==c.length&&(s=t.MixBlend.setup);var d=this.vertices,u=d[0].length,f=this.frames;if(r<f[0])switch(s){case t.MixBlend.setup:return void(c.length=0);case t.MixBlend.first:if(1==a)return void(c.length=0);if(c.length=u,(I=l).bones){a=1-a;for(m=0;m<u;m++)c[m]*=a}else for(var p=I.vertices,m=0;m<u;m++)c[m]+=(p[m]-c[m])*a}else if(c.length=u,r>=f[f.length-1]){var v=d[f.length-1];if(1==a)if(s==t.MixBlend.add)if((I=l).bones)for(m=0;m<u;m++)c[m]+=v[m];else{p=I.vertices;for(var m=0;m<u;m++)c[m]+=v[m]-p[m]}else g.arrayCopy(v,0,c,0,u);else switch(s){case t.MixBlend.setup:if((I=l).bones)for(m=0;m<u;m++)c[m]=v[m]*a;else for(p=I.vertices,m=0;m<u;m++){var y=p[m];c[m]=y+(v[m]-y)*a}break;case t.MixBlend.first:case t.MixBlend.replace:for(m=0;m<u;m++)c[m]+=(v[m]-c[m])*a;break;case t.MixBlend.add:if((I=l).bones)for(m=0;m<u;m++)c[m]+=v[m]*a;else for(p=I.vertices,m=0;m<u;m++)c[m]+=(v[m]-p[m])*a}}else{var w=at.search1(f,r),b=this.getCurvePercent(r,w),M=d[w],k=d[w+1];if(1==a)if(s==t.MixBlend.add)if((I=l).bones)for(m=0;m<u;m++){S=M[m];c[m]+=S+(k[m]-S)*b}else for(p=I.vertices,m=0;m<u;m++){var S=M[m];c[m]+=S+(k[m]-S)*b-p[m]}else for(m=0;m<u;m++){S=M[m];c[m]=S+(k[m]-S)*b}else switch(s){case t.MixBlend.setup:if((I=l).bones)for(m=0;m<u;m++){S=M[m];c[m]=(S+(k[m]-S)*b)*a}else for(p=I.vertices,m=0;m<u;m++){var S=M[m],A=p[m];c[m]=A+(S+(k[m]-S)*b-A)*a}break;case t.MixBlend.first:case t.MixBlend.replace:for(m=0;m<u;m++){S=M[m];c[m]+=(S+(k[m]-S)*b-c[m])*a}break;case t.MixBlend.add:var I;if((I=l).bones)for(m=0;m<u;m++){S=M[m];c[m]+=(S+(k[m]-S)*b)*a}else for(p=I.vertices,m=0;m<u;m++){S=M[m];c[m]+=(S+(k[m]-S)*b-p[m])*a}}}}}},n}(st),It=function(t){function e(n){var r=t.call(this,n,e.propertyIds)||this;return r.events=new Array(n),r}return r(e,t),e.prototype.getFrameCount=function(){return this.frames.length},e.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},e.prototype.apply=function(t,e,n,r,i,a,s){if(r){var o=this.frames,h=this.frames.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,r,i,a,s),e=-1;else if(e>=o[h-1])return;if(!(n<o[0])){var l=0;if(e<o[0])l=0;else for(var c=o[l=at.search1(o,e)+1];l>0&&o[l-1]==c;)l--;for(;l<h&&n>=o[l];l++)r.push(this.events[l])}}},e.propertyIds=[""+Q],e}(at),Bt=function(e){function n(t){var r=e.call(this,t,n.propertyIds)||this;return r.drawOrders=new Array(t),r}return r(n,e),n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},n.prototype.apply=function(e,n,r,i,a,s,o){if(o!=t.MixDirection.mixOut)if(r<this.frames[0])s!=t.MixBlend.setup&&s!=t.MixBlend.first||g.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);else{var h=at.search1(this.frames,r),l=this.drawOrders[h];if(l)for(var c=e.drawOrder,d=e.slots,u=0,f=l.length;u<f;u++)c[u]=d[l[u]];else g.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length)}else s==t.MixBlend.setup&&g.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length)},n.propertyIds=[""+J],n}(at),Tt=function(e){function n(t,n,r){var i=e.call(this,t,n,[$+"|"+r])||this;return i.ikConstraintIndex=0,i.ikConstraintIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 6},n.prototype.setFrame=function(t,e,n,r,i,a,s){t*=6,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a?1:0,this.frames[t+5]=s?1:0},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.ikConstraints[this.ikConstraintIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.mix=h.data.mix,h.softness=h.data.softness,h.bendDirection=h.data.bendDirection,h.compress=h.data.compress,void(h.stretch=h.data.stretch);case t.MixBlend.first:h.mix+=(h.data.mix-h.mix)*a,h.softness+=(h.data.softness-h.softness)*a,h.bendDirection=h.data.bendDirection,h.compress=h.data.compress,h.stretch=h.data.stretch}else{var c=0,d=0,u=at.search(l,r,6),f=this.curves[u/6];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+6]-p);c+=(l[u+6+1]-c)*m,d+=(l[u+6+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}s==t.MixBlend.setup?(h.mix=h.data.mix+(c-h.data.mix)*a,h.softness=h.data.softness+(d-h.data.softness)*a,o==t.MixDirection.mixOut?(h.bendDirection=h.data.bendDirection,h.compress=h.data.compress,h.stretch=h.data.stretch):(h.bendDirection=l[u+3],h.compress=0!=l[u+4],h.stretch=0!=l[u+5])):(h.mix+=(c-h.mix)*a,h.softness+=(d-h.softness)*a,o==t.MixDirection.mixIn&&(h.bendDirection=l[u+3],h.compress=0!=l[u+4],h.stretch=0!=l[u+5]))}}},n}(st),Ct=function(e){function n(t,n,r){var i=e.call(this,t,n,[tt+"|"+r])||this;return i.transformConstraintIndex=0,i.transformConstraintIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 7},n.prototype.setFrame=function(t,e,n,r,i,a,s,o){var h=this.frames;h[t*=7]=e,h[t+1]=n,h[t+2]=r,h[t+3]=i,h[t+4]=a,h[t+5]=s,h[t+6]=o},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.transformConstraints[this.transformConstraintIndex];if(h.active){var l=this.frames;if(r<l[0]){var c=h.data;switch(s){case t.MixBlend.setup:return h.mixRotate=c.mixRotate,h.mixX=c.mixX,h.mixY=c.mixY,h.mixScaleX=c.mixScaleX,h.mixScaleY=c.mixScaleY,void(h.mixShearY=c.mixShearY);case t.MixBlend.first:h.mixRotate+=(c.mixRotate-h.mixRotate)*a,h.mixX+=(c.mixX-h.mixX)*a,h.mixY+=(c.mixY-h.mixY)*a,h.mixScaleX+=(c.mixScaleX-h.mixScaleX)*a,h.mixScaleY+=(c.mixScaleY-h.mixScaleY)*a,h.mixShearY+=(c.mixShearY-h.mixShearY)*a}}else{var d,u,f,p,m,g,v=at.search(l,r,7),y=this.curves[v/7];switch(y){case 0:var x=l[v];d=l[v+1],u=l[v+2],f=l[v+3],p=l[v+4],m=l[v+5],g=l[v+6];var w=(r-x)/(l[v+7]-x);d+=(l[v+7+1]-d)*w,u+=(l[v+7+2]-u)*w,f+=(l[v+7+3]-f)*w,p+=(l[v+7+4]-p)*w,m+=(l[v+7+5]-m)*w,g+=(l[v+7+6]-g)*w;break;case 1:d=l[v+1],u=l[v+2],f=l[v+3],p=l[v+4],m=l[v+5],g=l[v+6];break;default:d=this.getBezierValue(r,v,1,y-2),u=this.getBezierValue(r,v,2,y+18-2),f=this.getBezierValue(r,v,3,y+36-2),p=this.getBezierValue(r,v,4,y+54-2),m=this.getBezierValue(r,v,5,y+72-2),g=this.getBezierValue(r,v,6,y+90-2)}if(s==t.MixBlend.setup){c=h.data;h.mixRotate=c.mixRotate+(d-c.mixRotate)*a,h.mixX=c.mixX+(u-c.mixX)*a,h.mixY=c.mixY+(f-c.mixY)*a,h.mixScaleX=c.mixScaleX+(p-c.mixScaleX)*a,h.mixScaleY=c.mixScaleY+(m-c.mixScaleY)*a,h.mixShearY=c.mixShearY+(g-c.mixShearY)*a}else h.mixRotate+=(d-h.mixRotate)*a,h.mixX+=(u-h.mixX)*a,h.mixY+=(f-h.mixY)*a,h.mixScaleX+=(p-h.mixScaleX)*a,h.mixScaleY+=(m-h.mixScaleY)*a,h.mixShearY+=(g-h.mixShearY)*a}}},n}(st),Et=function(e){function n(t,n,r){var i=e.call(this,t,n,et+"|"+r)||this;return i.pathConstraintIndex=0,i.pathConstraintIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.pathConstraints[this.pathConstraintIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.position=h.data.position);case t.MixBlend.first:h.position+=(h.data.position-h.position)*a}else{var l=this.getCurveValue(r);s==t.MixBlend.setup?h.position=h.data.position+(l-h.data.position)*a:h.position+=(l-h.position)*a}},n}(ot),Ft=function(e){function n(t,n,r){var i=e.call(this,t,n,nt+"|"+r)||this;return i.pathConstraintIndex=0,i.pathConstraintIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.pathConstraints[this.pathConstraintIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.spacing=h.data.spacing);case t.MixBlend.first:h.spacing+=(h.data.spacing-h.spacing)*a}else{var l=this.getCurveValue(r);s==t.MixBlend.setup?h.spacing=h.data.spacing+(l-h.data.spacing)*a:h.spacing+=(l-h.spacing)*a}},n}(ot),Yt=function(e){function n(t,n,r){var i=e.call(this,t,n,[rt+"|"+r])||this;return i.pathConstraintIndex=0,i.pathConstraintIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 4},n.prototype.setFrame=function(t,e,n,r,i){var a=this.frames;a[t<<=2]=e,a[t+1]=n,a[t+2]=r,a[t+3]=i},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.pathConstraints[this.pathConstraintIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.mixRotate=h.data.mixRotate,h.mixX=h.data.mixX,void(h.mixY=h.data.mixY);case t.MixBlend.first:h.mixRotate+=(h.data.mixRotate-h.mixRotate)*a,h.mixX+=(h.data.mixX-h.mixX)*a,h.mixY+=(h.data.mixY-h.mixY)*a}else{var c,d,u,f=at.search(l,r,4),p=this.curves[f>>2];switch(p){case 0:var m=l[f];c=l[f+1],d=l[f+2],u=l[f+3];var g=(r-m)/(l[f+4]-m);c+=(l[f+4+1]-c)*g,d+=(l[f+4+2]-d)*g,u+=(l[f+4+3]-u)*g;break;case 1:c=l[f+1],d=l[f+2],u=l[f+3];break;default:c=this.getBezierValue(r,f,1,p-2),d=this.getBezierValue(r,f,2,p+18-2),u=this.getBezierValue(r,f,3,p+36-2)}if(s==t.MixBlend.setup){var v=h.data;h.mixRotate=v.mixRotate+(c-v.mixRotate)*a,h.mixX=v.mixX+(d-v.mixX)*a,h.mixY=v.mixY+(u-v.mixY)*a}else h.mixRotate+=(c-h.mixRotate)*a,h.mixX+=(d-h.mixX)*a,h.mixY+=(u-h.mixY)*a}}},n}(st),Xt=function(e){function n(t,n,r){var i=e.call(this,t,[it+"|"+n+"|"+r.sequence.id])||this;return i.slotIndex=n,i.attachment=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return n.ENTRIES},n.prototype.getSlotIndex=function(){return this.slotIndex},n.prototype.getAttachment=function(){return this.attachment},n.prototype.setFrame=function(t,e,r,i,a){var s=this.frames;s[t*=n.ENTRIES]=e,s[t+n.MODE]=r|i<<4,s[t+n.DELAY]=a},n.prototype.apply=function(e,r,i,a,s,o,h){var l=e.slots[this.slotIndex];if(l.bone.active){var c=l.attachment,d=this.attachment;if(c==d||c instanceof x&&c.timelineAttachment==d){var u=this.frames;if(i<u[0])o!=t.MixBlend.setup&&o!=t.MixBlend.first||(l.sequenceIndex=-1);else{var f=at.search(u,i,n.ENTRIES),p=u[f],m=u[f+n.MODE],g=u[f+n.DELAY];if(this.attachment.sequence){var v=m>>4,y=this.attachment.sequence.regions.length,w=D[15&m];if(w!=E.hold)switch(v+=(i-p)/g+1e-5|0,w){case E.once:v=Math.min(y-1,v);break;case E.loop:v%=y;break;case E.pingpong:(v=0==(b=(y<<1)-2)?0:v%b)>=y&&(v=b-v);break;case E.onceReverse:v=Math.max(y-1-v,0);break;case E.loopReverse:v=y-1-v%y;break;case E.pingpongReverse:var b;(v=0==(b=(y<<1)-2)?0:(v+y-1)%b)>=y&&(v=b-v)}l.sequenceIndex=v}}}}},n.ENTRIES=3,n.MODE=1,n.DELAY=2,n}(at),Rt=function(){function e(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Dt(this),this.propertyIDs=new m,this.animationsChanged=!1,this.trackEntryPool=new v((function(){return new Pt})),this.data=t}return e.emptyAnimation=function(){return e._emptyAnimation},e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n<r;n++){var i=e[n];if(i){i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast;var a=t*i.timeScale;if(i.delay>0){if(i.delay-=a,i.delay>0)continue;a=-i.delay,i.delay=0}var s=i.next;if(s){var o=i.trackLast-s.delay;if(o>=0){for(s.delay=0,s.trackTime+=0==i.timeScale?0:(o/i.timeScale+t)*s.timeScale,i.trackTime+=a,this.setCurrent(n,s,!0);s.mixingFrom;)s.mixTime+=t,s=s.mixingFrom;continue}}else if(i.trackLast>=i.trackEnd&&!i.mixingFrom){e[n]=null,this.queue.end(i),this.clearNext(i);continue}if(i.mixingFrom&&this.updateMixingFrom(i,t)){var h=i.mixingFrom;for(i.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}i.trackTime+=a}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(!n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=this.events,r=this.tracks,i=!1,a=0,s=r.length;a<s;a++){var o=r[a];if(o&&!(o.delay>0)){i=!0;var h=0==a?t.MixBlend.first:o.mixBlend,l=o.alpha;o.mixingFrom?l*=this.applyMixingFrom(o,e,h):o.trackTime>=o.trackEnd&&!o.next&&(l=0);var c=o.animationLast,d=o.getAnimationTime(),u=d,f=n;o.reverse&&(u=o.animation.duration-u,f=null);var p=o.animation.timelines,m=p.length;if(0==a&&1==l||h==t.MixBlend.add)for(var v=0;v<m;v++){g.webkit602BugfixHelper(l,h),(b=p[v])instanceof St?this.applyAttachmentTimeline(b,e,u,h,!0):b.apply(e,c,u,f,l,h,t.MixDirection.mixIn)}else{var y=o.timelineMode,x=o.shortestRotation,w=!x&&o.timelinesRotation.length!=m<<1;w&&(o.timelinesRotation.length=m<<1);for(v=0;v<m;v++){var b=p[v],M=y[v]==Nt?h:t.MixBlend.setup;!x&&b instanceof lt?this.applyRotateTimeline(b,e,u,l,M,o.timelinesRotation,v<<1,w):b instanceof St?this.applyAttachmentTimeline(b,e,u,h,!0):(g.webkit602BugfixHelper(l,h),b.apply(e,c,u,f,l,M,t.MixDirection.mixIn))}}this.queueEvents(o,d),n.length=0,o.nextAnimationLast=d,o.nextTrackLast=o.trackTime}}var k=this.unkeyedState+Ut,S=e.slots;for(a=0,s=e.slots.length;a<s;a++){var A=S[a];if(A.attachmentState==k){var I=A.data.attachmentName;A.setAttachment(I?e.getAttachment(A.data.index,I):null)}}return this.unkeyedState+=2,this.queue.drain(),i},e.prototype.applyMixingFrom=function(e,n,r){var i=e.mixingFrom;i.mixingFrom&&this.applyMixingFrom(i,n,r);var a=0;0==e.mixDuration?(a=1,r==t.MixBlend.first&&(r=t.MixBlend.setup)):((a=e.mixTime/e.mixDuration)>1&&(a=1),r!=t.MixBlend.first&&(r=i.mixBlend));var s=a<i.attachmentThreshold,o=a<i.drawOrderThreshold,h=i.animation.timelines,l=h.length,c=i.alpha*e.interruptAlpha,d=c*(1-a),u=i.animationLast,f=i.getAnimationTime(),p=f,m=null;if(i.reverse?p=i.animation.duration-p:a<i.eventThreshold&&(m=this.events),r==t.MixBlend.add)for(var v=0;v<l;v++)h[v].apply(n,u,p,m,d,r,t.MixDirection.mixOut);else{var y=i.timelineMode,x=i.timelineHoldMix,w=i.shortestRotation,b=!w&&i.timelinesRotation.length!=l<<1;b&&(i.timelinesRotation.length=l<<1),i.totalAlpha=0;for(v=0;v<l;v++){var M=h[v],k=t.MixDirection.mixOut,S=void 0,A=0;switch(y[v]){case Nt:if(!o&&M instanceof Bt)continue;S=r,A=d;break;case Ot:S=t.MixBlend.setup,A=d;break;case _t:S=r,A=c;break;case qt:S=t.MixBlend.setup,A=c;break;default:S=t.MixBlend.setup;var I=x[v];A=c*Math.max(0,1-I.mixTime/I.mixDuration)}i.totalAlpha+=A,!w&&M instanceof lt?this.applyRotateTimeline(M,n,p,A,S,i.timelinesRotation,v<<1,b):M instanceof St?this.applyAttachmentTimeline(M,n,p,S,s):(g.webkit602BugfixHelper(A,r),o&&M instanceof Bt&&S==t.MixBlend.setup&&(k=t.MixDirection.mixIn),M.apply(n,u,p,m,A,S,k))}}return e.mixDuration>0&&this.queueEvents(i,f),this.events.length=0,i.nextAnimationLast=f,i.nextTrackLast=i.trackTime,a},e.prototype.applyAttachmentTimeline=function(e,n,r,i,a){var s=n.slots[e.slotIndex];s.bone.active&&(r<e.frames[0]?i!=t.MixBlend.setup&&i!=t.MixBlend.first||this.setAttachment(n,s,s.data.attachmentName,a):this.setAttachment(n,s,e.attachmentNames[at.search1(e.frames,r)],a),s.attachmentState<=this.unkeyedState&&(s.attachmentState=this.unkeyedState+Ut))},e.prototype.setAttachment=function(t,e,n,r){e.setAttachment(n?t.getAttachment(e.data.index,n):null),r&&(e.attachmentState=this.unkeyedState+zt)},e.prototype.applyRotateTimeline=function(e,n,r,i,a,s,o,h){if(h&&(s[o]=0),1!=i){var l=n.bones[e.boneIndex];if(l.active){var c=0,d=0;if(r<e.frames[0])switch(a){case t.MixBlend.setup:l.rotation=l.data.rotation;default:return;case t.MixBlend.first:c=l.rotation,d=l.data.rotation}else c=a==t.MixBlend.setup?l.data.rotation:l.rotation,d=l.data.rotation+e.getCurveValue(r);var u=0,f=d-c;if(0==(f-=360*(16384-(16384.499999999996-f/360|0))))u=s[o];else{var p=0,m=0;h?(p=0,m=f):(p=s[o],m=s[o+1]);var g=f>0,v=p>=0;C.signum(m)!=C.signum(f)&&Math.abs(m)<=90&&(Math.abs(p)>180&&(p+=360*C.signum(p)),v=g),u=f+p-p%360,v!=g&&(u+=360*C.signum(p)),s[o]=u}s[o+1]=f,l.rotation=c+u*i}}else e.apply(n,0,r,null,1,a,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,i=r-n,a=t.trackLast%i,s=this.events,o=0,h=s.length;o<h;o++){var l=s[o];if(l.time<a)break;l.time>r||this.queue.event(t,l)}for((t.loop?0==i||a>t.trackTime%i:e>=r&&t.animationLast<r)&&this.queue.complete(t);o<h;o++){var c=s[o];c.time<n||this.queue.event(t,c)}},e.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,n=this.tracks.length;e<n;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},e.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];if(e){this.queue.end(e),this.clearNext(e);for(var n=e;;){var r=n.mixingFrom;if(!r)break;this.queue.end(r),n.mixingFrom=null,n.mixingTo=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,r.mixingTo=e,e.mixTime=0,r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){void 0===n&&(n=!1);var r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(void 0===n&&(n=!1),!e)throw new Error("animation cannot be null.");var r=!0,i=this.expandToIndex(t);i&&(-1==i.nextTrackLast?(this.tracks[t]=i.mixingFrom,this.queue.interrupt(i),this.queue.end(i),this.clearNext(i),i=i.mixingFrom,r=!1):this.clearNext(i));var a=this.trackEntry(t,e,n,i);return this.setCurrent(t,a,r),this.queue.drain(),a},e.prototype.addAnimation=function(t,e,n,r){void 0===n&&(n=!1),void 0===r&&(r=0);var i=this.data.skeletonData.findAnimation(e);if(!i)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,i,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=0),!e)throw new Error("animation cannot be null.");var i=this.expandToIndex(t);if(i)for(;i.next;)i=i.next;var a=this.trackEntry(t,e,n,i);return i?(i.next=a,a.previous=i,r<=0&&(r+=i.getTrackComplete()-a.mixDuration)):(this.setCurrent(t,a,!0),this.queue.drain()),a.delay=r,a},e.prototype.setEmptyAnimation=function(t,n){void 0===n&&(n=0);var r=this.setAnimationWith(t,e.emptyAnimation(),!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=this.addAnimationWith(t,e.emptyAnimation(),!1,r);return r<=0&&(i.delay+=i.mixDuration-n),i.mixDuration=n,i.trackEnd=n,i},e.prototype.setEmptyAnimations=function(t){void 0===t&&(t=0);var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n<r;n++){var i=this.tracks[n];i&&this.setEmptyAnimation(i.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},e.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(g.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},e.prototype.trackEntry=function(e,n,r,i){var a=this.trackEntryPool.obtain();return a.reset(),a.trackIndex=e,a.animation=n,a.loop=r,a.holdPrevious=!1,a.reverse=!1,a.shortestRotation=!1,a.eventThreshold=0,a.attachmentThreshold=0,a.drawOrderThreshold=0,a.animationStart=0,a.animationEnd=n.duration,a.animationLast=-1,a.nextAnimationLast=-1,a.delay=0,a.trackTime=0,a.trackLast=-1,a.nextTrackLast=-1,a.trackEnd=Number.MAX_VALUE,a.timeScale=1,a.alpha=1,a.mixTime=0,a.mixDuration=i?this.data.getMix(i.animation,n):0,a.interruptAlpha=1,a.totalAlpha=0,a.mixBlend=t.MixBlend.replace,a},e.prototype.clearNext=function(t){for(var e=t.next;e;)this.queue.dispose(e),e=e.next;t.next=null},e.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var e=this.tracks,n=0,r=e.length;n<r;n++){var i=e[n];if(i){for(;i.mixingFrom;)i=i.mixingFrom;do{i.mixingTo&&i.mixBlend==t.MixBlend.add||this.computeHold(i),i=i.mixingTo}while(i)}}},e.prototype.computeHold=function(t){var e=t.mixingTo,n=t.animation.timelines,r=t.animation.timelines.length,i=t.timelineMode;i.length=r;var a=t.timelineHoldMix;a.length=0;var s=this.propertyIDs;if(e&&e.holdPrevious)for(var o=0;o<r;o++)i[o]=s.addAll(n[o].getPropertyIds())?qt:_t;else t:for(o=0;o<r;o++){var h=n[o],l=h.getPropertyIds();if(s.addAll(l))if(!e||h instanceof St||h instanceof Bt||h instanceof It||!e.animation.hasTimeline(l))i[o]=Ot;else{for(var c=e.mixingTo;c;c=c.mixingTo)if(!c.animation.hasTimeline(l)){if(t.mixDuration>0){i[o]=Wt,a[o]=c;continue t}break}i[o]=qt}else i[o]=Nt}},e.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e._emptyAnimation=new V("<empty>",[],0),e}(),Pt=function(){function e(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e.prototype.getTrackComplete=function(){var t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime<t)return t}return this.trackTime},e}(),Dt=function(){function e(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return e.prototype.start=function(e){this.objects.push(t.EventType.start),this.objects.push(e),this.animState.animationsChanged=!0},e.prototype.interrupt=function(e){this.objects.push(t.EventType.interrupt),this.objects.push(e)},e.prototype.end=function(e){this.objects.push(t.EventType.end),this.objects.push(e),this.animState.animationsChanged=!0},e.prototype.dispose=function(e){this.objects.push(t.EventType.dispose),this.objects.push(e)},e.prototype.complete=function(e){this.objects.push(t.EventType.complete),this.objects.push(e)},e.prototype.event=function(e,n){this.objects.push(t.EventType.event),this.objects.push(e),this.objects.push(n)},e.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,n=this.animState.listeners,r=0;r<e.length;r+=2){var i=e[r],a=e[r+1];switch(i){case t.EventType.start:a.listener&&a.listener.start&&a.listener.start(a);for(var s=0;s<n.length;s++){(h=n[s]).start&&h.start(a)}break;case t.EventType.interrupt:a.listener&&a.listener.interrupt&&a.listener.interrupt(a);for(s=0;s<n.length;s++){(h=n[s]).interrupt&&h.interrupt(a)}break;case t.EventType.end:a.listener&&a.listener.end&&a.listener.end(a);for(s=0;s<n.length;s++){(h=n[s]).end&&h.end(a)}case t.EventType.dispose:a.listener&&a.listener.dispose&&a.listener.dispose(a);for(s=0;s<n.length;s++){(h=n[s]).dispose&&h.dispose(a)}this.animState.trackEntryPool.free(a);break;case t.EventType.complete:a.listener&&a.listener.complete&&a.listener.complete(a);for(s=0;s<n.length;s++){(h=n[s]).complete&&h.complete(a)}break;case t.EventType.event:var o=e[2+r++];a.listener&&a.listener.event&&a.listener.event(a,o);for(s=0;s<n.length;s++){var h;(h=n[s]).event&&h.event(a,o)}}}this.clear(),this.drainDisabled=!1}},e.prototype.clear=function(){this.objects.length=0},e}();t.EventType=void 0,(L=t.EventType||(t.EventType={}))[L.start=0]="start",L[L.interrupt=1]="interrupt",L[L.end=2]="end",L[L.dispose=3]="dispose",L[L.complete=4]="complete",L[L.event=5]="event";var Vt,Lt=function(){function t(){}return t.prototype.start=function(t){},t.prototype.interrupt=function(t){},t.prototype.end=function(t){},t.prototype.dispose=function(t){},t.prototype.complete=function(t){},t.prototype.event=function(t,e){},t}(),Nt=0,Ot=1,_t=2,qt=3,Wt=4,Ut=1,zt=2,Gt=function(){function t(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}return t.prototype.setMix=function(t,e,n){var r=this.skeletonData.findAnimation(t);if(!r)throw new Error("Animation not found: "+t);var i=this.skeletonData.findAnimation(e);if(!i)throw new Error("Animation not found: "+e);this.setMixWith(r,i,n)},t.prototype.setMixWith=function(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");var r=t.name+"."+e.name;this.animationToMixTime[r]=n},t.prototype.getMix=function(t,e){var n=t.name+"."+e.name,r=this.animationToMixTime[n];return void 0===r?this.defaultMix:r},t}(),jt=function(){function t(t){this.atlas=t}return t.prototype.loadSequence=function(t,e,n){for(var r=n.regions,i=0,a=r.length;i<a;i++){var s=n.getPath(e,i),o=this.atlas.findRegion(s);if(null==o)throw new Error("Region not found in atlas: "+s+" (sequence: "+t+")");r[i]=o,r[i].renderObject=r[i]}},t.prototype.newRegionAttachment=function(t,e,n,r){var i=new Y(e,n);if(null!=r)this.loadSequence(e,n,r);else{var a=this.atlas.findRegion(n);if(!a)throw new Error("Region not found in atlas: "+n+" (region attachment: "+e+")");a.renderObject=a,i.region=a}return i},t.prototype.newMeshAttachment=function(t,e,n,r){var i=new B(e,n);if(null!=r)this.loadSequence(e,n,r);else{var a=this.atlas.findRegion(n);if(!a)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+e+")");a.renderObject=a,i.region=a}return i},t.prototype.newBoundingBoxAttachment=function(t,e){return new w(e)},t.prototype.newPathAttachment=function(t,e){return new T(e)},t.prototype.newPointAttachment=function(t,e){return new F(e)},t.prototype.newClippingAttachment=function(t,e){return new b(e)},t}(),Ht=function(e,n,r){if(this.index=0,this.parent=null,this.length=0,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=t.TransformMode.Normal,this.skinRequired=!1,this.color=new h,e<0)throw new Error("index must be >= 0.");if(!n)throw new Error("name cannot be null.");this.index=e,this.name=n,this.parent=r};t.TransformMode=void 0,(Vt=t.TransformMode||(t.TransformMode={}))[Vt.Normal=0]="Normal",Vt[Vt.OnlyTranslation=1]="OnlyTranslation",Vt[Vt.NoRotationOrReflection=2]="NoRotationOrReflection",Vt[Vt.NoScale=3]="NoScale",Vt[Vt.NoScaleOrReflection=4]="NoScaleOrReflection";var Kt,Zt,Qt,Jt=function(){function e(t,e,n){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,r,i,a,s,o){this.ax=e,this.ay=n,this.arotation=r,this.ascaleX=i,this.ascaleY=a,this.ashearX=s,this.ashearY=o;var h=this.parent;if(!h){var l=this.skeleton,c=r+90+o,d=l.scaleX,u=l.scaleY;return this.a=C.cosDeg(r+s)*i*d,this.b=C.cosDeg(c)*a*d,this.c=C.sinDeg(r+s)*i*u,this.d=C.sinDeg(c)*a*u,this.worldX=e*d+l.x,void(this.worldY=n*u+l.y)}var f=h.a,p=h.b,m=h.c,g=h.d;switch(this.worldX=f*e+p*n+h.worldX,this.worldY=m*e+g*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:c=r+90+o;var v=C.cosDeg(r+s)*i,y=C.cosDeg(c)*a,x=C.sinDeg(r+s)*i,w=C.sinDeg(c)*a;return this.a=f*v+p*x,this.b=f*y+p*w,this.c=m*v+g*x,void(this.d=m*y+g*w);case t.TransformMode.OnlyTranslation:c=r+90+o;this.a=C.cosDeg(r+s)*i,this.b=C.cosDeg(c)*a,this.c=C.sinDeg(r+s)*i,this.d=C.sinDeg(c)*a;break;case t.TransformMode.NoRotationOrReflection:var b=0;(S=f*f+m*m)>1e-4?(S=Math.abs(f*g-p*m)/S,f/=this.skeleton.scaleX,p=(m/=this.skeleton.scaleY)*S,g=f*S,b=Math.atan2(m,f)*C.radDeg):(f=0,m=0,b=90-Math.atan2(g,p)*C.radDeg);var M=r+s-b,k=r+o-b+90;v=C.cosDeg(M)*i,y=C.cosDeg(k)*a,x=C.sinDeg(M)*i,w=C.sinDeg(k)*a;this.a=f*v-p*x,this.b=f*y-p*w,this.c=m*v+g*x,this.d=m*y+g*w;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var S,A=C.cosDeg(r),I=C.sinDeg(r),B=(f*A+p*I)/this.skeleton.scaleX,T=(m*A+g*I)/this.skeleton.scaleY;(S=Math.sqrt(B*B+T*T))>1e-5&&(S=1/S),B*=S,T*=S,S=Math.sqrt(B*B+T*T),this.data.transformMode==t.TransformMode.NoScale&&f*g-p*m<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(S=-S);var E=Math.PI/2+Math.atan2(T,B),F=Math.cos(E)*S,Y=Math.sin(E)*S;v=C.cosDeg(s)*i,y=C.cosDeg(90+o)*a,x=C.sinDeg(s)*i,w=C.sinDeg(90+o)*a;this.a=B*v+F*x,this.b=B*y+F*w,this.c=T*v+Y*x,this.d=T*y+Y*w}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*C.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*C.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){var t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*C.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*C.radDeg);var e=t.a,n=t.b,r=t.c,i=t.d,a=1/(e*i-n*r),s=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=s*i*a-o*n*a,this.ay=o*e*a-s*r*a;var h=a*i,l=a*e,c=a*n,d=a*r,u=h*this.a-c*this.c,f=h*this.b-c*this.d,p=l*this.c-d*this.a,m=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(u*u+p*p),this.ascaleX>1e-4){var g=u*m-f*p;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(u*f+p*m,g)*C.radDeg,this.arotation=Math.atan2(p,u)*C.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(f*f+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,f)*C.radDeg},e.prototype.worldToLocal=function(t){var e=1/(this.a*this.d-this.b*this.c),n=t.x-this.worldX,r=t.y-this.worldY;return t.x=n*this.d*e-r*this.b*e,t.y=r*this.a*e-n*this.c*e,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(t){var e=C.sinDeg(t),n=C.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*C.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=C.sinDeg(t),n=C.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*C.radDeg},e.prototype.rotateWorld=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,a=C.cosDeg(t),s=C.sinDeg(t);this.a=a*e-s*r,this.b=a*n-s*i,this.c=s*e+a*r,this.d=s*n+a*i},e}(),$t=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n},te=function(t,e){if(this.intValue=0,this.floatValue=0,this.stringValue=null,this.time=0,this.volume=0,this.balance=0,!e)throw new Error("data cannot be null.");this.time=t,this.data=e},ee=function(t){this.intValue=0,this.floatValue=0,this.stringValue=null,this.audioPath=null,this.volume=0,this.balance=0,this.name=t},ne=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n<t.bones.length;n++){var r=e.findBone(t.bones[n].name);if(!r)throw new Error("Couldn't find bone ".concat(t.bones[n].name));this.bones.push(r)}var i=e.findBone(t.target.name);if(!i)throw new Error("Couldn't find bone ".concat(t.target.name));this.target=i}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){if(0!=this.mix){var t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.data.uniform,this.softness,this.mix)}}},e.prototype.apply1=function(e,n,r,i,a,s,o){var h=e.parent;if(!h)throw new Error("IK bone must have parent.");var l=h.a,c=h.c,d=h.b,u=h.d,f=-e.ashearX-e.arotation,p=0,m=0;switch(e.data.transformMode){case t.TransformMode.OnlyTranslation:p=n-e.worldX,m=r-e.worldY;break;case t.TransformMode.NoRotationOrReflection:var g=Math.abs(l*u-d*c)/(l*l+c*c),v=l/e.skeleton.scaleX,y=c/e.skeleton.scaleY;d=-y*g*e.skeleton.scaleX,u=v*g*e.skeleton.scaleY,f+=Math.atan2(y,v)*C.radDeg;default:var x=n-h.worldX,w=r-h.worldY,b=l*u-d*c;p=(x*u-w*d)/b-e.ax,m=(w*l-x*c)/b-e.ay}f+=Math.atan2(m,p)*C.radDeg,e.ascaleX<0&&(f+=180),f>180?f-=360:f<-180&&(f+=360);var M=e.ascaleX,k=e.ascaleY;if(i||a){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=n-e.worldX,m=r-e.worldY}var S=e.data.length*M,A=Math.sqrt(p*p+m*m);if(i&&A<S||a&&A>S&&S>1e-4)M*=g=(A/S-1)*o+1,s&&(k*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+f*o,M,k,e.ashearX,e.ashearY)},e.prototype.apply2=function(t,e,n,r,i,a,s,o,h){var l=t.ax,c=t.ay,d=t.ascaleX,u=t.ascaleY,f=d,p=u,m=e.ascaleX,g=0,v=0,y=0;d<0?(d=-d,g=180,y=-1):(g=0,y=1),u<0&&(u=-u,y=-y),m<0?(m=-m,v=180):v=0;var x=e.ax,w=0,b=0,M=0,k=t.a,S=t.b,A=t.c,I=t.d,B=Math.abs(d-u)<=1e-4;!B||a?(w=0,b=k*x+t.worldX,M=A*x+t.worldY):(b=k*x+S*(w=e.ay)+t.worldX,M=A*x+I*w+t.worldY);var T=t.parent;if(!T)throw new Error("IK parent must itself have a parent.");k=T.a,S=T.b,A=T.c;var E,F,Y=1/(k*(I=T.d)-S*A),X=b-T.worldX,R=M-T.worldY,P=(X*I-R*S)*Y-l,D=(R*k-X*A)*Y-c,V=Math.sqrt(P*P+D*D),L=e.data.length*m;if(V<1e-4)return this.apply1(t,n,r,!1,a,!1,h),void e.updateWorldTransformWith(x,w,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var N=((X=n-T.worldX)*I-(R=r-T.worldY)*S)*Y-l,O=(R*k-X*A)*Y-c,_=N*N+O*O;if(0!=o){o*=d*(m+1)*.5;var q=Math.sqrt(_),W=q-V-L*d+o;if(W>0){var U=Math.min(1,W/(2*o))-1;_=(N-=(U=(W-o*(1-U*U))/q)*N)*N+(O-=U*O)*O}}t:if(B){var z=(_-V*V-(L*=d)*L)/(2*V*L);z<-1?(z=-1,F=Math.PI*i):z>1?(z=1,F=0,a&&(f*=k=(Math.sqrt(_)/(V+L)-1)*h+1,s&&(p*=k))):F=Math.acos(z)*i,k=V+L*z,S=L*Math.sin(F),E=Math.atan2(O*k-N*S,N*k+O*S)}else{var G=(k=d*L)*k,j=(S=u*L)*S,H=Math.atan2(O,N),K=-2*j*V,Z=j-G;if((I=K*K-4*Z*(A=j*V*V+G*_-G*j))>=0){var Q=Math.sqrt(I);K<0&&(Q=-Q);var J=(Q=.5*-(K+Q))/Z,$=A/Q,tt=Math.abs(J)<Math.abs($)?J:$;if(tt*tt<=_){R=Math.sqrt(_-tt*tt)*i,E=H-Math.atan2(R,tt),F=Math.atan2(R/u,(tt-V)/d);break t}}var et=C.PI,nt=V-k,rt=nt*nt,it=0,at=0,st=V+k,ot=st*st,ht=0;(A=-k*V/(G-j))>=-1&&A<=1&&(A=Math.acos(A),(I=(X=k*Math.cos(A)+V)*X+(R=S*Math.sin(A))*R)<rt&&(et=A,rt=I,nt=X,it=R),I>ot&&(at=A,ot=I,st=X,ht=R)),_<=.5*(rt+ot)?(E=H-Math.atan2(it*i,nt),F=et*i):(E=H-Math.atan2(ht*i,st),F=at*i)}var lt=Math.atan2(w,x)*y,ct=t.arotation;(E=(E-lt)*C.radDeg+g-ct)>180?E-=360:E<-180&&(E+=360),t.updateWorldTransformWith(l,c,ct+E*h,f,p,0,0),ct=e.arotation,(F=((F+lt)*C.radDeg-e.ashearX)*y+v-ct)>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(x,w,ct+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)},e}(),re=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n._target=null,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return r(e,t),Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t},enumerable:!1,configurable:!0}),e}($t),ie=function(e){function n(n){var r=e.call(this,n,0,!1)||this;return r.bones=new Array,r._target=null,r.positionMode=t.PositionMode.Fixed,r.spacingMode=t.SpacingMode.Fixed,r.rotateMode=t.RotateMode.Chain,r.offsetRotation=0,r.position=0,r.spacing=0,r.mixRotate=0,r.mixX=0,r.mixY=0,r}return r(n,e),Object.defineProperty(n.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("SlotData not set.")},set:function(t){this._target=t},enumerable:!1,configurable:!0}),n}($t);t.PositionMode=void 0,(Kt=t.PositionMode||(t.PositionMode={}))[Kt.Fixed=0]="Fixed",Kt[Kt.Percent=1]="Percent",t.SpacingMode=void 0,(Zt=t.SpacingMode||(t.SpacingMode={}))[Zt.Length=0]="Length",Zt[Zt.Fixed=1]="Fixed",Zt[Zt.Percent=2]="Percent",Zt[Zt.Proportional=3]="Proportional",t.RotateMode=void 0,(Qt=t.RotateMode||(t.RotateMode={}))[Qt.Tangent=0]="Tangent",Qt[Qt.Chain=1]="Chain",Qt[Qt.ChainScale=2]="ChainScale";var ae,se=function(){function e(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n<r;n++){var i=e.findBone(t.bones[n].name);if(!i)throw new Error("Couldn't find bone ".concat(t.bones[n].name,"."));this.bones.push(i)}var a=e.findSlot(t.target.name);if(!a)throw new Error("Couldn't find target bone ".concat(t.target.name));this.target=a,this.position=t.position,this.spacing=t.spacing,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){var n=this.target.getAttachment();if(n instanceof T){var r=this.mixRotate,i=this.mixX,a=this.mixY;if(0!=r||0!=i||0!=a){var s=this.data,o=s.rotateMode==t.RotateMode.Tangent,h=s.rotateMode==t.RotateMode.ChainScale,l=this.bones,c=l.length,d=o?c:c+1,u=g.setArraySize(this.spaces,d),f=h?this.lengths=g.setArraySize(this.lengths,c):[],p=this.spacing;switch(s.spacingMode){case t.SpacingMode.Percent:if(h)for(var m=0,v=d-1;m<v;m++){if((k=(X=l[m]).data.length)<e.epsilon)f[m]=0;else{var y=k*X.a,x=k*X.c;f[m]=Math.sqrt(y*y+x*x)}}g.arrayFill(u,1,d,p);break;case t.SpacingMode.Proportional:var w=0;for(m=0,v=d-1;m<v;){if((k=(X=l[m]).data.length)<e.epsilon)h&&(f[m]=0),u[++m]=p;else{y=k*X.a,x=k*X.c;var b=Math.sqrt(y*y+x*x);h&&(f[m]=b),u[++m]=b,w+=b}}if(w>0){w=d/w*p;for(m=1;m<d;m++)u[m]*=w}break;default:var M=s.spacingMode==t.SpacingMode.Length;for(m=0,v=d-1;m<v;){var k;if((k=(X=l[m]).data.length)<e.epsilon)h&&(f[m]=0),u[++m]=p;else{y=k*X.a,x=k*X.c;var S=Math.sqrt(y*y+x*x);h&&(f[m]=S),u[++m]=(M?k+p:p)*S/k}}}var A=this.computeWorldPositions(n,d,o),I=A[0],B=A[1],E=s.offsetRotation,F=!1;if(0==E)F=s.rotateMode==t.RotateMode.Chain;else F=!1,E*=(Y=this.target.bone).a*Y.d-Y.b*Y.c>0?C.degRad:-C.degRad;m=0;for(var Y=3;m<c;m++,Y+=3){var X;(X=l[m]).worldX+=(I-X.worldX)*i,X.worldY+=(B-X.worldY)*a;var R=(y=A[Y])-I,P=(x=A[Y+1])-B;if(h){var D=f[m];if(0!=D){var V=(Math.sqrt(R*R+P*P)/D-1)*r+1;X.a*=V,X.c*=V}}if(I=y,B=x,r>0){var L=X.a,N=X.b,O=X.c,_=X.d,q=0,W=0,U=0;if(q=o?A[Y-1]:0==u[m+1]?A[Y+2]:Math.atan2(P,R),q-=Math.atan2(O,L),F){W=Math.cos(q),U=Math.sin(q);var z=X.data.length;I+=(z*(W*L-U*O)-R)*r,B+=(z*(U*L+W*O)-P)*r}else q+=E;q>C.PI?q-=C.PI2:q<-C.PI&&(q+=C.PI2),q*=r,W=Math.cos(q),U=Math.sin(q),X.a=W*L-U*O,X.b=W*N-U*_,X.c=U*L+W*O,X.d=U*N+W*_}X.updateAppliedTransform()}}}},e.prototype.computeWorldPositions=function(n,r,i){var a=this.target,s=this.position,o=this.spaces,h=g.setArraySize(this.positions,3*r+2),l=this.world,c=n.closed,d=n.worldVerticesLength,u=d/6,f=e.NONE;if(!n.constantSpeed){var p,m=n.lengths,v=m[u-=c?1:2];switch(this.data.positionMode==t.PositionMode.Percent&&(s*=v),this.data.spacingMode){case t.SpacingMode.Percent:p=v;break;case t.SpacingMode.Proportional:p=v/r;break;default:p=1}l=g.setArraySize(this.world,8);for(var y=0,x=0,w=0;y<r;y++,x+=3){var b=s+=G=o[y]*p;if(c)(b%=v)<0&&(b+=v),w=0;else{if(b<0){f!=e.BEFORE&&(f=e.BEFORE,n.computeWorldVertices(a,2,4,l,0,2)),this.addBeforePosition(b,l,0,h,x);continue}if(b>v){f!=e.AFTER&&(f=e.AFTER,n.computeWorldVertices(a,d-6,4,l,0,2)),this.addAfterPosition(b-v,l,0,h,x);continue}}for(;;w++){var M=m[w];if(!(b>M)){if(0==w)b/=M;else b=(b-(Z=m[w-1]))/(M-Z);break}}w!=f&&(f=w,c&&w==u?(n.computeWorldVertices(a,d-4,4,l,0,2),n.computeWorldVertices(a,0,4,l,4,2)):n.computeWorldVertices(a,6*w+2,8,l,0,2)),this.addCurvePosition(b,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],h,x,i||y>0&&0==G)}return h}c?(d+=2,l=g.setArraySize(this.world,d),n.computeWorldVertices(a,2,d-4,l,0,2),n.computeWorldVertices(a,0,2,l,d-4,2),l[d-2]=l[0],l[d-1]=l[1]):(u--,d-=4,l=g.setArraySize(this.world,d),n.computeWorldVertices(a,2,d,l,0,2));for(var k,S=g.setArraySize(this.curves,u),A=0,I=l[0],B=l[1],T=0,C=0,E=0,F=0,Y=0,X=0,R=0,P=0,D=0,V=0,L=0,N=0,O=0,_=0,q=(y=0,2);y<u;y++,q+=6)T=l[q],C=l[q+1],E=l[q+2],F=l[q+3],L=2*(R=.1875*(I-2*T+E))+(D=.09375*(3*(T-E)-I+(Y=l[q+4]))),N=2*(P=.1875*(B-2*C+F))+(V=.09375*(3*(C-F)-B+(X=l[q+5]))),O=.75*(T-I)+R+.16666667*D,_=.75*(C-B)+P+.16666667*V,A+=Math.sqrt(O*O+_*_),O+=L,_+=N,L+=D,N+=V,A+=Math.sqrt(O*O+_*_),O+=L,_+=N,A+=Math.sqrt(O*O+_*_),O+=L+D,_+=N+V,A+=Math.sqrt(O*O+_*_),S[y]=A,I=Y,B=X;switch(this.data.positionMode==t.PositionMode.Percent&&(s*=A),this.data.spacingMode){case t.SpacingMode.Percent:k=A;break;case t.SpacingMode.Proportional:k=A/r;break;default:k=1}for(var W=this.segments,U=0,z=(y=0,x=0,w=0,0);y<r;y++,x+=3){var G;b=s+=G=o[y]*k;if(c)(b%=A)<0&&(b+=A),w=0;else{if(b<0){this.addBeforePosition(b,l,0,h,x);continue}if(b>A){this.addAfterPosition(b-A,l,d-4,h,x);continue}}for(;;w++){var j=S[w];if(!(b>j)){if(0==w)b/=j;else b=(b-(Z=S[w-1]))/(j-Z);break}}if(w!=f){f=w;var H=6*w;for(I=l[H],B=l[H+1],T=l[H+2],C=l[H+3],E=l[H+4],F=l[H+5],L=2*(R=.03*(I-2*T+E))+(D=.006*(3*(T-E)-I+(Y=l[H+6]))),N=2*(P=.03*(B-2*C+F))+(V=.006*(3*(C-F)-B+(X=l[H+7]))),O=.3*(T-I)+R+.16666667*D,_=.3*(C-B)+P+.16666667*V,U=Math.sqrt(O*O+_*_),W[0]=U,H=1;H<8;H++)O+=L,_+=N,L+=D,N+=V,U+=Math.sqrt(O*O+_*_),W[H]=U;O+=L,_+=N,U+=Math.sqrt(O*O+_*_),W[8]=U,O+=L+D,_+=N+V,U+=Math.sqrt(O*O+_*_),W[9]=U,z=0}for(b*=U;;z++){var K=W[z];if(!(b>K)){var Z;if(0==z)b/=K;else b=z+(b-(Z=W[z-1]))/(K-Z);break}}this.addCurvePosition(.1*b,I,B,T,C,E,F,Y,X,h,x,i||y>0&&0==G)}return h},e.prototype.addBeforePosition=function(t,e,n,r,i){var a=e[n],s=e[n+1],o=e[n+2]-a,h=e[n+3]-s,l=Math.atan2(h,o);r[i]=a+t*Math.cos(l),r[i+1]=s+t*Math.sin(l),r[i+2]=l},e.prototype.addAfterPosition=function(t,e,n,r,i){var a=e[n+2],s=e[n+3],o=a-e[n],h=s-e[n+1],l=Math.atan2(h,o);r[i]=a+t*Math.cos(l),r[i+1]=s+t*Math.sin(l),r[i+2]=l},e.prototype.addCurvePosition=function(t,e,n,r,i,a,s,o,h,l,c,d){if(0==t||isNaN(t))return l[c]=e,l[c+1]=n,void(l[c+2]=Math.atan2(i-n,r-e));var u=t*t,f=u*t,p=1-t,m=p*p,g=m*p,v=p*t,y=3*v,x=p*y,w=y*t,b=e*g+r*x+a*w+o*f,M=n*g+i*x+s*w+h*f;l[c]=b,l[c+1]=M,d&&(l[c+2]=t<.001?Math.atan2(i-n,r-e):Math.atan2(M-(n*m+i*v*2+s*u),b-(e*m+r*v*2+a*u)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}(),oe=function(){function t(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}return t.prototype.getSkeleton=function(){return this.bone.skeleton},t.prototype.getAttachment=function(){return this.attachment},t.prototype.setAttachment=function(t){this.attachment!=t&&(t instanceof x&&this.attachment instanceof x&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)},t.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null},t}(),he=function(){function t(t,n){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new e.math.Vector2,this.active=!1,!t)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(var r=0;r<t.bones.length;r++){var i=n.findBone(t.bones[r].name);if(!i)throw new Error("Couldn't find bone ".concat(t.bones[r].name,"."));this.bones.push(i)}var a=n.findBone(t.target.name);if(!a)throw new Error("Couldn't find target bone ".concat(t.target.name,"."));this.target=a}return t.prototype.isActive=function(){return this.active},t.prototype.update=function(){0==this.mixRotate&&0==this.mixX&&0==this.mixY&&0==this.mixScaleX&&0==this.mixScaleX&&0==this.mixShearY||(this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld())},t.prototype.applyAbsoluteWorld=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=0!=e||0!=n,o=this.target,h=o.a,l=o.b,c=o.c,d=o.d,u=h*d-l*c>0?C.degRad:-C.degRad,f=this.data.offsetRotation*u,p=this.data.offsetShearY*u,m=this.bones,g=0,v=m.length;g<v;g++){var y=m[g];if(0!=t){var x=y.a,w=y.b,b=y.c,M=y.d;(I=Math.atan2(c,h)-Math.atan2(b,x)+f)>C.PI?I-=C.PI2:I<-C.PI&&(I+=C.PI2),I*=t;var k=Math.cos(I),S=Math.sin(I);y.a=k*x-S*b,y.b=k*w-S*M,y.c=S*x+k*b,y.d=S*w+k*M}if(s){var A=this.temp;o.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(A.x-y.worldX)*e,y.worldY+=(A.y-y.worldY)*n}if(0!=r)0!=(T=Math.sqrt(y.a*y.a+y.c*y.c))&&(T=(T+(Math.sqrt(h*h+c*c)-T+this.data.offsetScaleX)*r)/T),y.a*=T,y.c*=T;if(0!=i)0!=(T=Math.sqrt(y.b*y.b+y.d*y.d))&&(T=(T+(Math.sqrt(l*l+d*d)-T+this.data.offsetScaleY)*i)/T),y.b*=T,y.d*=T;if(a>0){w=y.b,M=y.d;var I,B=Math.atan2(M,w);(I=Math.atan2(d,l)-Math.atan2(c,h)-(B-Math.atan2(y.c,y.a)))>C.PI?I-=C.PI2:I<-C.PI&&(I+=C.PI2),I=B+(I+p)*a;var T=Math.sqrt(w*w+M*M);y.b=Math.cos(I)*T,y.d=Math.sin(I)*T}y.updateAppliedTransform()}},t.prototype.applyRelativeWorld=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=0!=e||0!=n,o=this.target,h=o.a,l=o.b,c=o.c,d=o.d,u=h*d-l*c>0?C.degRad:-C.degRad,f=this.data.offsetRotation*u,p=this.data.offsetShearY*u,m=this.bones,g=0,v=m.length;g<v;g++){var y=m[g];if(0!=t){var x=y.a,w=y.b,b=y.c,M=y.d;(B=Math.atan2(c,h)+f)>C.PI?B-=C.PI2:B<-C.PI&&(B+=C.PI2),B*=t;var k=Math.cos(B),S=Math.sin(B);y.a=k*x-S*b,y.b=k*w-S*M,y.c=S*x+k*b,y.d=S*w+k*M}if(s){var A=this.temp;o.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),y.worldX+=A.x*e,y.worldY+=A.y*n}if(0!=r){var I=(Math.sqrt(h*h+c*c)-1+this.data.offsetScaleX)*r+1;y.a*=I,y.c*=I}if(0!=i){I=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*i+1;y.b*=I,y.d*=I}if(a>0){var B;(B=Math.atan2(d,l)-Math.atan2(c,h))>C.PI?B-=C.PI2:B<-C.PI&&(B+=C.PI2);w=y.b,M=y.d;B=Math.atan2(M,w)+(B-C.PI/2+p)*a;I=Math.sqrt(w*w+M*M);y.b=Math.cos(B)*I,y.d=Math.sin(B)*I}y.updateAppliedTransform()}},t.prototype.applyAbsoluteLocal=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h<l;h++){var c=o[h],d=c.arotation;if(0!=t){var u=s.arotation-d+this.data.offsetRotation;d+=(u-=360*(16384-(16384.499999999996-u/360|0)))*t}var f=c.ax,p=c.ay;f+=(s.ax-f+this.data.offsetX)*e,p+=(s.ay-p+this.data.offsetY)*n;var m=c.ascaleX,g=c.ascaleY;0!=r&&0!=m&&(m=(m+(s.ascaleX-m+this.data.offsetScaleX)*r)/m),0!=i&&0!=g&&(g=(g+(s.ascaleY-g+this.data.offsetScaleY)*i)/g);var v=c.ashearY;if(0!=a){u=s.ashearY-v+this.data.offsetShearY;v+=(u-=360*(16384-(16384.499999999996-u/360|0)))*a}c.updateWorldTransformWith(f,p,d,m,g,c.ashearX,v)}},t.prototype.applyRelativeLocal=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h<l;h++){var c=o[h],d=c.arotation+(s.arotation+this.data.offsetRotation)*t,u=c.ax+(s.ax+this.data.offsetX)*e,f=c.ay+(s.ay+this.data.offsetY)*n,p=c.ascaleX*((s.ascaleX-1+this.data.offsetScaleX)*r+1),m=c.ascaleY*((s.ascaleY-1+this.data.offsetScaleY)*i+1),g=c.ashearY+(s.ashearY+this.data.offsetShearY)*a;c.updateWorldTransformWith(u,f,d,p,m,c.ashearX,g)}},t}(),le=function(){function t(t){if(this._updateCache=new Array,this.skin=null,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,!t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var n=t.bones[e],r=void 0;if(n.parent){var i=this.bones[n.parent.index];r=new Jt(n,this,i),i.children.push(r)}else r=new Jt(n,this,null);this.bones.push(r)}this.slots=new Array,this.drawOrder=new Array;for(e=0;e<t.slots.length;e++){var a=t.slots[e],s=(r=this.bones[a.boneData.index],new oe(a,r));this.slots.push(s),this.drawOrder.push(s)}this.ikConstraints=new Array;for(e=0;e<t.ikConstraints.length;e++){var o=t.ikConstraints[e];this.ikConstraints.push(new ne(o,this))}this.transformConstraints=new Array;for(e=0;e<t.transformConstraints.length;e++){var l=t.transformConstraints[e];this.transformConstraints.push(new he(l,this))}this.pathConstraints=new Array;for(e=0;e<t.pathConstraints.length;e++){var c=t.pathConstraints[e];this.pathConstraints.push(new se(c,this))}this.color=new h(1,1,1,1),this.updateCache()}return t.prototype.updateCache=function(){this._updateCache.length=0;for(var t=this.bones,e=0,n=t.length;e<n;e++){(i=t[e]).sorted=i.data.skinRequired,i.active=!i.sorted}if(this.skin){var r=this.skin.bones;for(e=0,n=this.skin.bones.length;e<n;e++){var i=this.bones[r[e].index];do{i.sorted=!1,i.active=!0,i=i.parent}while(i)}}var a=this.ikConstraints,s=this.transformConstraints,o=this.pathConstraints,h=a.length,l=s.length,c=o.length,d=h+l+c;t:for(e=0;e<d;e++){for(var u=0;u<h;u++){if((f=a[u]).data.order==e){this.sortIkConstraint(f);continue t}}for(u=0;u<l;u++){if((f=s[u]).data.order==e){this.sortTransformConstraint(f);continue t}}for(u=0;u<c;u++){var f;if((f=o[u]).data.order==e){this.sortPathConstraint(f);continue t}}}for(e=0,n=t.length;e<n;e++)this.sortBone(t[e])},t.prototype.sortIkConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||this.skin&&g.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target;this.sortBone(e);var n=t.bones,r=n[0];if(this.sortBone(r),1==n.length)this._updateCache.push(t),this.sortReset(r.children);else{var i=n[n.length-1];this.sortBone(i),this._updateCache.push(t),this.sortReset(r.children),i.sorted=!0}}},t.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||this.skin&&g.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,n=e.data.index,r=e.bone;this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var i=0,a=this.data.skins.length;i<a;i++)this.sortPathConstraintAttachment(this.data.skins[i],n,r);var s=e.getAttachment();s instanceof T&&this.sortPathConstraintAttachmentWith(s,r);var o=t.bones,h=o.length;for(i=0;i<h;i++)this.sortBone(o[i]);this._updateCache.push(t);for(i=0;i<h;i++)this.sortReset(o[i].children);for(i=0;i<h;i++)o[i].sorted=!0}},t.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||this.skin&&g.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,n=e.length;if(t.data.local)for(var r=0;r<n;r++){var i=e[r];this.sortBone(i.parent),this.sortBone(i)}else for(r=0;r<n;r++)this.sortBone(e[r]);this._updateCache.push(t);for(r=0;r<n;r++)this.sortReset(e[r].children);for(r=0;r<n;r++)e[r].sorted=!0}},t.prototype.sortPathConstraintAttachment=function(t,e,n){var r=t.attachments[e];if(r)for(var i in r)this.sortPathConstraintAttachmentWith(r[i],n)},t.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof T){var n=t.bones;if(n)for(var r=this.bones,i=0,a=n.length;i<a;){var s=n[i++];for(s+=i;i<s;)this.sortBone(r[n[i++]])}else this.sortBone(e)}},t.prototype.sortBone=function(t){if(t&&!t.sorted){var e=t.parent;e&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t)}},t.prototype.sortReset=function(t){for(var e=0,n=t.length;e<n;e++){var r=t[e];r.active&&(r.sorted&&this.sortReset(r.children),r.sorted=!1)}},t.prototype.updateWorldTransform=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++){var r=t[e];r.ax=r.x,r.ay=r.y,r.arotation=r.rotation,r.ascaleX=r.scaleX,r.ascaleY=r.scaleY,r.ashearX=r.shearX,r.ashearY=r.shearY}var i=this._updateCache;for(e=0,n=i.length;e<n;e++)i[e].update()},t.prototype.updateWorldTransformWith=function(t){var e=this.getRootBone();if(!e)throw new Error("Root bone must not be null.");var n=t.a,r=t.b,i=t.c,a=t.d;e.worldX=n*this.x+r*this.y+t.worldX,e.worldY=i*this.x+a*this.y+t.worldY;var s=e.rotation+90+e.shearY,o=C.cosDeg(e.rotation+e.shearX)*e.scaleX,h=C.cosDeg(s)*e.scaleY,l=C.sinDeg(e.rotation+e.shearX)*e.scaleX,c=C.sinDeg(s)*e.scaleY;e.a=(n*o+r*l)*this.scaleX,e.b=(n*h+r*c)*this.scaleX,e.c=(i*o+a*l)*this.scaleY,e.d=(i*h+a*c)*this.scaleY;for(var d=this._updateCache,u=0,f=d.length;u<f;u++){var p=d[u];p!=e&&p.update()}},t.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},t.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].setToSetupPose();var r=this.ikConstraints;for(e=0,n=r.length;e<n;e++){(o=r[e]).mix=o.data.mix,o.softness=o.data.softness,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch}var i=this.transformConstraints;for(e=0,n=i.length;e<n;e++){var a=(o=i[e]).data;o.mixRotate=a.mixRotate,o.mixX=a.mixX,o.mixY=a.mixY,o.mixScaleX=a.mixScaleX,o.mixScaleY=a.mixScaleY,o.mixShearY=a.mixShearY}var s=this.pathConstraints;for(e=0,n=s.length;e<n;e++){var o;a=(o=s[e]).data;o.position=a.position,o.spacing=a.spacing,o.mixRotate=a.mixRotate,o.mixX=a.mixX,o.mixY=a.mixY}},t.prototype.setSlotsToSetupPose=function(){var t=this.slots;g.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,n=t.length;e<n;e++)t[e].setToSetupPose()},t.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},t.prototype.findBone=function(t){if(!t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.findSlot=function(t){if(!t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(!e)throw new Error("Skin not found: "+t);this.setSkin(e)},t.prototype.setSkin=function(t){if(t!=this.skin){if(t)if(this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n],a=i.data.attachmentName;if(a){var s=t.getAttachment(n,a);s&&i.setAttachment(s)}}this.skin=t,this.updateCache()}},t.prototype.getAttachmentByName=function(t,e){var n=this.data.findSlot(t);if(!n)throw new Error("Can't find slot with name ".concat(t));return this.getAttachment(n.index,e)},t.prototype.getAttachment=function(t,e){if(!e)throw new Error("attachmentName cannot be null.");if(this.skin){var n=this.skin.getAttachment(t,e);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},t.prototype.setAttachment=function(t,e){if(!t)throw new Error("slotName cannot be null.");for(var n=this.slots,r=0,i=n.length;r<i;r++){var a=n[r];if(a.data.name==t){var s=null;if(e&&!(s=this.getAttachment(r,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void a.setAttachment(s)}}throw new Error("Slot not found: "+t)},t.prototype.findIkConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.findTransformConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.findPathConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.getBoundsRect=function(){var t=new e.math.Vector2,n=new e.math.Vector2;return this.getBounds(t,n),{x:t.x,y:t.y,width:n.x,height:n.y}},t.prototype.getBounds=function(t,e,n){if(void 0===n&&(n=new Array(2)),!t)throw new Error("offset cannot be null.");if(!e)throw new Error("size cannot be null.");for(var r=this.drawOrder,i=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=r.length;h<l;h++){var c=r[h];if(c.bone.active){var d=0,u=null,f=c.getAttachment();if(f instanceof Y)d=8,u=g.setArraySize(n,d,0),f.computeWorldVertices(c,u,0,2);else if(f instanceof B){var p=f;d=p.worldVerticesLength,u=g.setArraySize(n,d,0),p.computeWorldVertices(c,0,d,u,0,2)}if(u)for(var m=0,v=u.length;m<v;m+=2){var y=u[m],x=u[m+1];i=Math.min(i,y),a=Math.min(a,x),s=Math.max(s,y),o=Math.max(o,x)}}}t.set(i,a),e.set(s-i,o-a)},t}(),ce=function(){function t(){this.name=null,this.bones=new Array,this.slots=new Array,this.skins=new Array,this.defaultSkin=null,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.x=0,this.y=0,this.width=0,this.height=0,this.version=null,this.hash=null,this.fps=0,this.imagesPath=null,this.audioPath=null}return t.prototype.findBone=function(t){if(!t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findSlot=function(t){if(!t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findSkin=function(t){if(!t)throw new Error("skinName cannot be null.");for(var e=this.skins,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findEvent=function(t){if(!t)throw new Error("eventDataName cannot be null.");for(var e=this.events,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findAnimation=function(t){if(!t)throw new Error("animationName cannot be null.");for(var e=this.animations,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findIkConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findTransformConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findPathConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t}(),de=function(t,e,n){void 0===t&&(t=0),this.slotIndex=t,this.name=e,this.attachment=n},ue=function(){function t(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!t)throw new Error("name cannot be null.");this.name=t}return t.prototype.setAttachment=function(t,e,n){if(!n)throw new Error("attachment cannot be null.");var r=this.attachments;t>=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},t.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],r=!1,i=0;i<this.bones.length;i++)if(this.bones[i]==n){r=!0;break}r||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){var a=t.constraints[e];for(r=!1,i=0;i<this.constraints.length;i++)if(this.constraints[i]==a){r=!0;break}r||this.constraints.push(a)}var s=t.getAttachments();for(e=0;e<s.length;e++){var o=s[e];this.setAttachment(o.slotIndex,o.name,o.attachment)}},t.prototype.copySkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],r=!1,i=0;i<this.bones.length;i++)if(this.bones[i]==n){r=!0;break}r||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){var a=t.constraints[e];for(r=!1,i=0;i<this.constraints.length;i++)if(this.constraints[i]==a){r=!0;break}r||this.constraints.push(a)}var s=t.getAttachments();for(e=0;e<s.length;e++){var o=s[e];o.attachment&&(o.attachment instanceof B?(o.attachment=o.attachment.newLinkedMesh(),this.setAttachment(o.slotIndex,o.name,o.attachment)):(o.attachment=o.attachment.copy(),this.setAttachment(o.slotIndex,o.name,o.attachment)))}},t.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},t.prototype.removeAttachment=function(t,e){var n=this.attachments[t];n&&delete n[e]},t.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var n=this.attachments[e];if(n)for(var r in n){var i=n[r];i&&t.push(new de(e,r,i))}}return t},t.prototype.getAttachmentsForSlot=function(t,e){var n=this.attachments[t];if(n)for(var r in n){var i=n[r];i&&e.push(new de(t,r,i))}},t.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},t.prototype.attachAll=function(t,e){for(var n=0,r=0;r<t.slots.length;r++){var i=t.slots[r],a=i.getAttachment();if(a&&n<e.attachments.length){var s=e.attachments[n];for(var o in s){if(a==s[o]){var h=this.getAttachment(n,o);h&&i.setAttachment(h);break}}}n++}},t}(),fe=function(e,n,r){if(this.index=0,this.color=new h(1,1,1,1),this.darkColor=null,this.attachmentName=null,this.blendMode=t.BlendMode.Normal,e<0)throw new Error("index must be >= 0.");if(!n)throw new Error("name cannot be null.");if(!r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r};t.BlendMode=void 0,(ae=t.BlendMode||(t.BlendMode={}))[ae.Normal=0]="Normal",ae[ae.Additive=1]="Additive",ae[ae.Multiply=2]="Multiply",ae[ae.Screen=3]="Screen";var pe,me=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n._target=null,n.mixRotate=0,n.mixX=0,n.mixY=0,n.mixScaleX=0,n.mixScaleY=0,n.mixShearY=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return r(e,t),Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t},enumerable:!1,configurable:!0}),e}($t),ge=function(){function e(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}return e.prototype.readSkeletonData=function(e){var n=this.scale,r=new ce;r.name="";var i=new ve(e),a=i.readInt32(),s=i.readInt32();r.hash=0==s&&0==a?null:s.toString(16)+a.toString(16),r.version=i.readString(),r.x=i.readFloat(),r.y=i.readFloat(),r.width=i.readFloat(),r.height=i.readFloat();var o=i.readBoolean();o&&(r.fps=i.readFloat(),r.imagesPath=i.readString(),r.audioPath=i.readString());var l=0;l=i.readInt(!0);for(var c=0;c<l;c++){var d=i.readString();if(!d)throw new Error("String in string table must not be null.");i.strings.push(d)}l=i.readInt(!0);for(c=0;c<l;c++){var u=i.readString();if(!u)throw new Error("Bone name must not be null.");var f=0==c?null:r.bones[i.readInt(!0)];(v=new Ht(c,u,f)).rotation=i.readFloat(),v.x=i.readFloat()*n,v.y=i.readFloat()*n,v.scaleX=i.readFloat(),v.scaleY=i.readFloat(),v.shearX=i.readFloat(),v.shearY=i.readFloat(),v.length=i.readFloat()*n,v.transformMode=i.readInt(!0),v.skinRequired=i.readBoolean(),o&&h.rgba8888ToColor(v.color,i.readInt32()),r.bones.push(v)}l=i.readInt(!0);for(c=0;c<l;c++){var p=i.readString();if(!p)throw new Error("Slot name must not be null.");var m=r.bones[i.readInt(!0)],v=new fe(c,p,m);h.rgba8888ToColor(v.color,i.readInt32());var y=i.readInt32();-1!=y&&h.rgb888ToColor(v.darkColor=new h,y),v.attachmentName=i.readStringRef(),v.blendMode=i.readInt(!0),r.slots.push(v)}l=i.readInt(!0);c=0;for(var x=void 0;c<l;c++){var w=i.readString();if(!w)throw new Error("IK constraint data name must not be null.");(v=new re(w)).order=i.readInt(!0),v.skinRequired=i.readBoolean(),x=i.readInt(!0);for(var b=0;b<x;b++)v.bones.push(r.bones[i.readInt(!0)]);v.target=r.bones[i.readInt(!0)],v.mix=i.readFloat(),v.softness=i.readFloat()*n,v.bendDirection=i.readByte(),v.compress=i.readBoolean(),v.stretch=i.readBoolean(),v.uniform=i.readBoolean(),r.ikConstraints.push(v)}l=i.readInt(!0);for(c=0,x=void 0;c<l;c++){var M=i.readString();if(!M)throw new Error("Transform constraint data name must not be null.");(v=new me(M)).order=i.readInt(!0),v.skinRequired=i.readBoolean(),x=i.readInt(!0);for(b=0;b<x;b++)v.bones.push(r.bones[i.readInt(!0)]);v.target=r.bones[i.readInt(!0)],v.local=i.readBoolean(),v.relative=i.readBoolean(),v.offsetRotation=i.readFloat(),v.offsetX=i.readFloat()*n,v.offsetY=i.readFloat()*n,v.offsetScaleX=i.readFloat(),v.offsetScaleY=i.readFloat(),v.offsetShearY=i.readFloat(),v.mixRotate=i.readFloat(),v.mixX=i.readFloat(),v.mixY=i.readFloat(),v.mixScaleX=i.readFloat(),v.mixScaleY=i.readFloat(),v.mixShearY=i.readFloat(),r.transformConstraints.push(v)}l=i.readInt(!0);for(c=0,x=void 0;c<l;c++){var k=i.readString();if(!k)throw new Error("Path constraint data name must not be null.");(v=new ie(k)).order=i.readInt(!0),v.skinRequired=i.readBoolean(),x=i.readInt(!0);for(b=0;b<x;b++)v.bones.push(r.bones[i.readInt(!0)]);v.target=r.slots[i.readInt(!0)],v.positionMode=i.readInt(!0),v.spacingMode=i.readInt(!0),v.rotateMode=i.readInt(!0),v.offsetRotation=i.readFloat(),v.position=i.readFloat(),v.positionMode==t.PositionMode.Fixed&&(v.position*=n),v.spacing=i.readFloat(),v.spacingMode!=t.SpacingMode.Length&&v.spacingMode!=t.SpacingMode.Fixed||(v.spacing*=n),v.mixRotate=i.readFloat(),v.mixX=i.readFloat(),v.mixY=i.readFloat(),r.pathConstraints.push(v)}var S=this.readSkin(i,r,!0,o);S&&(r.defaultSkin=S,r.skins.push(S));c=r.skins.length;for(g.setArraySize(r.skins,l=c+i.readInt(!0));c<l;c++){if(!(A=this.readSkin(i,r,!1,o)))throw new Error("readSkin() should not have returned null.");r.skins[c]=A}l=this.linkedMeshes.length;for(c=0;c<l;c++){var A,I=this.linkedMeshes[c];if(!(A=I.skin?r.findSkin(I.skin):r.defaultSkin))throw new Error("Not skin found for linked mesh.");if(!I.parent)throw new Error("Linked mesh parent must not be null");var B=A.getAttachment(I.slotIndex,I.parent);if(!B)throw new Error("Parent mesh not found: ".concat(I.parent));I.mesh.timelineAttachment=I.inheritTimeline?B:I.mesh,I.mesh.setParentMesh(B),null!=I.mesh.region&&I.mesh.updateRegion()}this.linkedMeshes.length=0,l=i.readInt(!0);for(c=0;c<l;c++){var T=i.readStringRef();if(!T)throw new Error;(v=new ee(T)).intValue=i.readInt(!1),v.floatValue=i.readFloat(),v.stringValue=i.readString(),v.audioPath=i.readString(),v.audioPath&&(v.volume=i.readFloat(),v.balance=i.readFloat()),r.events.push(v)}l=i.readInt(!0);for(c=0;c<l;c++){var C=i.readString();if(!C)throw new Error("Animatio name must not be null.");r.animations.push(this.readAnimation(i,C,r))}return r},e.prototype.readSkin=function(t,e,n,r){var i=null,a=0;if(n){if(0==(a=t.readInt(!0)))return null;i=new ue("default")}else{var s=t.readStringRef();if(!s)throw new Error("Skin name must not be null.");(i=new ue(s)).bones.length=t.readInt(!0);for(var o=0,h=i.bones.length;o<h;o++)i.bones[o]=e.bones[t.readInt(!0)];for(o=0,h=t.readInt(!0);o<h;o++)i.constraints.push(e.ikConstraints[t.readInt(!0)]);for(o=0,h=t.readInt(!0);o<h;o++)i.constraints.push(e.transformConstraints[t.readInt(!0)]);for(o=0,h=t.readInt(!0);o<h;o++)i.constraints.push(e.pathConstraints[t.readInt(!0)]);a=t.readInt(!0)}for(o=0;o<a;o++)for(var l=t.readInt(!0),c=0,d=t.readInt(!0);c<d;c++){var u=t.readStringRef();if(!u)throw new Error("Attachment name must not be null");var f=this.readAttachment(t,e,i,l,u,r);f&&i.setAttachment(l,u,f)}return i},e.prototype.readAttachment=function(t,e,n,r,i,a){var s=this.scale,o=t.readStringRef();switch(o||(o=i),t.readByte()){case pe.Region:var l=t.readStringRef(),c=t.readFloat(),d=t.readFloat(),u=t.readFloat(),f=t.readFloat(),p=t.readFloat(),m=t.readFloat(),v=t.readFloat(),y=t.readInt32(),x=this.readSequence(t);l||(l=o);var w=this.attachmentLoader.newRegionAttachment(n,o,l,x);return w?(w.path=l,w.x=d*s,w.y=u*s,w.scaleX=f,w.scaleY=p,w.rotation=c,w.width=m*s,w.height=v*s,h.rgba8888ToColor(w.color,y),w.sequence=x,null==x&&w.updateRegion(),w):null;case pe.BoundingBox:var b=t.readInt(!0),M=this.readVertices(t,b),k=(y=a?t.readInt32():0,this.attachmentLoader.newBoundingBoxAttachment(n,o));return k?(k.worldVerticesLength=b<<1,k.vertices=M.vertices,k.bones=M.bones,a&&h.rgba8888ToColor(k.color,y),k):null;case pe.Mesh:l=t.readStringRef(),y=t.readInt32(),b=t.readInt(!0);var S=this.readFloatArray(t,b<<1,1),A=this.readShortArray(t),I=(M=this.readVertices(t,b),t.readInt(!0)),B=(x=this.readSequence(t),[]);m=0,v=0;return a&&(B=this.readShortArray(t),m=t.readFloat(),v=t.readFloat()),l||(l=o),(T=this.attachmentLoader.newMeshAttachment(n,o,l,x))?(T.path=l,h.rgba8888ToColor(T.color,y),T.bones=M.bones,T.vertices=M.vertices,T.worldVerticesLength=b<<1,T.triangles=A,T.regionUVs=S,null==x&&T.updateRegion(),T.hullLength=I<<1,T.sequence=x,a&&(T.edges=B,T.width=m*s,T.height=v*s),T):null;case pe.LinkedMesh:l=t.readStringRef(),y=t.readInt32();var T,C=t.readStringRef(),E=t.readStringRef(),F=t.readBoolean();x=this.readSequence(t),m=0,v=0;return a&&(m=t.readFloat(),v=t.readFloat()),l||(l=o),(T=this.attachmentLoader.newMeshAttachment(n,o,l,x))?(T.path=l,h.rgba8888ToColor(T.color,y),T.sequence=x,a&&(T.width=m*s,T.height=v*s),this.linkedMeshes.push(new ye(T,C,r,E,F)),T):null;case pe.Path:for(var Y=t.readBoolean(),X=t.readBoolean(),R=(b=t.readInt(!0),M=this.readVertices(t,b),g.newArray(b/3,0)),P=0,D=R.length;P<D;P++)R[P]=t.readFloat()*s;y=a?t.readInt32():0;return(l=this.attachmentLoader.newPathAttachment(n,o))?(l.closed=Y,l.constantSpeed=X,l.worldVerticesLength=b<<1,l.vertices=M.vertices,l.bones=M.bones,l.lengths=R,a&&h.rgba8888ToColor(l.color,y),l):null;case pe.Point:c=t.readFloat(),d=t.readFloat(),u=t.readFloat(),y=a?t.readInt32():0;var V=this.attachmentLoader.newPointAttachment(n,o);return V?(V.x=d*s,V.y=u*s,V.rotation=c,a&&h.rgba8888ToColor(V.color,y),V):null;case pe.Clipping:var L=t.readInt(!0),N=(b=t.readInt(!0),M=this.readVertices(t,b),y=a?t.readInt32():0,this.attachmentLoader.newClippingAttachment(n,o));return N?(N.endSlot=e.slots[L],N.worldVerticesLength=b<<1,N.vertices=M.vertices,N.bones=M.bones,a&&h.rgba8888ToColor(N.color,y),N):null}return null},e.prototype.readSequence=function(t){if(!t.readBoolean())return null;var e=new X(t.readInt(!0));return e.start=t.readInt(!0),e.digits=t.readInt(!0),e.setupIndex=t.readInt(!0),e},e.prototype.readVertices=function(t,e){var n=this.scale,r=e<<1,i=new xe;if(!t.readBoolean())return i.vertices=this.readFloatArray(t,r,n),i;for(var a=new Array,s=new Array,o=0;o<e;o++){var h=t.readInt(!0);s.push(h);for(var l=0;l<h;l++)s.push(t.readInt(!0)),a.push(t.readFloat()*n),a.push(t.readFloat()*n),a.push(t.readFloat())}return i.vertices=g.toFloatArray(a),i.bones=s,i},e.prototype.readFloatArray=function(t,e,n){var r=new Array(e);if(1==n)for(var i=0;i<e;i++)r[i]=t.readFloat();else for(i=0;i<e;i++)r[i]=t.readFloat()*n;return r},e.prototype.readShortArray=function(t){for(var e=t.readInt(!0),n=new Array(e),r=0;r<e;r++)n[r]=t.readShort();return n},e.prototype.readAnimation=function(e,n,r){e.readInt(!0);var i=new Array,a=this.scale;new h,new h;for(var s=0,o=e.readInt(!0);s<o;s++)for(var l=e.readInt(!0),c=0,d=e.readInt(!0);c<d;c++){var u=e.readByte(),f=(O=e.readInt(!0))-1;switch(u){case Re:for(var p=new St(O,l),m=0;m<O;m++)p.setFrame(m,e.readFloat(),e.readStringRef());i.push(p);break;case Pe:for(var v=e.readInt(!0),y=(p=new xt(O,v,l),e.readFloat()),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,k=(m=0,0);p.setFrame(m,y,x,w,b,M),m!=f;m++){var S=e.readFloat(),A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,T=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,A,1),Me(e,p,k++,m,1,y,S,w,I,1),Me(e,p,k++,m,2,y,S,b,B,1),Me(e,p,k++,m,3,y,S,M,T,1)}y=S,x=A,w=I,b=B,M=T}i.push(p);break;case De:for(v=e.readInt(!0),p=new wt(O,v,l),y=e.readFloat(),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,x,w,b),m!=f;m++){S=e.readFloat(),A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,A,1),Me(e,p,k++,m,1,y,S,w,I,1),Me(e,p,k++,m,2,y,S,b,B,1)}y=S,x=A,w=I,b=B}i.push(p);break;case Ve:for(v=e.readInt(!0),p=new Mt(O,v,l),y=e.readFloat(),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,x,w,b,M,A,I,B),m!=f;m++){S=e.readFloat();var C=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255,F=e.readUnsignedByte()/255,Y=e.readUnsignedByte()/255,X=e.readUnsignedByte()/255,R=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,C,1),Me(e,p,k++,m,1,y,S,w,E,1),Me(e,p,k++,m,2,y,S,b,F,1),Me(e,p,k++,m,3,y,S,M,Y,1),Me(e,p,k++,m,4,y,S,A,X,1),Me(e,p,k++,m,5,y,S,I,R,1),Me(e,p,k++,m,6,y,S,B,P,1)}y=S,x=C,w=E,b=F,M=Y,A=X,I=R,B=P}i.push(p);break;case Le:for(v=e.readInt(!0),p=new kt(O,v,l),y=e.readFloat(),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,x,w,b,A,I,B),m!=f;m++){S=e.readFloat(),C=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255,F=e.readUnsignedByte()/255,X=e.readUnsignedByte()/255,R=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,C,1),Me(e,p,k++,m,1,y,S,w,E,1),Me(e,p,k++,m,2,y,S,b,F,1),Me(e,p,k++,m,3,y,S,A,X,1),Me(e,p,k++,m,4,y,S,I,R,1),Me(e,p,k++,m,5,y,S,B,P,1)}y=S,x=C,w=E,b=F,A=X,I=R,B=P}i.push(p);break;case Ne:for(p=new bt(O,e.readInt(!0),l),y=e.readFloat(),M=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,M),m!=f;m++){S=e.readFloat(),T=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,M,T,1)}y=S,M=T}i.push(p)}}for(s=0,o=e.readInt(!0);s<o;s++){var L=e.readInt(!0);for(c=0,d=e.readInt(!0);c<d;c++){var N=e.readByte(),O=e.readInt(!0);v=e.readInt(!0);switch(N){case Se:i.push(we(e,new lt(O,v,L),1));break;case Ae:i.push(be(e,new ct(O,v,L),a));break;case Ie:i.push(we(e,new dt(O,v,L),a));break;case Be:i.push(we(e,new ut(O,v,L),a));break;case Te:i.push(be(e,new ft(O,v,L),1));break;case Ce:i.push(we(e,new pt(O,v,L),1));break;case Ee:i.push(we(e,new mt(O,v,L),1));break;case Fe:i.push(be(e,new gt(O,v,L),1));break;case Ye:i.push(we(e,new vt(O,v,L),1));break;case Xe:i.push(we(e,new yt(O,v,L),1))}}}for(s=0,o=e.readInt(!0);s<o;s++){var _=e.readInt(!0),q=(f=(O=e.readInt(!0))-1,p=new Tt(O,e.readInt(!0),_),y=e.readFloat(),e.readFloat()),W=e.readFloat()*a;for(m=0,k=0;p.setFrame(m,y,q,W,e.readByte(),e.readBoolean(),e.readBoolean()),m!=f;m++){S=e.readFloat();var U=e.readFloat(),z=e.readFloat()*a;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,q,U,1),Me(e,p,k++,m,1,y,S,W,z,a)}y=S,q=U,W=z}i.push(p)}for(s=0,o=e.readInt(!0);s<o;s++){_=e.readInt(!0),f=(O=e.readInt(!0))-1,p=new Ct(O,e.readInt(!0),_),y=e.readFloat();var G=e.readFloat(),j=e.readFloat(),H=e.readFloat(),K=e.readFloat(),Z=e.readFloat(),Q=e.readFloat();for(m=0,k=0;p.setFrame(m,y,G,j,H,K,Z,Q),m!=f;m++){S=e.readFloat();var J=e.readFloat(),$=e.readFloat(),tt=e.readFloat(),et=e.readFloat(),nt=e.readFloat(),rt=e.readFloat();switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,G,J,1),Me(e,p,k++,m,1,y,S,j,$,1),Me(e,p,k++,m,2,y,S,H,tt,1),Me(e,p,k++,m,3,y,S,K,et,1),Me(e,p,k++,m,4,y,S,Z,nt,1),Me(e,p,k++,m,5,y,S,Q,rt,1)}y=S,G=J,j=$,H=tt,K=et,Z=nt,Q=rt}i.push(p)}for(s=0,o=e.readInt(!0);s<o;s++){_=e.readInt(!0);var it=r.pathConstraints[_];for(c=0,d=e.readInt(!0);c<d;c++)switch(e.readByte()){case qe:i.push(we(e,new Et(e.readInt(!0),e.readInt(!0),_),it.positionMode==t.PositionMode.Fixed?a:1));break;case We:i.push(we(e,new Ft(e.readInt(!0),e.readInt(!0),_),it.spacingMode==t.SpacingMode.Length||it.spacingMode==t.SpacingMode.Fixed?a:1));break;case Ue:for(p=new Yt(e.readInt(!0),e.readInt(!0),_),y=e.readFloat(),G=e.readFloat(),j=e.readFloat(),H=e.readFloat(),m=0,k=0,f=p.getFrameCount()-1;p.setFrame(m,y,G,j,H),m!=f;m++){S=e.readFloat(),J=e.readFloat(),$=e.readFloat(),tt=e.readFloat();switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,G,J,1),Me(e,p,k++,m,1,y,S,j,$,1),Me(e,p,k++,m,2,y,S,H,tt,1)}y=S,G=J,j=$,H=tt}i.push(p)}}for(s=0,o=e.readInt(!0);s<o;s++){var at=r.skins[e.readInt(!0)];for(c=0,d=e.readInt(!0);c<d;c++){l=e.readInt(!0);for(var st=0,ot=e.readInt(!0);st<ot;st++){var ht=e.readStringRef();if(!ht)throw new Error("attachmentName must not be null.");var Rt=at.getAttachment(l,ht);u=e.readByte(),f=(O=e.readInt(!0))-1;switch(u){case Oe:var Pt=Rt,Dt=Pt.bones,Vt=Pt.vertices,Lt=Dt?Vt.length/3*2:Vt.length;for(v=e.readInt(!0),p=new At(O,v,l,Pt),y=e.readFloat(),m=0,k=0;;m++){var Nt=void 0,Ot=e.readInt(!0);if(0==Ot)Nt=Dt?g.newFloatArray(Lt):Vt;else{Nt=g.newFloatArray(Lt);var _t=e.readInt(!0);if(Ot+=_t,1==a)for(var qt=_t;qt<Ot;qt++)Nt[qt]=e.readFloat();else for(qt=_t;qt<Ot;qt++)Nt[qt]=e.readFloat()*a;if(!Dt){qt=0;for(var Wt=Nt.length;qt<Wt;qt++)Nt[qt]+=Vt[qt]}}if(p.setFrame(m,y,Nt),m==f)break;S=e.readFloat();switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,0,1,1)}y=S}i.push(p);break;case _e:for(p=new Xt(O,l,Rt),m=0;m<O;m++){y=e.readFloat();var Ut=e.readInt32();p.setFrame(m,y,D[15&Ut],Ut>>4,e.readFloat())}i.push(p)}}}}var zt=e.readInt(!0);if(zt>0){p=new Bt(zt);var Gt=r.slots.length;for(s=0;s<zt;s++){y=e.readFloat();var jt=e.readInt(!0),Ht=g.newArray(Gt,0);for(c=Gt-1;c>=0;c--)Ht[c]=-1;var Kt=g.newArray(Gt-jt,0),Zt=0,Qt=0;for(c=0;c<jt;c++){for(l=e.readInt(!0);Zt!=l;)Kt[Qt++]=Zt++;Ht[Zt+e.readInt(!0)]=Zt++}for(;Zt<Gt;)Kt[Qt++]=Zt++;for(c=Gt-1;c>=0;c--)-1==Ht[c]&&(Ht[c]=Kt[--Qt]);p.setFrame(s,y,Ht)}i.push(p)}var Jt=e.readInt(!0);if(Jt>0){for(p=new It(Jt),s=0;s<Jt;s++){y=e.readFloat();var $t=r.events[e.readInt(!0)],ee=new te(y,$t);ee.intValue=e.readInt(!1),ee.floatValue=e.readFloat(),ee.stringValue=e.readBoolean()?e.readString():$t.stringValue,ee.data.audioPath&&(ee.volume=e.readFloat(),ee.balance=e.readFloat()),p.setFrame(s,ee)}i.push(p)}var ne=0;for(s=0,o=i.length;s<o;s++)ne=Math.max(ne,i[s].getDuration());return new V(n,i,ne)},e}(),ve=function(){function t(t,e,n,r){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===r&&(r=t),this.strings=e,this.index=n,this.buffer=r}return t.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},t.prototype.readUnsignedByte=function(){return this.buffer.getUint8(this.index++)},t.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},t.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},t.prototype.readInt=function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<28)))),t?n:n>>>1^-(1&n)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n<t;){var r=this.readUnsignedByte();switch(r>>4){case 12:case 13:e+=String.fromCharCode((31&r)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&r)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(r),n++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t}(),ye=function(t,e,n,r,i){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=r,this.inheritTimeline=i},xe=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e};function we(t,e,n){for(var r=t.readFloat(),i=t.readFloat()*n,a=0,s=0,o=e.getFrameCount()-1;e.setFrame(a,r,i),a!=o;a++){var h=t.readFloat(),l=t.readFloat()*n;switch(t.readByte()){case ze:e.setStepped(a);break;case Ge:Me(t,e,s++,a,0,r,h,i,l,n)}r=h,i=l}return e}function be(t,e,n){for(var r=t.readFloat(),i=t.readFloat()*n,a=t.readFloat()*n,s=0,o=0,h=e.getFrameCount()-1;e.setFrame(s,r,i,a),s!=h;s++){var l=t.readFloat(),c=t.readFloat()*n,d=t.readFloat()*n;switch(t.readByte()){case ze:e.setStepped(s);break;case Ge:Me(t,e,o++,s,0,r,l,i,c,n),Me(t,e,o++,s,1,r,l,a,d,n)}r=l,i=c,a=d}return e}function Me(t,e,n,r,i,a,s,o,h,l){e.setBezier(n,r,i,a,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,s,h)}!function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"}(pe||(pe={}));var ke,Se=0,Ae=1,Ie=2,Be=3,Te=4,Ce=5,Ee=6,Fe=7,Ye=8,Xe=9,Re=0,Pe=1,De=2,Ve=3,Le=4,Ne=5,Oe=0,_e=1,qe=0,We=1,Ue=2,ze=1,Ge=2,je=function(){function t(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new v((function(){return g.newFloatArray(16)}))}return t.prototype.update=function(t,e){if(!t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,i=this.polygonPool,a=t.slots,s=a.length;n.length=0,i.freeAll(r),r.length=0;for(var o=0;o<s;o++){var h=a[o];if(h.bone.active){var l=h.getAttachment();if(l instanceof w){var c=l;n.push(c);var d=i.obtain();d.length!=c.worldVerticesLength&&(d=g.newFloatArray(c.worldVerticesLength)),r.push(d),c.computeWorldVertices(h,0,c.worldVerticesLength,d,0,2)}}}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},t.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=this.polygons,a=0,s=i.length;a<s;a++)for(var o=i[a],h=o,l=0,c=o.length;l<c;l+=2){var d=h[l],u=h[l+1];t=Math.min(t,d),e=Math.min(e,u),n=Math.max(n,d),r=Math.max(r,u)}this.minX=t,this.minY=e,this.maxX=n,this.maxY=r},t.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},t.prototype.aabbIntersectsSegment=function(t,e,n,r){var i=this.minX,a=this.minY,s=this.maxX,o=this.maxY;if(t<=i&&n<=i||e<=a&&r<=a||t>=s&&n>=s||e>=o&&r>=o)return!1;var h=(r-e)/(n-t),l=h*(i-t)+e;if(l>a&&l<o)return!0;if((l=h*(s-t)+e)>a&&l<o)return!0;var c=(a-e)/h+t;return c>i&&c<s||(c=(o-e)/h+t)>i&&c<s},t.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},t.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,i=n.length;r<i;r++)if(this.containsPointPolygon(n[r],t,e))return this.boundingBoxes[r];return null},t.prototype.containsPointPolygon=function(t,e,n){for(var r=t,i=t.length,a=i-2,s=!1,o=0;o<i;o+=2){var h=r[o+1],l=r[a+1];if(h<n&&l>=n||l<n&&h>=n){var c=r[o];c+(n-h)/(l-h)*(r[a]-c)<e&&(s=!s)}a=o}return s},t.prototype.intersectsSegment=function(t,e,n,r){for(var i=this.polygons,a=0,s=i.length;a<s;a++)if(this.intersectsSegmentPolygon(i[a],t,e,n,r))return this.boundingBoxes[a];return null},t.prototype.intersectsSegmentPolygon=function(t,e,n,r,i){for(var a=t,s=t.length,o=e-r,h=n-i,l=e*i-n*r,c=a[s-2],d=a[s-1],u=0;u<s;u+=2){var f=a[u],p=a[u+1],m=c*p-d*f,g=c-f,v=d-p,y=o*v-h*g,x=(l*g-o*m)/y;if((x>=c&&x<=f||x>=f&&x<=c)&&(x>=e&&x<=r||x>=r&&x<=e)){var w=(l*v-h*m)/y;if((w>=d&&w<=p||w>=p&&w<=d)&&(w>=n&&w<=i||w>=i&&w<=n))return!0}c=f,d=p}return!1},t.prototype.getPolygon=function(t){if(!t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},t.prototype.getWidth=function(){return this.maxX-this.minX},t.prototype.getHeight=function(){return this.maxY-this.minY},t}(),He=function(){function t(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new v((function(){return new Array})),this.polygonIndicesPool=new v((function(){return new Array}))}return t.prototype.triangulate=function(e){var n=e,r=e.length>>1,i=this.indicesArray;i.length=0;for(var a=0;a<r;a++)i[a]=a;var s=this.isConcaveArray;s.length=0;a=0;for(var o=r;a<o;++a)s[a]=t.isConcave(a,r,n,i);var h=this.triangles;for(h.length=0;r>3;){for(var l=r-1,c=(a=0,1);;){t:if(!s[a]){for(var d=i[l]<<1,u=i[a]<<1,f=i[c]<<1,p=n[d],m=n[d+1],g=n[u],v=n[u+1],y=n[f],x=n[f+1],w=(c+1)%r;w!=l;w=(w+1)%r)if(s[w]){var b=i[w]<<1,M=n[b],k=n[b+1];if(t.positiveArea(y,x,p,m,M,k)&&t.positiveArea(p,m,g,v,M,k)&&t.positiveArea(g,v,y,x,M,k))break t}break}if(0==c){do{if(!s[a])break;a--}while(a>0);break}l=a,a=c,c=(c+1)%r}h.push(i[(r+a-1)%r]),h.push(i[a]),h.push(i[(a+1)%r]),i.splice(a,1),s.splice(a,1);var S=(--r+a-1)%r,A=a==r?0:a;s[S]=t.isConcave(S,r,n,i),s[A]=t.isConcave(A,r,n,i)}return 3==r&&(h.push(i[2]),h.push(i[0]),h.push(i[1])),h},t.prototype.decompose=function(e,n){var r=e,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var a=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(a),a.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;var o=this.polygonPool.obtain();o.length=0;for(var h=-1,l=0,c=0,d=n.length;c<d;c+=3){var u=n[c]<<1,f=n[c+1]<<1,p=n[c+2]<<1,m=r[u],g=r[u+1],v=r[f],y=r[f+1],x=r[p],w=r[p+1],b=!1;if(h==u){var M=o.length-4,k=t.winding(o[M],o[M+1],o[M+2],o[M+3],x,w),S=t.winding(x,w,o[0],o[1],o[2],o[3]);k==l&&S==l&&(o.push(x),o.push(w),s.push(p),b=!0)}b||(o.length>0?(i.push(o),a.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(m),o.push(g),o.push(v),o.push(y),o.push(x),o.push(w),(s=this.polygonIndicesPool.obtain()).length=0,s.push(u),s.push(f),s.push(p),l=t.winding(m,g,v,y,x,w),h=u)}o.length>0&&(i.push(o),a.push(s));for(c=0,d=i.length;c<d;c++)if(0!=(s=a[c]).length)for(var A=s[0],I=s[s.length-1],B=(o=i[c])[M=o.length-4],T=o[M+1],C=o[M+2],E=o[M+3],F=o[0],Y=o[1],X=o[2],R=o[3],P=t.winding(B,T,C,E,F,Y),D=0;D<d;D++)if(D!=c){var V=a[D];if(3==V.length){var L=V[0],N=V[1],O=V[2],_=i[D];x=_[_.length-2],w=_[_.length-1];if(L==A&&N==I){k=t.winding(B,T,C,E,x,w),S=t.winding(x,w,F,Y,X,R);k==P&&S==P&&(_.length=0,V.length=0,o.push(x),o.push(w),s.push(O),B=C,T=E,C=x,E=w,D=0)}}}for(c=i.length-1;c>=0;c--)0==(o=i[c]).length&&(i.splice(c,1),this.polygonPool.free(o),s=a[c],a.splice(c,1),this.polygonIndicesPool.free(s));return i},t.isConcave=function(t,e,n,r){var i=r[(e+t-1)%e]<<1,a=r[t]<<1,s=r[(t+1)%e]<<1;return!this.positiveArea(n[i],n[i+1],n[a],n[a+1],n[s],n[s+1])},t.positiveArea=function(t,e,n,r,i,a){return t*(a-r)+n*(e-a)+i*(r-e)>=0},t.winding=function(t,e,n,r,i,a){var s=n-t,o=r-e;return i*o-a*s+s*e-t*o>=0?1:-1},t}(),Ke=function(){function t(){this.triangulator=new He,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}return t.prototype.clipStart=function(e,n){if(this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,i=g.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(e,0,r,i,0,2);var a=this.clippingPolygon;t.makeClockwise(a);for(var s=this.clippingPolygons=this.triangulator.decompose(a,this.triangulator.triangulate(a)),o=0,h=s.length;o<h;o++){var l=s[o];t.makeClockwise(l),l.push(l[0]),l.push(l[1])}return s.length},t.prototype.clipEndWithSlot=function(t){this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},t.prototype.clipEnd=function(){this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},t.prototype.isClipping=function(){return null!=this.clipAttachment},t.prototype.clipTriangles=function(t,e,n,r,i,a,s,o){var h=this.clipOutput,l=this.clippedVertices,c=this.clippedTriangles,d=this.clippingPolygons,u=d.length,f=o?12:8,p=0;l.length=0,c.length=0;t:for(var m=0;m<r;m+=3)for(var v=n[m]<<1,y=t[v],x=t[v+1],w=i[v],b=i[v+1],M=t[v=n[m+1]<<1],k=t[v+1],S=i[v],A=i[v+1],I=t[v=n[m+2]<<1],B=t[v+1],T=i[v],C=i[v+1],E=0;E<u;E++){var F=l.length;if(!this.clip(y,x,M,k,I,B,d[E],h)){(O=g.setArraySize(l,F+3*f))[F]=y,O[F+1]=x,O[F+2]=a.r,O[F+3]=a.g,O[F+4]=a.b,O[F+5]=a.a,o?(O[F+6]=w,O[F+7]=b,O[F+8]=s.r,O[F+9]=s.g,O[F+10]=s.b,O[F+11]=s.a,O[F+12]=M,O[F+13]=k,O[F+14]=a.r,O[F+15]=a.g,O[F+16]=a.b,O[F+17]=a.a,O[F+18]=S,O[F+19]=A,O[F+20]=s.r,O[F+21]=s.g,O[F+22]=s.b,O[F+23]=s.a,O[F+24]=I,O[F+25]=B,O[F+26]=a.r,O[F+27]=a.g,O[F+28]=a.b,O[F+29]=a.a,O[F+30]=T,O[F+31]=C,O[F+32]=s.r,O[F+33]=s.g,O[F+34]=s.b,O[F+35]=s.a):(O[F+6]=w,O[F+7]=b,O[F+8]=M,O[F+9]=k,O[F+10]=a.r,O[F+11]=a.g,O[F+12]=a.b,O[F+13]=a.a,O[F+14]=S,O[F+15]=A,O[F+16]=I,O[F+17]=B,O[F+18]=a.r,O[F+19]=a.g,O[F+20]=a.b,O[F+21]=a.a,O[F+22]=T,O[F+23]=C),F=c.length,(K=g.setArraySize(c,F+3))[F]=p,K[F+1]=p+1,K[F+2]=p+2,p+=3;continue t}var Y=h.length;if(0!=Y){for(var X=k-B,R=I-M,P=y-I,D=B-x,V=1/(X*P+R*(x-B)),L=Y>>1,N=this.clipOutput,O=g.setArraySize(l,F+L*f),_=0;_<Y;_+=2){var q=N[_],W=N[_+1];O[F]=q,O[F+1]=W,O[F+2]=a.r,O[F+3]=a.g,O[F+4]=a.b,O[F+5]=a.a;var U=q-I,z=W-B,G=(X*U+R*z)*V,j=(D*U+P*z)*V,H=1-G-j;O[F+6]=w*G+S*j+T*H,O[F+7]=b*G+A*j+C*H,o&&(O[F+8]=s.r,O[F+9]=s.g,O[F+10]=s.b,O[F+11]=s.a),F+=f}F=c.length;var K=g.setArraySize(c,F+3*(L-2));L--;for(_=1;_<L;_++)K[F]=p,K[F+1]=p+_,K[F+2]=p+_+1,F+=3;p+=L+1}}},t.prototype.clip=function(t,e,n,r,i,a,s,o){var h,l=o,c=!1;s.length%4>=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(n),h.push(r),h.push(i),h.push(a),h.push(t),h.push(e),o.length=0;for(var d=s,u=s.length-4,f=0;;f+=2){for(var p=d[f],m=d[f+1],g=d[f+2],v=d[f+3],y=p-g,x=m-v,w=h,b=h.length-2,M=o.length,k=0;k<b;k+=2){var S=w[k],A=w[k+1],I=w[k+2],B=w[k+3],T=y*(B-v)-x*(I-g)>0;if(y*(A-v)-x*(S-g)>0){if(T){o.push(I),o.push(B);continue}var C=(F=B-A)*(g-p)-(Y=I-S)*(v-m);if(Math.abs(C)>1e-6){var E=(Y*(m-A)-F*(p-S))/C;o.push(p+(g-p)*E),o.push(m+(v-m)*E)}else o.push(p),o.push(m)}else if(T){var F,Y;C=(F=B-A)*(g-p)-(Y=I-S)*(v-m);if(Math.abs(C)>1e-6){E=(Y*(m-A)-F*(p-S))/C;o.push(p+(g-p)*E),o.push(m+(v-m)*E)}else o.push(p),o.push(m);o.push(I),o.push(B)}c=!0}if(M==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),f==u)break;var X=o;(o=h).length=0,h=X}if(l!=o){l.length=0;f=0;for(var R=o.length-2;f<R;f++)l[f]=o[f]}else l.length=l.length-2;return c},t.makeClockwise=function(t){for(var e=t,n=t.length,r=e[n-2]*e[1]-e[0]*e[n-1],i=0,a=0,s=0,o=0,h=n-3;o<h;o+=2)i=e[o],a=e[o+1],s=e[o+2],r+=i*e[o+3]-s*a;if(!(r<0)){o=0;var l=n-2;for(h=n>>1;o<h;o+=2){var c=e[o],d=e[o+1],u=l-o;e[o]=e[u],e[o+1]=e[u+1],e[u]=c,e[u+1]=d}}},t}(),Ze=function(){function e(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}return e.prototype.readSkeletonData=function(e){var n=this.scale,r=new ce,i="string"==typeof e?JSON.parse(e):e,a=i.skeleton;if(a&&(r.hash=a.hash,r.version=a.spine,r.x=a.x,r.y=a.y,r.width=a.width,r.height=a.height,r.fps=a.fps,r.imagesPath=a.images),i.bones)for(var s=0;s<i.bones.length;s++){var o=i.bones[s],l=null,c=en(o,"parent",null);c&&(l=r.findBone(c)),(p=new Ht(r.bones.length,o.name,l)).length=en(o,"length",0)*n,p.x=en(o,"x",0)*n,p.y=en(o,"y",0)*n,p.rotation=en(o,"rotation",0),p.scaleX=en(o,"scaleX",1),p.scaleY=en(o,"scaleY",1),p.shearX=en(o,"shearX",0),p.shearY=en(o,"shearY",0),p.transformMode=g.enumValue(t.TransformMode,en(o,"transform","Normal")),p.skinRequired=en(o,"skin",!1),(f=en(o,"color",null))&&p.color.setFromString(f),r.bones.push(p)}if(i.slots)for(s=0;s<i.slots.length;s++){var d=i.slots[s],u=r.findBone(d.bone);if(!u)throw new Error("Couldn't find bone ".concat(d.bone," for slot ").concat(d.name));var f,p=new fe(r.slots.length,d.name,u);(f=en(d,"color",null))&&p.color.setFromString(f);var m=en(d,"dark",null);m&&(p.darkColor=h.fromString(m)),p.attachmentName=en(d,"attachment",null),p.blendMode=g.enumValue(t.BlendMode,en(d,"blend","normal")),r.slots.push(p)}if(i.ik)for(s=0;s<i.ik.length;s++){var v=i.ik[s];(p=new re(v.name)).order=en(v,"order",0),p.skinRequired=en(v,"skin",!1);for(var y=0;y<v.bones.length;y++){if(!(S=r.findBone(v.bones[y])))throw new Error("Couldn't find bone ".concat(v.bones[y]," for IK constraint ").concat(v.name,"."));p.bones.push(S)}if(!(b=r.findBone(v.target)))throw new Error("Couldn't find target bone ".concat(v.target," for IK constraint ").concat(v.name,"."));p.target=b,p.mix=en(v,"mix",1),p.softness=en(v,"softness",0)*n,p.bendDirection=en(v,"bendPositive",!0)?1:-1,p.compress=en(v,"compress",!1),p.stretch=en(v,"stretch",!1),p.uniform=en(v,"uniform",!1),r.ikConstraints.push(p)}if(i.transform)for(s=0;s<i.transform.length;s++){v=i.transform[s];(p=new me(v.name)).order=en(v,"order",0),p.skinRequired=en(v,"skin",!1);for(y=0;y<v.bones.length;y++){var x=v.bones[y];if(!(S=r.findBone(x)))throw new Error("Couldn't find bone ".concat(x," for transform constraint ").concat(v.name,"."));p.bones.push(S)}var w=v.target;if(!(b=r.findBone(w)))throw new Error("Couldn't find target bone ".concat(w," for transform constraint ").concat(v.name,"."));p.target=b,p.local=en(v,"local",!1),p.relative=en(v,"relative",!1),p.offsetRotation=en(v,"rotation",0),p.offsetX=en(v,"x",0)*n,p.offsetY=en(v,"y",0)*n,p.offsetScaleX=en(v,"scaleX",0),p.offsetScaleY=en(v,"scaleY",0),p.offsetShearY=en(v,"shearY",0),p.mixRotate=en(v,"mixRotate",1),p.mixX=en(v,"mixX",1),p.mixY=en(v,"mixY",p.mixX),p.mixScaleX=en(v,"mixScaleX",1),p.mixScaleY=en(v,"mixScaleY",p.mixScaleX),p.mixShearY=en(v,"mixShearY",1),r.transformConstraints.push(p)}if(i.path)for(s=0;s<i.path.length;s++){v=i.path[s];(p=new ie(v.name)).order=en(v,"order",0),p.skinRequired=en(v,"skin",!1);for(y=0;y<v.bones.length;y++){x=v.bones[y];if(!(S=r.findBone(x)))throw new Error("Couldn't find bone ".concat(x," for path constraint ").concat(v.name,"."));p.bones.push(S)}var b;w=v.target;if(!(b=r.findSlot(w)))throw new Error("Couldn't find target slot ".concat(w," for path constraint ").concat(v.name,"."));p.target=b,p.positionMode=g.enumValue(t.PositionMode,en(v,"positionMode","Percent")),p.spacingMode=g.enumValue(t.SpacingMode,en(v,"spacingMode","Length")),p.rotateMode=g.enumValue(t.RotateMode,en(v,"rotateMode","Tangent")),p.offsetRotation=en(v,"rotation",0),p.position=en(v,"position",0),p.positionMode==t.PositionMode.Fixed&&(p.position*=n),p.spacing=en(v,"spacing",0),p.spacingMode!=t.SpacingMode.Length&&p.spacingMode!=t.SpacingMode.Fixed||(p.spacing*=n),p.mixRotate=en(v,"mixRotate",1),p.mixX=en(v,"mixX",1),p.mixY=en(v,"mixY",p.mixX),r.pathConstraints.push(p)}if(i.skins)for(s=0;s<i.skins.length;s++){var M=i.skins[s],k=new ue(M.name);if(M.bones)for(y=0;y<M.bones.length;y++){var S;x=M.bones[y];if(!(S=r.findBone(x)))throw new Error("Couldn't find bone ".concat(x," for skin ").concat(M.name,"."));k.bones.push(S)}if(M.ik)for(y=0;y<M.ik.length;y++){var A=M.ik[y];if(!(I=r.findIkConstraint(A)))throw new Error("Couldn't find IK constraint ".concat(A," for skin ").concat(M.name,"."));k.constraints.push(I)}if(M.transform)for(y=0;y<M.transform.length;y++){A=M.transform[y];if(!(I=r.findTransformConstraint(A)))throw new Error("Couldn't find transform constraint ".concat(A," for skin ").concat(M.name,"."));k.constraints.push(I)}if(M.path)for(y=0;y<M.path.length;y++){var I;A=M.path[y];if(!(I=r.findPathConstraint(A)))throw new Error("Couldn't find path constraint ".concat(A," for skin ").concat(M.name,"."));k.constraints.push(I)}for(var B in M.attachments){var T=r.findSlot(B);if(!T)throw new Error("Couldn't find slot ".concat(B," for skin ").concat(M.name,"."));d=M.attachments[B];for(var C in d){var E=this.readAttachment(d[C],k,T.index,C,r);E&&k.setAttachment(T.index,C,E)}}r.skins.push(k),"default"==k.name&&(r.defaultSkin=k)}s=0;for(var F=this.linkedMeshes.length;s<F;s++){var Y=this.linkedMeshes[s];if(!(k=Y.skin?r.findSkin(Y.skin):r.defaultSkin))throw new Error("Skin not found: ".concat(Y.skin));var X=k.getAttachment(Y.slotIndex,Y.parent);if(!X)throw new Error("Parent mesh not found: ".concat(Y.parent));Y.mesh.timelineAttachment=Y.inheritTimeline?X:Y.mesh,Y.mesh.setParentMesh(X),null!=Y.mesh.region&&Y.mesh.updateRegion()}if(this.linkedMeshes.length=0,i.events)for(var R in i.events){var P=i.events[R];(p=new ee(R)).intValue=en(P,"int",0),p.floatValue=en(P,"float",0),p.stringValue=en(P,"string",""),p.audioPath=en(P,"audio",null),p.audioPath&&(p.volume=en(P,"volume",1),p.balance=en(P,"balance",0)),r.events.push(p)}if(i.animations)for(var D in i.animations){var V=i.animations[D];this.readAnimation(V,D,r)}return r},e.prototype.readAttachment=function(t,e,n,r,i){var a=this.scale;switch(r=en(t,"name",r),en(t,"type","region")){case"region":var s=en(t,"path",r),o=this.readSequence(en(t,"sequence",null)),h=this.attachmentLoader.newRegionAttachment(e,r,s,o);return h?(h.path=s,h.x=en(t,"x",0)*a,h.y=en(t,"y",0)*a,h.scaleX=en(t,"scaleX",1),h.scaleY=en(t,"scaleY",1),h.rotation=en(t,"rotation",0),h.width=t.width*a,h.height=t.height*a,h.sequence=o,(w=en(t,"color",null))&&h.color.setFromString(w),null!=h.region&&h.updateRegion(),h):null;case"boundingbox":var l=this.attachmentLoader.newBoundingBoxAttachment(e,r);return l?(this.readVertices(t,l,t.vertexCount<<1),(w=en(t,"color",null))&&l.color.setFromString(w),l):null;case"mesh":case"linkedmesh":s=en(t,"path",r),o=this.readSequence(en(t,"sequence",null));var c=this.attachmentLoader.newMeshAttachment(e,r,s,o);if(!c)return null;c.path=s,(w=en(t,"color",null))&&c.color.setFromString(w),c.width=en(t,"width",0)*a,c.height=en(t,"height",0)*a,c.sequence=o;var d=en(t,"parent",null);if(d)return this.linkedMeshes.push(new Qe(c,en(t,"skin",null),n,d,en(t,"timelines",!0))),c;var u=t.uvs;return this.readVertices(t,c,u.length),c.triangles=t.triangles,c.regionUVs=u,null!=c.region&&c.updateRegion(),c.edges=en(t,"edges",null),c.hullLength=2*en(t,"hull",0),c;case"path":if(!(s=this.attachmentLoader.newPathAttachment(e,r)))return null;s.closed=en(t,"closed",!1),s.constantSpeed=en(t,"constantSpeed",!0);var f=t.vertexCount;this.readVertices(t,s,f<<1);for(var p=g.newArray(f/3,0),m=0;m<t.lengths.length;m++)p[m]=t.lengths[m]*a;return s.lengths=p,(w=en(t,"color",null))&&s.color.setFromString(w),s;case"point":var v=this.attachmentLoader.newPointAttachment(e,r);return v?(v.x=en(t,"x",0)*a,v.y=en(t,"y",0)*a,v.rotation=en(t,"rotation",0),(w=en(t,"color",null))&&v.color.setFromString(w),v):null;case"clipping":var y=this.attachmentLoader.newClippingAttachment(e,r);if(!y)return null;var x=en(t,"end",null);x&&(y.endSlot=i.findSlot(x));var w;f=t.vertexCount;return this.readVertices(t,y,f<<1),(w=en(t,"color",null))&&y.color.setFromString(w),y}return null},e.prototype.readSequence=function(t){if(null==t)return null;var e=new X(en(t,"count",0));return e.start=en(t,"start",1),e.digits=en(t,"digits",0),e.setupIndex=en(t,"setup",0),e},e.prototype.readVertices=function(t,e,n){var r=this.scale;e.worldVerticesLength=n;var i=t.vertices;if(n!=i.length){var a=new Array,s=new Array;for(c=0,d=i.length;c<d;){var o=i[c++];s.push(o);for(var h=c+4*o;c<h;c+=4)s.push(i[c]),a.push(i[c+1]*r),a.push(i[c+2]*r),a.push(i[c+3])}e.bones=s,e.vertices=g.toFloatArray(a)}else{var l=g.toFloatArray(i);if(1!=r)for(var c=0,d=i.length;c<d;c++)l[c]*=r;e.vertices=l}},e.prototype.readAnimation=function(e,n,r){var i=this.scale,a=new Array;if(e.slots)for(var s in e.slots){var o=e.slots[s];if(!($t=r.findSlot(s)))throw new Error("Slot not found: "+s);var l=$t.index;for(var c in o){if(at=o[c]){var d=at.length;if("attachment"==c){for(var u=new St(d,l),f=0;f<d;f++){var p=at[f];u.setFrame(f,en(p,"time",0),en(p,"name",null))}a.push(u)}else if("rgba"==c){u=new xt(d,d<<2,l);for(var m=en(p=at[0],"time",0),v=h.fromString(p.color),y=(f=0,0);;f++){if(u.setFrame(f,m,v.r,v.g,v.b,v.a),!(Rt=at[f+1])){u.shrink(y);break}var x=en(Rt,"time",0),w=h.fromString(Rt.color);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1),y=tn(Ot,u,y,f,3,m,x,v.a,w.a,1)),m=x,v=w,p=Rt}a.push(u)}else if("rgb"==c){for(u=new wt(d,3*d,l),m=en(p=at[0],"time",0),v=h.fromString(p.color),f=0,y=0;;f++){if(u.setFrame(f,m,v.r,v.g,v.b),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),w=h.fromString(Rt.color);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1)),m=x,v=w,p=Rt}a.push(u)}else if("alpha"==c)a.push(Je(at,new bt(d,d,l),0,1));else if("rgba2"==c){u=new Mt(d,7*d,l),m=en(p=at[0],"time",0),v=h.fromString(p.light);var b=h.fromString(p.dark);for(f=0,y=0;;f++){if(u.setFrame(f,m,v.r,v.g,v.b,v.a,b.r,b.g,b.b),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),w=h.fromString(Rt.light);var M=h.fromString(Rt.dark);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1),y=tn(Ot,u,y,f,3,m,x,v.a,w.a,1),y=tn(Ot,u,y,f,4,m,x,b.r,M.r,1),y=tn(Ot,u,y,f,5,m,x,b.g,M.g,1),y=tn(Ot,u,y,f,6,m,x,b.b,M.b,1)),m=x,v=w,b=M,p=Rt}a.push(u)}else if("rgb2"==c){for(u=new kt(d,6*d,l),m=en(p=at[0],"time",0),v=h.fromString(p.light),b=h.fromString(p.dark),f=0,y=0;;f++){if(u.setFrame(f,m,v.r,v.g,v.b,b.r,b.g,b.b),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),w=h.fromString(Rt.light),M=h.fromString(Rt.dark);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1),y=tn(Ot,u,y,f,3,m,x,b.r,M.r,1),y=tn(Ot,u,y,f,4,m,x,b.g,M.g,1),y=tn(Ot,u,y,f,5,m,x,b.b,M.b,1)),m=x,v=w,b=M,p=Rt}a.push(u)}}}}if(e.bones)for(var k in e.bones){var S=e.bones[k],A=r.findBone(k);if(!A)throw new Error("Bone not found: "+k);var I=A.index;for(var c in S){var B=(at=S[c]).length;if(0!=B)if("rotate"===c)a.push(Je(at,new lt(B,B,I),0,1));else if("translate"===c){u=new ct(B,B<<1,I);a.push($e(at,u,"x","y",0,i))}else if("translatex"===c){u=new dt(B,B,I);a.push(Je(at,u,0,i))}else if("translatey"===c){u=new ut(B,B,I);a.push(Je(at,u,0,i))}else if("scale"===c){u=new ft(B,B<<1,I);a.push($e(at,u,"x","y",1,1))}else if("scalex"===c){u=new pt(B,B,I);a.push(Je(at,u,1,1))}else if("scaley"===c){u=new mt(B,B,I);a.push(Je(at,u,1,1))}else if("shear"===c){u=new gt(B,B<<1,I);a.push($e(at,u,"x","y",0,1))}else if("shearx"===c){u=new vt(B,B,I);a.push(Je(at,u,0,1))}else if("sheary"===c){u=new yt(B,B,I);a.push(Je(at,u,0,1))}}}if(e.ik)for(var T in e.ik){if(p=(K=e.ik[T])[0]){if(!(H=r.findIkConstraint(T)))throw new Error("IK Constraint not found: "+T);var C=r.ikConstraints.indexOf(H),F=(u=new Tt(K.length,K.length<<1,C),m=en(p,"time",0),en(p,"mix",1)),Y=en(p,"softness",0)*i;for(f=0,y=0;;f++){if(u.setFrame(f,m,F,Y,en(p,"bendPositive",!0)?1:-1,en(p,"compress",!1),en(p,"stretch",!1)),!(Rt=K[f+1])){u.shrink(y);break}x=en(Rt,"time",0);var X=en(Rt,"mix",1),R=en(Rt,"softness",0)*i;(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,F,X,1),y=tn(Ot,u,y,f,1,m,x,Y,R,i)),m=x,F=X,Y=R,p=Rt}a.push(u)}}if(e.transform)for(var T in e.transform){if(p=(at=e.transform[T])[0]){if(!(H=r.findTransformConstraint(T)))throw new Error("Transform constraint not found: "+T);C=r.transformConstraints.indexOf(H),u=new Ct(at.length,6*at.length,C),m=en(p,"time",0);var P=en(p,"mixRotate",1),D=en(p,"mixX",1),L=en(p,"mixY",D),N=en(p,"mixScaleX",1),O=en(p,"mixScaleY",N),_=en(p,"mixShearY",1);for(f=0,y=0;;f++){if(u.setFrame(f,m,P,D,L,N,O,_),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0);var q=en(Rt,"mixRotate",1),W=en(Rt,"mixX",1),U=en(Rt,"mixY",W),z=en(Rt,"mixScaleX",1),G=en(Rt,"mixScaleY",z),j=en(Rt,"mixShearY",1);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,P,q,1),y=tn(Ot,u,y,f,1,m,x,D,W,1),y=tn(Ot,u,y,f,2,m,x,L,U,1),y=tn(Ot,u,y,f,3,m,x,N,z,1),y=tn(Ot,u,y,f,4,m,x,O,G,1),y=tn(Ot,u,y,f,5,m,x,_,j,1)),m=x,P=q,D=W,L=U,N=z,O=G,N=z,p=Rt}a.push(u)}}if(e.path)for(var T in e.path){var H,K=e.path[T];if(!(H=r.findPathConstraint(T)))throw new Error("Path constraint not found: "+T);C=r.pathConstraints.indexOf(H);for(var c in K){if(p=(at=K[c])[0]){var Z=at.length;if("position"===c){u=new Et(Z,Z,C);a.push(Je(at,u,0,H.positionMode==t.PositionMode.Fixed?i:1))}else if("spacing"===c){u=new Ft(Z,Z,C);a.push(Je(at,u,0,H.spacingMode==t.SpacingMode.Length||H.spacingMode==t.SpacingMode.Fixed?i:1))}else if("mix"===c){for(u=new Yt(Z,3*Z,C),m=en(p,"time",0),P=en(p,"mixRotate",1),D=en(p,"mixX",1),L=en(p,"mixY",D),f=0,y=0;;f++){if(u.setFrame(f,m,P,D,L),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),q=en(Rt,"mixRotate",1),W=en(Rt,"mixX",1),U=en(Rt,"mixY",W);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,P,q,1),y=tn(Ot,u,y,f,1,m,x,D,W,1),y=tn(Ot,u,y,f,2,m,x,L,U,1)),m=x,P=q,D=W,L=U,p=Rt}a.push(u)}}}}if(e.attachments)for(var Q in e.attachments){var J=e.attachments[Q],$=r.findSkin(Q);if(!$)throw new Error("Skin not found: "+Q);for(var tt in J){o=J[tt];if(!($t=r.findSlot(tt)))throw new Error("Slot not found: "+tt);l=$t.index;for(var et in o){var nt=o[et],rt=$.getAttachment(l,et);for(var it in nt){var at;if(p=(at=nt[it])[0])if("deform"==it){var st=rt.bones,ot=rt.vertices,ht=st?ot.length/3*2:ot.length;for(u=new At(at.length,at.length,l,rt),m=en(p,"time",0),f=0,y=0;;f++){var Rt,Pt=void 0,Dt=en(p,"vertices",null);if(Dt){Pt=g.newFloatArray(ht);var Vt=en(p,"offset",0);if(g.arrayCopy(Dt,0,Pt,Vt,Dt.length),1!=i)for(var Lt=(Nt=Vt)+Dt.length;Nt<Lt;Nt++)Pt[Nt]*=i;if(!st)for(var Nt=0;Nt<ht;Nt++)Pt[Nt]+=ot[Nt]}else Pt=st?g.newFloatArray(ht):ot;if(u.setFrame(f,m,Pt),!(Rt=at[f+1])){u.shrink(y);break}var Ot;x=en(Rt,"time",0);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,0,1,1)),m=x,p=Rt}a.push(u)}else if("sequence"==it){u=new Xt(at.length,l,rt);var _t=0;for(f=0;f<at.length;f++){var qt=en(p,"delay",_t),Wt=(m=en(p,"time",0),E[en(p,"mode","hold")]),Ut=en(p,"index",0);u.setFrame(f,m,Wt,Ut,qt),_t=qt,p=at[f+1]}a.push(u)}}}}}if(e.drawOrder){u=new Bt(e.drawOrder.length);var zt=r.slots.length;for(f=0,Nt=0;Nt<e.drawOrder.length;Nt++,f++){var Gt=e.drawOrder[Nt],jt=null,Ht=en(Gt,"offsets",null);if(Ht){jt=g.newArray(zt,-1);for(var Kt=g.newArray(zt-Ht.length,0),Zt=0,Qt=0,Jt=0;Jt<Ht.length;Jt++){var $t,ee=Ht[Jt];if(!($t=r.findSlot(ee.slot)))throw new Error("Slot not found: "+$t);for(l=$t.index;Zt!=l;)Kt[Qt++]=Zt++;jt[Zt+ee.offset]=Zt++}for(;Zt<zt;)Kt[Qt++]=Zt++;for(Jt=zt-1;Jt>=0;Jt--)-1==jt[Jt]&&(jt[Jt]=Kt[--Qt])}u.setFrame(f,en(Gt,"time",0),jt)}a.push(u)}if(e.events){for(u=new It(e.events.length),f=0,Nt=0;Nt<e.events.length;Nt++,f++){var ne=e.events[Nt],re=r.findEvent(ne.name);if(!re)throw new Error("Event not found: "+ne.name);var ie=new te(g.toSinglePrecision(en(ne,"time",0)),re);ie.intValue=en(ne,"int",re.intValue),ie.floatValue=en(ne,"float",re.floatValue),ie.stringValue=en(ne,"string",re.stringValue),ie.data.audioPath&&(ie.volume=en(ne,"volume",1),ie.balance=en(ne,"balance",0)),u.setFrame(f,ie)}a.push(u)}var ae=0;for(Nt=0,Lt=a.length;Nt<Lt;Nt++)ae=Math.max(ae,a[Nt].getDuration());r.animations.push(new V(n,a,ae))},e}(),Qe=function(t,e,n,r,i){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=r,this.inheritTimeline=i};function Je(t,e,n,r){for(var i=t[0],a=en(i,"time",0),s=en(i,"value",n)*r,o=0,h=0;;h++){e.setFrame(h,a,s);var l=t[h+1];if(!l)return e.shrink(o),e;var c=en(l,"time",0),d=en(l,"value",n)*r;i.curve&&(o=tn(i.curve,e,o,h,0,a,c,s,d,r)),a=c,s=d,i=l}}function $e(t,e,n,r,i,a){for(var s=t[0],o=en(s,"time",0),h=en(s,n,i)*a,l=en(s,r,i)*a,c=0,d=0;;d++){e.setFrame(d,o,h,l);var u=t[d+1];if(!u)return e.shrink(c),e;var f=en(u,"time",0),p=en(u,n,i)*a,m=en(u,r,i)*a,g=s.curve;g&&(c=tn(g,e,c,d,0,o,f,h,p,a),c=tn(g,e,c,d,1,o,f,l,m,a)),o=f,h=p,l=m,s=u}}function tn(t,e,n,r,i,a,s,o,h,l){if("stepped"==t)return e.setStepped(r),n;var c=i<<2,d=t[c],u=t[c+1]*l,f=t[c+2],p=t[c+3]*l;return e.setBezier(n,r,i,a,o,d,u,f,p,s,h),n+1}function en(t,e,n){return void 0!==t[e]?t[e]:n}void 0===Math.fround&&(Math.fround=(ke=new Float32Array(1),function(t){return ke[0]=t,ke[0]}));var nn=1,rn=function(){function n(t){this.vertices=new Float32Array(an.MAX_VERTICES*an.VERTEX_SIZE),this.indices=new Uint16Array(an.MAX_VERTICES),this.verticesLength=0,this.indicesLength=0;var n=t.blendMode,r=t.texture,i=t.priority,a=t.renderer,s=t.pma,o=t.name,h=void 0===o?"MSpine":o,l=t.engine,c=a.mask,d=void 0===c?0:c,u=a.maskMode,f=void 0===u?0:u;this.blendMode=n,this.lastTexture=r,this.priority=i,this.engine=l,this.geometry=this.createGeometry(),this.material=this.createMaterial(s,f,d),this.mesh=e.Mesh.create(l,{name:h+nn++,priority:this.priority,material:this.material,geometry:this.geometry}),this.vertices=new Float32Array(an.MAX_VERTICES*an.VERTEX_SIZE),this.indices=new Uint16Array(an.MAX_VERTICES)}return Object.defineProperty(n.prototype,"blending",{get:function(){return this.blendMode},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"texture",{get:function(){return this.lastTexture},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"indicesNum",{get:function(){return this.indicesLength},enumerable:!1,configurable:!0}),n.prototype.createGeometry=function(){var t=Float32Array.BYTES_PER_ELEMENT,n=t*an.VERTEX_SIZE,r={aPosition:{size:2,offset:0,stride:n,data:new Float32Array(0)},aColor:{size:4,offset:2*t,stride:n,dataSource:"aPosition"},aTexCoords:{size:2,offset:6*t,stride:n,dataSource:"aPosition"},aColor2:{size:4,offset:8*t,stride:n,dataSource:"aPosition"}};return e.Geometry.create(this.engine,{attributes:r,indices:{data:new Uint16Array(0),releasable:!0},mode:e.glContext.TRIANGLES,maxVertex:an.MAX_VERTICES})},n.prototype.createMaterial=function(n,r,i){var a,s,o,h,l=e.Material.create(this.engine,{shader:(a=this.engine,s=a.renderer.env,o=a.gpuCapability.level,h=[["ENV_EDITOR",s===e.PLAYER_OPTIONS_ENV_EDITOR]],{fragment:e.createShaderWithMarcos(h,"precision mediump float;varying mediump vec4 vLight;varying mediump vec4 vDark;varying vec2 vTexCoords;uniform sampler2D uTexture;void main(){vec4 texColor=texture2D(uTexture,vTexCoords);gl_FragColor.a=texColor.a*vLight.a;gl_FragColor.rgb=((texColor.a-1.0)*vDark.a+1.0-texColor.rgb)*vDark.rgb+texColor.rgb*vLight.rgb;}",e.ShaderType.fragment,o),vertex:e.createShaderWithMarcos(h,"attribute vec2 aPosition;attribute vec4 aColor;attribute vec4 aColor2;attribute vec2 aTexCoords;uniform mat4 uModel;uniform mat4 effects_MatrixVP;\n#ifdef ENV_EDITOR\nuniform vec4 uEditorTransform;\n#endif\nvarying vec4 vLight;varying vec4 vDark;varying vec2 vTexCoords;void main(){vLight=aColor;vDark=aColor2;vTexCoords=aTexCoords;gl_Position=effects_MatrixVP*uModel*vec4(aPosition,0.0,1.0);\n#ifdef ENV_EDITOR\ngl_Position=vec4(gl_Position.xy*uEditorTransform.xy+uEditorTransform.zw*gl_Position.w,gl_Position.zw);\n#endif\n}",e.ShaderType.vertex,o),glslVersion:e.GLSLVersion.GLSL1,marcos:h,shared:!0}),uniformSemantics:{effects_MatrixVP:"VIEWPROJECTION",uEditorTransform:"EDITOR_TRANSFORM"}});return l.setTexture("uTexture",this.lastTexture),l.setMatrix("uModel",e.math.Matrix4.fromIdentity()),l.blending=!0,l.culling=!1,l.depthTest=!1,l.depthMask=!1,l.stencilRef=void 0!==i?[i,i]:void 0,function(n,r,i){switch(n.blendEquation=[e.glContext.FUNC_ADD,e.glContext.FUNC_ADD],r){case t.BlendMode.Multiply:n.blendFunction=[e.glContext.DST_COLOR,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE_MINUS_SRC_ALPHA];break;case t.BlendMode.Screen:n.blendFunction=[e.glContext.ONE,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE_MINUS_SRC_COLOR,e.glContext.ONE_MINUS_SRC_ALPHA];break;case t.BlendMode.Additive:n.blendFunction=[i?e.glContext.ONE:e.glContext.SRC_ALPHA,e.glContext.ONE,e.glContext.ONE,e.glContext.ONE];break;case t.BlendMode.Normal:n.blendFunction=[i?e.glContext.ONE:e.glContext.SRC_ALPHA,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE,e.glContext.ONE_MINUS_SRC_ALPHA];break;default:throw new Error("Unknown blend mode: ".concat(r))}}(l,this.blendMode,n),e.setMaskMode(l,r),l},n.prototype.updateMesh=function(t,e,n){var r=this.verticesLength,i=this.indicesLength,a=this.verticesLength/an.VERTEX_SIZE;this.vertices.set(t,r),this.verticesLength+=n;for(var s=0,o=i;s<e.length;s++,o++)this.indices[o]=e[s]+a;this.indicesLength+=e.length},n.prototype.endUpdate=function(t){for(var e=this.verticesLength;e<this.vertices.length;e++)this.vertices[e]=0;for(e=this.indicesLength;e<this.indices.length;e++)this.indices[e]=0;this.geometry.setAttributeData("aPosition",this.vertices),this.geometry.setIndexData(this.indices),this.geometry.setDrawCount(this.indicesLength),this.material.setMatrix("uModel",t)},n.prototype.startUpdate=function(){this.verticesLength=0,this.indicesLength=0},n}();var an=function(){function t(t,n){this.slotList=[],this.vertices=[],this.clipper=new Ke,this.tempColor=new h,this.tempDark=new h,this.wm=e.math.Matrix4.fromIdentity(),this.meshGroups=[],this.meshToAdd=[],this.slotList=t,this.meshName=n.meshName,this.transform=n.transform,this.listIndex=n.listIndex,this.pma=n.pma,this.renderer=n.renderer,this.engine=n.engine}return t.prototype.resetMeshes=function(){this.meshToAdd.length=0},t.prototype.update=function(){var e,n,r,i,a,o=this,h=this.clipper,l=this.pma,c=this.vertices,d=[],u=[],f=0,p=[],m=0,g=0;this.currentMesh=this.meshGroups[g],this.meshGroups.map((function(t){return t.startUpdate()}));try{for(var v=s(this.slotList),y=v.next();!y.done;y=v.next()){var x=y.value,w=h.isClipping()?2:t.VERTEX_SIZE,M=x.getAttachment(),k=void 0,S=void 0,A=0;if(u=[],p=[],f=0,m=0,x.bone.active){if(M instanceof Y){var I=M;k=I.color,c=this.vertices,A=w<<2,I.computeWorldVertices(x,c,0,w),d=t.QUAD_TRIANGLES,a=I.uvs,S=null===(r=I.region)||void 0===r?void 0:r.renderObject.page.texture}else{if(!(M instanceof B)){if(M instanceof b){h.clipStart(x,M);continue}h.clipEndWithSlot(x);continue}var T=M;k=T.color,c=this.vertices,A=(T.worldVerticesLength>>1)*w,T.computeWorldVertices(x,0,T.worldVerticesLength,c,0,w),d=T.triangles,a=T.uvs,S=null===(i=T.region)||void 0===i?void 0:i.renderObject.page.texture}if(S){var C=x.bone.skeleton.color,E=x.color,F=this.tempColor,X=this.tempDark;if(F.set(C.r*E.r*k.r,C.g*E.g*k.g,C.b*E.b*k.b,C.a*E.a*k.a),l&&(F.r*=F.a,F.g*=F.a,F.b*=F.a),x.darkColor?l?(X.r=x.darkColor.r*F.a,X.g=x.darkColor.g*F.a,X.b=x.darkColor.b*F.a,X.a=1):(X.setFromColor(x.darkColor),X.a=0):X.set(0,0,0,1),h.isClipping())h.clipTriangles(c,A,d,d.length,a,F,X,!0),f=(u=h.clippedVertices).length,m=(p=h.clippedTriangles).length;else{for(var R=2,P=0,D=A;R<D;R+=w,P+=2)c[R]=F.r,c[R+1]=F.g,c[R+2]=F.b,c[R+3]=F.a,c[R+4]=a[P],c[R+5]=a[P+1],c[R+6]=X.r,c[R+7]=X.g,c[R+8]=X.b,c[R+9]=X.a;u=c.slice(0,A),f=A,p=d,m=d.length}if(0==f||0==m){h.clipEndWithSlot(x);continue}var V=this.currentMesh;if(V&&V.blending===x.data.blendMode&&V.texture.name===S.name&&m+V.indicesNum<=t.MAX_VERTICES)V.updateMesh(u,p,f);else{var L=this.findMeshIndex(g,x.data.blendMode,S);if(-1===L){var N=this.currentMesh=new rn({blendMode:x.data.blendMode,texture:S,name:this.meshName,priority:this.listIndex+=.01,pma:l,renderer:this.renderer,engine:this.engine});g=this.meshGroups.length,this.meshGroups.push(N),this.meshToAdd.push(N.mesh)}else if(m+V.indicesNum<=t.MAX_VERTICES)g=L,this.currentMesh=this.meshGroups[L];else{N=this.currentMesh=new rn({blendMode:x.data.blendMode,texture:S,name:this.meshName,priority:V.priority+.01,pma:l,renderer:this.renderer,engine:this.engine});this.meshGroups.splice(g,0,N),this.meshToAdd.push(N.mesh),g++}this.currentMesh.updateMesh(u,p,f)}}h.clipEndWithSlot(x)}else h.clipEndWithSlot(x)}}catch(t){e={error:t}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(e)throw e.error}}h.clipEnd(),this.wm=this.transform.getWorldMatrix(),this.meshGroups.map((function(t){return t.endUpdate(o.wm)}))},t.prototype.findMeshIndex=function(t,e,n){for(var r=-1,i=t;i<this.meshGroups.length;i++){var a=this.meshGroups[i];if(a&&a.blending===e&&a.texture.name===n.name){r=i;break}}return r},t.QUAD_TRIANGLES=[0,1,2,2,3,0],t.VERTEX_SIZE=12,t.MAX_VERTICES=10920,t}(),sn=e.math.Vector2,on=e.math.Vector3,hn=function(t){function n(n,r){var i,a=t.call(this,n,r)||this;a.offset=new sn,a.size=new sn,a._contentVisible=!0;var s=null===(i=a.composition)||void 0===i?void 0:i.renderer.engine;return e.assertExist(s),a.engine=s,a}return r(n,t),Object.defineProperty(n.prototype,"type",{get:function(){return e.spec.ItemType.spine},enumerable:!1,configurable:!0}),n.prototype.onConstructed=function(t){var e;this.initContent(t.content.options,null===(e=this.composition)||void 0===e?void 0:e.loaderData.spineDatas),this.startSize=t.content.options.startSize,this.renderer=t.content.renderer},n.prototype.initContent=function(t,e){var n=t.spine;if(!isNaN(n)){var r=t.activeSkin||"default",i=e[n],a=i.atlas,s=i.skeletonFile,o=i.skeletonType,h=i.skinList,c=i.animationList,u="string"==typeof t.activeAnimation?[t.activeAnimation]:t.activeAnimation;if(this.skeletonData=l(a,s,o),this.animationStateData=new Gt(this.skeletonData),this.animationStateData.defaultMix=t.mixDuration||0,this.spineDataCache=e[n],this.skinList=h.slice(),this.animationList=c.slice(),this.skeleton=new le(this.skeletonData),this.setSkin(r),this.state=new Rt(this.animationStateData),1===u.length)if(isNaN(t.speed)){var f=Number((d(this.skeletonData,u[0])/this.duration).toFixed(2));this.setAnimation(u[0],f)}else this.setAnimation(u[0],t.speed);else this.setAnimationList(u,t.speed);this.pma=a.pages[0].pma}},n.prototype.doCreateContent=function(){if(this.skeleton)return new an(this.skeleton.drawOrder,{listIndex:this.listIndex,meshName:this.name,transform:this.transform,pma:this.pma,renderer:this.renderer,engine:this.engine})},n.prototype.onLifetimeBegin=function(){this.state&&this.skeleton&&(this.state.apply(this.skeleton),this.resize(),this.updateState(0))},n.prototype.onItemUpdate=function(t,e){if(this.content&&this.content.meshGroups.length){var n=this.contentVisible;this.content.meshGroups.map((function(t){t.mesh.setVisible(n)})),n&&this.updateState(t/1e3)}},n.prototype.onEnd=function(){this.endBehavior===e.spec.END_BEHAVIOR_DESTROY&&this.state&&(this.state.clearListeners(),this.state.clearTracks())},n.prototype.handleVisibleChanged=function(t){this.content&&this.content.meshGroups.length&&this.content.meshGroups.map((function(e){e.mesh.setVisible(t)}))},n.prototype.getBoundingBox=function(){var t=this.getBounds(),n={type:e.HitTestType.triangle,area:[]};if(!t)return n;var r=t.x,i=t.y,a=t.width,s=t.height,o=this.transform.getWorldMatrix(),h=r+a/2,l=i+s/2,c=new on(h-a/2,l-s/2,0),d=new on(h+a/2,l-s/2,0),u=new on(h+a/2,l+s/2,0),f=new on(h-a/2,l+s/2,0);return o.projectPoint(c),o.projectPoint(d),o.projectPoint(u),o.projectPoint(f),n.area=[{p0:c,p1:d,p2:u},{p0:c,p1:u,p2:f}],n},n.prototype.getHitTestParams=function(t){var n,r=this.getBoundingBox(),i=null===(n=this.engine.renderer)||void 0===n?void 0:n.env;if(r.area.length)return t&&i===e.PLAYER_OPTIONS_ENV_EDITOR?{type:e.HitTestType.triangle,triangles:r.area,backfaceCulling:!1,behavior:e.spec.InteractBehavior.NOTIFY}:void 0},n.prototype.updateState=function(t){var e;this.state&&this.skeleton&&(this.state.update(t),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform(),null===(e=this.content)||void 0===e||e.update())},n.prototype.setAnimation=function(t,n){if(!this.skeleton||!this.state)throw new Error("Set animation before skeleton create");if(!this.animationList.length)throw new Error("animationList is empty, check your spine file");var r=this.endBehavior===e.spec.ItemEndBehavior.loop;this.animationList.includes(t)?(this.state.addAnimation(0,t,r,0),this.activeAnimation=[t]):(console.warn("animation ".concat(t," not exists in animationList: ").concat(this.animationList,", set to ").concat(this.animationList[0])),this.state.setAnimation(0,this.animationList[0],r),this.activeAnimation=[this.animationList[0]]),isNaN(n)||this.setSpeed(n)},n.prototype.setAnimationList=function(t,n){var r,i,a=this;if(!this.skeleton||!this.state)throw new Error("Set animation before skeleton create");if(!this.animationList.length)throw new Error("animationList is empty, check your spine file");this.state.clearTracks();var o=function(t){var n=h.state.addAnimation(0,t,!1);if(h.endBehavior===e.spec.ItemEndBehavior.loop){var r={end:function(){a.state.addAnimation(0,t,!1).listener=r}};n.listener=r}},h=this;try{for(var l=s(t),c=l.next();!c.done;c=l.next()){o(c.value)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}this.activeAnimation=t,isNaN(n)||this.setSpeed(n)},n.prototype.setSpeed=function(t){this.state&&(this.state.timeScale=t)},n.prototype.getSpeed=function(){return this.state.timeScale||1},n.prototype.getActiveAnimation=function(){return this.activeAnimation},n.prototype.setMixDuration=function(t,e,n){this.animationStateData&&this.animationStateData.setMix(t,e,n)},n.prototype.setDefaultMixDuration=function(t){this.state&&!this.state.tracks[0]&&(this.state.tracks[0].mixDuration=t)},n.prototype.deleteMixForLoop=function(){var t=this.activeAnimation[this.activeAnimation.length-1],e=this.activeAnimation[0];this.animationStateData.setMix(t,e,0)},n.prototype.setSkin=function(t){if(!this.skeleton)throw new Error("Set skin before skeleton create");if(!t||!this.skinList.includes(t))throw new Error("skin ".concat(t," not exists in skinList: ").concat(this.skinList));this.skeleton.setSkinByName(t),this.skeleton.setToSetupPose()},n.prototype.resize=function(){var t=this.getBounds();if(t){var e=t.width,n=this.transform.scale,r=1/e;this.scaleFactor=r,this.transform.setScale(this.startSize*r,this.startSize*r,n.z)}},n.prototype.setScale=function(t,e,n){var r=this.transform.scale,i=r.x,a=r.y,s=r.z;this.transform.setScale(i*t,a*e,s*n)},n.prototype.getBounds=function(){if(this.state&&this.skeleton&&this.contentVisible)return this.skeleton.updateWorldTransform(),this.skeleton.getBounds(this.offset,this.size),{x:this.offset.x,y:this.offset.y,width:this.size.x,height:this.size.y}},n}(e.VFXItem),ln=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.slotGroups=[],e.meshToRemove=[],e}return r(n,t),n.processRawJSON=function(t,e){return i(this,void 0,void 0,(function(){return a(this,(function(t){return[2,Promise.resolve()]}))}))},n.prepareResource=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,h,d,f,p,m,g,v,y,x,w,b,M,S,A,I,B,T,C,E,F,Y,X,R,P,D,V,L,N;return a(this,(function(a){if(n=(e=t).jsonScene,!(e&&n&&n.spines))throw new Error("scene not contain spine content");r=[],i=e.bins,h=new TextDecoder("utf-8");try{for(m=s(n.spines),g=m.next();!g.done;g=m.next())(v=g.value).spineData?r.push(v.spineData):(y=v.atlas,x=v.skeleton,w=v.images,b=v.skeletonType,M=v.id,S=void 0===M?"":M,A=w.map((function(t){return n.textures[t]})),D=o(y[1],3),p=D[0],V=D[1],f=void 0===V?0:V,d=D[2],I=i[p],B=d?h.decode(new Uint8Array(I,f,d)):h.decode(new Uint8Array(I,f)),T=new k(B),L=o(x[1],3),p=L[0],N=L[1],f=void 0===N?0:N,d=L[2],C=i[p],E=void 0,E="json"===b?d?h.decode(new Uint8Array(C,f,d)):h.decode(new Uint8Array(C,f)):d?new DataView(C,f,d):new DataView(C,f),F=l(T,E,b),Y=u(F),X=c(F),r.push({atlas:T,skeletonFile:E,skeletonData:F,images:w,texturesOptions:A,skeletonType:b,skeletonInstance:new le(F),skinList:Y,animationList:X,id:S}))}catch(t){R={error:t}}finally{try{g&&!g.done&&(P=m.return)&&P.call(m)}finally{if(R)throw R.error}}return n.spines=r,[2]}))}))},n.prototype.onCompositionConstructed=function(t,e){this.slotGroups=[];var n=t.textures;if(e.jsonScene.spines){var r=e.jsonScene.spines;r.map((function(t,e){var r=t.atlas,i=t.images,a=r.pages.length;if(i.length!==a)throw new Error("atlas.page's length not equal spine.textures' length");for(var s=0;s<a;s++){var o=r.pages[s],h=n[i[s]];if(!h)throw new Error("Can not find page ".concat(o.name,"'s texture, check the texture name"));o.setTexture(h)}})),t.loaderData.spineDatas=r}},n.prototype.onCompositionItemLifeBegin=function(t,e){e instanceof hn&&e.content&&this.slotGroups.push(e.content)},n.prototype.onCompositionItemRemoved=function(t,e){var n;e instanceof hn&&e.content&&(e.spineDataCache=void 0,(n=this.meshToRemove).push.apply(n,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([],o(e.content.meshGroups),!1)))},n.prototype.onCompositionDestroyed=function(t){t.reusable||t.keepResource?this.slotGroups.map((function(t){t&&t.meshGroups.map((function(t){return t.mesh.dispose({material:{textures:e.DestroyOptions.keep}})}))})):t.loaderData.spineDatas&&delete t.loaderData.spineDatas},n.prototype.prepareRenderFrame=function(t,e){return this.meshToRemove.map((function(t){return e.removeMeshFromDefaultRenderPass(t.mesh)})),this.slotGroups.length&&this.slotGroups.map((function(t){t&&(t.meshToAdd.forEach((function(t){t.getVisible()&&e.addMeshToDefaultRenderPass(t)})),t.resetMeshes())})),this.meshToRemove.length=0,!1},n}(e.AbstractPlugin);e.registerPlugin("spine",ln,hn);var cn="1.1.2";console.info("[Galacean Effects Plugin Spine] version: "+cn),t.AlphaTimeline=bt,t.Animation=V,t.AnimationState=Rt,t.AnimationStateAdapter=Lt,t.AnimationStateData=Gt,t.AtlasAttachmentLoader=jt,t.Attachment=y,t.AttachmentTimeline=St,t.BinaryInput=ve,t.Bone=Jt,t.BoneData=Ht,t.BoundingBoxAttachment=w,t.CURRENT=zt,t.ClippingAttachment=b,t.ConstraintData=$t,t.CurveTimeline=st,t.CurveTimeline1=ot,t.CurveTimeline2=ht,t.DeformTimeline=At,t.DrawOrderTimeline=Bt,t.Event=te,t.EventData=ee,t.EventQueue=Dt,t.EventTimeline=It,t.FIRST=Ot,t.HOLD_FIRST=qt,t.HOLD_MIX=Wt,t.HOLD_SUBSEQUENT=_t,t.IkConstraint=ne,t.IkConstraintData=re,t.IkConstraintTimeline=Tt,t.MeshAttachment=B,t.PathAttachment=T,t.PathConstraint=se,t.PathConstraintData=ie,t.PathConstraintMixTimeline=Yt,t.PathConstraintPositionTimeline=Et,t.PathConstraintSpacingTimeline=Ft,t.PointAttachment=F,t.RGB2Timeline=kt,t.RGBA2Timeline=Mt,t.RGBATimeline=xt,t.RGBTimeline=wt,t.RegionAttachment=Y,t.RotateTimeline=lt,t.SETUP=Ut,t.SUBSEQUENT=Nt,t.ScaleTimeline=ft,t.ScaleXTimeline=pt,t.ScaleYTimeline=mt,t.SequenceTimeline=Xt,t.ShearTimeline=gt,t.ShearXTimeline=vt,t.ShearYTimeline=yt,t.Skeleton=le,t.SkeletonBinary=ge,t.SkeletonBounds=je,t.SkeletonClipping=Ke,t.SkeletonData=ce,t.SkeletonJson=Ze,t.Skin=ue,t.SkinEntry=de,t.Slot=oe,t.SlotData=fe,t.SpineLoader=ln,t.SpineVFXItem=hn,t.TextureAtlas=k,t.TextureAtlasPage=A,t.TextureAtlasRegion=I,t.TextureRegion=M,t.Timeline=at,t.TrackEntry=Pt,t.TransformConstraint=he,t.TransformConstraintData=me,t.TransformConstraintTimeline=Ct,t.TranslateTimeline=ct,t.TranslateXTimeline=dt,t.TranslateYTimeline=ut,t.Triangulator=He,t.VertexAttachment=x,t.createSkeletonData=l,t.getAnimationDuration=d,t.getAnimationList=c,t.getSkinList=u,t.getSpineVersion=function(t){var e=new ve(t);return e.readInt32(),e.readInt32(),e.readString()},t.getTextureOptions=function(e){var n,r,i=new TextDecoder("utf-8").decode(new Uint8Array(e,0)),a=new k(i),o=[],h=a.pages[0];try{for(var l=s(a.pages),c=l.next();!c.done;c=l.next()){var d=c.value;o.push(d.name)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var u=h.magFilter,f=void 0===u?t.TextureFilter.Linear:u,p=h.minFilter,m=void 0===p?t.TextureFilter.Linear:p,g=h.uWrap,v=void 0===g?t.TextureWrap.ClampToEdge:g,y=h.vWrap,x=void 0===y?t.TextureWrap.ClampToEdge:y;return{images:o,pma:h.pma,magFilter:f,minFilter:m,wrapS:v,wrapT:x}},t.version=cn,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
8
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@galacean/effects")):"function"==typeof define&&define.amd?define(["exports","@galacean/effects"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ge=t.ge||{},t.ge.spinePlugin={}),t.ge)}(this,(function(t,e){"use strict";var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function i(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{h(r.next(t))}catch(t){a(t)}}function o(t){try{h(r.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}h((r=r.apply(t,e||[])).next())}))}function a(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(h){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,h])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var h=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp()},t.prototype.toString=function(){return"r: ".concat(this.r,", g: ").concat(this.g,", b: ").concat(this.b,", a: ").concat(this.a)},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp()},t.prototype.clamp=function(){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},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.fromString=function(e){return(new t).setFromString(e)},t}();function l(t,e,n){var r=new jt(t);return("skel"===n?new ge(r):new Ze(r)).readSkeletonData(e)}function c(t){return t.animations.map((function(t){return t.name}))}function d(t,n){var r=t.findAnimation(n);return e.assertExist(r),r.duration}function u(t){return t.skins.map((function(t){return t.name}))}var f,p,m=function(){function t(){this.entries={},this.size=0}return t.prototype.add=function(t){var e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)},t.prototype.addAll=function(t){for(var e=this.size,n=0,r=t.length;n<r;n++)this.add(t[n]);return e!=this.size},t.prototype.contains=function(t){return this.entries[t]},t.prototype.clear=function(){this.entries={},this.size=0},t}(),g=function(){function t(){}return t.arrayCopy=function(t,e,n,r,i){for(var a=e,s=r;a<e+i;a++,s++)n[s]=t[a]},t.arrayFill=function(t,e,n,r){for(var i=e;i<n;i++)t[i]=r},t.setArraySize=function(t,e,n){void 0===n&&(n=0);var r=t.length;if(r==e)return t;if(t.length=e,r<e)for(var i=r;i<e;i++)t[i]=n;return t},t.ensureArrayCapacity=function(e,n,r){return void 0===r&&(r=0),e.length>=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r<t;r++)n[r]=e;return n},t.newFloatArray=function(e){if(t.SUPPORTS_TYPED_ARRAYS)return new Float32Array(e);for(var n=new Array(e),r=0;r<n.length;r++)n[r]=0;return n},t.newShortArray=function(e){if(t.SUPPORTS_TYPED_ARRAYS)return new Int16Array(e);for(var n=new Array(e),r=0;r<n.length;r++)n[r]=0;return n},t.toFloatArray=function(e){return t.SUPPORTS_TYPED_ARRAYS?new Float32Array(e):e},t.toSinglePrecision=function(e){return t.SUPPORTS_TYPED_ARRAYS?Math.fround(e):e},t.webkit602BugfixHelper=function(t,e){},t.contains=function(t,e,n){for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1},t.enumValue=function(t,e){return t[e[0].toUpperCase()+e.slice(1)]},t.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,t}(),v=function(){function t(t){this.items=new Array,this.instantiator=t}return t.prototype.obtain=function(){return this.items.length>0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)this.free(t[e])},t.prototype.clear=function(){this.items.length=0},t}(),y=function(t){if(!t)throw new Error("name cannot be null.");this.name=t},x=function(t){function e(n){var r=t.call(this,n)||this;return r.id=e.nextID++,r.bones=null,r.vertices=[],r.worldVerticesLength=0,r.timelineAttachment=r,r}return r(e,t),e.prototype.computeWorldVertices=function(t,e,n,r,i,a){n=i+(n>>1)*a;var s=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(l){for(var c=0,d=0,u=0;u<e;u+=2){c+=(g=l[c])+1,d+=g}var f=s.bones;if(0==o.length)for(T=i,S=3*d;T<n;T+=a){var p=0,m=0,g=l[c++];for(g+=c;c<g;c++,S+=3){w=f[l[c]],C=h[S],E=h[S+1];var v=h[S+2];p+=(C*w.a+E*w.b+w.worldX)*v,m+=(C*w.c+E*w.d+w.worldY)*v}r[T]=p,r[T+1]=m}else for(var y=o,x=(T=i,S=3*d,d<<1);T<n;T+=a){p=0,m=0,g=l[c++];for(g+=c;c<g;c++,S+=3,x+=2){w=f[l[c]],C=h[S]+y[x],E=h[S+1]+y[x+1],v=h[S+2];p+=(C*w.a+E*w.b+w.worldX)*v,m+=(C*w.c+E*w.d+w.worldY)*v}r[T]=p,r[T+1]=m}}else{o.length>0&&(h=o);for(var w,b=(w=t.bone).worldX,M=w.worldY,k=w.a,S=w.b,A=w.c,I=w.d,B=e,T=i;T<n;B+=2,T+=a){var C=h[B],E=h[B+1];r[T]=C*k+E*S+b,r[T+1]=C*A+E*I+M}}},e.prototype.copyTo=function(t){this.bones?(t.bones=new Array(this.bones.length),g.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=g.newFloatArray(this.vertices.length),g.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment},e.nextID=0,e}(y),w=function(t){function e(e){var n=t.call(this,e)||this;return n.color=new h(1,1,1,1),n}return r(e,t),e.prototype.copy=function(){var t=new e(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t},e}(x),b=function(t){function e(e){var n=t.call(this,e)||this;return n.endSlot=null,n.color=new h(.2275,.2275,.8078,1),n}return r(e,t),e.prototype.copy=function(){var t=new e(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},e}(x);t.TextureFilter=void 0,(f=t.TextureFilter||(t.TextureFilter={}))[f.Nearest=9728]="Nearest",f[f.Linear=9729]="Linear",f[f.MipMap=9729]="MipMap",f[f.MipMapNearestNearest=9729]="MipMapNearestNearest",f[f.MipMapLinearNearest=9729]="MipMapLinearNearest",f[f.MipMapNearestLinear=9729]="MipMapNearestLinear",f[f.MipMapLinearLinear=9729]="MipMapLinearLinear",t.TextureWrap=void 0,(p=t.TextureWrap||(t.TextureWrap={}))[p.MirroredRepeat=33648]="MirroredRepeat",p[p.ClampToEdge=33071]="ClampToEdge",p[p.Repeat=10497]="Repeat";var M=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0},k=function(){function e(e){this.pages=new Array,this.regions=new Array;for(var n=new S(e),r=new Array(4),i={size:function(t){t.width=parseInt(r[1]),t.height=parseInt(r[2])},filter:function(e){e.minFilter=g.enumValue(t.TextureFilter,r[1]),e.magFilter=g.enumValue(t.TextureFilter,r[2])},repeat:function(e){r[1].includes("x")&&(e.uWrap=t.TextureWrap.Repeat),r[1].includes("y")&&(e.vWrap=t.TextureWrap.Repeat)},pma:function(t){t.pma="true"==r[1]}},a={xy:function(t){t.x=parseInt(r[1]),t.y=parseInt(r[2])},size:function(t){t.width=parseInt(r[1]),t.height=parseInt(r[2])},bounds:function(t){t.x=parseInt(r[1]),t.y=parseInt(r[2]),t.width=parseInt(r[3]),t.height=parseInt(r[4])},offset:function(t){t.offsetX=parseInt(r[1]),t.offsetY=parseInt(r[2])},orig:function(t){t.originalWidth=parseInt(r[1]),t.originalHeight=parseInt(r[2])},offsets:function(t){t.offsetX=parseInt(r[1]),t.offsetY=parseInt(r[2]),t.originalWidth=parseInt(r[3]),t.originalHeight=parseInt(r[4])},rotate:function(t){var e=r[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:function(t){t.index=parseInt(r[1])}},s=n.readLine();s&&0==s.trim().length;)s=n.readLine();for(;s&&0!=s.trim().length&&0!=n.readEntry(r,s);)s=n.readLine();for(var o=null,h=null,l=null;null!==s;)if(0==s.trim().length)o=null,s=n.readLine();else if(o){for(var c=new I(o,s);;){var d=n.readEntry(r,s=n.readLine());if(0==d)break;if(p=a[r[0]])p(c);else{h||(h=[]),l||(l=[]),h.push(r[0]);for(var u=[],f=0;f<d;f++)u.push(parseInt(r[f+1]));l.push(u)}}0==c.originalWidth&&0==c.originalHeight&&(c.originalWidth=c.width,c.originalHeight=c.height),h&&h.length>0&&l&&l.length>0&&(c.names=h,c.values=l,h=null,l=null),c.u=c.x/o.width,c.v=c.y/o.height,90==c.degrees?(c.u2=(c.x+c.height)/o.width,c.v2=(c.y+c.width)/o.height):(c.u2=(c.x+c.width)/o.width,c.v2=(c.y+c.height)/o.height),this.regions.push(c)}else{for(o=new A(s.trim());0!=n.readEntry(r,s=n.readLine());){var p;(p=i[r[0]])&&p(o)}this.pages.push(o)}}return e.prototype.findRegion=function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null},e.prototype.setTextures=function(t,e){var n,r;void 0===e&&(e="");try{for(var i=s(this.pages),a=i.next();!a.done;a=i.next()){var o=a.value;o.setTexture(t.get(e+o.name))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.dispose=function(){for(var t,e=0;e<this.pages.length;e++)null===(t=this.pages[e].texture)||void 0===t||t.dispose()},e}(),S=function(){function t(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}return t.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},t.prototype.readEntry=function(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;var n=e.indexOf(":");if(-1==n)return 0;t[0]=e.substr(0,n).trim();for(var r=1,i=n+1;;r++){var a=e.indexOf(",",i);if(-1==a)return t[r]=e.substr(i).trim(),r;if(t[r]=e.substr(i,a-i).trim(),i=a+1,4==r)return 4}},t}(),A=function(){function e(e){this.minFilter=t.TextureFilter.Nearest,this.magFilter=t.TextureFilter.Nearest,this.uWrap=t.TextureWrap.ClampToEdge,this.vWrap=t.TextureWrap.ClampToEdge,this.texture=null,this.width=0,this.height=0,this.name=e}return e.prototype.setTexture=function(t){this.texture=t},e}(),I=function(t){function e(e,n){var r=t.call(this)||this;return r.x=0,r.y=0,r.offsetX=0,r.offsetY=0,r.originalWidth=0,r.originalHeight=0,r.index=0,r.degrees=0,r.names=null,r.values=null,r.page=e,r.name=n,r}return r(e,t),e}(M),B=function(t){function e(e,n){var r=t.call(this,e)||this;return r.region=null,r.regionUVs=[],r.uvs=[],r.triangles=[],r.color=new h(1,1,1,1),r.width=0,r.height=0,r.hullLength=0,r.edges=[],r.parentMesh=null,r.sequence=null,r.tempColor=new h(0,0,0,0),r.path=n,r}return r(e,t),e.prototype.updateRegion=function(){if(!this.region)throw new Error("Region not set.");var t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=g.newFloatArray(t.length));var e=this.uvs,n=this.uvs.length,r=this.region.u,i=this.region.v,a=0,s=0;if(this.region instanceof I){var o=this.region,h=o.page,l=h.width,c=h.height;switch(o.degrees){case 90:r-=(o.originalHeight-o.offsetY-o.height)/l,i-=(o.originalWidth-o.offsetX-o.width)/c,a=o.originalHeight/l,s=o.originalWidth/c;for(var d=0;d<n;d+=2)e[d]=r+t[d+1]*a,e[d+1]=i+(1-t[d])*s;return;case 180:r-=(o.originalWidth-o.offsetX-o.width)/l,i-=o.offsetY/c,a=o.originalWidth/l,s=o.originalHeight/c;for(d=0;d<n;d+=2)e[d]=r+(1-t[d])*a,e[d+1]=i+(1-t[d+1])*s;return;case 270:r-=o.offsetY/l,i-=o.offsetX/c,a=o.originalHeight/l,s=o.originalWidth/c;for(d=0;d<n;d+=2)e[d]=r+(1-t[d+1])*a,e[d+1]=i+t[d]*s;return}r-=o.offsetX/l,i-=(o.originalHeight-o.offsetY-o.height)/c,a=o.originalWidth/l,s=o.originalHeight/c}else this.region?(a=this.region.u2-r,s=this.region.v2-i):(r=i=0,a=s=1);for(d=0;d<n;d+=2)e[d]=r+t[d]*a,e[d+1]=i+t[d+1]*s},e.prototype.getParentMesh=function(){return this.parentMesh},e.prototype.setParentMesh=function(t){this.parentMesh=t,t&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)},e.prototype.copy=function(){if(this.parentMesh)return this.newLinkedMesh();var t=new e(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),g.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),g.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),g.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,t.sequence=null!=this.sequence?this.sequence.copy():null,this.edges&&(t.edges=new Array(this.edges.length),g.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t},e.prototype.computeWorldVertices=function(e,n,r,i,a,s){null!=this.sequence&&this.sequence.apply(e,this),t.prototype.computeWorldVertices.call(this,e,n,r,i,a,s)},e.prototype.newLinkedMesh=function(){var t=new e(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),t.timelineAttachment=this.timelineAttachment,t.setParentMesh(this.parentMesh?this.parentMesh:this),null!=t.region&&t.updateRegion(),t},e}(x),T=function(t){function e(e){var n=t.call(this,e)||this;return n.lengths=[],n.closed=!1,n.constantSpeed=!1,n.color=new h(1,1,1,1),n}return r(e,t),e.prototype.copy=function(){var t=new e(this.name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),g.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t},e}(x),C=function(){function t(){}return t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var r=Math.random(),i=e-t;return r<=(n-t)/i?t+Math.sqrt(r*i*(n-t)):e-Math.sqrt((1-r)*i*(e-n))},t.isPowerOfTwo=function(t){return t&&0==(t&t-1)},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();!function(t){function e(e){return t.call(this,e)||this}r(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}}(function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return r(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}()));var E,F=function(t){function e(e){var n=t.call(this,e)||this;return n.x=0,n.y=0,n.rotation=0,n.color=new h(.38,.94,0,1),n}return r(e,t),e.prototype.computeWorldPosition=function(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e},e.prototype.computeWorldRotation=function(t){var e=C.cosDeg(this.rotation),n=C.sinDeg(this.rotation),r=e*t.a+n*t.b,i=e*t.c+n*t.d;return Math.atan2(i,r)*C.radDeg},e.prototype.copy=function(){var t=new e(this.name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},e}(x),Y=function(t){function e(e,n){var r=t.call(this,e)||this;return r.x=0,r.y=0,r.scaleX=1,r.scaleY=1,r.rotation=0,r.width=0,r.height=0,r.color=new h(1,1,1,1),r.rendererObject=null,r.region=null,r.sequence=null,r.offset=g.newFloatArray(8),r.uvs=g.newFloatArray(8),r.tempColor=new h(1,1,1,1),r.path=n,r}return r(e,t),e.prototype.updateRegion=function(){if(!this.region)throw new Error("Region not set.");var t=this.region,e=this.width/this.region.originalWidth*this.scaleX,n=this.height/this.region.originalHeight*this.scaleY,r=-this.width/2*this.scaleX+this.region.offsetX*e,i=-this.height/2*this.scaleY+this.region.offsetY*n,a=r+this.region.width*e,s=i+this.region.height*n,o=this.rotation*Math.PI/180,h=Math.cos(o),l=Math.sin(o),c=this.x,d=this.y,u=r*h+c,f=r*l,p=i*h+d,m=i*l,g=a*h+c,v=a*l,y=s*h+d,x=s*l,w=this.offset;w[0]=u-m,w[1]=p+f,w[2]=u-x,w[3]=y+f,w[4]=g-x,w[5]=y+v,w[6]=g-m,w[7]=p+v;var b=this.uvs;90==t.degrees?(b[2]=t.u,b[3]=t.v2,b[4]=t.u,b[5]=t.v,b[6]=t.u2,b[7]=t.v,b[0]=t.u2,b[1]=t.v2):(b[0]=t.u,b[1]=t.v2,b[2]=t.u,b[3]=t.v,b[4]=t.u2,b[5]=t.v,b[6]=t.u2,b[7]=t.v2)},e.prototype.computeWorldVertices=function(t,e,n,r){null!=this.sequence&&this.sequence.apply(t,this);var i=t.bone,a=this.offset,s=i.worldX,o=i.worldY,h=i.a,l=i.b,c=i.c,d=i.d,u=0,f=0;u=a[0],f=a[1],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o,n+=r,u=a[2],f=a[3],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o,n+=r,u=a[4],f=a[5],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o,n+=r,u=a[6],f=a[7],e[n]=u*h+f*l+s,e[n+1]=u*c+f*d+o},e.prototype.copy=function(){var t=new e(this.name,this.path);return t.region=this.region,t.rendererObject=this.rendererObject,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,g.arrayCopy(this.uvs,0,t.uvs,0,8),g.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t.sequence=null!=this.sequence?this.sequence.copy():null,t},e.X1=0,e.Y1=1,e.C1R=2,e.C1G=3,e.C1B=4,e.C1A=5,e.U1=6,e.V1=7,e.X2=8,e.Y2=9,e.C2R=10,e.C2G=11,e.C2B=12,e.C2A=13,e.U2=14,e.V2=15,e.X3=16,e.Y3=17,e.C3R=18,e.C3G=19,e.C3B=20,e.C3A=21,e.U3=22,e.V3=23,e.X4=24,e.Y4=25,e.C4R=26,e.C4G=27,e.C4B=28,e.C4A=29,e.U4=30,e.V4=31,e}(y),X=function(){function t(e){this.id=t.nextID(),this.start=0,this.digits=0,this.setupIndex=0,this.regions=new Array(e)}return t.prototype.copy=function(){var e=new t(this.regions.length);return g.arrayCopy(this.regions,0,e.regions,0,this.regions.length),e.start=this.start,e.digits=this.digits,e.setupIndex=this.setupIndex,e},t.prototype.apply=function(t,e){var n=t.sequenceIndex;-1==n&&(n=this.setupIndex),n>=this.regions.length&&(n=this.regions.length-1);var r=this.regions[n];e.region!=r&&(e.region=r,e.updateRegion())},t.prototype.getPath=function(t,e){for(var n=t,r=(this.start+e).toString(),i=this.digits-r.length;i>0;i--)n+="0";return n+=r},t.nextID=function(){return t._nextID++},t._nextID=0,t}();!function(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"}(E||(E={}));var R,P,D=[E.hold,E.once,E.loop,E.pingpong,E.onceReverse,E.loopReverse,E.pingpongReverse],V=function(){function t(t,e,n){if(this.timelines=[],this.timelineIds=new m,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=n}return t.prototype.setTimelines=function(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e<t.length;e++)this.timelineIds.addAll(t[e].getPropertyIds())},t.prototype.hasTimeline=function(t){for(var e=0;e<t.length;e++)if(this.timelineIds.contains(t[e]))return!0;return!1},t.prototype.apply=function(t,e,n,r,i,a,s,o){if(!t)throw new Error("skeleton cannot be null.");r&&0!=this.duration&&(n%=this.duration,e>0&&(e%=this.duration));for(var h=this.timelines,l=0,c=h.length;l<c;l++)h[l].apply(t,e,n,i,a,s,o)},t}();t.MixBlend=void 0,(R=t.MixBlend||(t.MixBlend={}))[R.setup=0]="setup",R[R.first=1]="first",R[R.replace=2]="replace",R[R.add=3]="add",t.MixDirection=void 0,(P=t.MixDirection||(t.MixDirection={}))[P.mixIn=0]="mixIn",P[P.mixOut=1]="mixOut";var L,N=0,O=1,_=2,q=3,W=4,U=5,z=6,G=7,j=8,H=9,K=10,Z=11,J=12,Q=13,$=14,tt=15,et=16,nt=17,rt=18,it=19,at=function(){function t(t,e){this.propertyIds=e,this.frames=g.newFloatArray(t*this.getFrameEntries())}return t.prototype.getPropertyIds=function(){return this.propertyIds},t.prototype.getFrameEntries=function(){return 1},t.prototype.getFrameCount=function(){return this.frames.length/this.getFrameEntries()},t.prototype.getDuration=function(){return this.frames[this.frames.length-this.getFrameEntries()]},t.search1=function(t,e){for(var n=t.length,r=1;r<n;r++)if(t[r]>e)return r-1;return n-1},t.search=function(t,e,n){for(var r=t.length,i=n;i<r;i+=n)if(t[i]>e)return i-n;return r-n},t}(),st=function(t){function e(e,n,r){var i=t.call(this,e,r)||this;return i.curves=g.newFloatArray(e+18*n),i.curves[e-1]=1,i}return r(e,t),e.prototype.setLinear=function(t){this.curves[t]=0},e.prototype.setStepped=function(t){this.curves[t]=1},e.prototype.shrink=function(t){var e=this.getFrameCount()+18*t;if(this.curves.length>e){var n=g.newFloatArray(e);g.arrayCopy(this.curves,0,n,0,e),this.curves=n}},e.prototype.setBezier=function(t,e,n,r,i,a,s,o,h,l,c){var d=this.curves,u=this.getFrameCount()+18*t;0==n&&(d[e]=2+u);for(var f=.03*(r-2*a+o),p=.03*(i-2*s+h),m=.006*(3*(a-o)-r+l),g=.006*(3*(s-h)-i+c),v=2*f+m,y=2*p+g,x=.3*(a-r)+f+.16666667*m,w=.3*(s-i)+p+.16666667*g,b=r+x,M=i+w,k=u+18;u<k;u+=2)d[u]=b,d[u+1]=M,x+=v,w+=y,v+=m,y+=g,b+=x,M+=w},e.prototype.getBezierValue=function(t,e,n,r){var i=this.curves;if(i[r]>t){var a=this.frames[e],s=this.frames[e+n];return s+(t-a)/(i[r]-a)*(i[r+1]-s)}var o=r+18;for(r+=2;r<o;r+=2)if(i[r]>=t){var h=i[r-2],l=i[r-1];return l+(t-h)/(i[r]-h)*(i[r+1]-l)}e+=this.getFrameEntries();var c=i[o-2],d=i[o-1];return d+(t-c)/(this.frames[e]-c)*(this.frames[e+n]-d)},e}(at),ot=function(t){function e(e,n,r){return t.call(this,e,n,[r])||this}return r(e,t),e.prototype.getFrameEntries=function(){return 2},e.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+1]=n},e.prototype.getCurveValue=function(t){for(var e=this.frames,n=e.length-2,r=2;r<=n;r+=2)if(e[r]>t){n=r-2;break}var i=this.curves[n>>1];switch(i){case 0:var a=e[n],s=e[n+1];return s+(t-a)/(e[n+2]-a)*(e[n+2+1]-s);case 1:return e[n+1]}return this.getBezierValue(t,n,1,i-2)},e}(st),ht=function(t){function e(e,n,r,i){return t.call(this,e,n,[r,i])||this}return r(e,t),e.prototype.getFrameEntries=function(){return 3},e.prototype.setFrame=function(t,e,n,r){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r},e}(st),lt=function(e){function n(t,n,r){var i=e.call(this,t,n,N+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.rotation=h.data.rotation);case t.MixBlend.first:h.rotation+=(h.data.rotation-h.rotation)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.rotation=h.data.rotation+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:l+=h.data.rotation-h.rotation;case t.MixBlend.add:h.rotation+=l*a}}},n}(ot),ct=function(e){function n(t,n,r){var i=e.call(this,t,n,O+"|"+r,_+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.x=h.data.x,void(h.y=h.data.y);case t.MixBlend.first:h.x+=(h.data.x-h.x)*a,h.y+=(h.data.y-h.y)*a}else{var c=0,d=0,u=at.search(l,r,3),f=this.curves[u/3];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+3]-p);c+=(l[u+3+1]-c)*m,d+=(l[u+3+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}switch(s){case t.MixBlend.setup:h.x=h.data.x+c*a,h.y=h.data.y+d*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.x+=(h.data.x+c-h.x)*a,h.y+=(h.data.y+d-h.y)*a;break;case t.MixBlend.add:h.x+=c*a,h.y+=d*a}}}},n}(ht),dt=function(e){function n(t,n,r){var i=e.call(this,t,n,O+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.x=h.data.x);case t.MixBlend.first:h.x+=(h.data.x-h.x)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.x=h.data.x+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.x+=(h.data.x+l-h.x)*a;break;case t.MixBlend.add:h.x+=l*a}}},n}(ot),ut=function(e){function n(t,n,r){var i=e.call(this,t,n,_+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.y=h.data.y);case t.MixBlend.first:h.y+=(h.data.y-h.y)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.y=h.data.y+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.y+=(h.data.y+l-h.y)*a;break;case t.MixBlend.add:h.y+=l*a}}},n}(ot),ft=function(e){function n(t,n,r){var i=e.call(this,t,n,q+"|"+r,W+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case t.MixBlend.first:h.scaleX+=(h.data.scaleX-h.scaleX)*a,h.scaleY+=(h.data.scaleY-h.scaleY)*a}else{var c,d,u=at.search(l,r,3),f=this.curves[u/3];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+3]-p);c+=(l[u+3+1]-c)*m,d+=(l[u+3+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}if(c*=h.data.scaleX,d*=h.data.scaleY,1==a)s==t.MixBlend.add?(h.scaleX+=c-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=c,h.scaleY=d);else{var g=0,v=0;if(o==t.MixDirection.mixOut)switch(s){case t.MixBlend.setup:g=h.data.scaleX,v=h.data.scaleY,h.scaleX=g+(Math.abs(c)*C.signum(g)-g)*a,h.scaleY=v+(Math.abs(d)*C.signum(v)-v)*a;break;case t.MixBlend.first:case t.MixBlend.replace:g=h.scaleX,v=h.scaleY,h.scaleX=g+(Math.abs(c)*C.signum(g)-g)*a,h.scaleY=v+(Math.abs(d)*C.signum(v)-v)*a;break;case t.MixBlend.add:h.scaleX+=(c-h.data.scaleX)*a,h.scaleY+=(d-h.data.scaleY)*a}else switch(s){case t.MixBlend.setup:g=Math.abs(h.data.scaleX)*C.signum(c),v=Math.abs(h.data.scaleY)*C.signum(d),h.scaleX=g+(c-g)*a,h.scaleY=v+(d-v)*a;break;case t.MixBlend.first:case t.MixBlend.replace:g=Math.abs(h.scaleX)*C.signum(c),v=Math.abs(h.scaleY)*C.signum(d),h.scaleX=g+(c-g)*a,h.scaleY=v+(d-v)*a;break;case t.MixBlend.add:h.scaleX+=(c-h.data.scaleX)*a,h.scaleY+=(d-h.data.scaleY)*a}}}}},n}(ht),pt=function(e){function n(t,n,r){var i=e.call(this,t,n,q+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.scaleX=h.data.scaleX);case t.MixBlend.first:h.scaleX+=(h.data.scaleX-h.scaleX)*a}else{var l=this.getCurveValue(r)*h.data.scaleX;if(1==a)s==t.MixBlend.add?h.scaleX+=l-h.data.scaleX:h.scaleX=l;else{var c=0;if(o==t.MixDirection.mixOut)switch(s){case t.MixBlend.setup:c=h.data.scaleX,h.scaleX=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=h.scaleX,h.scaleX=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.add:h.scaleX+=(l-h.data.scaleX)*a}else switch(s){case t.MixBlend.setup:c=Math.abs(h.data.scaleX)*C.signum(l),h.scaleX=c+(l-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=Math.abs(h.scaleX)*C.signum(l),h.scaleX=c+(l-c)*a;break;case t.MixBlend.add:h.scaleX+=(l-h.data.scaleX)*a}}}},n}(ot),mt=function(e){function n(t,n,r){var i=e.call(this,t,n,W+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.scaleY=h.data.scaleY);case t.MixBlend.first:h.scaleY+=(h.data.scaleY-h.scaleY)*a}else{var l=this.getCurveValue(r)*h.data.scaleY;if(1==a)s==t.MixBlend.add?h.scaleY+=l-h.data.scaleY:h.scaleY=l;else{var c=0;if(o==t.MixDirection.mixOut)switch(s){case t.MixBlend.setup:c=h.data.scaleY,h.scaleY=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=h.scaleY,h.scaleY=c+(Math.abs(l)*C.signum(c)-c)*a;break;case t.MixBlend.add:h.scaleY+=(l-h.data.scaleY)*a}else switch(s){case t.MixBlend.setup:c=Math.abs(h.data.scaleY)*C.signum(l),h.scaleY=c+(l-c)*a;break;case t.MixBlend.first:case t.MixBlend.replace:c=Math.abs(h.scaleY)*C.signum(l),h.scaleY=c+(l-c)*a;break;case t.MixBlend.add:h.scaleY+=(l-h.data.scaleY)*a}}}},n}(ot),gt=function(e){function n(t,n,r){var i=e.call(this,t,n,U+"|"+r,z+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case t.MixBlend.first:h.shearX+=(h.data.shearX-h.shearX)*a,h.shearY+=(h.data.shearY-h.shearY)*a}else{var c=0,d=0,u=at.search(l,r,3),f=this.curves[u/3];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+3]-p);c+=(l[u+3+1]-c)*m,d+=(l[u+3+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}switch(s){case t.MixBlend.setup:h.shearX=h.data.shearX+c*a,h.shearY=h.data.shearY+d*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.shearX+=(h.data.shearX+c-h.shearX)*a,h.shearY+=(h.data.shearY+d-h.shearY)*a;break;case t.MixBlend.add:h.shearX+=c*a,h.shearY+=d*a}}}},n}(ht),vt=function(e){function n(t,n,r){var i=e.call(this,t,n,U+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.shearX=h.data.shearX);case t.MixBlend.first:h.shearX+=(h.data.shearX-h.shearX)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.shearX=h.data.shearX+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.shearX+=(h.data.shearX+l-h.shearX)*a;break;case t.MixBlend.add:h.shearX+=l*a}}},n}(ot),yt=function(e){function n(t,n,r){var i=e.call(this,t,n,z+"|"+r)||this;return i.boneIndex=0,i.boneIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.bones[this.boneIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.shearY=h.data.shearY);case t.MixBlend.first:h.shearY+=(h.data.shearY-h.shearY)*a}else{var l=this.getCurveValue(r);switch(s){case t.MixBlend.setup:h.shearY=h.data.shearY+l*a;break;case t.MixBlend.first:case t.MixBlend.replace:h.shearY+=(h.data.shearY+l-h.shearY)*a;break;case t.MixBlend.add:h.shearY+=l*a}}},n}(ot),xt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r,j+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 5},n.prototype.setFrame=function(t,e,n,r,i,a){t*=5,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color;if(r<l[0]){var d=h.data.color;switch(s){case t.MixBlend.setup:return void c.setFromColor(d);case t.MixBlend.first:c.add((d.r-c.r)*a,(d.g-c.g)*a,(d.b-c.b)*a,(d.a-c.a)*a)}}else{var u=0,f=0,p=0,m=0,g=at.search(l,r,5),v=this.curves[g/5];switch(v){case 0:var y=l[g];u=l[g+1],f=l[g+2],p=l[g+3],m=l[g+4];var x=(r-y)/(l[g+5]-y);u+=(l[g+5+1]-u)*x,f+=(l[g+5+2]-f)*x,p+=(l[g+5+3]-p)*x,m+=(l[g+5+4]-m)*x;break;case 1:u=l[g+1],f=l[g+2],p=l[g+3],m=l[g+4];break;default:u=this.getBezierValue(r,g,1,v-2),f=this.getBezierValue(r,g,2,v+18-2),p=this.getBezierValue(r,g,3,v+36-2),m=this.getBezierValue(r,g,4,v+54-2)}1==a?c.set(u,f,p,m):(s==t.MixBlend.setup&&c.setFromColor(h.data.color),c.add((u-c.r)*a,(f-c.g)*a,(p-c.b)*a,(m-c.a)*a))}}},n}(st),wt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 4},n.prototype.setFrame=function(t,e,n,r,i){t<<=2,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color;if(r<l[0]){var d=h.data.color;switch(s){case t.MixBlend.setup:return c.r=d.r,c.g=d.g,void(c.b=d.b);case t.MixBlend.first:c.r+=(d.r-c.r)*a,c.g+=(d.g-c.g)*a,c.b+=(d.b-c.b)*a}}else{var u=0,f=0,p=0,m=at.search(l,r,4),g=this.curves[m>>2];switch(g){case 0:var v=l[m];u=l[m+1],f=l[m+2],p=l[m+3];var y=(r-v)/(l[m+4]-v);u+=(l[m+4+1]-u)*y,f+=(l[m+4+2]-f)*y,p+=(l[m+4+3]-p)*y;break;case 1:u=l[m+1],f=l[m+2],p=l[m+3];break;default:u=this.getBezierValue(r,m,1,g-2),f=this.getBezierValue(r,m,2,g+18-2),p=this.getBezierValue(r,m,3,g+36-2)}if(1==a)c.r=u,c.g=f,c.b=p;else{if(s==t.MixBlend.setup){var x=h.data.color;c.r=x.r,c.g=x.g,c.b=x.b}c.r+=(u-c.r)*a,c.g+=(f-c.g)*a,c.b+=(p-c.b)*a}}}},n}(st),bt=function(e){function n(t,n,r){var i=e.call(this,t,n,j+"|"+r)||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=h.color;if(r<this.frames[0]){var c=h.data.color;switch(s){case t.MixBlend.setup:return void(l.a=c.a);case t.MixBlend.first:l.a+=(c.a-l.a)*a}}else{var d=this.getCurveValue(r);1==a?l.a=d:(s==t.MixBlend.setup&&(l.a=h.data.color.a),l.a+=(d-l.a)*a)}}},n}(ot),Mt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r,j+"|"+r,H+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 8},n.prototype.setFrame=function(t,e,n,r,i,a,s,o,h){t<<=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a,this.frames[t+5]=s,this.frames[t+6]=o,this.frames[t+7]=h},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color,d=h.darkColor;if(r<l[0]){var u=h.data.color,f=h.data.darkColor;switch(s){case t.MixBlend.setup:return c.setFromColor(u),d.r=f.r,d.g=f.g,void(d.b=f.b);case t.MixBlend.first:c.add((u.r-c.r)*a,(u.g-c.g)*a,(u.b-c.b)*a,(u.a-c.a)*a),d.r+=(f.r-d.r)*a,d.g+=(f.g-d.g)*a,d.b+=(f.b-d.b)*a}}else{var p=0,m=0,g=0,v=0,y=0,x=0,w=0,b=at.search(l,r,8),M=this.curves[b>>3];switch(M){case 0:var k=l[b];p=l[b+1],m=l[b+2],g=l[b+3],v=l[b+4],y=l[b+5],x=l[b+6],w=l[b+7];var S=(r-k)/(l[b+8]-k);p+=(l[b+8+1]-p)*S,m+=(l[b+8+2]-m)*S,g+=(l[b+8+3]-g)*S,v+=(l[b+8+4]-v)*S,y+=(l[b+8+5]-y)*S,x+=(l[b+8+6]-x)*S,w+=(l[b+8+7]-w)*S;break;case 1:p=l[b+1],m=l[b+2],g=l[b+3],v=l[b+4],y=l[b+5],x=l[b+6],w=l[b+7];break;default:p=this.getBezierValue(r,b,1,M-2),m=this.getBezierValue(r,b,2,M+18-2),g=this.getBezierValue(r,b,3,M+36-2),v=this.getBezierValue(r,b,4,M+54-2),y=this.getBezierValue(r,b,5,M+72-2),x=this.getBezierValue(r,b,6,M+90-2),w=this.getBezierValue(r,b,7,M+108-2)}if(1==a)c.set(p,m,g,v),d.r=y,d.g=x,d.b=w;else{if(s==t.MixBlend.setup){c.setFromColor(h.data.color);f=h.data.darkColor;d.r=f.r,d.g=f.g,d.b=f.b}c.add((p-c.r)*a,(m-c.g)*a,(g-c.b)*a,(v-c.a)*a),d.r+=(y-d.r)*a,d.g+=(x-d.g)*a,d.b+=(w-d.b)*a}}}},n}(st),kt=function(e){function n(t,n,r){var i=e.call(this,t,n,[G+"|"+r,H+"|"+r])||this;return i.slotIndex=0,i.slotIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 7},n.prototype.setFrame=function(t,e,n,r,i,a,s,o){t*=7,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a,this.frames[t+5]=s,this.frames[t+6]=o},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=this.frames,c=h.color,d=h.darkColor;if(r<l[0]){var u=h.data.color,f=h.data.darkColor;switch(s){case t.MixBlend.setup:return c.r=u.r,c.g=u.g,c.b=u.b,d.r=f.r,d.g=f.g,void(d.b=f.b);case t.MixBlend.first:c.r+=(u.r-c.r)*a,c.g+=(u.g-c.g)*a,c.b+=(u.b-c.b)*a,d.r+=(f.r-d.r)*a,d.g+=(f.g-d.g)*a,d.b+=(f.b-d.b)*a}}else{var p=0,m=0,g=0,v=0,y=0,x=0,w=at.search(l,r,7),b=this.curves[w/7];switch(b){case 0:var M=l[w];p=l[w+1],m=l[w+2],g=l[w+3],v=l[w+4],y=l[w+5],x=l[w+6];var k=(r-M)/(l[w+7]-M);p+=(l[w+7+1]-p)*k,m+=(l[w+7+2]-m)*k,g+=(l[w+7+3]-g)*k,v+=(l[w+7+4]-v)*k,y+=(l[w+7+5]-y)*k,x+=(l[w+7+6]-x)*k;break;case 1:p=l[w+1],m=l[w+2],g=l[w+3],v=l[w+4],y=l[w+5],x=l[w+6];break;default:p=this.getBezierValue(r,w,1,b-2),m=this.getBezierValue(r,w,2,b+18-2),g=this.getBezierValue(r,w,3,b+36-2),v=this.getBezierValue(r,w,4,b+54-2),y=this.getBezierValue(r,w,5,b+72-2),x=this.getBezierValue(r,w,6,b+90-2)}if(1==a)c.r=p,c.g=m,c.b=g,d.r=v,d.g=y,d.b=x;else{if(s==t.MixBlend.setup){u=h.data.color,f=h.data.darkColor;c.r=u.r,c.g=u.g,c.b=u.b,d.r=f.r,d.g=f.g,d.b=f.b}c.r+=(p-c.r)*a,c.g+=(m-c.g)*a,c.b+=(g-c.b)*a,d.r+=(v-d.r)*a,d.g+=(y-d.g)*a,d.b+=(x-d.b)*a}}}},n}(st),St=function(e){function n(t,n){var r=e.call(this,t,[K+"|"+n])||this;return r.slotIndex=0,r.slotIndex=n,r.attachmentNames=new Array(t),r}return r(n,e),n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];h.bone.active&&(o!=t.MixDirection.mixOut?r<this.frames[0]?s!=t.MixBlend.setup&&s!=t.MixBlend.first||this.setAttachment(e,h,h.data.attachmentName):this.setAttachment(e,h,this.attachmentNames[at.search1(this.frames,r)]):s==t.MixBlend.setup&&this.setAttachment(e,h,h.data.attachmentName))},n.prototype.setAttachment=function(t,e,n){e.setAttachment(n?t.getAttachment(this.slotIndex,n):null)},n}(at),At=function(e){function n(t,n,r,i){var a=e.call(this,t,n,[Z+"|"+r+"|"+i.id])||this;return a.slotIndex=0,a.slotIndex=r,a.attachment=i,a.vertices=new Array(t),a}return r(n,e),n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.vertices[t]=n},n.prototype.setBezier=function(t,e,n,r,i,a,s,o,h,l,c){var d=this.curves,u=this.getFrameCount()+18*t;0==n&&(d[e]=2+u);for(var f=.03*(r-2*a+o),p=.03*h-.06*s,m=.006*(3*(a-o)-r+l),g=.018*(s-h+.33333333),v=2*f+m,y=2*p+g,x=.3*(a-r)+f+.16666667*m,w=.3*s+p+.16666667*g,b=r+x,M=w,k=u+18;u<k;u+=2)d[u]=b,d[u+1]=M,x+=v,w+=y,v+=m,y+=g,b+=x,M+=w},n.prototype.getCurvePercent=function(t,e){var n=this.curves,r=n[e];switch(r){case 0:var i=this.frames[e];return(t-i)/(this.frames[e+this.getFrameEntries()]-i);case 1:return 0}if(n[r-=2]>t){var a=this.frames[e];return n[r+1]*(t-a)/(n[r]-a)}var s=r+18;for(r+=2;r<s;r+=2)if(n[r]>=t){var o=n[r-2],h=n[r-1];return h+(t-o)/(n[r]-o)*(n[r+1]-h)}var l=n[s-2],c=n[s-1];return c+(1-c)*(t-l)/(this.frames[e+this.getFrameEntries()]-l)},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.slots[this.slotIndex];if(h.bone.active){var l=h.getAttachment();if(l&&l instanceof x&&l.timelineAttachment==this.attachment){var c=h.deform;0==c.length&&(s=t.MixBlend.setup);var d=this.vertices,u=d[0].length,f=this.frames;if(r<f[0])switch(s){case t.MixBlend.setup:return void(c.length=0);case t.MixBlend.first:if(1==a)return void(c.length=0);if(c.length=u,(I=l).bones){a=1-a;for(m=0;m<u;m++)c[m]*=a}else for(var p=I.vertices,m=0;m<u;m++)c[m]+=(p[m]-c[m])*a}else if(c.length=u,r>=f[f.length-1]){var v=d[f.length-1];if(1==a)if(s==t.MixBlend.add)if((I=l).bones)for(m=0;m<u;m++)c[m]+=v[m];else{p=I.vertices;for(var m=0;m<u;m++)c[m]+=v[m]-p[m]}else g.arrayCopy(v,0,c,0,u);else switch(s){case t.MixBlend.setup:if((I=l).bones)for(m=0;m<u;m++)c[m]=v[m]*a;else for(p=I.vertices,m=0;m<u;m++){var y=p[m];c[m]=y+(v[m]-y)*a}break;case t.MixBlend.first:case t.MixBlend.replace:for(m=0;m<u;m++)c[m]+=(v[m]-c[m])*a;break;case t.MixBlend.add:if((I=l).bones)for(m=0;m<u;m++)c[m]+=v[m]*a;else for(p=I.vertices,m=0;m<u;m++)c[m]+=(v[m]-p[m])*a}}else{var w=at.search1(f,r),b=this.getCurvePercent(r,w),M=d[w],k=d[w+1];if(1==a)if(s==t.MixBlend.add)if((I=l).bones)for(m=0;m<u;m++){S=M[m];c[m]+=S+(k[m]-S)*b}else for(p=I.vertices,m=0;m<u;m++){var S=M[m];c[m]+=S+(k[m]-S)*b-p[m]}else for(m=0;m<u;m++){S=M[m];c[m]=S+(k[m]-S)*b}else switch(s){case t.MixBlend.setup:if((I=l).bones)for(m=0;m<u;m++){S=M[m];c[m]=(S+(k[m]-S)*b)*a}else for(p=I.vertices,m=0;m<u;m++){var S=M[m],A=p[m];c[m]=A+(S+(k[m]-S)*b-A)*a}break;case t.MixBlend.first:case t.MixBlend.replace:for(m=0;m<u;m++){S=M[m];c[m]+=(S+(k[m]-S)*b-c[m])*a}break;case t.MixBlend.add:var I;if((I=l).bones)for(m=0;m<u;m++){S=M[m];c[m]+=(S+(k[m]-S)*b)*a}else for(p=I.vertices,m=0;m<u;m++){S=M[m];c[m]+=(S+(k[m]-S)*b-p[m])*a}}}}}},n}(st),It=function(t){function e(n){var r=t.call(this,n,e.propertyIds)||this;return r.events=new Array(n),r}return r(e,t),e.prototype.getFrameCount=function(){return this.frames.length},e.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},e.prototype.apply=function(t,e,n,r,i,a,s){if(r){var o=this.frames,h=this.frames.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,r,i,a,s),e=-1;else if(e>=o[h-1])return;if(!(n<o[0])){var l=0;if(e<o[0])l=0;else for(var c=o[l=at.search1(o,e)+1];l>0&&o[l-1]==c;)l--;for(;l<h&&n>=o[l];l++)r.push(this.events[l])}}},e.propertyIds=[""+J],e}(at),Bt=function(e){function n(t){var r=e.call(this,t,n.propertyIds)||this;return r.drawOrders=new Array(t),r}return r(n,e),n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},n.prototype.apply=function(e,n,r,i,a,s,o){if(o!=t.MixDirection.mixOut)if(r<this.frames[0])s!=t.MixBlend.setup&&s!=t.MixBlend.first||g.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);else{var h=at.search1(this.frames,r),l=this.drawOrders[h];if(l)for(var c=e.drawOrder,d=e.slots,u=0,f=l.length;u<f;u++)c[u]=d[l[u]];else g.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length)}else s==t.MixBlend.setup&&g.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length)},n.propertyIds=[""+Q],n}(at),Tt=function(e){function n(t,n,r){var i=e.call(this,t,n,[$+"|"+r])||this;return i.ikConstraintIndex=0,i.ikConstraintIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 6},n.prototype.setFrame=function(t,e,n,r,i,a,s){t*=6,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=i,this.frames[t+4]=a?1:0,this.frames[t+5]=s?1:0},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.ikConstraints[this.ikConstraintIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.mix=h.data.mix,h.softness=h.data.softness,h.bendDirection=h.data.bendDirection,h.compress=h.data.compress,void(h.stretch=h.data.stretch);case t.MixBlend.first:h.mix+=(h.data.mix-h.mix)*a,h.softness+=(h.data.softness-h.softness)*a,h.bendDirection=h.data.bendDirection,h.compress=h.data.compress,h.stretch=h.data.stretch}else{var c=0,d=0,u=at.search(l,r,6),f=this.curves[u/6];switch(f){case 0:var p=l[u];c=l[u+1],d=l[u+2];var m=(r-p)/(l[u+6]-p);c+=(l[u+6+1]-c)*m,d+=(l[u+6+2]-d)*m;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(r,u,1,f-2),d=this.getBezierValue(r,u,2,f+18-2)}s==t.MixBlend.setup?(h.mix=h.data.mix+(c-h.data.mix)*a,h.softness=h.data.softness+(d-h.data.softness)*a,o==t.MixDirection.mixOut?(h.bendDirection=h.data.bendDirection,h.compress=h.data.compress,h.stretch=h.data.stretch):(h.bendDirection=l[u+3],h.compress=0!=l[u+4],h.stretch=0!=l[u+5])):(h.mix+=(c-h.mix)*a,h.softness+=(d-h.softness)*a,o==t.MixDirection.mixIn&&(h.bendDirection=l[u+3],h.compress=0!=l[u+4],h.stretch=0!=l[u+5]))}}},n}(st),Ct=function(e){function n(t,n,r){var i=e.call(this,t,n,[tt+"|"+r])||this;return i.transformConstraintIndex=0,i.transformConstraintIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 7},n.prototype.setFrame=function(t,e,n,r,i,a,s,o){var h=this.frames;h[t*=7]=e,h[t+1]=n,h[t+2]=r,h[t+3]=i,h[t+4]=a,h[t+5]=s,h[t+6]=o},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.transformConstraints[this.transformConstraintIndex];if(h.active){var l=this.frames;if(r<l[0]){var c=h.data;switch(s){case t.MixBlend.setup:return h.mixRotate=c.mixRotate,h.mixX=c.mixX,h.mixY=c.mixY,h.mixScaleX=c.mixScaleX,h.mixScaleY=c.mixScaleY,void(h.mixShearY=c.mixShearY);case t.MixBlend.first:h.mixRotate+=(c.mixRotate-h.mixRotate)*a,h.mixX+=(c.mixX-h.mixX)*a,h.mixY+=(c.mixY-h.mixY)*a,h.mixScaleX+=(c.mixScaleX-h.mixScaleX)*a,h.mixScaleY+=(c.mixScaleY-h.mixScaleY)*a,h.mixShearY+=(c.mixShearY-h.mixShearY)*a}}else{var d,u,f,p,m,g,v=at.search(l,r,7),y=this.curves[v/7];switch(y){case 0:var x=l[v];d=l[v+1],u=l[v+2],f=l[v+3],p=l[v+4],m=l[v+5],g=l[v+6];var w=(r-x)/(l[v+7]-x);d+=(l[v+7+1]-d)*w,u+=(l[v+7+2]-u)*w,f+=(l[v+7+3]-f)*w,p+=(l[v+7+4]-p)*w,m+=(l[v+7+5]-m)*w,g+=(l[v+7+6]-g)*w;break;case 1:d=l[v+1],u=l[v+2],f=l[v+3],p=l[v+4],m=l[v+5],g=l[v+6];break;default:d=this.getBezierValue(r,v,1,y-2),u=this.getBezierValue(r,v,2,y+18-2),f=this.getBezierValue(r,v,3,y+36-2),p=this.getBezierValue(r,v,4,y+54-2),m=this.getBezierValue(r,v,5,y+72-2),g=this.getBezierValue(r,v,6,y+90-2)}if(s==t.MixBlend.setup){c=h.data;h.mixRotate=c.mixRotate+(d-c.mixRotate)*a,h.mixX=c.mixX+(u-c.mixX)*a,h.mixY=c.mixY+(f-c.mixY)*a,h.mixScaleX=c.mixScaleX+(p-c.mixScaleX)*a,h.mixScaleY=c.mixScaleY+(m-c.mixScaleY)*a,h.mixShearY=c.mixShearY+(g-c.mixShearY)*a}else h.mixRotate+=(d-h.mixRotate)*a,h.mixX+=(u-h.mixX)*a,h.mixY+=(f-h.mixY)*a,h.mixScaleX+=(p-h.mixScaleX)*a,h.mixScaleY+=(m-h.mixScaleY)*a,h.mixShearY+=(g-h.mixShearY)*a}}},n}(st),Et=function(e){function n(t,n,r){var i=e.call(this,t,n,et+"|"+r)||this;return i.pathConstraintIndex=0,i.pathConstraintIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.pathConstraints[this.pathConstraintIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.position=h.data.position);case t.MixBlend.first:h.position+=(h.data.position-h.position)*a}else{var l=this.getCurveValue(r);s==t.MixBlend.setup?h.position=h.data.position+(l-h.data.position)*a:h.position+=(l-h.position)*a}},n}(ot),Ft=function(e){function n(t,n,r){var i=e.call(this,t,n,nt+"|"+r)||this;return i.pathConstraintIndex=0,i.pathConstraintIndex=r,i}return r(n,e),n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.pathConstraints[this.pathConstraintIndex];if(h.active)if(r<this.frames[0])switch(s){case t.MixBlend.setup:return void(h.spacing=h.data.spacing);case t.MixBlend.first:h.spacing+=(h.data.spacing-h.spacing)*a}else{var l=this.getCurveValue(r);s==t.MixBlend.setup?h.spacing=h.data.spacing+(l-h.data.spacing)*a:h.spacing+=(l-h.spacing)*a}},n}(ot),Yt=function(e){function n(t,n,r){var i=e.call(this,t,n,[rt+"|"+r])||this;return i.pathConstraintIndex=0,i.pathConstraintIndex=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return 4},n.prototype.setFrame=function(t,e,n,r,i){var a=this.frames;a[t<<=2]=e,a[t+1]=n,a[t+2]=r,a[t+3]=i},n.prototype.apply=function(e,n,r,i,a,s,o){var h=e.pathConstraints[this.pathConstraintIndex];if(h.active){var l=this.frames;if(r<l[0])switch(s){case t.MixBlend.setup:return h.mixRotate=h.data.mixRotate,h.mixX=h.data.mixX,void(h.mixY=h.data.mixY);case t.MixBlend.first:h.mixRotate+=(h.data.mixRotate-h.mixRotate)*a,h.mixX+=(h.data.mixX-h.mixX)*a,h.mixY+=(h.data.mixY-h.mixY)*a}else{var c,d,u,f=at.search(l,r,4),p=this.curves[f>>2];switch(p){case 0:var m=l[f];c=l[f+1],d=l[f+2],u=l[f+3];var g=(r-m)/(l[f+4]-m);c+=(l[f+4+1]-c)*g,d+=(l[f+4+2]-d)*g,u+=(l[f+4+3]-u)*g;break;case 1:c=l[f+1],d=l[f+2],u=l[f+3];break;default:c=this.getBezierValue(r,f,1,p-2),d=this.getBezierValue(r,f,2,p+18-2),u=this.getBezierValue(r,f,3,p+36-2)}if(s==t.MixBlend.setup){var v=h.data;h.mixRotate=v.mixRotate+(c-v.mixRotate)*a,h.mixX=v.mixX+(d-v.mixX)*a,h.mixY=v.mixY+(u-v.mixY)*a}else h.mixRotate+=(c-h.mixRotate)*a,h.mixX+=(d-h.mixX)*a,h.mixY+=(u-h.mixY)*a}}},n}(st),Xt=function(e){function n(t,n,r){var i=e.call(this,t,[it+"|"+n+"|"+r.sequence.id])||this;return i.slotIndex=n,i.attachment=r,i}return r(n,e),n.prototype.getFrameEntries=function(){return n.ENTRIES},n.prototype.getSlotIndex=function(){return this.slotIndex},n.prototype.getAttachment=function(){return this.attachment},n.prototype.setFrame=function(t,e,r,i,a){var s=this.frames;s[t*=n.ENTRIES]=e,s[t+n.MODE]=r|i<<4,s[t+n.DELAY]=a},n.prototype.apply=function(e,r,i,a,s,o,h){var l=e.slots[this.slotIndex];if(l.bone.active){var c=l.attachment,d=this.attachment;if(c==d||c instanceof x&&c.timelineAttachment==d){var u=this.frames;if(i<u[0])o!=t.MixBlend.setup&&o!=t.MixBlend.first||(l.sequenceIndex=-1);else{var f=at.search(u,i,n.ENTRIES),p=u[f],m=u[f+n.MODE],g=u[f+n.DELAY];if(this.attachment.sequence){var v=m>>4,y=this.attachment.sequence.regions.length,w=D[15&m];if(w!=E.hold)switch(v+=(i-p)/g+1e-5|0,w){case E.once:v=Math.min(y-1,v);break;case E.loop:v%=y;break;case E.pingpong:(v=0==(b=(y<<1)-2)?0:v%b)>=y&&(v=b-v);break;case E.onceReverse:v=Math.max(y-1-v,0);break;case E.loopReverse:v=y-1-v%y;break;case E.pingpongReverse:var b;(v=0==(b=(y<<1)-2)?0:(v+y-1)%b)>=y&&(v=b-v)}l.sequenceIndex=v}}}}},n.ENTRIES=3,n.MODE=1,n.DELAY=2,n}(at),Rt=function(){function e(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Dt(this),this.propertyIDs=new m,this.animationsChanged=!1,this.trackEntryPool=new v((function(){return new Pt})),this.data=t}return e.emptyAnimation=function(){return e._emptyAnimation},e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n<r;n++){var i=e[n];if(i){i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast;var a=t*i.timeScale;if(i.delay>0){if(i.delay-=a,i.delay>0)continue;a=-i.delay,i.delay=0}var s=i.next;if(s){var o=i.trackLast-s.delay;if(o>=0){for(s.delay=0,s.trackTime+=0==i.timeScale?0:(o/i.timeScale+t)*s.timeScale,i.trackTime+=a,this.setCurrent(n,s,!0);s.mixingFrom;)s.mixTime+=t,s=s.mixingFrom;continue}}else if(i.trackLast>=i.trackEnd&&!i.mixingFrom){e[n]=null,this.queue.end(i),this.clearNext(i);continue}if(i.mixingFrom&&this.updateMixingFrom(i,t)){var h=i.mixingFrom;for(i.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}i.trackTime+=a}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(!n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=this.events,r=this.tracks,i=!1,a=0,s=r.length;a<s;a++){var o=r[a];if(o&&!(o.delay>0)){i=!0;var h=0==a?t.MixBlend.first:o.mixBlend,l=o.alpha;o.mixingFrom?l*=this.applyMixingFrom(o,e,h):o.trackTime>=o.trackEnd&&!o.next&&(l=0);var c=o.animationLast,d=o.getAnimationTime(),u=d,f=n;o.reverse&&(u=o.animation.duration-u,f=null);var p=o.animation.timelines,m=p.length;if(0==a&&1==l||h==t.MixBlend.add)for(var v=0;v<m;v++){g.webkit602BugfixHelper(l,h),(b=p[v])instanceof St?this.applyAttachmentTimeline(b,e,u,h,!0):b.apply(e,c,u,f,l,h,t.MixDirection.mixIn)}else{var y=o.timelineMode,x=o.shortestRotation,w=!x&&o.timelinesRotation.length!=m<<1;w&&(o.timelinesRotation.length=m<<1);for(v=0;v<m;v++){var b=p[v],M=y[v]==Nt?h:t.MixBlend.setup;!x&&b instanceof lt?this.applyRotateTimeline(b,e,u,l,M,o.timelinesRotation,v<<1,w):b instanceof St?this.applyAttachmentTimeline(b,e,u,h,!0):(g.webkit602BugfixHelper(l,h),b.apply(e,c,u,f,l,M,t.MixDirection.mixIn))}}this.queueEvents(o,d),n.length=0,o.nextAnimationLast=d,o.nextTrackLast=o.trackTime}}var k=this.unkeyedState+Ut,S=e.slots;for(a=0,s=e.slots.length;a<s;a++){var A=S[a];if(A.attachmentState==k){var I=A.data.attachmentName;A.setAttachment(I?e.getAttachment(A.data.index,I):null)}}return this.unkeyedState+=2,this.queue.drain(),i},e.prototype.applyMixingFrom=function(e,n,r){var i=e.mixingFrom;i.mixingFrom&&this.applyMixingFrom(i,n,r);var a=0;0==e.mixDuration?(a=1,r==t.MixBlend.first&&(r=t.MixBlend.setup)):((a=e.mixTime/e.mixDuration)>1&&(a=1),r!=t.MixBlend.first&&(r=i.mixBlend));var s=a<i.attachmentThreshold,o=a<i.drawOrderThreshold,h=i.animation.timelines,l=h.length,c=i.alpha*e.interruptAlpha,d=c*(1-a),u=i.animationLast,f=i.getAnimationTime(),p=f,m=null;if(i.reverse?p=i.animation.duration-p:a<i.eventThreshold&&(m=this.events),r==t.MixBlend.add)for(var v=0;v<l;v++)h[v].apply(n,u,p,m,d,r,t.MixDirection.mixOut);else{var y=i.timelineMode,x=i.timelineHoldMix,w=i.shortestRotation,b=!w&&i.timelinesRotation.length!=l<<1;b&&(i.timelinesRotation.length=l<<1),i.totalAlpha=0;for(v=0;v<l;v++){var M=h[v],k=t.MixDirection.mixOut,S=void 0,A=0;switch(y[v]){case Nt:if(!o&&M instanceof Bt)continue;S=r,A=d;break;case Ot:S=t.MixBlend.setup,A=d;break;case _t:S=r,A=c;break;case qt:S=t.MixBlend.setup,A=c;break;default:S=t.MixBlend.setup;var I=x[v];A=c*Math.max(0,1-I.mixTime/I.mixDuration)}i.totalAlpha+=A,!w&&M instanceof lt?this.applyRotateTimeline(M,n,p,A,S,i.timelinesRotation,v<<1,b):M instanceof St?this.applyAttachmentTimeline(M,n,p,S,s):(g.webkit602BugfixHelper(A,r),o&&M instanceof Bt&&S==t.MixBlend.setup&&(k=t.MixDirection.mixIn),M.apply(n,u,p,m,A,S,k))}}return e.mixDuration>0&&this.queueEvents(i,f),this.events.length=0,i.nextAnimationLast=f,i.nextTrackLast=i.trackTime,a},e.prototype.applyAttachmentTimeline=function(e,n,r,i,a){var s=n.slots[e.slotIndex];s.bone.active&&(r<e.frames[0]?i!=t.MixBlend.setup&&i!=t.MixBlend.first||this.setAttachment(n,s,s.data.attachmentName,a):this.setAttachment(n,s,e.attachmentNames[at.search1(e.frames,r)],a),s.attachmentState<=this.unkeyedState&&(s.attachmentState=this.unkeyedState+Ut))},e.prototype.setAttachment=function(t,e,n,r){e.setAttachment(n?t.getAttachment(e.data.index,n):null),r&&(e.attachmentState=this.unkeyedState+zt)},e.prototype.applyRotateTimeline=function(e,n,r,i,a,s,o,h){if(h&&(s[o]=0),1!=i){var l=n.bones[e.boneIndex];if(l.active){var c=0,d=0;if(r<e.frames[0])switch(a){case t.MixBlend.setup:l.rotation=l.data.rotation;default:return;case t.MixBlend.first:c=l.rotation,d=l.data.rotation}else c=a==t.MixBlend.setup?l.data.rotation:l.rotation,d=l.data.rotation+e.getCurveValue(r);var u=0,f=d-c;if(0==(f-=360*(16384-(16384.499999999996-f/360|0))))u=s[o];else{var p=0,m=0;h?(p=0,m=f):(p=s[o],m=s[o+1]);var g=f>0,v=p>=0;C.signum(m)!=C.signum(f)&&Math.abs(m)<=90&&(Math.abs(p)>180&&(p+=360*C.signum(p)),v=g),u=f+p-p%360,v!=g&&(u+=360*C.signum(p)),s[o]=u}s[o+1]=f,l.rotation=c+u*i}}else e.apply(n,0,r,null,1,a,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,i=r-n,a=t.trackLast%i,s=this.events,o=0,h=s.length;o<h;o++){var l=s[o];if(l.time<a)break;l.time>r||this.queue.event(t,l)}for((t.loop?0==i||a>t.trackTime%i:e>=r&&t.animationLast<r)&&this.queue.complete(t);o<h;o++){var c=s[o];c.time<n||this.queue.event(t,c)}},e.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,n=this.tracks.length;e<n;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},e.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];if(e){this.queue.end(e),this.clearNext(e);for(var n=e;;){var r=n.mixingFrom;if(!r)break;this.queue.end(r),n.mixingFrom=null,n.mixingTo=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,r.mixingTo=e,e.mixTime=0,r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){void 0===n&&(n=!1);var r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(void 0===n&&(n=!1),!e)throw new Error("animation cannot be null.");var r=!0,i=this.expandToIndex(t);i&&(-1==i.nextTrackLast?(this.tracks[t]=i.mixingFrom,this.queue.interrupt(i),this.queue.end(i),this.clearNext(i),i=i.mixingFrom,r=!1):this.clearNext(i));var a=this.trackEntry(t,e,n,i);return this.setCurrent(t,a,r),this.queue.drain(),a},e.prototype.addAnimation=function(t,e,n,r){void 0===n&&(n=!1),void 0===r&&(r=0);var i=this.data.skeletonData.findAnimation(e);if(!i)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,i,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=0),!e)throw new Error("animation cannot be null.");var i=this.expandToIndex(t);if(i)for(;i.next;)i=i.next;var a=this.trackEntry(t,e,n,i);return i?(i.next=a,a.previous=i,r<=0&&(r+=i.getTrackComplete()-a.mixDuration)):(this.setCurrent(t,a,!0),this.queue.drain()),a.delay=r,a},e.prototype.setEmptyAnimation=function(t,n){void 0===n&&(n=0);var r=this.setAnimationWith(t,e.emptyAnimation(),!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=this.addAnimationWith(t,e.emptyAnimation(),!1,r);return r<=0&&(i.delay+=i.mixDuration-n),i.mixDuration=n,i.trackEnd=n,i},e.prototype.setEmptyAnimations=function(t){void 0===t&&(t=0);var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n<r;n++){var i=this.tracks[n];i&&this.setEmptyAnimation(i.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},e.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(g.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},e.prototype.trackEntry=function(e,n,r,i){var a=this.trackEntryPool.obtain();return a.reset(),a.trackIndex=e,a.animation=n,a.loop=r,a.holdPrevious=!1,a.reverse=!1,a.shortestRotation=!1,a.eventThreshold=0,a.attachmentThreshold=0,a.drawOrderThreshold=0,a.animationStart=0,a.animationEnd=n.duration,a.animationLast=-1,a.nextAnimationLast=-1,a.delay=0,a.trackTime=0,a.trackLast=-1,a.nextTrackLast=-1,a.trackEnd=Number.MAX_VALUE,a.timeScale=1,a.alpha=1,a.mixTime=0,a.mixDuration=i?this.data.getMix(i.animation,n):0,a.interruptAlpha=1,a.totalAlpha=0,a.mixBlend=t.MixBlend.replace,a},e.prototype.clearNext=function(t){for(var e=t.next;e;)this.queue.dispose(e),e=e.next;t.next=null},e.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var e=this.tracks,n=0,r=e.length;n<r;n++){var i=e[n];if(i){for(;i.mixingFrom;)i=i.mixingFrom;do{i.mixingTo&&i.mixBlend==t.MixBlend.add||this.computeHold(i),i=i.mixingTo}while(i)}}},e.prototype.computeHold=function(t){var e=t.mixingTo,n=t.animation.timelines,r=t.animation.timelines.length,i=t.timelineMode;i.length=r;var a=t.timelineHoldMix;a.length=0;var s=this.propertyIDs;if(e&&e.holdPrevious)for(var o=0;o<r;o++)i[o]=s.addAll(n[o].getPropertyIds())?qt:_t;else t:for(o=0;o<r;o++){var h=n[o],l=h.getPropertyIds();if(s.addAll(l))if(!e||h instanceof St||h instanceof Bt||h instanceof It||!e.animation.hasTimeline(l))i[o]=Ot;else{for(var c=e.mixingTo;c;c=c.mixingTo)if(!c.animation.hasTimeline(l)){if(t.mixDuration>0){i[o]=Wt,a[o]=c;continue t}break}i[o]=qt}else i[o]=Nt}},e.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e._emptyAnimation=new V("<empty>",[],0),e}(),Pt=function(){function e(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e.prototype.getTrackComplete=function(){var t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime<t)return t}return this.trackTime},e}(),Dt=function(){function e(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return e.prototype.start=function(e){this.objects.push(t.EventType.start),this.objects.push(e),this.animState.animationsChanged=!0},e.prototype.interrupt=function(e){this.objects.push(t.EventType.interrupt),this.objects.push(e)},e.prototype.end=function(e){this.objects.push(t.EventType.end),this.objects.push(e),this.animState.animationsChanged=!0},e.prototype.dispose=function(e){this.objects.push(t.EventType.dispose),this.objects.push(e)},e.prototype.complete=function(e){this.objects.push(t.EventType.complete),this.objects.push(e)},e.prototype.event=function(e,n){this.objects.push(t.EventType.event),this.objects.push(e),this.objects.push(n)},e.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,n=this.animState.listeners,r=0;r<e.length;r+=2){var i=e[r],a=e[r+1];switch(i){case t.EventType.start:a.listener&&a.listener.start&&a.listener.start(a);for(var s=0;s<n.length;s++){(h=n[s]).start&&h.start(a)}break;case t.EventType.interrupt:a.listener&&a.listener.interrupt&&a.listener.interrupt(a);for(s=0;s<n.length;s++){(h=n[s]).interrupt&&h.interrupt(a)}break;case t.EventType.end:a.listener&&a.listener.end&&a.listener.end(a);for(s=0;s<n.length;s++){(h=n[s]).end&&h.end(a)}case t.EventType.dispose:a.listener&&a.listener.dispose&&a.listener.dispose(a);for(s=0;s<n.length;s++){(h=n[s]).dispose&&h.dispose(a)}this.animState.trackEntryPool.free(a);break;case t.EventType.complete:a.listener&&a.listener.complete&&a.listener.complete(a);for(s=0;s<n.length;s++){(h=n[s]).complete&&h.complete(a)}break;case t.EventType.event:var o=e[2+r++];a.listener&&a.listener.event&&a.listener.event(a,o);for(s=0;s<n.length;s++){var h;(h=n[s]).event&&h.event(a,o)}}}this.clear(),this.drainDisabled=!1}},e.prototype.clear=function(){this.objects.length=0},e}();t.EventType=void 0,(L=t.EventType||(t.EventType={}))[L.start=0]="start",L[L.interrupt=1]="interrupt",L[L.end=2]="end",L[L.dispose=3]="dispose",L[L.complete=4]="complete",L[L.event=5]="event";var Vt,Lt=function(){function t(){}return t.prototype.start=function(t){},t.prototype.interrupt=function(t){},t.prototype.end=function(t){},t.prototype.dispose=function(t){},t.prototype.complete=function(t){},t.prototype.event=function(t,e){},t}(),Nt=0,Ot=1,_t=2,qt=3,Wt=4,Ut=1,zt=2,Gt=function(){function t(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}return t.prototype.setMix=function(t,e,n){var r=this.skeletonData.findAnimation(t);if(!r)throw new Error("Animation not found: "+t);var i=this.skeletonData.findAnimation(e);if(!i)throw new Error("Animation not found: "+e);this.setMixWith(r,i,n)},t.prototype.setMixWith=function(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");var r=t.name+"."+e.name;this.animationToMixTime[r]=n},t.prototype.getMix=function(t,e){var n=t.name+"."+e.name,r=this.animationToMixTime[n];return void 0===r?this.defaultMix:r},t}(),jt=function(){function t(t){this.atlas=t}return t.prototype.loadSequence=function(t,e,n){for(var r=n.regions,i=0,a=r.length;i<a;i++){var s=n.getPath(e,i),o=this.atlas.findRegion(s);if(null==o)throw new Error("Region not found in atlas: "+s+" (sequence: "+t+")");r[i]=o,r[i].renderObject=r[i]}},t.prototype.newRegionAttachment=function(t,e,n,r){var i=new Y(e,n);if(null!=r)this.loadSequence(e,n,r);else{var a=this.atlas.findRegion(n);if(!a)throw new Error("Region not found in atlas: "+n+" (region attachment: "+e+")");a.renderObject=a,i.region=a}return i},t.prototype.newMeshAttachment=function(t,e,n,r){var i=new B(e,n);if(null!=r)this.loadSequence(e,n,r);else{var a=this.atlas.findRegion(n);if(!a)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+e+")");a.renderObject=a,i.region=a}return i},t.prototype.newBoundingBoxAttachment=function(t,e){return new w(e)},t.prototype.newPathAttachment=function(t,e){return new T(e)},t.prototype.newPointAttachment=function(t,e){return new F(e)},t.prototype.newClippingAttachment=function(t,e){return new b(e)},t}(),Ht=function(e,n,r){if(this.index=0,this.parent=null,this.length=0,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=t.TransformMode.Normal,this.skinRequired=!1,this.color=new h,e<0)throw new Error("index must be >= 0.");if(!n)throw new Error("name cannot be null.");this.index=e,this.name=n,this.parent=r};t.TransformMode=void 0,(Vt=t.TransformMode||(t.TransformMode={}))[Vt.Normal=0]="Normal",Vt[Vt.OnlyTranslation=1]="OnlyTranslation",Vt[Vt.NoRotationOrReflection=2]="NoRotationOrReflection",Vt[Vt.NoScale=3]="NoScale",Vt[Vt.NoScaleOrReflection=4]="NoScaleOrReflection";var Kt,Zt,Jt,Qt=function(){function e(t,e,n){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,r,i,a,s,o){this.ax=e,this.ay=n,this.arotation=r,this.ascaleX=i,this.ascaleY=a,this.ashearX=s,this.ashearY=o;var h=this.parent;if(!h){var l=this.skeleton,c=r+90+o,d=l.scaleX,u=l.scaleY;return this.a=C.cosDeg(r+s)*i*d,this.b=C.cosDeg(c)*a*d,this.c=C.sinDeg(r+s)*i*u,this.d=C.sinDeg(c)*a*u,this.worldX=e*d+l.x,void(this.worldY=n*u+l.y)}var f=h.a,p=h.b,m=h.c,g=h.d;switch(this.worldX=f*e+p*n+h.worldX,this.worldY=m*e+g*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:c=r+90+o;var v=C.cosDeg(r+s)*i,y=C.cosDeg(c)*a,x=C.sinDeg(r+s)*i,w=C.sinDeg(c)*a;return this.a=f*v+p*x,this.b=f*y+p*w,this.c=m*v+g*x,void(this.d=m*y+g*w);case t.TransformMode.OnlyTranslation:c=r+90+o;this.a=C.cosDeg(r+s)*i,this.b=C.cosDeg(c)*a,this.c=C.sinDeg(r+s)*i,this.d=C.sinDeg(c)*a;break;case t.TransformMode.NoRotationOrReflection:var b=0;(S=f*f+m*m)>1e-4?(S=Math.abs(f*g-p*m)/S,f/=this.skeleton.scaleX,p=(m/=this.skeleton.scaleY)*S,g=f*S,b=Math.atan2(m,f)*C.radDeg):(f=0,m=0,b=90-Math.atan2(g,p)*C.radDeg);var M=r+s-b,k=r+o-b+90;v=C.cosDeg(M)*i,y=C.cosDeg(k)*a,x=C.sinDeg(M)*i,w=C.sinDeg(k)*a;this.a=f*v-p*x,this.b=f*y-p*w,this.c=m*v+g*x,this.d=m*y+g*w;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var S,A=C.cosDeg(r),I=C.sinDeg(r),B=(f*A+p*I)/this.skeleton.scaleX,T=(m*A+g*I)/this.skeleton.scaleY;(S=Math.sqrt(B*B+T*T))>1e-5&&(S=1/S),B*=S,T*=S,S=Math.sqrt(B*B+T*T),this.data.transformMode==t.TransformMode.NoScale&&f*g-p*m<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(S=-S);var E=Math.PI/2+Math.atan2(T,B),F=Math.cos(E)*S,Y=Math.sin(E)*S;v=C.cosDeg(s)*i,y=C.cosDeg(90+o)*a,x=C.sinDeg(s)*i,w=C.sinDeg(90+o)*a;this.a=B*v+F*x,this.b=B*y+F*w,this.c=T*v+Y*x,this.d=T*y+Y*w}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*C.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*C.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){var t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*C.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*C.radDeg);var e=t.a,n=t.b,r=t.c,i=t.d,a=1/(e*i-n*r),s=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=s*i*a-o*n*a,this.ay=o*e*a-s*r*a;var h=a*i,l=a*e,c=a*n,d=a*r,u=h*this.a-c*this.c,f=h*this.b-c*this.d,p=l*this.c-d*this.a,m=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(u*u+p*p),this.ascaleX>1e-4){var g=u*m-f*p;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(u*f+p*m,g)*C.radDeg,this.arotation=Math.atan2(p,u)*C.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(f*f+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,f)*C.radDeg},e.prototype.worldToLocal=function(t){var e=1/(this.a*this.d-this.b*this.c),n=t.x-this.worldX,r=t.y-this.worldY;return t.x=n*this.d*e-r*this.b*e,t.y=r*this.a*e-n*this.c*e,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(t){var e=C.sinDeg(t),n=C.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*C.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=C.sinDeg(t),n=C.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*C.radDeg},e.prototype.rotateWorld=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,a=C.cosDeg(t),s=C.sinDeg(t);this.a=a*e-s*r,this.b=a*n-s*i,this.c=s*e+a*r,this.d=s*n+a*i},e}(),$t=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n},te=function(t,e){if(this.intValue=0,this.floatValue=0,this.stringValue=null,this.time=0,this.volume=0,this.balance=0,!e)throw new Error("data cannot be null.");this.time=t,this.data=e},ee=function(t){this.intValue=0,this.floatValue=0,this.stringValue=null,this.audioPath=null,this.volume=0,this.balance=0,this.name=t},ne=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n<t.bones.length;n++){var r=e.findBone(t.bones[n].name);if(!r)throw new Error("Couldn't find bone ".concat(t.bones[n].name));this.bones.push(r)}var i=e.findBone(t.target.name);if(!i)throw new Error("Couldn't find bone ".concat(t.target.name));this.target=i}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){if(0!=this.mix){var t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.data.uniform,this.softness,this.mix)}}},e.prototype.apply1=function(e,n,r,i,a,s,o){var h=e.parent;if(!h)throw new Error("IK bone must have parent.");var l=h.a,c=h.c,d=h.b,u=h.d,f=-e.ashearX-e.arotation,p=0,m=0;switch(e.data.transformMode){case t.TransformMode.OnlyTranslation:p=n-e.worldX,m=r-e.worldY;break;case t.TransformMode.NoRotationOrReflection:var g=Math.abs(l*u-d*c)/(l*l+c*c),v=l/e.skeleton.scaleX,y=c/e.skeleton.scaleY;d=-y*g*e.skeleton.scaleX,u=v*g*e.skeleton.scaleY,f+=Math.atan2(y,v)*C.radDeg;default:var x=n-h.worldX,w=r-h.worldY,b=l*u-d*c;p=(x*u-w*d)/b-e.ax,m=(w*l-x*c)/b-e.ay}f+=Math.atan2(m,p)*C.radDeg,e.ascaleX<0&&(f+=180),f>180?f-=360:f<-180&&(f+=360);var M=e.ascaleX,k=e.ascaleY;if(i||a){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=n-e.worldX,m=r-e.worldY}var S=e.data.length*M,A=Math.sqrt(p*p+m*m);if(i&&A<S||a&&A>S&&S>1e-4)M*=g=(A/S-1)*o+1,s&&(k*=g)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+f*o,M,k,e.ashearX,e.ashearY)},e.prototype.apply2=function(t,e,n,r,i,a,s,o,h){var l=t.ax,c=t.ay,d=t.ascaleX,u=t.ascaleY,f=d,p=u,m=e.ascaleX,g=0,v=0,y=0;d<0?(d=-d,g=180,y=-1):(g=0,y=1),u<0&&(u=-u,y=-y),m<0?(m=-m,v=180):v=0;var x=e.ax,w=0,b=0,M=0,k=t.a,S=t.b,A=t.c,I=t.d,B=Math.abs(d-u)<=1e-4;!B||a?(w=0,b=k*x+t.worldX,M=A*x+t.worldY):(b=k*x+S*(w=e.ay)+t.worldX,M=A*x+I*w+t.worldY);var T=t.parent;if(!T)throw new Error("IK parent must itself have a parent.");k=T.a,S=T.b,A=T.c;var E,F,Y=1/(k*(I=T.d)-S*A),X=b-T.worldX,R=M-T.worldY,P=(X*I-R*S)*Y-l,D=(R*k-X*A)*Y-c,V=Math.sqrt(P*P+D*D),L=e.data.length*m;if(V<1e-4)return this.apply1(t,n,r,!1,a,!1,h),void e.updateWorldTransformWith(x,w,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var N=((X=n-T.worldX)*I-(R=r-T.worldY)*S)*Y-l,O=(R*k-X*A)*Y-c,_=N*N+O*O;if(0!=o){o*=d*(m+1)*.5;var q=Math.sqrt(_),W=q-V-L*d+o;if(W>0){var U=Math.min(1,W/(2*o))-1;_=(N-=(U=(W-o*(1-U*U))/q)*N)*N+(O-=U*O)*O}}t:if(B){var z=(_-V*V-(L*=d)*L)/(2*V*L);z<-1?(z=-1,F=Math.PI*i):z>1?(z=1,F=0,a&&(f*=k=(Math.sqrt(_)/(V+L)-1)*h+1,s&&(p*=k))):F=Math.acos(z)*i,k=V+L*z,S=L*Math.sin(F),E=Math.atan2(O*k-N*S,N*k+O*S)}else{var G=(k=d*L)*k,j=(S=u*L)*S,H=Math.atan2(O,N),K=-2*j*V,Z=j-G;if((I=K*K-4*Z*(A=j*V*V+G*_-G*j))>=0){var J=Math.sqrt(I);K<0&&(J=-J);var Q=(J=.5*-(K+J))/Z,$=A/J,tt=Math.abs(Q)<Math.abs($)?Q:$;if(tt*tt<=_){R=Math.sqrt(_-tt*tt)*i,E=H-Math.atan2(R,tt),F=Math.atan2(R/u,(tt-V)/d);break t}}var et=C.PI,nt=V-k,rt=nt*nt,it=0,at=0,st=V+k,ot=st*st,ht=0;(A=-k*V/(G-j))>=-1&&A<=1&&(A=Math.acos(A),(I=(X=k*Math.cos(A)+V)*X+(R=S*Math.sin(A))*R)<rt&&(et=A,rt=I,nt=X,it=R),I>ot&&(at=A,ot=I,st=X,ht=R)),_<=.5*(rt+ot)?(E=H-Math.atan2(it*i,nt),F=et*i):(E=H-Math.atan2(ht*i,st),F=at*i)}var lt=Math.atan2(w,x)*y,ct=t.arotation;(E=(E-lt)*C.radDeg+g-ct)>180?E-=360:E<-180&&(E+=360),t.updateWorldTransformWith(l,c,ct+E*h,f,p,0,0),ct=e.arotation,(F=((F+lt)*C.radDeg-e.ashearX)*y+v-ct)>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(x,w,ct+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)},e}(),re=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n._target=null,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return r(e,t),Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t},enumerable:!1,configurable:!0}),e}($t),ie=function(e){function n(n){var r=e.call(this,n,0,!1)||this;return r.bones=new Array,r._target=null,r.positionMode=t.PositionMode.Fixed,r.spacingMode=t.SpacingMode.Fixed,r.rotateMode=t.RotateMode.Chain,r.offsetRotation=0,r.position=0,r.spacing=0,r.mixRotate=0,r.mixX=0,r.mixY=0,r}return r(n,e),Object.defineProperty(n.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("SlotData not set.")},set:function(t){this._target=t},enumerable:!1,configurable:!0}),n}($t);t.PositionMode=void 0,(Kt=t.PositionMode||(t.PositionMode={}))[Kt.Fixed=0]="Fixed",Kt[Kt.Percent=1]="Percent",t.SpacingMode=void 0,(Zt=t.SpacingMode||(t.SpacingMode={}))[Zt.Length=0]="Length",Zt[Zt.Fixed=1]="Fixed",Zt[Zt.Percent=2]="Percent",Zt[Zt.Proportional=3]="Proportional",t.RotateMode=void 0,(Jt=t.RotateMode||(t.RotateMode={}))[Jt.Tangent=0]="Tangent",Jt[Jt.Chain=1]="Chain",Jt[Jt.ChainScale=2]="ChainScale";var ae,se=function(){function e(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n<r;n++){var i=e.findBone(t.bones[n].name);if(!i)throw new Error("Couldn't find bone ".concat(t.bones[n].name,"."));this.bones.push(i)}var a=e.findSlot(t.target.name);if(!a)throw new Error("Couldn't find target bone ".concat(t.target.name));this.target=a,this.position=t.position,this.spacing=t.spacing,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){var n=this.target.getAttachment();if(n instanceof T){var r=this.mixRotate,i=this.mixX,a=this.mixY;if(0!=r||0!=i||0!=a){var s=this.data,o=s.rotateMode==t.RotateMode.Tangent,h=s.rotateMode==t.RotateMode.ChainScale,l=this.bones,c=l.length,d=o?c:c+1,u=g.setArraySize(this.spaces,d),f=h?this.lengths=g.setArraySize(this.lengths,c):[],p=this.spacing;switch(s.spacingMode){case t.SpacingMode.Percent:if(h)for(var m=0,v=d-1;m<v;m++){if((k=(X=l[m]).data.length)<e.epsilon)f[m]=0;else{var y=k*X.a,x=k*X.c;f[m]=Math.sqrt(y*y+x*x)}}g.arrayFill(u,1,d,p);break;case t.SpacingMode.Proportional:var w=0;for(m=0,v=d-1;m<v;){if((k=(X=l[m]).data.length)<e.epsilon)h&&(f[m]=0),u[++m]=p;else{y=k*X.a,x=k*X.c;var b=Math.sqrt(y*y+x*x);h&&(f[m]=b),u[++m]=b,w+=b}}if(w>0){w=d/w*p;for(m=1;m<d;m++)u[m]*=w}break;default:var M=s.spacingMode==t.SpacingMode.Length;for(m=0,v=d-1;m<v;){var k;if((k=(X=l[m]).data.length)<e.epsilon)h&&(f[m]=0),u[++m]=p;else{y=k*X.a,x=k*X.c;var S=Math.sqrt(y*y+x*x);h&&(f[m]=S),u[++m]=(M?k+p:p)*S/k}}}var A=this.computeWorldPositions(n,d,o),I=A[0],B=A[1],E=s.offsetRotation,F=!1;if(0==E)F=s.rotateMode==t.RotateMode.Chain;else F=!1,E*=(Y=this.target.bone).a*Y.d-Y.b*Y.c>0?C.degRad:-C.degRad;m=0;for(var Y=3;m<c;m++,Y+=3){var X;(X=l[m]).worldX+=(I-X.worldX)*i,X.worldY+=(B-X.worldY)*a;var R=(y=A[Y])-I,P=(x=A[Y+1])-B;if(h){var D=f[m];if(0!=D){var V=(Math.sqrt(R*R+P*P)/D-1)*r+1;X.a*=V,X.c*=V}}if(I=y,B=x,r>0){var L=X.a,N=X.b,O=X.c,_=X.d,q=0,W=0,U=0;if(q=o?A[Y-1]:0==u[m+1]?A[Y+2]:Math.atan2(P,R),q-=Math.atan2(O,L),F){W=Math.cos(q),U=Math.sin(q);var z=X.data.length;I+=(z*(W*L-U*O)-R)*r,B+=(z*(U*L+W*O)-P)*r}else q+=E;q>C.PI?q-=C.PI2:q<-C.PI&&(q+=C.PI2),q*=r,W=Math.cos(q),U=Math.sin(q),X.a=W*L-U*O,X.b=W*N-U*_,X.c=U*L+W*O,X.d=U*N+W*_}X.updateAppliedTransform()}}}},e.prototype.computeWorldPositions=function(n,r,i){var a=this.target,s=this.position,o=this.spaces,h=g.setArraySize(this.positions,3*r+2),l=this.world,c=n.closed,d=n.worldVerticesLength,u=d/6,f=e.NONE;if(!n.constantSpeed){var p,m=n.lengths,v=m[u-=c?1:2];switch(this.data.positionMode==t.PositionMode.Percent&&(s*=v),this.data.spacingMode){case t.SpacingMode.Percent:p=v;break;case t.SpacingMode.Proportional:p=v/r;break;default:p=1}l=g.setArraySize(this.world,8);for(var y=0,x=0,w=0;y<r;y++,x+=3){var b=s+=G=o[y]*p;if(c)(b%=v)<0&&(b+=v),w=0;else{if(b<0){f!=e.BEFORE&&(f=e.BEFORE,n.computeWorldVertices(a,2,4,l,0,2)),this.addBeforePosition(b,l,0,h,x);continue}if(b>v){f!=e.AFTER&&(f=e.AFTER,n.computeWorldVertices(a,d-6,4,l,0,2)),this.addAfterPosition(b-v,l,0,h,x);continue}}for(;;w++){var M=m[w];if(!(b>M)){if(0==w)b/=M;else b=(b-(Z=m[w-1]))/(M-Z);break}}w!=f&&(f=w,c&&w==u?(n.computeWorldVertices(a,d-4,4,l,0,2),n.computeWorldVertices(a,0,4,l,4,2)):n.computeWorldVertices(a,6*w+2,8,l,0,2)),this.addCurvePosition(b,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],h,x,i||y>0&&0==G)}return h}c?(d+=2,l=g.setArraySize(this.world,d),n.computeWorldVertices(a,2,d-4,l,0,2),n.computeWorldVertices(a,0,2,l,d-4,2),l[d-2]=l[0],l[d-1]=l[1]):(u--,d-=4,l=g.setArraySize(this.world,d),n.computeWorldVertices(a,2,d,l,0,2));for(var k,S=g.setArraySize(this.curves,u),A=0,I=l[0],B=l[1],T=0,C=0,E=0,F=0,Y=0,X=0,R=0,P=0,D=0,V=0,L=0,N=0,O=0,_=0,q=(y=0,2);y<u;y++,q+=6)T=l[q],C=l[q+1],E=l[q+2],F=l[q+3],L=2*(R=.1875*(I-2*T+E))+(D=.09375*(3*(T-E)-I+(Y=l[q+4]))),N=2*(P=.1875*(B-2*C+F))+(V=.09375*(3*(C-F)-B+(X=l[q+5]))),O=.75*(T-I)+R+.16666667*D,_=.75*(C-B)+P+.16666667*V,A+=Math.sqrt(O*O+_*_),O+=L,_+=N,L+=D,N+=V,A+=Math.sqrt(O*O+_*_),O+=L,_+=N,A+=Math.sqrt(O*O+_*_),O+=L+D,_+=N+V,A+=Math.sqrt(O*O+_*_),S[y]=A,I=Y,B=X;switch(this.data.positionMode==t.PositionMode.Percent&&(s*=A),this.data.spacingMode){case t.SpacingMode.Percent:k=A;break;case t.SpacingMode.Proportional:k=A/r;break;default:k=1}for(var W=this.segments,U=0,z=(y=0,x=0,w=0,0);y<r;y++,x+=3){var G;b=s+=G=o[y]*k;if(c)(b%=A)<0&&(b+=A),w=0;else{if(b<0){this.addBeforePosition(b,l,0,h,x);continue}if(b>A){this.addAfterPosition(b-A,l,d-4,h,x);continue}}for(;;w++){var j=S[w];if(!(b>j)){if(0==w)b/=j;else b=(b-(Z=S[w-1]))/(j-Z);break}}if(w!=f){f=w;var H=6*w;for(I=l[H],B=l[H+1],T=l[H+2],C=l[H+3],E=l[H+4],F=l[H+5],L=2*(R=.03*(I-2*T+E))+(D=.006*(3*(T-E)-I+(Y=l[H+6]))),N=2*(P=.03*(B-2*C+F))+(V=.006*(3*(C-F)-B+(X=l[H+7]))),O=.3*(T-I)+R+.16666667*D,_=.3*(C-B)+P+.16666667*V,U=Math.sqrt(O*O+_*_),W[0]=U,H=1;H<8;H++)O+=L,_+=N,L+=D,N+=V,U+=Math.sqrt(O*O+_*_),W[H]=U;O+=L,_+=N,U+=Math.sqrt(O*O+_*_),W[8]=U,O+=L+D,_+=N+V,U+=Math.sqrt(O*O+_*_),W[9]=U,z=0}for(b*=U;;z++){var K=W[z];if(!(b>K)){var Z;if(0==z)b/=K;else b=z+(b-(Z=W[z-1]))/(K-Z);break}}this.addCurvePosition(.1*b,I,B,T,C,E,F,Y,X,h,x,i||y>0&&0==G)}return h},e.prototype.addBeforePosition=function(t,e,n,r,i){var a=e[n],s=e[n+1],o=e[n+2]-a,h=e[n+3]-s,l=Math.atan2(h,o);r[i]=a+t*Math.cos(l),r[i+1]=s+t*Math.sin(l),r[i+2]=l},e.prototype.addAfterPosition=function(t,e,n,r,i){var a=e[n+2],s=e[n+3],o=a-e[n],h=s-e[n+1],l=Math.atan2(h,o);r[i]=a+t*Math.cos(l),r[i+1]=s+t*Math.sin(l),r[i+2]=l},e.prototype.addCurvePosition=function(t,e,n,r,i,a,s,o,h,l,c,d){if(0==t||isNaN(t))return l[c]=e,l[c+1]=n,void(l[c+2]=Math.atan2(i-n,r-e));var u=t*t,f=u*t,p=1-t,m=p*p,g=m*p,v=p*t,y=3*v,x=p*y,w=y*t,b=e*g+r*x+a*w+o*f,M=n*g+i*x+s*w+h*f;l[c]=b,l[c+1]=M,d&&(l[c+2]=t<.001?Math.atan2(i-n,r-e):Math.atan2(M-(n*m+i*v*2+s*u),b-(e*m+r*v*2+a*u)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}(),oe=function(){function t(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}return t.prototype.getSkeleton=function(){return this.bone.skeleton},t.prototype.getAttachment=function(){return this.attachment},t.prototype.setAttachment=function(t){this.attachment!=t&&(t instanceof x&&this.attachment instanceof x&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)},t.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null},t}(),he=function(){function t(t,n){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new e.math.Vector2,this.active=!1,!t)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(var r=0;r<t.bones.length;r++){var i=n.findBone(t.bones[r].name);if(!i)throw new Error("Couldn't find bone ".concat(t.bones[r].name,"."));this.bones.push(i)}var a=n.findBone(t.target.name);if(!a)throw new Error("Couldn't find target bone ".concat(t.target.name,"."));this.target=a}return t.prototype.isActive=function(){return this.active},t.prototype.update=function(){0==this.mixRotate&&0==this.mixX&&0==this.mixY&&0==this.mixScaleX&&0==this.mixScaleX&&0==this.mixShearY||(this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld())},t.prototype.applyAbsoluteWorld=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=0!=e||0!=n,o=this.target,h=o.a,l=o.b,c=o.c,d=o.d,u=h*d-l*c>0?C.degRad:-C.degRad,f=this.data.offsetRotation*u,p=this.data.offsetShearY*u,m=this.bones,g=0,v=m.length;g<v;g++){var y=m[g];if(0!=t){var x=y.a,w=y.b,b=y.c,M=y.d;(I=Math.atan2(c,h)-Math.atan2(b,x)+f)>C.PI?I-=C.PI2:I<-C.PI&&(I+=C.PI2),I*=t;var k=Math.cos(I),S=Math.sin(I);y.a=k*x-S*b,y.b=k*w-S*M,y.c=S*x+k*b,y.d=S*w+k*M}if(s){var A=this.temp;o.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(A.x-y.worldX)*e,y.worldY+=(A.y-y.worldY)*n}if(0!=r)0!=(T=Math.sqrt(y.a*y.a+y.c*y.c))&&(T=(T+(Math.sqrt(h*h+c*c)-T+this.data.offsetScaleX)*r)/T),y.a*=T,y.c*=T;if(0!=i)0!=(T=Math.sqrt(y.b*y.b+y.d*y.d))&&(T=(T+(Math.sqrt(l*l+d*d)-T+this.data.offsetScaleY)*i)/T),y.b*=T,y.d*=T;if(a>0){w=y.b,M=y.d;var I,B=Math.atan2(M,w);(I=Math.atan2(d,l)-Math.atan2(c,h)-(B-Math.atan2(y.c,y.a)))>C.PI?I-=C.PI2:I<-C.PI&&(I+=C.PI2),I=B+(I+p)*a;var T=Math.sqrt(w*w+M*M);y.b=Math.cos(I)*T,y.d=Math.sin(I)*T}y.updateAppliedTransform()}},t.prototype.applyRelativeWorld=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=0!=e||0!=n,o=this.target,h=o.a,l=o.b,c=o.c,d=o.d,u=h*d-l*c>0?C.degRad:-C.degRad,f=this.data.offsetRotation*u,p=this.data.offsetShearY*u,m=this.bones,g=0,v=m.length;g<v;g++){var y=m[g];if(0!=t){var x=y.a,w=y.b,b=y.c,M=y.d;(B=Math.atan2(c,h)+f)>C.PI?B-=C.PI2:B<-C.PI&&(B+=C.PI2),B*=t;var k=Math.cos(B),S=Math.sin(B);y.a=k*x-S*b,y.b=k*w-S*M,y.c=S*x+k*b,y.d=S*w+k*M}if(s){var A=this.temp;o.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),y.worldX+=A.x*e,y.worldY+=A.y*n}if(0!=r){var I=(Math.sqrt(h*h+c*c)-1+this.data.offsetScaleX)*r+1;y.a*=I,y.c*=I}if(0!=i){I=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*i+1;y.b*=I,y.d*=I}if(a>0){var B;(B=Math.atan2(d,l)-Math.atan2(c,h))>C.PI?B-=C.PI2:B<-C.PI&&(B+=C.PI2);w=y.b,M=y.d;B=Math.atan2(M,w)+(B-C.PI/2+p)*a;I=Math.sqrt(w*w+M*M);y.b=Math.cos(B)*I,y.d=Math.sin(B)*I}y.updateAppliedTransform()}},t.prototype.applyAbsoluteLocal=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h<l;h++){var c=o[h],d=c.arotation;if(0!=t){var u=s.arotation-d+this.data.offsetRotation;d+=(u-=360*(16384-(16384.499999999996-u/360|0)))*t}var f=c.ax,p=c.ay;f+=(s.ax-f+this.data.offsetX)*e,p+=(s.ay-p+this.data.offsetY)*n;var m=c.ascaleX,g=c.ascaleY;0!=r&&0!=m&&(m=(m+(s.ascaleX-m+this.data.offsetScaleX)*r)/m),0!=i&&0!=g&&(g=(g+(s.ascaleY-g+this.data.offsetScaleY)*i)/g);var v=c.ashearY;if(0!=a){u=s.ashearY-v+this.data.offsetShearY;v+=(u-=360*(16384-(16384.499999999996-u/360|0)))*a}c.updateWorldTransformWith(f,p,d,m,g,c.ashearX,v)}},t.prototype.applyRelativeLocal=function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,i=this.mixScaleY,a=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h<l;h++){var c=o[h],d=c.arotation+(s.arotation+this.data.offsetRotation)*t,u=c.ax+(s.ax+this.data.offsetX)*e,f=c.ay+(s.ay+this.data.offsetY)*n,p=c.ascaleX*((s.ascaleX-1+this.data.offsetScaleX)*r+1),m=c.ascaleY*((s.ascaleY-1+this.data.offsetScaleY)*i+1),g=c.ashearY+(s.ashearY+this.data.offsetShearY)*a;c.updateWorldTransformWith(u,f,d,p,m,c.ashearX,g)}},t}(),le=function(){function t(t){if(this._updateCache=new Array,this.skin=null,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,!t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var n=t.bones[e],r=void 0;if(n.parent){var i=this.bones[n.parent.index];r=new Qt(n,this,i),i.children.push(r)}else r=new Qt(n,this,null);this.bones.push(r)}this.slots=new Array,this.drawOrder=new Array;for(e=0;e<t.slots.length;e++){var a=t.slots[e],s=(r=this.bones[a.boneData.index],new oe(a,r));this.slots.push(s),this.drawOrder.push(s)}this.ikConstraints=new Array;for(e=0;e<t.ikConstraints.length;e++){var o=t.ikConstraints[e];this.ikConstraints.push(new ne(o,this))}this.transformConstraints=new Array;for(e=0;e<t.transformConstraints.length;e++){var l=t.transformConstraints[e];this.transformConstraints.push(new he(l,this))}this.pathConstraints=new Array;for(e=0;e<t.pathConstraints.length;e++){var c=t.pathConstraints[e];this.pathConstraints.push(new se(c,this))}this.color=new h(1,1,1,1),this.updateCache()}return t.prototype.updateCache=function(){this._updateCache.length=0;for(var t=this.bones,e=0,n=t.length;e<n;e++){(i=t[e]).sorted=i.data.skinRequired,i.active=!i.sorted}if(this.skin){var r=this.skin.bones;for(e=0,n=this.skin.bones.length;e<n;e++){var i=this.bones[r[e].index];do{i.sorted=!1,i.active=!0,i=i.parent}while(i)}}var a=this.ikConstraints,s=this.transformConstraints,o=this.pathConstraints,h=a.length,l=s.length,c=o.length,d=h+l+c;t:for(e=0;e<d;e++){for(var u=0;u<h;u++){if((f=a[u]).data.order==e){this.sortIkConstraint(f);continue t}}for(u=0;u<l;u++){if((f=s[u]).data.order==e){this.sortTransformConstraint(f);continue t}}for(u=0;u<c;u++){var f;if((f=o[u]).data.order==e){this.sortPathConstraint(f);continue t}}}for(e=0,n=t.length;e<n;e++)this.sortBone(t[e])},t.prototype.sortIkConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||this.skin&&g.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target;this.sortBone(e);var n=t.bones,r=n[0];if(this.sortBone(r),1==n.length)this._updateCache.push(t),this.sortReset(r.children);else{var i=n[n.length-1];this.sortBone(i),this._updateCache.push(t),this.sortReset(r.children),i.sorted=!0}}},t.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||this.skin&&g.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,n=e.data.index,r=e.bone;this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var i=0,a=this.data.skins.length;i<a;i++)this.sortPathConstraintAttachment(this.data.skins[i],n,r);var s=e.getAttachment();s instanceof T&&this.sortPathConstraintAttachmentWith(s,r);var o=t.bones,h=o.length;for(i=0;i<h;i++)this.sortBone(o[i]);this._updateCache.push(t);for(i=0;i<h;i++)this.sortReset(o[i].children);for(i=0;i<h;i++)o[i].sorted=!0}},t.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||this.skin&&g.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,n=e.length;if(t.data.local)for(var r=0;r<n;r++){var i=e[r];this.sortBone(i.parent),this.sortBone(i)}else for(r=0;r<n;r++)this.sortBone(e[r]);this._updateCache.push(t);for(r=0;r<n;r++)this.sortReset(e[r].children);for(r=0;r<n;r++)e[r].sorted=!0}},t.prototype.sortPathConstraintAttachment=function(t,e,n){var r=t.attachments[e];if(r)for(var i in r)this.sortPathConstraintAttachmentWith(r[i],n)},t.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof T){var n=t.bones;if(n)for(var r=this.bones,i=0,a=n.length;i<a;){var s=n[i++];for(s+=i;i<s;)this.sortBone(r[n[i++]])}else this.sortBone(e)}},t.prototype.sortBone=function(t){if(t&&!t.sorted){var e=t.parent;e&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t)}},t.prototype.sortReset=function(t){for(var e=0,n=t.length;e<n;e++){var r=t[e];r.active&&(r.sorted&&this.sortReset(r.children),r.sorted=!1)}},t.prototype.updateWorldTransform=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++){var r=t[e];r.ax=r.x,r.ay=r.y,r.arotation=r.rotation,r.ascaleX=r.scaleX,r.ascaleY=r.scaleY,r.ashearX=r.shearX,r.ashearY=r.shearY}var i=this._updateCache;for(e=0,n=i.length;e<n;e++)i[e].update()},t.prototype.updateWorldTransformWith=function(t){var e=this.getRootBone();if(!e)throw new Error("Root bone must not be null.");var n=t.a,r=t.b,i=t.c,a=t.d;e.worldX=n*this.x+r*this.y+t.worldX,e.worldY=i*this.x+a*this.y+t.worldY;var s=e.rotation+90+e.shearY,o=C.cosDeg(e.rotation+e.shearX)*e.scaleX,h=C.cosDeg(s)*e.scaleY,l=C.sinDeg(e.rotation+e.shearX)*e.scaleX,c=C.sinDeg(s)*e.scaleY;e.a=(n*o+r*l)*this.scaleX,e.b=(n*h+r*c)*this.scaleX,e.c=(i*o+a*l)*this.scaleY,e.d=(i*h+a*c)*this.scaleY;for(var d=this._updateCache,u=0,f=d.length;u<f;u++){var p=d[u];p!=e&&p.update()}},t.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},t.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].setToSetupPose();var r=this.ikConstraints;for(e=0,n=r.length;e<n;e++){(o=r[e]).mix=o.data.mix,o.softness=o.data.softness,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch}var i=this.transformConstraints;for(e=0,n=i.length;e<n;e++){var a=(o=i[e]).data;o.mixRotate=a.mixRotate,o.mixX=a.mixX,o.mixY=a.mixY,o.mixScaleX=a.mixScaleX,o.mixScaleY=a.mixScaleY,o.mixShearY=a.mixShearY}var s=this.pathConstraints;for(e=0,n=s.length;e<n;e++){var o;a=(o=s[e]).data;o.position=a.position,o.spacing=a.spacing,o.mixRotate=a.mixRotate,o.mixX=a.mixX,o.mixY=a.mixY}},t.prototype.setSlotsToSetupPose=function(){var t=this.slots;g.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,n=t.length;e<n;e++)t[e].setToSetupPose()},t.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},t.prototype.findBone=function(t){if(!t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.findSlot=function(t){if(!t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(!e)throw new Error("Skin not found: "+t);this.setSkin(e)},t.prototype.setSkin=function(t){if(t!=this.skin){if(t)if(this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n],a=i.data.attachmentName;if(a){var s=t.getAttachment(n,a);s&&i.setAttachment(s)}}this.skin=t,this.updateCache()}},t.prototype.getAttachmentByName=function(t,e){var n=this.data.findSlot(t);if(!n)throw new Error("Can't find slot with name ".concat(t));return this.getAttachment(n.index,e)},t.prototype.getAttachment=function(t,e){if(!e)throw new Error("attachmentName cannot be null.");if(this.skin){var n=this.skin.getAttachment(t,e);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},t.prototype.setAttachment=function(t,e){if(!t)throw new Error("slotName cannot be null.");for(var n=this.slots,r=0,i=n.length;r<i;r++){var a=n[r];if(a.data.name==t){var s=null;if(e&&!(s=this.getAttachment(r,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void a.setAttachment(s)}}throw new Error("Slot not found: "+t)},t.prototype.findIkConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.findTransformConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.findPathConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.data.name==t)return i}return null},t.prototype.getBoundsRect=function(){var t=new e.math.Vector2,n=new e.math.Vector2;return this.getBounds(t,n),{x:t.x,y:t.y,width:n.x,height:n.y}},t.prototype.getBounds=function(t,e,n){if(void 0===n&&(n=new Array(2)),!t)throw new Error("offset cannot be null.");if(!e)throw new Error("size cannot be null.");for(var r=this.drawOrder,i=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=r.length;h<l;h++){var c=r[h];if(c.bone.active){var d=0,u=null,f=c.getAttachment();if(f instanceof Y)d=8,u=g.setArraySize(n,d,0),f.computeWorldVertices(c,u,0,2);else if(f instanceof B){var p=f;d=p.worldVerticesLength,u=g.setArraySize(n,d,0),p.computeWorldVertices(c,0,d,u,0,2)}if(u)for(var m=0,v=u.length;m<v;m+=2){var y=u[m],x=u[m+1];i=Math.min(i,y),a=Math.min(a,x),s=Math.max(s,y),o=Math.max(o,x)}}}t.set(i,a),e.set(s-i,o-a)},t}(),ce=function(){function t(){this.name=null,this.bones=new Array,this.slots=new Array,this.skins=new Array,this.defaultSkin=null,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.x=0,this.y=0,this.width=0,this.height=0,this.version=null,this.hash=null,this.fps=0,this.imagesPath=null,this.audioPath=null}return t.prototype.findBone=function(t){if(!t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findSlot=function(t){if(!t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findSkin=function(t){if(!t)throw new Error("skinName cannot be null.");for(var e=this.skins,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findEvent=function(t){if(!t)throw new Error("eventDataName cannot be null.");for(var e=this.events,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findAnimation=function(t){if(!t)throw new Error("animationName cannot be null.");for(var e=this.animations,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findIkConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findTransformConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t.prototype.findPathConstraint=function(t){if(!t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,r=e.length;n<r;n++){var i=e[n];if(i.name==t)return i}return null},t}(),de=function(t,e,n){void 0===t&&(t=0),this.slotIndex=t,this.name=e,this.attachment=n},ue=function(){function t(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!t)throw new Error("name cannot be null.");this.name=t}return t.prototype.setAttachment=function(t,e,n){if(!n)throw new Error("attachment cannot be null.");var r=this.attachments;t>=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},t.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],r=!1,i=0;i<this.bones.length;i++)if(this.bones[i]==n){r=!0;break}r||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){var a=t.constraints[e];for(r=!1,i=0;i<this.constraints.length;i++)if(this.constraints[i]==a){r=!0;break}r||this.constraints.push(a)}var s=t.getAttachments();for(e=0;e<s.length;e++){var o=s[e];this.setAttachment(o.slotIndex,o.name,o.attachment)}},t.prototype.copySkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],r=!1,i=0;i<this.bones.length;i++)if(this.bones[i]==n){r=!0;break}r||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){var a=t.constraints[e];for(r=!1,i=0;i<this.constraints.length;i++)if(this.constraints[i]==a){r=!0;break}r||this.constraints.push(a)}var s=t.getAttachments();for(e=0;e<s.length;e++){var o=s[e];o.attachment&&(o.attachment instanceof B?(o.attachment=o.attachment.newLinkedMesh(),this.setAttachment(o.slotIndex,o.name,o.attachment)):(o.attachment=o.attachment.copy(),this.setAttachment(o.slotIndex,o.name,o.attachment)))}},t.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},t.prototype.removeAttachment=function(t,e){var n=this.attachments[t];n&&delete n[e]},t.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var n=this.attachments[e];if(n)for(var r in n){var i=n[r];i&&t.push(new de(e,r,i))}}return t},t.prototype.getAttachmentsForSlot=function(t,e){var n=this.attachments[t];if(n)for(var r in n){var i=n[r];i&&e.push(new de(t,r,i))}},t.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},t.prototype.attachAll=function(t,e){for(var n=0,r=0;r<t.slots.length;r++){var i=t.slots[r],a=i.getAttachment();if(a&&n<e.attachments.length){var s=e.attachments[n];for(var o in s){if(a==s[o]){var h=this.getAttachment(n,o);h&&i.setAttachment(h);break}}}n++}},t}(),fe=function(e,n,r){if(this.index=0,this.color=new h(1,1,1,1),this.darkColor=null,this.attachmentName=null,this.blendMode=t.BlendMode.Normal,e<0)throw new Error("index must be >= 0.");if(!n)throw new Error("name cannot be null.");if(!r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r};t.BlendMode=void 0,(ae=t.BlendMode||(t.BlendMode={}))[ae.Normal=0]="Normal",ae[ae.Additive=1]="Additive",ae[ae.Multiply=2]="Multiply",ae[ae.Screen=3]="Screen";var pe,me=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n._target=null,n.mixRotate=0,n.mixX=0,n.mixY=0,n.mixScaleX=0,n.mixScaleY=0,n.mixShearY=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return r(e,t),Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t},enumerable:!1,configurable:!0}),e}($t),ge=function(){function e(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}return e.prototype.readSkeletonData=function(e){var n=this.scale,r=new ce;r.name="";var i=new ve(e),a=i.readInt32(),s=i.readInt32();r.hash=0==s&&0==a?null:s.toString(16)+a.toString(16),r.version=i.readString(),r.x=i.readFloat(),r.y=i.readFloat(),r.width=i.readFloat(),r.height=i.readFloat();var o=i.readBoolean();o&&(r.fps=i.readFloat(),r.imagesPath=i.readString(),r.audioPath=i.readString());var l=0;l=i.readInt(!0);for(var c=0;c<l;c++){var d=i.readString();if(!d)throw new Error("String in string table must not be null.");i.strings.push(d)}l=i.readInt(!0);for(c=0;c<l;c++){var u=i.readString();if(!u)throw new Error("Bone name must not be null.");var f=0==c?null:r.bones[i.readInt(!0)];(v=new Ht(c,u,f)).rotation=i.readFloat(),v.x=i.readFloat()*n,v.y=i.readFloat()*n,v.scaleX=i.readFloat(),v.scaleY=i.readFloat(),v.shearX=i.readFloat(),v.shearY=i.readFloat(),v.length=i.readFloat()*n,v.transformMode=i.readInt(!0),v.skinRequired=i.readBoolean(),o&&h.rgba8888ToColor(v.color,i.readInt32()),r.bones.push(v)}l=i.readInt(!0);for(c=0;c<l;c++){var p=i.readString();if(!p)throw new Error("Slot name must not be null.");var m=r.bones[i.readInt(!0)],v=new fe(c,p,m);h.rgba8888ToColor(v.color,i.readInt32());var y=i.readInt32();-1!=y&&h.rgb888ToColor(v.darkColor=new h,y),v.attachmentName=i.readStringRef(),v.blendMode=i.readInt(!0),r.slots.push(v)}l=i.readInt(!0);c=0;for(var x=void 0;c<l;c++){var w=i.readString();if(!w)throw new Error("IK constraint data name must not be null.");(v=new re(w)).order=i.readInt(!0),v.skinRequired=i.readBoolean(),x=i.readInt(!0);for(var b=0;b<x;b++)v.bones.push(r.bones[i.readInt(!0)]);v.target=r.bones[i.readInt(!0)],v.mix=i.readFloat(),v.softness=i.readFloat()*n,v.bendDirection=i.readByte(),v.compress=i.readBoolean(),v.stretch=i.readBoolean(),v.uniform=i.readBoolean(),r.ikConstraints.push(v)}l=i.readInt(!0);for(c=0,x=void 0;c<l;c++){var M=i.readString();if(!M)throw new Error("Transform constraint data name must not be null.");(v=new me(M)).order=i.readInt(!0),v.skinRequired=i.readBoolean(),x=i.readInt(!0);for(b=0;b<x;b++)v.bones.push(r.bones[i.readInt(!0)]);v.target=r.bones[i.readInt(!0)],v.local=i.readBoolean(),v.relative=i.readBoolean(),v.offsetRotation=i.readFloat(),v.offsetX=i.readFloat()*n,v.offsetY=i.readFloat()*n,v.offsetScaleX=i.readFloat(),v.offsetScaleY=i.readFloat(),v.offsetShearY=i.readFloat(),v.mixRotate=i.readFloat(),v.mixX=i.readFloat(),v.mixY=i.readFloat(),v.mixScaleX=i.readFloat(),v.mixScaleY=i.readFloat(),v.mixShearY=i.readFloat(),r.transformConstraints.push(v)}l=i.readInt(!0);for(c=0,x=void 0;c<l;c++){var k=i.readString();if(!k)throw new Error("Path constraint data name must not be null.");(v=new ie(k)).order=i.readInt(!0),v.skinRequired=i.readBoolean(),x=i.readInt(!0);for(b=0;b<x;b++)v.bones.push(r.bones[i.readInt(!0)]);v.target=r.slots[i.readInt(!0)],v.positionMode=i.readInt(!0),v.spacingMode=i.readInt(!0),v.rotateMode=i.readInt(!0),v.offsetRotation=i.readFloat(),v.position=i.readFloat(),v.positionMode==t.PositionMode.Fixed&&(v.position*=n),v.spacing=i.readFloat(),v.spacingMode!=t.SpacingMode.Length&&v.spacingMode!=t.SpacingMode.Fixed||(v.spacing*=n),v.mixRotate=i.readFloat(),v.mixX=i.readFloat(),v.mixY=i.readFloat(),r.pathConstraints.push(v)}var S=this.readSkin(i,r,!0,o);S&&(r.defaultSkin=S,r.skins.push(S));c=r.skins.length;for(g.setArraySize(r.skins,l=c+i.readInt(!0));c<l;c++){if(!(A=this.readSkin(i,r,!1,o)))throw new Error("readSkin() should not have returned null.");r.skins[c]=A}l=this.linkedMeshes.length;for(c=0;c<l;c++){var A,I=this.linkedMeshes[c];if(!(A=I.skin?r.findSkin(I.skin):r.defaultSkin))throw new Error("Not skin found for linked mesh.");if(!I.parent)throw new Error("Linked mesh parent must not be null");var B=A.getAttachment(I.slotIndex,I.parent);if(!B)throw new Error("Parent mesh not found: ".concat(I.parent));I.mesh.timelineAttachment=I.inheritTimeline?B:I.mesh,I.mesh.setParentMesh(B),null!=I.mesh.region&&I.mesh.updateRegion()}this.linkedMeshes.length=0,l=i.readInt(!0);for(c=0;c<l;c++){var T=i.readStringRef();if(!T)throw new Error;(v=new ee(T)).intValue=i.readInt(!1),v.floatValue=i.readFloat(),v.stringValue=i.readString(),v.audioPath=i.readString(),v.audioPath&&(v.volume=i.readFloat(),v.balance=i.readFloat()),r.events.push(v)}l=i.readInt(!0);for(c=0;c<l;c++){var C=i.readString();if(!C)throw new Error("Animatio name must not be null.");r.animations.push(this.readAnimation(i,C,r))}return r},e.prototype.readSkin=function(t,e,n,r){var i=null,a=0;if(n){if(0==(a=t.readInt(!0)))return null;i=new ue("default")}else{var s=t.readStringRef();if(!s)throw new Error("Skin name must not be null.");(i=new ue(s)).bones.length=t.readInt(!0);for(var o=0,h=i.bones.length;o<h;o++)i.bones[o]=e.bones[t.readInt(!0)];for(o=0,h=t.readInt(!0);o<h;o++)i.constraints.push(e.ikConstraints[t.readInt(!0)]);for(o=0,h=t.readInt(!0);o<h;o++)i.constraints.push(e.transformConstraints[t.readInt(!0)]);for(o=0,h=t.readInt(!0);o<h;o++)i.constraints.push(e.pathConstraints[t.readInt(!0)]);a=t.readInt(!0)}for(o=0;o<a;o++)for(var l=t.readInt(!0),c=0,d=t.readInt(!0);c<d;c++){var u=t.readStringRef();if(!u)throw new Error("Attachment name must not be null");var f=this.readAttachment(t,e,i,l,u,r);f&&i.setAttachment(l,u,f)}return i},e.prototype.readAttachment=function(t,e,n,r,i,a){var s=this.scale,o=t.readStringRef();switch(o||(o=i),t.readByte()){case pe.Region:var l=t.readStringRef(),c=t.readFloat(),d=t.readFloat(),u=t.readFloat(),f=t.readFloat(),p=t.readFloat(),m=t.readFloat(),v=t.readFloat(),y=t.readInt32(),x=this.readSequence(t);l||(l=o);var w=this.attachmentLoader.newRegionAttachment(n,o,l,x);return w?(w.path=l,w.x=d*s,w.y=u*s,w.scaleX=f,w.scaleY=p,w.rotation=c,w.width=m*s,w.height=v*s,h.rgba8888ToColor(w.color,y),w.sequence=x,null==x&&w.updateRegion(),w):null;case pe.BoundingBox:var b=t.readInt(!0),M=this.readVertices(t,b),k=(y=a?t.readInt32():0,this.attachmentLoader.newBoundingBoxAttachment(n,o));return k?(k.worldVerticesLength=b<<1,k.vertices=M.vertices,k.bones=M.bones,a&&h.rgba8888ToColor(k.color,y),k):null;case pe.Mesh:l=t.readStringRef(),y=t.readInt32(),b=t.readInt(!0);var S=this.readFloatArray(t,b<<1,1),A=this.readShortArray(t),I=(M=this.readVertices(t,b),t.readInt(!0)),B=(x=this.readSequence(t),[]);m=0,v=0;return a&&(B=this.readShortArray(t),m=t.readFloat(),v=t.readFloat()),l||(l=o),(T=this.attachmentLoader.newMeshAttachment(n,o,l,x))?(T.path=l,h.rgba8888ToColor(T.color,y),T.bones=M.bones,T.vertices=M.vertices,T.worldVerticesLength=b<<1,T.triangles=A,T.regionUVs=S,null==x&&T.updateRegion(),T.hullLength=I<<1,T.sequence=x,a&&(T.edges=B,T.width=m*s,T.height=v*s),T):null;case pe.LinkedMesh:l=t.readStringRef(),y=t.readInt32();var T,C=t.readStringRef(),E=t.readStringRef(),F=t.readBoolean();x=this.readSequence(t),m=0,v=0;return a&&(m=t.readFloat(),v=t.readFloat()),l||(l=o),(T=this.attachmentLoader.newMeshAttachment(n,o,l,x))?(T.path=l,h.rgba8888ToColor(T.color,y),T.sequence=x,a&&(T.width=m*s,T.height=v*s),this.linkedMeshes.push(new ye(T,C,r,E,F)),T):null;case pe.Path:for(var Y=t.readBoolean(),X=t.readBoolean(),R=(b=t.readInt(!0),M=this.readVertices(t,b),g.newArray(b/3,0)),P=0,D=R.length;P<D;P++)R[P]=t.readFloat()*s;y=a?t.readInt32():0;return(l=this.attachmentLoader.newPathAttachment(n,o))?(l.closed=Y,l.constantSpeed=X,l.worldVerticesLength=b<<1,l.vertices=M.vertices,l.bones=M.bones,l.lengths=R,a&&h.rgba8888ToColor(l.color,y),l):null;case pe.Point:c=t.readFloat(),d=t.readFloat(),u=t.readFloat(),y=a?t.readInt32():0;var V=this.attachmentLoader.newPointAttachment(n,o);return V?(V.x=d*s,V.y=u*s,V.rotation=c,a&&h.rgba8888ToColor(V.color,y),V):null;case pe.Clipping:var L=t.readInt(!0),N=(b=t.readInt(!0),M=this.readVertices(t,b),y=a?t.readInt32():0,this.attachmentLoader.newClippingAttachment(n,o));return N?(N.endSlot=e.slots[L],N.worldVerticesLength=b<<1,N.vertices=M.vertices,N.bones=M.bones,a&&h.rgba8888ToColor(N.color,y),N):null}return null},e.prototype.readSequence=function(t){if(!t.readBoolean())return null;var e=new X(t.readInt(!0));return e.start=t.readInt(!0),e.digits=t.readInt(!0),e.setupIndex=t.readInt(!0),e},e.prototype.readVertices=function(t,e){var n=this.scale,r=e<<1,i=new xe;if(!t.readBoolean())return i.vertices=this.readFloatArray(t,r,n),i;for(var a=new Array,s=new Array,o=0;o<e;o++){var h=t.readInt(!0);s.push(h);for(var l=0;l<h;l++)s.push(t.readInt(!0)),a.push(t.readFloat()*n),a.push(t.readFloat()*n),a.push(t.readFloat())}return i.vertices=g.toFloatArray(a),i.bones=s,i},e.prototype.readFloatArray=function(t,e,n){var r=new Array(e);if(1==n)for(var i=0;i<e;i++)r[i]=t.readFloat();else for(i=0;i<e;i++)r[i]=t.readFloat()*n;return r},e.prototype.readShortArray=function(t){for(var e=t.readInt(!0),n=new Array(e),r=0;r<e;r++)n[r]=t.readShort();return n},e.prototype.readAnimation=function(e,n,r){e.readInt(!0);var i=new Array,a=this.scale;new h,new h;for(var s=0,o=e.readInt(!0);s<o;s++)for(var l=e.readInt(!0),c=0,d=e.readInt(!0);c<d;c++){var u=e.readByte(),f=(O=e.readInt(!0))-1;switch(u){case Re:for(var p=new St(O,l),m=0;m<O;m++)p.setFrame(m,e.readFloat(),e.readStringRef());i.push(p);break;case Pe:for(var v=e.readInt(!0),y=(p=new xt(O,v,l),e.readFloat()),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,k=(m=0,0);p.setFrame(m,y,x,w,b,M),m!=f;m++){var S=e.readFloat(),A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,T=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,A,1),Me(e,p,k++,m,1,y,S,w,I,1),Me(e,p,k++,m,2,y,S,b,B,1),Me(e,p,k++,m,3,y,S,M,T,1)}y=S,x=A,w=I,b=B,M=T}i.push(p);break;case De:for(v=e.readInt(!0),p=new wt(O,v,l),y=e.readFloat(),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,x,w,b),m!=f;m++){S=e.readFloat(),A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,A,1),Me(e,p,k++,m,1,y,S,w,I,1),Me(e,p,k++,m,2,y,S,b,B,1)}y=S,x=A,w=I,b=B}i.push(p);break;case Ve:for(v=e.readInt(!0),p=new Mt(O,v,l),y=e.readFloat(),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,M=e.readUnsignedByte()/255,A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,x,w,b,M,A,I,B),m!=f;m++){S=e.readFloat();var C=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255,F=e.readUnsignedByte()/255,Y=e.readUnsignedByte()/255,X=e.readUnsignedByte()/255,R=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,C,1),Me(e,p,k++,m,1,y,S,w,E,1),Me(e,p,k++,m,2,y,S,b,F,1),Me(e,p,k++,m,3,y,S,M,Y,1),Me(e,p,k++,m,4,y,S,A,X,1),Me(e,p,k++,m,5,y,S,I,R,1),Me(e,p,k++,m,6,y,S,B,P,1)}y=S,x=C,w=E,b=F,M=Y,A=X,I=R,B=P}i.push(p);break;case Le:for(v=e.readInt(!0),p=new kt(O,v,l),y=e.readFloat(),x=e.readUnsignedByte()/255,w=e.readUnsignedByte()/255,b=e.readUnsignedByte()/255,A=e.readUnsignedByte()/255,I=e.readUnsignedByte()/255,B=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,x,w,b,A,I,B),m!=f;m++){S=e.readFloat(),C=e.readUnsignedByte()/255,E=e.readUnsignedByte()/255,F=e.readUnsignedByte()/255,X=e.readUnsignedByte()/255,R=e.readUnsignedByte()/255,P=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,x,C,1),Me(e,p,k++,m,1,y,S,w,E,1),Me(e,p,k++,m,2,y,S,b,F,1),Me(e,p,k++,m,3,y,S,A,X,1),Me(e,p,k++,m,4,y,S,I,R,1),Me(e,p,k++,m,5,y,S,B,P,1)}y=S,x=C,w=E,b=F,A=X,I=R,B=P}i.push(p);break;case Ne:for(p=new bt(O,e.readInt(!0),l),y=e.readFloat(),M=e.readUnsignedByte()/255,m=0,k=0;p.setFrame(m,y,M),m!=f;m++){S=e.readFloat(),T=e.readUnsignedByte()/255;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,M,T,1)}y=S,M=T}i.push(p)}}for(s=0,o=e.readInt(!0);s<o;s++){var L=e.readInt(!0);for(c=0,d=e.readInt(!0);c<d;c++){var N=e.readByte(),O=e.readInt(!0);v=e.readInt(!0);switch(N){case Se:i.push(we(e,new lt(O,v,L),1));break;case Ae:i.push(be(e,new ct(O,v,L),a));break;case Ie:i.push(we(e,new dt(O,v,L),a));break;case Be:i.push(we(e,new ut(O,v,L),a));break;case Te:i.push(be(e,new ft(O,v,L),1));break;case Ce:i.push(we(e,new pt(O,v,L),1));break;case Ee:i.push(we(e,new mt(O,v,L),1));break;case Fe:i.push(be(e,new gt(O,v,L),1));break;case Ye:i.push(we(e,new vt(O,v,L),1));break;case Xe:i.push(we(e,new yt(O,v,L),1))}}}for(s=0,o=e.readInt(!0);s<o;s++){var _=e.readInt(!0),q=(f=(O=e.readInt(!0))-1,p=new Tt(O,e.readInt(!0),_),y=e.readFloat(),e.readFloat()),W=e.readFloat()*a;for(m=0,k=0;p.setFrame(m,y,q,W,e.readByte(),e.readBoolean(),e.readBoolean()),m!=f;m++){S=e.readFloat();var U=e.readFloat(),z=e.readFloat()*a;switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,q,U,1),Me(e,p,k++,m,1,y,S,W,z,a)}y=S,q=U,W=z}i.push(p)}for(s=0,o=e.readInt(!0);s<o;s++){_=e.readInt(!0),f=(O=e.readInt(!0))-1,p=new Ct(O,e.readInt(!0),_),y=e.readFloat();var G=e.readFloat(),j=e.readFloat(),H=e.readFloat(),K=e.readFloat(),Z=e.readFloat(),J=e.readFloat();for(m=0,k=0;p.setFrame(m,y,G,j,H,K,Z,J),m!=f;m++){S=e.readFloat();var Q=e.readFloat(),$=e.readFloat(),tt=e.readFloat(),et=e.readFloat(),nt=e.readFloat(),rt=e.readFloat();switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,G,Q,1),Me(e,p,k++,m,1,y,S,j,$,1),Me(e,p,k++,m,2,y,S,H,tt,1),Me(e,p,k++,m,3,y,S,K,et,1),Me(e,p,k++,m,4,y,S,Z,nt,1),Me(e,p,k++,m,5,y,S,J,rt,1)}y=S,G=Q,j=$,H=tt,K=et,Z=nt,J=rt}i.push(p)}for(s=0,o=e.readInt(!0);s<o;s++){_=e.readInt(!0);var it=r.pathConstraints[_];for(c=0,d=e.readInt(!0);c<d;c++)switch(e.readByte()){case qe:i.push(we(e,new Et(e.readInt(!0),e.readInt(!0),_),it.positionMode==t.PositionMode.Fixed?a:1));break;case We:i.push(we(e,new Ft(e.readInt(!0),e.readInt(!0),_),it.spacingMode==t.SpacingMode.Length||it.spacingMode==t.SpacingMode.Fixed?a:1));break;case Ue:for(p=new Yt(e.readInt(!0),e.readInt(!0),_),y=e.readFloat(),G=e.readFloat(),j=e.readFloat(),H=e.readFloat(),m=0,k=0,f=p.getFrameCount()-1;p.setFrame(m,y,G,j,H),m!=f;m++){S=e.readFloat(),Q=e.readFloat(),$=e.readFloat(),tt=e.readFloat();switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,G,Q,1),Me(e,p,k++,m,1,y,S,j,$,1),Me(e,p,k++,m,2,y,S,H,tt,1)}y=S,G=Q,j=$,H=tt}i.push(p)}}for(s=0,o=e.readInt(!0);s<o;s++){var at=r.skins[e.readInt(!0)];for(c=0,d=e.readInt(!0);c<d;c++){l=e.readInt(!0);for(var st=0,ot=e.readInt(!0);st<ot;st++){var ht=e.readStringRef();if(!ht)throw new Error("attachmentName must not be null.");var Rt=at.getAttachment(l,ht);u=e.readByte(),f=(O=e.readInt(!0))-1;switch(u){case Oe:var Pt=Rt,Dt=Pt.bones,Vt=Pt.vertices,Lt=Dt?Vt.length/3*2:Vt.length;for(v=e.readInt(!0),p=new At(O,v,l,Pt),y=e.readFloat(),m=0,k=0;;m++){var Nt=void 0,Ot=e.readInt(!0);if(0==Ot)Nt=Dt?g.newFloatArray(Lt):Vt;else{Nt=g.newFloatArray(Lt);var _t=e.readInt(!0);if(Ot+=_t,1==a)for(var qt=_t;qt<Ot;qt++)Nt[qt]=e.readFloat();else for(qt=_t;qt<Ot;qt++)Nt[qt]=e.readFloat()*a;if(!Dt){qt=0;for(var Wt=Nt.length;qt<Wt;qt++)Nt[qt]+=Vt[qt]}}if(p.setFrame(m,y,Nt),m==f)break;S=e.readFloat();switch(e.readByte()){case ze:p.setStepped(m);break;case Ge:Me(e,p,k++,m,0,y,S,0,1,1)}y=S}i.push(p);break;case _e:for(p=new Xt(O,l,Rt),m=0;m<O;m++){y=e.readFloat();var Ut=e.readInt32();p.setFrame(m,y,D[15&Ut],Ut>>4,e.readFloat())}i.push(p)}}}}var zt=e.readInt(!0);if(zt>0){p=new Bt(zt);var Gt=r.slots.length;for(s=0;s<zt;s++){y=e.readFloat();var jt=e.readInt(!0),Ht=g.newArray(Gt,0);for(c=Gt-1;c>=0;c--)Ht[c]=-1;var Kt=g.newArray(Gt-jt,0),Zt=0,Jt=0;for(c=0;c<jt;c++){for(l=e.readInt(!0);Zt!=l;)Kt[Jt++]=Zt++;Ht[Zt+e.readInt(!0)]=Zt++}for(;Zt<Gt;)Kt[Jt++]=Zt++;for(c=Gt-1;c>=0;c--)-1==Ht[c]&&(Ht[c]=Kt[--Jt]);p.setFrame(s,y,Ht)}i.push(p)}var Qt=e.readInt(!0);if(Qt>0){for(p=new It(Qt),s=0;s<Qt;s++){y=e.readFloat();var $t=r.events[e.readInt(!0)],ee=new te(y,$t);ee.intValue=e.readInt(!1),ee.floatValue=e.readFloat(),ee.stringValue=e.readBoolean()?e.readString():$t.stringValue,ee.data.audioPath&&(ee.volume=e.readFloat(),ee.balance=e.readFloat()),p.setFrame(s,ee)}i.push(p)}var ne=0;for(s=0,o=i.length;s<o;s++)ne=Math.max(ne,i[s].getDuration());return new V(n,i,ne)},e}(),ve=function(){function t(t,e,n,r){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===r&&(r=t),this.strings=e,this.index=n,this.buffer=r}return t.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},t.prototype.readUnsignedByte=function(){return this.buffer.getUint8(this.index++)},t.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},t.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},t.prototype.readInt=function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<28)))),t?n:n>>>1^-(1&n)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n<t;){var r=this.readUnsignedByte();switch(r>>4){case 12:case 13:e+=String.fromCharCode((31&r)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&r)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(r),n++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t}(),ye=function(t,e,n,r,i){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=r,this.inheritTimeline=i},xe=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e};function we(t,e,n){for(var r=t.readFloat(),i=t.readFloat()*n,a=0,s=0,o=e.getFrameCount()-1;e.setFrame(a,r,i),a!=o;a++){var h=t.readFloat(),l=t.readFloat()*n;switch(t.readByte()){case ze:e.setStepped(a);break;case Ge:Me(t,e,s++,a,0,r,h,i,l,n)}r=h,i=l}return e}function be(t,e,n){for(var r=t.readFloat(),i=t.readFloat()*n,a=t.readFloat()*n,s=0,o=0,h=e.getFrameCount()-1;e.setFrame(s,r,i,a),s!=h;s++){var l=t.readFloat(),c=t.readFloat()*n,d=t.readFloat()*n;switch(t.readByte()){case ze:e.setStepped(s);break;case Ge:Me(t,e,o++,s,0,r,l,i,c,n),Me(t,e,o++,s,1,r,l,a,d,n)}r=l,i=c,a=d}return e}function Me(t,e,n,r,i,a,s,o,h,l){e.setBezier(n,r,i,a,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,s,h)}!function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"}(pe||(pe={}));var ke,Se=0,Ae=1,Ie=2,Be=3,Te=4,Ce=5,Ee=6,Fe=7,Ye=8,Xe=9,Re=0,Pe=1,De=2,Ve=3,Le=4,Ne=5,Oe=0,_e=1,qe=0,We=1,Ue=2,ze=1,Ge=2,je=function(){function t(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new v((function(){return g.newFloatArray(16)}))}return t.prototype.update=function(t,e){if(!t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,i=this.polygonPool,a=t.slots,s=a.length;n.length=0,i.freeAll(r),r.length=0;for(var o=0;o<s;o++){var h=a[o];if(h.bone.active){var l=h.getAttachment();if(l instanceof w){var c=l;n.push(c);var d=i.obtain();d.length!=c.worldVerticesLength&&(d=g.newFloatArray(c.worldVerticesLength)),r.push(d),c.computeWorldVertices(h,0,c.worldVerticesLength,d,0,2)}}}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},t.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=this.polygons,a=0,s=i.length;a<s;a++)for(var o=i[a],h=o,l=0,c=o.length;l<c;l+=2){var d=h[l],u=h[l+1];t=Math.min(t,d),e=Math.min(e,u),n=Math.max(n,d),r=Math.max(r,u)}this.minX=t,this.minY=e,this.maxX=n,this.maxY=r},t.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},t.prototype.aabbIntersectsSegment=function(t,e,n,r){var i=this.minX,a=this.minY,s=this.maxX,o=this.maxY;if(t<=i&&n<=i||e<=a&&r<=a||t>=s&&n>=s||e>=o&&r>=o)return!1;var h=(r-e)/(n-t),l=h*(i-t)+e;if(l>a&&l<o)return!0;if((l=h*(s-t)+e)>a&&l<o)return!0;var c=(a-e)/h+t;return c>i&&c<s||(c=(o-e)/h+t)>i&&c<s},t.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},t.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,i=n.length;r<i;r++)if(this.containsPointPolygon(n[r],t,e))return this.boundingBoxes[r];return null},t.prototype.containsPointPolygon=function(t,e,n){for(var r=t,i=t.length,a=i-2,s=!1,o=0;o<i;o+=2){var h=r[o+1],l=r[a+1];if(h<n&&l>=n||l<n&&h>=n){var c=r[o];c+(n-h)/(l-h)*(r[a]-c)<e&&(s=!s)}a=o}return s},t.prototype.intersectsSegment=function(t,e,n,r){for(var i=this.polygons,a=0,s=i.length;a<s;a++)if(this.intersectsSegmentPolygon(i[a],t,e,n,r))return this.boundingBoxes[a];return null},t.prototype.intersectsSegmentPolygon=function(t,e,n,r,i){for(var a=t,s=t.length,o=e-r,h=n-i,l=e*i-n*r,c=a[s-2],d=a[s-1],u=0;u<s;u+=2){var f=a[u],p=a[u+1],m=c*p-d*f,g=c-f,v=d-p,y=o*v-h*g,x=(l*g-o*m)/y;if((x>=c&&x<=f||x>=f&&x<=c)&&(x>=e&&x<=r||x>=r&&x<=e)){var w=(l*v-h*m)/y;if((w>=d&&w<=p||w>=p&&w<=d)&&(w>=n&&w<=i||w>=i&&w<=n))return!0}c=f,d=p}return!1},t.prototype.getPolygon=function(t){if(!t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},t.prototype.getWidth=function(){return this.maxX-this.minX},t.prototype.getHeight=function(){return this.maxY-this.minY},t}(),He=function(){function t(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new v((function(){return new Array})),this.polygonIndicesPool=new v((function(){return new Array}))}return t.prototype.triangulate=function(e){var n=e,r=e.length>>1,i=this.indicesArray;i.length=0;for(var a=0;a<r;a++)i[a]=a;var s=this.isConcaveArray;s.length=0;a=0;for(var o=r;a<o;++a)s[a]=t.isConcave(a,r,n,i);var h=this.triangles;for(h.length=0;r>3;){for(var l=r-1,c=(a=0,1);;){t:if(!s[a]){for(var d=i[l]<<1,u=i[a]<<1,f=i[c]<<1,p=n[d],m=n[d+1],g=n[u],v=n[u+1],y=n[f],x=n[f+1],w=(c+1)%r;w!=l;w=(w+1)%r)if(s[w]){var b=i[w]<<1,M=n[b],k=n[b+1];if(t.positiveArea(y,x,p,m,M,k)&&t.positiveArea(p,m,g,v,M,k)&&t.positiveArea(g,v,y,x,M,k))break t}break}if(0==c){do{if(!s[a])break;a--}while(a>0);break}l=a,a=c,c=(c+1)%r}h.push(i[(r+a-1)%r]),h.push(i[a]),h.push(i[(a+1)%r]),i.splice(a,1),s.splice(a,1);var S=(--r+a-1)%r,A=a==r?0:a;s[S]=t.isConcave(S,r,n,i),s[A]=t.isConcave(A,r,n,i)}return 3==r&&(h.push(i[2]),h.push(i[0]),h.push(i[1])),h},t.prototype.decompose=function(e,n){var r=e,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var a=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(a),a.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;var o=this.polygonPool.obtain();o.length=0;for(var h=-1,l=0,c=0,d=n.length;c<d;c+=3){var u=n[c]<<1,f=n[c+1]<<1,p=n[c+2]<<1,m=r[u],g=r[u+1],v=r[f],y=r[f+1],x=r[p],w=r[p+1],b=!1;if(h==u){var M=o.length-4,k=t.winding(o[M],o[M+1],o[M+2],o[M+3],x,w),S=t.winding(x,w,o[0],o[1],o[2],o[3]);k==l&&S==l&&(o.push(x),o.push(w),s.push(p),b=!0)}b||(o.length>0?(i.push(o),a.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(m),o.push(g),o.push(v),o.push(y),o.push(x),o.push(w),(s=this.polygonIndicesPool.obtain()).length=0,s.push(u),s.push(f),s.push(p),l=t.winding(m,g,v,y,x,w),h=u)}o.length>0&&(i.push(o),a.push(s));for(c=0,d=i.length;c<d;c++)if(0!=(s=a[c]).length)for(var A=s[0],I=s[s.length-1],B=(o=i[c])[M=o.length-4],T=o[M+1],C=o[M+2],E=o[M+3],F=o[0],Y=o[1],X=o[2],R=o[3],P=t.winding(B,T,C,E,F,Y),D=0;D<d;D++)if(D!=c){var V=a[D];if(3==V.length){var L=V[0],N=V[1],O=V[2],_=i[D];x=_[_.length-2],w=_[_.length-1];if(L==A&&N==I){k=t.winding(B,T,C,E,x,w),S=t.winding(x,w,F,Y,X,R);k==P&&S==P&&(_.length=0,V.length=0,o.push(x),o.push(w),s.push(O),B=C,T=E,C=x,E=w,D=0)}}}for(c=i.length-1;c>=0;c--)0==(o=i[c]).length&&(i.splice(c,1),this.polygonPool.free(o),s=a[c],a.splice(c,1),this.polygonIndicesPool.free(s));return i},t.isConcave=function(t,e,n,r){var i=r[(e+t-1)%e]<<1,a=r[t]<<1,s=r[(t+1)%e]<<1;return!this.positiveArea(n[i],n[i+1],n[a],n[a+1],n[s],n[s+1])},t.positiveArea=function(t,e,n,r,i,a){return t*(a-r)+n*(e-a)+i*(r-e)>=0},t.winding=function(t,e,n,r,i,a){var s=n-t,o=r-e;return i*o-a*s+s*e-t*o>=0?1:-1},t}(),Ke=function(){function t(){this.triangulator=new He,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}return t.prototype.clipStart=function(e,n){if(this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,i=g.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(e,0,r,i,0,2);var a=this.clippingPolygon;t.makeClockwise(a);for(var s=this.clippingPolygons=this.triangulator.decompose(a,this.triangulator.triangulate(a)),o=0,h=s.length;o<h;o++){var l=s[o];t.makeClockwise(l),l.push(l[0]),l.push(l[1])}return s.length},t.prototype.clipEndWithSlot=function(t){this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},t.prototype.clipEnd=function(){this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},t.prototype.isClipping=function(){return null!=this.clipAttachment},t.prototype.clipTriangles=function(t,e,n,r,i,a,s,o){var h=this.clipOutput,l=this.clippedVertices,c=this.clippedTriangles,d=this.clippingPolygons,u=d.length,f=o?12:8,p=0;l.length=0,c.length=0;t:for(var m=0;m<r;m+=3)for(var v=n[m]<<1,y=t[v],x=t[v+1],w=i[v],b=i[v+1],M=t[v=n[m+1]<<1],k=t[v+1],S=i[v],A=i[v+1],I=t[v=n[m+2]<<1],B=t[v+1],T=i[v],C=i[v+1],E=0;E<u;E++){var F=l.length;if(!this.clip(y,x,M,k,I,B,d[E],h)){(O=g.setArraySize(l,F+3*f))[F]=y,O[F+1]=x,O[F+2]=a.r,O[F+3]=a.g,O[F+4]=a.b,O[F+5]=a.a,o?(O[F+6]=w,O[F+7]=b,O[F+8]=s.r,O[F+9]=s.g,O[F+10]=s.b,O[F+11]=s.a,O[F+12]=M,O[F+13]=k,O[F+14]=a.r,O[F+15]=a.g,O[F+16]=a.b,O[F+17]=a.a,O[F+18]=S,O[F+19]=A,O[F+20]=s.r,O[F+21]=s.g,O[F+22]=s.b,O[F+23]=s.a,O[F+24]=I,O[F+25]=B,O[F+26]=a.r,O[F+27]=a.g,O[F+28]=a.b,O[F+29]=a.a,O[F+30]=T,O[F+31]=C,O[F+32]=s.r,O[F+33]=s.g,O[F+34]=s.b,O[F+35]=s.a):(O[F+6]=w,O[F+7]=b,O[F+8]=M,O[F+9]=k,O[F+10]=a.r,O[F+11]=a.g,O[F+12]=a.b,O[F+13]=a.a,O[F+14]=S,O[F+15]=A,O[F+16]=I,O[F+17]=B,O[F+18]=a.r,O[F+19]=a.g,O[F+20]=a.b,O[F+21]=a.a,O[F+22]=T,O[F+23]=C),F=c.length,(K=g.setArraySize(c,F+3))[F]=p,K[F+1]=p+1,K[F+2]=p+2,p+=3;continue t}var Y=h.length;if(0!=Y){for(var X=k-B,R=I-M,P=y-I,D=B-x,V=1/(X*P+R*(x-B)),L=Y>>1,N=this.clipOutput,O=g.setArraySize(l,F+L*f),_=0;_<Y;_+=2){var q=N[_],W=N[_+1];O[F]=q,O[F+1]=W,O[F+2]=a.r,O[F+3]=a.g,O[F+4]=a.b,O[F+5]=a.a;var U=q-I,z=W-B,G=(X*U+R*z)*V,j=(D*U+P*z)*V,H=1-G-j;O[F+6]=w*G+S*j+T*H,O[F+7]=b*G+A*j+C*H,o&&(O[F+8]=s.r,O[F+9]=s.g,O[F+10]=s.b,O[F+11]=s.a),F+=f}F=c.length;var K=g.setArraySize(c,F+3*(L-2));L--;for(_=1;_<L;_++)K[F]=p,K[F+1]=p+_,K[F+2]=p+_+1,F+=3;p+=L+1}}},t.prototype.clip=function(t,e,n,r,i,a,s,o){var h,l=o,c=!1;s.length%4>=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(n),h.push(r),h.push(i),h.push(a),h.push(t),h.push(e),o.length=0;for(var d=s,u=s.length-4,f=0;;f+=2){for(var p=d[f],m=d[f+1],g=d[f+2],v=d[f+3],y=p-g,x=m-v,w=h,b=h.length-2,M=o.length,k=0;k<b;k+=2){var S=w[k],A=w[k+1],I=w[k+2],B=w[k+3],T=y*(B-v)-x*(I-g)>0;if(y*(A-v)-x*(S-g)>0){if(T){o.push(I),o.push(B);continue}var C=(F=B-A)*(g-p)-(Y=I-S)*(v-m);if(Math.abs(C)>1e-6){var E=(Y*(m-A)-F*(p-S))/C;o.push(p+(g-p)*E),o.push(m+(v-m)*E)}else o.push(p),o.push(m)}else if(T){var F,Y;C=(F=B-A)*(g-p)-(Y=I-S)*(v-m);if(Math.abs(C)>1e-6){E=(Y*(m-A)-F*(p-S))/C;o.push(p+(g-p)*E),o.push(m+(v-m)*E)}else o.push(p),o.push(m);o.push(I),o.push(B)}c=!0}if(M==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),f==u)break;var X=o;(o=h).length=0,h=X}if(l!=o){l.length=0;f=0;for(var R=o.length-2;f<R;f++)l[f]=o[f]}else l.length=l.length-2;return c},t.makeClockwise=function(t){for(var e=t,n=t.length,r=e[n-2]*e[1]-e[0]*e[n-1],i=0,a=0,s=0,o=0,h=n-3;o<h;o+=2)i=e[o],a=e[o+1],s=e[o+2],r+=i*e[o+3]-s*a;if(!(r<0)){o=0;var l=n-2;for(h=n>>1;o<h;o+=2){var c=e[o],d=e[o+1],u=l-o;e[o]=e[u],e[o+1]=e[u+1],e[u]=c,e[u+1]=d}}},t}(),Ze=function(){function e(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}return e.prototype.readSkeletonData=function(e){var n=this.scale,r=new ce,i="string"==typeof e?JSON.parse(e):e,a=i.skeleton;if(a&&(r.hash=a.hash,r.version=a.spine,r.x=a.x,r.y=a.y,r.width=a.width,r.height=a.height,r.fps=a.fps,r.imagesPath=a.images),i.bones)for(var s=0;s<i.bones.length;s++){var o=i.bones[s],l=null,c=en(o,"parent",null);c&&(l=r.findBone(c)),(p=new Ht(r.bones.length,o.name,l)).length=en(o,"length",0)*n,p.x=en(o,"x",0)*n,p.y=en(o,"y",0)*n,p.rotation=en(o,"rotation",0),p.scaleX=en(o,"scaleX",1),p.scaleY=en(o,"scaleY",1),p.shearX=en(o,"shearX",0),p.shearY=en(o,"shearY",0),p.transformMode=g.enumValue(t.TransformMode,en(o,"transform","Normal")),p.skinRequired=en(o,"skin",!1),(f=en(o,"color",null))&&p.color.setFromString(f),r.bones.push(p)}if(i.slots)for(s=0;s<i.slots.length;s++){var d=i.slots[s],u=r.findBone(d.bone);if(!u)throw new Error("Couldn't find bone ".concat(d.bone," for slot ").concat(d.name));var f,p=new fe(r.slots.length,d.name,u);(f=en(d,"color",null))&&p.color.setFromString(f);var m=en(d,"dark",null);m&&(p.darkColor=h.fromString(m)),p.attachmentName=en(d,"attachment",null),p.blendMode=g.enumValue(t.BlendMode,en(d,"blend","normal")),r.slots.push(p)}if(i.ik)for(s=0;s<i.ik.length;s++){var v=i.ik[s];(p=new re(v.name)).order=en(v,"order",0),p.skinRequired=en(v,"skin",!1);for(var y=0;y<v.bones.length;y++){if(!(S=r.findBone(v.bones[y])))throw new Error("Couldn't find bone ".concat(v.bones[y]," for IK constraint ").concat(v.name,"."));p.bones.push(S)}if(!(b=r.findBone(v.target)))throw new Error("Couldn't find target bone ".concat(v.target," for IK constraint ").concat(v.name,"."));p.target=b,p.mix=en(v,"mix",1),p.softness=en(v,"softness",0)*n,p.bendDirection=en(v,"bendPositive",!0)?1:-1,p.compress=en(v,"compress",!1),p.stretch=en(v,"stretch",!1),p.uniform=en(v,"uniform",!1),r.ikConstraints.push(p)}if(i.transform)for(s=0;s<i.transform.length;s++){v=i.transform[s];(p=new me(v.name)).order=en(v,"order",0),p.skinRequired=en(v,"skin",!1);for(y=0;y<v.bones.length;y++){var x=v.bones[y];if(!(S=r.findBone(x)))throw new Error("Couldn't find bone ".concat(x," for transform constraint ").concat(v.name,"."));p.bones.push(S)}var w=v.target;if(!(b=r.findBone(w)))throw new Error("Couldn't find target bone ".concat(w," for transform constraint ").concat(v.name,"."));p.target=b,p.local=en(v,"local",!1),p.relative=en(v,"relative",!1),p.offsetRotation=en(v,"rotation",0),p.offsetX=en(v,"x",0)*n,p.offsetY=en(v,"y",0)*n,p.offsetScaleX=en(v,"scaleX",0),p.offsetScaleY=en(v,"scaleY",0),p.offsetShearY=en(v,"shearY",0),p.mixRotate=en(v,"mixRotate",1),p.mixX=en(v,"mixX",1),p.mixY=en(v,"mixY",p.mixX),p.mixScaleX=en(v,"mixScaleX",1),p.mixScaleY=en(v,"mixScaleY",p.mixScaleX),p.mixShearY=en(v,"mixShearY",1),r.transformConstraints.push(p)}if(i.path)for(s=0;s<i.path.length;s++){v=i.path[s];(p=new ie(v.name)).order=en(v,"order",0),p.skinRequired=en(v,"skin",!1);for(y=0;y<v.bones.length;y++){x=v.bones[y];if(!(S=r.findBone(x)))throw new Error("Couldn't find bone ".concat(x," for path constraint ").concat(v.name,"."));p.bones.push(S)}var b;w=v.target;if(!(b=r.findSlot(w)))throw new Error("Couldn't find target slot ".concat(w," for path constraint ").concat(v.name,"."));p.target=b,p.positionMode=g.enumValue(t.PositionMode,en(v,"positionMode","Percent")),p.spacingMode=g.enumValue(t.SpacingMode,en(v,"spacingMode","Length")),p.rotateMode=g.enumValue(t.RotateMode,en(v,"rotateMode","Tangent")),p.offsetRotation=en(v,"rotation",0),p.position=en(v,"position",0),p.positionMode==t.PositionMode.Fixed&&(p.position*=n),p.spacing=en(v,"spacing",0),p.spacingMode!=t.SpacingMode.Length&&p.spacingMode!=t.SpacingMode.Fixed||(p.spacing*=n),p.mixRotate=en(v,"mixRotate",1),p.mixX=en(v,"mixX",1),p.mixY=en(v,"mixY",p.mixX),r.pathConstraints.push(p)}if(i.skins)for(s=0;s<i.skins.length;s++){var M=i.skins[s],k=new ue(M.name);if(M.bones)for(y=0;y<M.bones.length;y++){var S;x=M.bones[y];if(!(S=r.findBone(x)))throw new Error("Couldn't find bone ".concat(x," for skin ").concat(M.name,"."));k.bones.push(S)}if(M.ik)for(y=0;y<M.ik.length;y++){var A=M.ik[y];if(!(I=r.findIkConstraint(A)))throw new Error("Couldn't find IK constraint ".concat(A," for skin ").concat(M.name,"."));k.constraints.push(I)}if(M.transform)for(y=0;y<M.transform.length;y++){A=M.transform[y];if(!(I=r.findTransformConstraint(A)))throw new Error("Couldn't find transform constraint ".concat(A," for skin ").concat(M.name,"."));k.constraints.push(I)}if(M.path)for(y=0;y<M.path.length;y++){var I;A=M.path[y];if(!(I=r.findPathConstraint(A)))throw new Error("Couldn't find path constraint ".concat(A," for skin ").concat(M.name,"."));k.constraints.push(I)}for(var B in M.attachments){var T=r.findSlot(B);if(!T)throw new Error("Couldn't find slot ".concat(B," for skin ").concat(M.name,"."));d=M.attachments[B];for(var C in d){var E=this.readAttachment(d[C],k,T.index,C,r);E&&k.setAttachment(T.index,C,E)}}r.skins.push(k),"default"==k.name&&(r.defaultSkin=k)}s=0;for(var F=this.linkedMeshes.length;s<F;s++){var Y=this.linkedMeshes[s];if(!(k=Y.skin?r.findSkin(Y.skin):r.defaultSkin))throw new Error("Skin not found: ".concat(Y.skin));var X=k.getAttachment(Y.slotIndex,Y.parent);if(!X)throw new Error("Parent mesh not found: ".concat(Y.parent));Y.mesh.timelineAttachment=Y.inheritTimeline?X:Y.mesh,Y.mesh.setParentMesh(X),null!=Y.mesh.region&&Y.mesh.updateRegion()}if(this.linkedMeshes.length=0,i.events)for(var R in i.events){var P=i.events[R];(p=new ee(R)).intValue=en(P,"int",0),p.floatValue=en(P,"float",0),p.stringValue=en(P,"string",""),p.audioPath=en(P,"audio",null),p.audioPath&&(p.volume=en(P,"volume",1),p.balance=en(P,"balance",0)),r.events.push(p)}if(i.animations)for(var D in i.animations){var V=i.animations[D];this.readAnimation(V,D,r)}return r},e.prototype.readAttachment=function(t,e,n,r,i){var a=this.scale;switch(r=en(t,"name",r),en(t,"type","region")){case"region":var s=en(t,"path",r),o=this.readSequence(en(t,"sequence",null)),h=this.attachmentLoader.newRegionAttachment(e,r,s,o);return h?(h.path=s,h.x=en(t,"x",0)*a,h.y=en(t,"y",0)*a,h.scaleX=en(t,"scaleX",1),h.scaleY=en(t,"scaleY",1),h.rotation=en(t,"rotation",0),h.width=t.width*a,h.height=t.height*a,h.sequence=o,(w=en(t,"color",null))&&h.color.setFromString(w),null!=h.region&&h.updateRegion(),h):null;case"boundingbox":var l=this.attachmentLoader.newBoundingBoxAttachment(e,r);return l?(this.readVertices(t,l,t.vertexCount<<1),(w=en(t,"color",null))&&l.color.setFromString(w),l):null;case"mesh":case"linkedmesh":s=en(t,"path",r),o=this.readSequence(en(t,"sequence",null));var c=this.attachmentLoader.newMeshAttachment(e,r,s,o);if(!c)return null;c.path=s,(w=en(t,"color",null))&&c.color.setFromString(w),c.width=en(t,"width",0)*a,c.height=en(t,"height",0)*a,c.sequence=o;var d=en(t,"parent",null);if(d)return this.linkedMeshes.push(new Je(c,en(t,"skin",null),n,d,en(t,"timelines",!0))),c;var u=t.uvs;return this.readVertices(t,c,u.length),c.triangles=t.triangles,c.regionUVs=u,null!=c.region&&c.updateRegion(),c.edges=en(t,"edges",null),c.hullLength=2*en(t,"hull",0),c;case"path":if(!(s=this.attachmentLoader.newPathAttachment(e,r)))return null;s.closed=en(t,"closed",!1),s.constantSpeed=en(t,"constantSpeed",!0);var f=t.vertexCount;this.readVertices(t,s,f<<1);for(var p=g.newArray(f/3,0),m=0;m<t.lengths.length;m++)p[m]=t.lengths[m]*a;return s.lengths=p,(w=en(t,"color",null))&&s.color.setFromString(w),s;case"point":var v=this.attachmentLoader.newPointAttachment(e,r);return v?(v.x=en(t,"x",0)*a,v.y=en(t,"y",0)*a,v.rotation=en(t,"rotation",0),(w=en(t,"color",null))&&v.color.setFromString(w),v):null;case"clipping":var y=this.attachmentLoader.newClippingAttachment(e,r);if(!y)return null;var x=en(t,"end",null);x&&(y.endSlot=i.findSlot(x));var w;f=t.vertexCount;return this.readVertices(t,y,f<<1),(w=en(t,"color",null))&&y.color.setFromString(w),y}return null},e.prototype.readSequence=function(t){if(null==t)return null;var e=new X(en(t,"count",0));return e.start=en(t,"start",1),e.digits=en(t,"digits",0),e.setupIndex=en(t,"setup",0),e},e.prototype.readVertices=function(t,e,n){var r=this.scale;e.worldVerticesLength=n;var i=t.vertices;if(n!=i.length){var a=new Array,s=new Array;for(c=0,d=i.length;c<d;){var o=i[c++];s.push(o);for(var h=c+4*o;c<h;c+=4)s.push(i[c]),a.push(i[c+1]*r),a.push(i[c+2]*r),a.push(i[c+3])}e.bones=s,e.vertices=g.toFloatArray(a)}else{var l=g.toFloatArray(i);if(1!=r)for(var c=0,d=i.length;c<d;c++)l[c]*=r;e.vertices=l}},e.prototype.readAnimation=function(e,n,r){var i=this.scale,a=new Array;if(e.slots)for(var s in e.slots){var o=e.slots[s];if(!($t=r.findSlot(s)))throw new Error("Slot not found: "+s);var l=$t.index;for(var c in o){if(at=o[c]){var d=at.length;if("attachment"==c){for(var u=new St(d,l),f=0;f<d;f++){var p=at[f];u.setFrame(f,en(p,"time",0),en(p,"name",null))}a.push(u)}else if("rgba"==c){u=new xt(d,d<<2,l);for(var m=en(p=at[0],"time",0),v=h.fromString(p.color),y=(f=0,0);;f++){if(u.setFrame(f,m,v.r,v.g,v.b,v.a),!(Rt=at[f+1])){u.shrink(y);break}var x=en(Rt,"time",0),w=h.fromString(Rt.color);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1),y=tn(Ot,u,y,f,3,m,x,v.a,w.a,1)),m=x,v=w,p=Rt}a.push(u)}else if("rgb"==c){for(u=new wt(d,3*d,l),m=en(p=at[0],"time",0),v=h.fromString(p.color),f=0,y=0;;f++){if(u.setFrame(f,m,v.r,v.g,v.b),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),w=h.fromString(Rt.color);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1)),m=x,v=w,p=Rt}a.push(u)}else if("alpha"==c)a.push(Qe(at,new bt(d,d,l),0,1));else if("rgba2"==c){u=new Mt(d,7*d,l),m=en(p=at[0],"time",0),v=h.fromString(p.light);var b=h.fromString(p.dark);for(f=0,y=0;;f++){if(u.setFrame(f,m,v.r,v.g,v.b,v.a,b.r,b.g,b.b),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),w=h.fromString(Rt.light);var M=h.fromString(Rt.dark);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1),y=tn(Ot,u,y,f,3,m,x,v.a,w.a,1),y=tn(Ot,u,y,f,4,m,x,b.r,M.r,1),y=tn(Ot,u,y,f,5,m,x,b.g,M.g,1),y=tn(Ot,u,y,f,6,m,x,b.b,M.b,1)),m=x,v=w,b=M,p=Rt}a.push(u)}else if("rgb2"==c){for(u=new kt(d,6*d,l),m=en(p=at[0],"time",0),v=h.fromString(p.light),b=h.fromString(p.dark),f=0,y=0;;f++){if(u.setFrame(f,m,v.r,v.g,v.b,b.r,b.g,b.b),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),w=h.fromString(Rt.light),M=h.fromString(Rt.dark);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,v.r,w.r,1),y=tn(Ot,u,y,f,1,m,x,v.g,w.g,1),y=tn(Ot,u,y,f,2,m,x,v.b,w.b,1),y=tn(Ot,u,y,f,3,m,x,b.r,M.r,1),y=tn(Ot,u,y,f,4,m,x,b.g,M.g,1),y=tn(Ot,u,y,f,5,m,x,b.b,M.b,1)),m=x,v=w,b=M,p=Rt}a.push(u)}}}}if(e.bones)for(var k in e.bones){var S=e.bones[k],A=r.findBone(k);if(!A)throw new Error("Bone not found: "+k);var I=A.index;for(var c in S){var B=(at=S[c]).length;if(0!=B)if("rotate"===c)a.push(Qe(at,new lt(B,B,I),0,1));else if("translate"===c){u=new ct(B,B<<1,I);a.push($e(at,u,"x","y",0,i))}else if("translatex"===c){u=new dt(B,B,I);a.push(Qe(at,u,0,i))}else if("translatey"===c){u=new ut(B,B,I);a.push(Qe(at,u,0,i))}else if("scale"===c){u=new ft(B,B<<1,I);a.push($e(at,u,"x","y",1,1))}else if("scalex"===c){u=new pt(B,B,I);a.push(Qe(at,u,1,1))}else if("scaley"===c){u=new mt(B,B,I);a.push(Qe(at,u,1,1))}else if("shear"===c){u=new gt(B,B<<1,I);a.push($e(at,u,"x","y",0,1))}else if("shearx"===c){u=new vt(B,B,I);a.push(Qe(at,u,0,1))}else if("sheary"===c){u=new yt(B,B,I);a.push(Qe(at,u,0,1))}}}if(e.ik)for(var T in e.ik){if(p=(K=e.ik[T])[0]){if(!(H=r.findIkConstraint(T)))throw new Error("IK Constraint not found: "+T);var C=r.ikConstraints.indexOf(H),F=(u=new Tt(K.length,K.length<<1,C),m=en(p,"time",0),en(p,"mix",1)),Y=en(p,"softness",0)*i;for(f=0,y=0;;f++){if(u.setFrame(f,m,F,Y,en(p,"bendPositive",!0)?1:-1,en(p,"compress",!1),en(p,"stretch",!1)),!(Rt=K[f+1])){u.shrink(y);break}x=en(Rt,"time",0);var X=en(Rt,"mix",1),R=en(Rt,"softness",0)*i;(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,F,X,1),y=tn(Ot,u,y,f,1,m,x,Y,R,i)),m=x,F=X,Y=R,p=Rt}a.push(u)}}if(e.transform)for(var T in e.transform){if(p=(at=e.transform[T])[0]){if(!(H=r.findTransformConstraint(T)))throw new Error("Transform constraint not found: "+T);C=r.transformConstraints.indexOf(H),u=new Ct(at.length,6*at.length,C),m=en(p,"time",0);var P=en(p,"mixRotate",1),D=en(p,"mixX",1),L=en(p,"mixY",D),N=en(p,"mixScaleX",1),O=en(p,"mixScaleY",N),_=en(p,"mixShearY",1);for(f=0,y=0;;f++){if(u.setFrame(f,m,P,D,L,N,O,_),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0);var q=en(Rt,"mixRotate",1),W=en(Rt,"mixX",1),U=en(Rt,"mixY",W),z=en(Rt,"mixScaleX",1),G=en(Rt,"mixScaleY",z),j=en(Rt,"mixShearY",1);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,P,q,1),y=tn(Ot,u,y,f,1,m,x,D,W,1),y=tn(Ot,u,y,f,2,m,x,L,U,1),y=tn(Ot,u,y,f,3,m,x,N,z,1),y=tn(Ot,u,y,f,4,m,x,O,G,1),y=tn(Ot,u,y,f,5,m,x,_,j,1)),m=x,P=q,D=W,L=U,N=z,O=G,N=z,p=Rt}a.push(u)}}if(e.path)for(var T in e.path){var H,K=e.path[T];if(!(H=r.findPathConstraint(T)))throw new Error("Path constraint not found: "+T);C=r.pathConstraints.indexOf(H);for(var c in K){if(p=(at=K[c])[0]){var Z=at.length;if("position"===c){u=new Et(Z,Z,C);a.push(Qe(at,u,0,H.positionMode==t.PositionMode.Fixed?i:1))}else if("spacing"===c){u=new Ft(Z,Z,C);a.push(Qe(at,u,0,H.spacingMode==t.SpacingMode.Length||H.spacingMode==t.SpacingMode.Fixed?i:1))}else if("mix"===c){for(u=new Yt(Z,3*Z,C),m=en(p,"time",0),P=en(p,"mixRotate",1),D=en(p,"mixX",1),L=en(p,"mixY",D),f=0,y=0;;f++){if(u.setFrame(f,m,P,D,L),!(Rt=at[f+1])){u.shrink(y);break}x=en(Rt,"time",0),q=en(Rt,"mixRotate",1),W=en(Rt,"mixX",1),U=en(Rt,"mixY",W);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,P,q,1),y=tn(Ot,u,y,f,1,m,x,D,W,1),y=tn(Ot,u,y,f,2,m,x,L,U,1)),m=x,P=q,D=W,L=U,p=Rt}a.push(u)}}}}if(e.attachments)for(var J in e.attachments){var Q=e.attachments[J],$=r.findSkin(J);if(!$)throw new Error("Skin not found: "+J);for(var tt in Q){o=Q[tt];if(!($t=r.findSlot(tt)))throw new Error("Slot not found: "+tt);l=$t.index;for(var et in o){var nt=o[et],rt=$.getAttachment(l,et);for(var it in nt){var at;if(p=(at=nt[it])[0])if("deform"==it){var st=rt.bones,ot=rt.vertices,ht=st?ot.length/3*2:ot.length;for(u=new At(at.length,at.length,l,rt),m=en(p,"time",0),f=0,y=0;;f++){var Rt,Pt=void 0,Dt=en(p,"vertices",null);if(Dt){Pt=g.newFloatArray(ht);var Vt=en(p,"offset",0);if(g.arrayCopy(Dt,0,Pt,Vt,Dt.length),1!=i)for(var Lt=(Nt=Vt)+Dt.length;Nt<Lt;Nt++)Pt[Nt]*=i;if(!st)for(var Nt=0;Nt<ht;Nt++)Pt[Nt]+=ot[Nt]}else Pt=st?g.newFloatArray(ht):ot;if(u.setFrame(f,m,Pt),!(Rt=at[f+1])){u.shrink(y);break}var Ot;x=en(Rt,"time",0);(Ot=p.curve)&&(y=tn(Ot,u,y,f,0,m,x,0,1,1)),m=x,p=Rt}a.push(u)}else if("sequence"==it){u=new Xt(at.length,l,rt);var _t=0;for(f=0;f<at.length;f++){var qt=en(p,"delay",_t),Wt=(m=en(p,"time",0),E[en(p,"mode","hold")]),Ut=en(p,"index",0);u.setFrame(f,m,Wt,Ut,qt),_t=qt,p=at[f+1]}a.push(u)}}}}}if(e.drawOrder){u=new Bt(e.drawOrder.length);var zt=r.slots.length;for(f=0,Nt=0;Nt<e.drawOrder.length;Nt++,f++){var Gt=e.drawOrder[Nt],jt=null,Ht=en(Gt,"offsets",null);if(Ht){jt=g.newArray(zt,-1);for(var Kt=g.newArray(zt-Ht.length,0),Zt=0,Jt=0,Qt=0;Qt<Ht.length;Qt++){var $t,ee=Ht[Qt];if(!($t=r.findSlot(ee.slot)))throw new Error("Slot not found: "+$t);for(l=$t.index;Zt!=l;)Kt[Jt++]=Zt++;jt[Zt+ee.offset]=Zt++}for(;Zt<zt;)Kt[Jt++]=Zt++;for(Qt=zt-1;Qt>=0;Qt--)-1==jt[Qt]&&(jt[Qt]=Kt[--Jt])}u.setFrame(f,en(Gt,"time",0),jt)}a.push(u)}if(e.events){for(u=new It(e.events.length),f=0,Nt=0;Nt<e.events.length;Nt++,f++){var ne=e.events[Nt],re=r.findEvent(ne.name);if(!re)throw new Error("Event not found: "+ne.name);var ie=new te(g.toSinglePrecision(en(ne,"time",0)),re);ie.intValue=en(ne,"int",re.intValue),ie.floatValue=en(ne,"float",re.floatValue),ie.stringValue=en(ne,"string",re.stringValue),ie.data.audioPath&&(ie.volume=en(ne,"volume",1),ie.balance=en(ne,"balance",0)),u.setFrame(f,ie)}a.push(u)}var ae=0;for(Nt=0,Lt=a.length;Nt<Lt;Nt++)ae=Math.max(ae,a[Nt].getDuration());r.animations.push(new V(n,a,ae))},e}(),Je=function(t,e,n,r,i){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=r,this.inheritTimeline=i};function Qe(t,e,n,r){for(var i=t[0],a=en(i,"time",0),s=en(i,"value",n)*r,o=0,h=0;;h++){e.setFrame(h,a,s);var l=t[h+1];if(!l)return e.shrink(o),e;var c=en(l,"time",0),d=en(l,"value",n)*r;i.curve&&(o=tn(i.curve,e,o,h,0,a,c,s,d,r)),a=c,s=d,i=l}}function $e(t,e,n,r,i,a){for(var s=t[0],o=en(s,"time",0),h=en(s,n,i)*a,l=en(s,r,i)*a,c=0,d=0;;d++){e.setFrame(d,o,h,l);var u=t[d+1];if(!u)return e.shrink(c),e;var f=en(u,"time",0),p=en(u,n,i)*a,m=en(u,r,i)*a,g=s.curve;g&&(c=tn(g,e,c,d,0,o,f,h,p,a),c=tn(g,e,c,d,1,o,f,l,m,a)),o=f,h=p,l=m,s=u}}function tn(t,e,n,r,i,a,s,o,h,l){if("stepped"==t)return e.setStepped(r),n;var c=i<<2,d=t[c],u=t[c+1]*l,f=t[c+2],p=t[c+3]*l;return e.setBezier(n,r,i,a,o,d,u,f,p,s,h),n+1}function en(t,e,n){return void 0!==t[e]?t[e]:n}void 0===Math.fround&&(Math.fround=(ke=new Float32Array(1),function(t){return ke[0]=t,ke[0]}));var nn=1,rn=function(){function n(t){this.vertices=new Float32Array(an.MAX_VERTICES*an.VERTEX_SIZE),this.indices=new Uint16Array(an.MAX_VERTICES),this.verticesLength=0,this.indicesLength=0;var n=t.blendMode,r=t.texture,i=t.priority,a=t.renderer,s=t.pma,o=t.name,h=void 0===o?"MSpine":o,l=t.engine,c=a.mask,d=void 0===c?0:c,u=a.maskMode,f=void 0===u?0:u;this.blendMode=n,this.lastTexture=r,this.priority=i,this.engine=l,this.geometry=this.createGeometry(),this.material=this.createMaterial(s,f,d),this.mesh=e.Mesh.create(l,{name:h+nn++,priority:this.priority,material:this.material,geometry:this.geometry}),this.vertices=new Float32Array(an.MAX_VERTICES*an.VERTEX_SIZE),this.indices=new Uint16Array(an.MAX_VERTICES)}return Object.defineProperty(n.prototype,"blending",{get:function(){return this.blendMode},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"texture",{get:function(){return this.lastTexture},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"indicesNum",{get:function(){return this.indicesLength},enumerable:!1,configurable:!0}),n.prototype.createGeometry=function(){var t=Float32Array.BYTES_PER_ELEMENT,n=t*an.VERTEX_SIZE,r={aPosition:{size:2,offset:0,stride:n,data:new Float32Array(0)},aColor:{size:4,offset:2*t,stride:n,dataSource:"aPosition"},aTexCoords:{size:2,offset:6*t,stride:n,dataSource:"aPosition"},aColor2:{size:4,offset:8*t,stride:n,dataSource:"aPosition"}};return e.Geometry.create(this.engine,{attributes:r,indices:{data:new Uint16Array(0),releasable:!0},mode:e.glContext.TRIANGLES,maxVertex:an.MAX_VERTICES})},n.prototype.createMaterial=function(n,r,i){var a,s,o,h,l=e.Material.create(this.engine,{shader:(a=this.engine,s=a.renderer.env,o=a.gpuCapability.level,h=[["ENV_EDITOR",s===e.PLAYER_OPTIONS_ENV_EDITOR]],{fragment:e.createShaderWithMarcos(h,"precision mediump float;varying mediump vec4 vLight;varying mediump vec4 vDark;varying vec2 vTexCoords;uniform sampler2D uTexture;void main(){vec4 texColor=texture2D(uTexture,vTexCoords);gl_FragColor.a=texColor.a*vLight.a;gl_FragColor.rgb=((texColor.a-1.0)*vDark.a+1.0-texColor.rgb)*vDark.rgb+texColor.rgb*vLight.rgb;}",e.ShaderType.fragment,o),vertex:e.createShaderWithMarcos(h,"attribute vec2 aPosition;attribute vec4 aColor;attribute vec4 aColor2;attribute vec2 aTexCoords;uniform mat4 uModel;uniform mat4 effects_MatrixVP;\n#ifdef ENV_EDITOR\nuniform vec4 uEditorTransform;\n#endif\nvarying vec4 vLight;varying vec4 vDark;varying vec2 vTexCoords;void main(){vLight=aColor;vDark=aColor2;vTexCoords=aTexCoords;gl_Position=effects_MatrixVP*uModel*vec4(aPosition,0.0,1.0);\n#ifdef ENV_EDITOR\ngl_Position=vec4(gl_Position.xy*uEditorTransform.xy+uEditorTransform.zw*gl_Position.w,gl_Position.zw);\n#endif\n}",e.ShaderType.vertex,o),glslVersion:e.GLSLVersion.GLSL1,marcos:h,shared:!0}),uniformSemantics:{effects_MatrixVP:"VIEWPROJECTION",uEditorTransform:"EDITOR_TRANSFORM"}});return l.setTexture("uTexture",this.lastTexture),l.setMatrix("uModel",e.math.Matrix4.fromIdentity()),l.blending=!0,l.culling=!1,l.depthTest=!1,l.depthMask=!1,l.stencilRef=void 0!==i?[i,i]:void 0,function(n,r,i){switch(n.blendEquation=[e.glContext.FUNC_ADD,e.glContext.FUNC_ADD],r){case t.BlendMode.Multiply:n.blendFunction=[e.glContext.DST_COLOR,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE_MINUS_SRC_ALPHA];break;case t.BlendMode.Screen:n.blendFunction=[e.glContext.ONE,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE_MINUS_SRC_COLOR,e.glContext.ONE_MINUS_SRC_ALPHA];break;case t.BlendMode.Additive:n.blendFunction=[i?e.glContext.ONE:e.glContext.SRC_ALPHA,e.glContext.ONE,e.glContext.ONE,e.glContext.ONE];break;case t.BlendMode.Normal:n.blendFunction=[i?e.glContext.ONE:e.glContext.SRC_ALPHA,e.glContext.ONE_MINUS_SRC_ALPHA,e.glContext.ONE,e.glContext.ONE_MINUS_SRC_ALPHA];break;default:throw new Error("Unknown blend mode: ".concat(r))}}(l,this.blendMode,n),e.setMaskMode(l,r),l},n.prototype.updateMesh=function(t,e,n){var r=this.verticesLength,i=this.indicesLength,a=this.verticesLength/an.VERTEX_SIZE;this.vertices.set(t,r),this.verticesLength+=n;for(var s=0,o=i;s<e.length;s++,o++)this.indices[o]=e[s]+a;this.indicesLength+=e.length},n.prototype.endUpdate=function(t){for(var e=this.verticesLength;e<this.vertices.length;e++)this.vertices[e]=0;for(e=this.indicesLength;e<this.indices.length;e++)this.indices[e]=0;this.geometry.setAttributeData("aPosition",this.vertices),this.geometry.setIndexData(this.indices),this.geometry.setDrawCount(this.indicesLength),this.material.setMatrix("uModel",t)},n.prototype.startUpdate=function(){this.verticesLength=0,this.indicesLength=0},n}();var an=function(){function t(t,n){this.slotList=[],this.vertices=[],this.clipper=new Ke,this.tempColor=new h,this.tempDark=new h,this.wm=e.math.Matrix4.fromIdentity(),this.meshGroups=[],this.meshToAdd=[],this.slotList=t,this.meshName=n.meshName,this.transform=n.transform,this.listIndex=n.listIndex,this.pma=n.pma,this.renderer=n.renderer,this.engine=n.engine}return t.prototype.resetMeshes=function(){this.meshToAdd.length=0},t.prototype.update=function(){var e,n,r,i,a,o=this,h=this.clipper,l=this.pma,c=this.vertices,d=[],u=[],f=0,p=[],m=0,g=0;this.currentMesh=this.meshGroups[g],this.meshGroups.map((function(t){return t.startUpdate()}));try{for(var v=s(this.slotList),y=v.next();!y.done;y=v.next()){var x=y.value,w=h.isClipping()?2:t.VERTEX_SIZE,M=x.getAttachment(),k=void 0,S=void 0,A=0;if(u=[],p=[],f=0,m=0,x.bone.active){if(M instanceof Y){var I=M;k=I.color,c=this.vertices,A=w<<2,I.computeWorldVertices(x,c,0,w),d=t.QUAD_TRIANGLES,a=I.uvs,S=null===(r=I.region)||void 0===r?void 0:r.renderObject.page.texture}else{if(!(M instanceof B)){if(M instanceof b){h.clipStart(x,M);continue}h.clipEndWithSlot(x);continue}var T=M;k=T.color,c=this.vertices,A=(T.worldVerticesLength>>1)*w,T.computeWorldVertices(x,0,T.worldVerticesLength,c,0,w),d=T.triangles,a=T.uvs,S=null===(i=T.region)||void 0===i?void 0:i.renderObject.page.texture}if(S){var C=x.bone.skeleton.color,E=x.color,F=this.tempColor,X=this.tempDark;if(F.set(C.r*E.r*k.r,C.g*E.g*k.g,C.b*E.b*k.b,C.a*E.a*k.a),l&&(F.r*=F.a,F.g*=F.a,F.b*=F.a),x.darkColor?l?(X.r=x.darkColor.r*F.a,X.g=x.darkColor.g*F.a,X.b=x.darkColor.b*F.a,X.a=1):(X.setFromColor(x.darkColor),X.a=0):X.set(0,0,0,1),h.isClipping())h.clipTriangles(c,A,d,d.length,a,F,X,!0),f=(u=h.clippedVertices).length,m=(p=h.clippedTriangles).length;else{for(var R=2,P=0,D=A;R<D;R+=w,P+=2)c[R]=F.r,c[R+1]=F.g,c[R+2]=F.b,c[R+3]=F.a,c[R+4]=a[P],c[R+5]=a[P+1],c[R+6]=X.r,c[R+7]=X.g,c[R+8]=X.b,c[R+9]=X.a;u=c.slice(0,A),f=A,p=d,m=d.length}if(0==f||0==m){h.clipEndWithSlot(x);continue}var V=this.currentMesh;if(V&&V.blending===x.data.blendMode&&V.texture.name===S.name&&m+V.indicesNum<=t.MAX_VERTICES)V.updateMesh(u,p,f);else{var L=this.findMeshIndex(g,x.data.blendMode,S);if(-1===L){var N=this.currentMesh=new rn({blendMode:x.data.blendMode,texture:S,name:this.meshName,priority:this.listIndex+=.01,pma:l,renderer:this.renderer,engine:this.engine});g=this.meshGroups.length,this.meshGroups.push(N),this.meshToAdd.push(N.mesh)}else if(m+V.indicesNum<=t.MAX_VERTICES)g=L,this.currentMesh=this.meshGroups[L];else{N=this.currentMesh=new rn({blendMode:x.data.blendMode,texture:S,name:this.meshName,priority:V.priority+.01,pma:l,renderer:this.renderer,engine:this.engine});this.meshGroups.splice(g,0,N),this.meshToAdd.push(N.mesh),g++}this.currentMesh.updateMesh(u,p,f)}}h.clipEndWithSlot(x)}else h.clipEndWithSlot(x)}}catch(t){e={error:t}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(e)throw e.error}}h.clipEnd(),this.wm=this.transform.getWorldMatrix(),this.meshGroups.map((function(t){return t.endUpdate(o.wm)}))},t.prototype.findMeshIndex=function(t,e,n){for(var r=-1,i=t;i<this.meshGroups.length;i++){var a=this.meshGroups[i];if(a&&a.blending===e&&a.texture.name===n.name){r=i;break}}return r},t.QUAD_TRIANGLES=[0,1,2,2,3,0],t.VERTEX_SIZE=12,t.MAX_VERTICES=10920,t}(),sn=e.math.Vector2,on=e.math.Vector3,hn=function(t){function n(n,r){var i,a=t.call(this,n,r)||this;a.offset=new sn,a.size=new sn,a._contentVisible=!0;var s=null===(i=a.composition)||void 0===i?void 0:i.renderer.engine;return e.assertExist(s),a.engine=s,a}return r(n,t),Object.defineProperty(n.prototype,"type",{get:function(){return e.spec.ItemType.spine},enumerable:!1,configurable:!0}),n.prototype.onConstructed=function(t){var e;this.initContent(t.content.options,null===(e=this.composition)||void 0===e?void 0:e.loaderData.spineDatas),this.startSize=t.content.options.startSize,this.renderer=t.content.renderer},n.prototype.initContent=function(t,e){var n=t.spine;if(!isNaN(n)){var r=t.activeSkin||"default",i=e[n],a=i.atlas,s=i.skeletonFile,o=i.skeletonType,h=i.skinList,c=i.animationList,u="string"==typeof t.activeAnimation?[t.activeAnimation]:t.activeAnimation;if(this.skeletonData=l(a,s,o),this.animationStateData=new Gt(this.skeletonData),this.animationStateData.defaultMix=t.mixDuration||0,this.spineDataCache=e[n],this.skinList=h.slice(),this.animationList=c.slice(),this.skeleton=new le(this.skeletonData),this.setSkin(r),this.state=new Rt(this.animationStateData),1===u.length)if(isNaN(t.speed)){var f=Number((d(this.skeletonData,u[0])/this.duration).toFixed(2));this.setAnimation(u[0],f)}else this.setAnimation(u[0],t.speed);else this.setAnimationList(u,t.speed);this.pma=a.pages[0].pma}},n.prototype.doCreateContent=function(){if(this.skeleton)return new an(this.skeleton.drawOrder,{listIndex:this.listIndex,meshName:this.name,transform:this.transform,pma:this.pma,renderer:this.renderer,engine:this.engine})},n.prototype.onLifetimeBegin=function(){this.state&&this.skeleton&&(this.state.apply(this.skeleton),this.resize(),this.updateState(0))},n.prototype.onItemUpdate=function(t,e){if(this.content&&this.content.meshGroups.length){var n=this.contentVisible;this.content.meshGroups.map((function(t){t.mesh.setVisible(n)})),n&&this.updateState(t/1e3)}},n.prototype.onEnd=function(){this.endBehavior===e.spec.END_BEHAVIOR_DESTROY&&this.state&&(this.state.clearListeners(),this.state.clearTracks())},n.prototype.handleVisibleChanged=function(t){this.content&&this.content.meshGroups.length&&this.content.meshGroups.map((function(e){e.mesh.setVisible(t)}))},n.prototype.getBoundingBox=function(){var t=this.getBounds(),n={type:e.HitTestType.triangle,area:[]};if(!t)return n;var r=t.x,i=t.y,a=t.width,s=t.height,o=this.transform.getWorldMatrix(),h=r+a/2,l=i+s/2,c=new on(h-a/2,l-s/2,0),d=new on(h+a/2,l-s/2,0),u=new on(h+a/2,l+s/2,0),f=new on(h-a/2,l+s/2,0);return o.projectPoint(c),o.projectPoint(d),o.projectPoint(u),o.projectPoint(f),n.area=[{p0:c,p1:d,p2:u},{p0:c,p1:u,p2:f}],n},n.prototype.getHitTestParams=function(t){var n,r=this.getBoundingBox(),i=null===(n=this.engine.renderer)||void 0===n?void 0:n.env;if(r.area.length)return t&&i===e.PLAYER_OPTIONS_ENV_EDITOR?{type:e.HitTestType.triangle,triangles:r.area,backfaceCulling:!1,behavior:e.spec.InteractBehavior.NOTIFY}:void 0},n.prototype.updateState=function(t){var e;this.state&&this.skeleton&&(this.state.update(t),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform(),null===(e=this.content)||void 0===e||e.update())},n.prototype.setAnimation=function(t,n){var r;if(!this.skeleton||!this.state)throw new Error("Set animation before skeleton create");if(!this.animationList.length)throw new Error("animationList is empty, check your spine file");var i=this.endBehavior===e.spec.ItemEndBehavior.loop,a=null===(r=this.state.tracks[0])||void 0===r?void 0:r.listener;a&&(a.end=function(){}),this.state.clearTracks(),this.skeleton.setToSetupPose(),this.animationList.includes(t)?(this.state.setAnimation(0,t,i),this.activeAnimation=[t]):(console.warn("animation ".concat(JSON.stringify(t)," not exists in animationList: ").concat(this.animationList,", set to ").concat(this.animationList[0])),this.state.setAnimation(0,this.animationList[0],i),this.activeAnimation=[this.animationList[0]]),isNaN(n)||this.setSpeed(n)},n.prototype.setAnimationList=function(t,n){var r,i,a,o=this;if(!this.skeleton||!this.state)throw new Error("Set animation before skeleton create");if(!this.animationList.length)throw new Error("animationList is empty, please check your setting");if(1!==t.length){var h=null===(a=this.state.tracks[0])||void 0===a?void 0:a.listener;h&&(h.end=function(){}),this.state.clearTracks(),this.skeleton.setToSetupPose();var l=function(t){var n=c.state.addAnimation(0,t,!1);if(c.endBehavior===e.spec.ItemEndBehavior.loop){var r={end:function(){o.state.addAnimation(0,t,!1).listener=r}};n.listener=r}},c=this;try{for(var d=s(t),u=d.next();!u.done;u=d.next()){l(u.value)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}this.activeAnimation=t,isNaN(n)||this.setSpeed(n)}else this.setAnimation(t[0],n)},n.prototype.setSpeed=function(t){this.state&&(this.state.timeScale=t)},n.prototype.getSpeed=function(){return this.state.timeScale||1},n.prototype.getActiveAnimation=function(){return this.activeAnimation},n.prototype.setMixDuration=function(t,e,n){this.animationStateData&&this.animationStateData.setMix(t,e,n)},n.prototype.setDefaultMixDuration=function(t){this.state&&!this.state.tracks[0]&&(this.state.tracks[0].mixDuration=t)},n.prototype.deleteMixForLoop=function(){var t=this.activeAnimation[this.activeAnimation.length-1],e=this.activeAnimation[0];this.animationStateData.setMix(t,e,0)},n.prototype.setSkin=function(t){if(!this.skeleton)throw new Error("Set skin before skeleton create");if(!t||!this.skinList.includes(t))throw new Error("skin ".concat(t," not exists in skinList: ").concat(this.skinList));this.skeleton.setSkinByName(t),this.skeleton.setToSetupPose()},n.prototype.resize=function(){var t=this.getBounds();if(t){var e=t.width,n=this.transform.scale,r=1/e;this.scaleFactor=r,this.transform.setScale(this.startSize*r,this.startSize*r,n.z)}},n.prototype.setScale=function(t,e,n){var r=this.transform.scale,i=r.x,a=r.y,s=r.z;this.transform.setScale(i*t,a*e,s*n)},n.prototype.getBounds=function(){if(this.state&&this.skeleton&&this.contentVisible)return this.skeleton.updateWorldTransform(),this.skeleton.getBounds(this.offset,this.size),{x:this.offset.x,y:this.offset.y,width:this.size.x,height:this.size.y}},n}(e.VFXItem),ln=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.slotGroups=[],e.meshToRemove=[],e}return r(n,t),n.processRawJSON=function(t,e){return i(this,void 0,void 0,(function(){return a(this,(function(t){return[2,Promise.resolve()]}))}))},n.prepareResource=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,h,d,f,p,m,g,v,y,x,w,b,M,S,A,I,B,T,C,E,F,Y,X,R,P,D,V,L,N;return a(this,(function(a){if(n=(e=t).jsonScene,!(e&&n&&n.spines))throw new Error("scene not contain spine content");r=[],i=e.bins,h=new TextDecoder("utf-8");try{for(m=s(n.spines),g=m.next();!g.done;g=m.next())(v=g.value).spineData?r.push(v.spineData):(y=v.atlas,x=v.skeleton,w=v.images,b=v.skeletonType,M=v.id,S=void 0===M?"":M,A=w.map((function(t){return n.textures[t]})),D=o(y[1],3),p=D[0],V=D[1],f=void 0===V?0:V,d=D[2],I=i[p],B=d?h.decode(new Uint8Array(I,f,d)):h.decode(new Uint8Array(I,f)),T=new k(B),L=o(x[1],3),p=L[0],N=L[1],f=void 0===N?0:N,d=L[2],C=i[p],E=void 0,E="json"===b?d?h.decode(new Uint8Array(C,f,d)):h.decode(new Uint8Array(C,f)):d?new DataView(C,f,d):new DataView(C,f),F=l(T,E,b),Y=u(F),X=c(F),r.push({atlas:T,skeletonFile:E,skeletonData:F,images:w,texturesOptions:A,skeletonType:b,skeletonInstance:new le(F),skinList:Y,animationList:X,id:S}))}catch(t){R={error:t}}finally{try{g&&!g.done&&(P=m.return)&&P.call(m)}finally{if(R)throw R.error}}return n.spines=r,[2]}))}))},n.prototype.onCompositionConstructed=function(t,e){this.slotGroups=[];var n=t.textures;if(e.jsonScene.spines){var r=e.jsonScene.spines;r.map((function(t,e){var r=t.atlas,i=t.images,a=r.pages.length;if(i.length!==a)throw new Error("atlas.page's length not equal spine.textures' length");for(var s=0;s<a;s++){var o=r.pages[s],h=n[i[s]];if(!h)throw new Error("Can not find page ".concat(o.name,"'s texture, check the texture name"));o.setTexture(h)}})),t.loaderData.spineDatas=r}},n.prototype.onCompositionItemLifeBegin=function(t,e){e instanceof hn&&e.content&&this.slotGroups.push(e.content)},n.prototype.onCompositionItemRemoved=function(t,e){var n;e instanceof hn&&e.content&&(e.spineDataCache=void 0,(n=this.meshToRemove).push.apply(n,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([],o(e.content.meshGroups),!1)))},n.prototype.onCompositionDestroyed=function(t){t.reusable||t.keepResource?this.slotGroups.map((function(t){t&&t.meshGroups.map((function(t){return t.mesh.dispose({material:{textures:e.DestroyOptions.keep}})}))})):t.loaderData.spineDatas&&delete t.loaderData.spineDatas},n.prototype.prepareRenderFrame=function(t,e){return this.meshToRemove.map((function(t){return e.removeMeshFromDefaultRenderPass(t.mesh)})),this.slotGroups.length&&this.slotGroups.map((function(t){t&&(t.meshToAdd.forEach((function(t){t.getVisible()&&e.addMeshToDefaultRenderPass(t)})),t.resetMeshes())})),this.meshToRemove.length=0,!1},n}(e.AbstractPlugin);e.registerPlugin("spine",ln,hn);var cn="1.1.3";console.info("[Galacean Effects Plugin Spine] version: "+cn),t.AlphaTimeline=bt,t.Animation=V,t.AnimationState=Rt,t.AnimationStateAdapter=Lt,t.AnimationStateData=Gt,t.AtlasAttachmentLoader=jt,t.Attachment=y,t.AttachmentTimeline=St,t.BinaryInput=ve,t.Bone=Qt,t.BoneData=Ht,t.BoundingBoxAttachment=w,t.CURRENT=zt,t.ClippingAttachment=b,t.ConstraintData=$t,t.CurveTimeline=st,t.CurveTimeline1=ot,t.CurveTimeline2=ht,t.DeformTimeline=At,t.DrawOrderTimeline=Bt,t.Event=te,t.EventData=ee,t.EventQueue=Dt,t.EventTimeline=It,t.FIRST=Ot,t.HOLD_FIRST=qt,t.HOLD_MIX=Wt,t.HOLD_SUBSEQUENT=_t,t.IkConstraint=ne,t.IkConstraintData=re,t.IkConstraintTimeline=Tt,t.MeshAttachment=B,t.PathAttachment=T,t.PathConstraint=se,t.PathConstraintData=ie,t.PathConstraintMixTimeline=Yt,t.PathConstraintPositionTimeline=Et,t.PathConstraintSpacingTimeline=Ft,t.PointAttachment=F,t.RGB2Timeline=kt,t.RGBA2Timeline=Mt,t.RGBATimeline=xt,t.RGBTimeline=wt,t.RegionAttachment=Y,t.RotateTimeline=lt,t.SETUP=Ut,t.SUBSEQUENT=Nt,t.ScaleTimeline=ft,t.ScaleXTimeline=pt,t.ScaleYTimeline=mt,t.SequenceTimeline=Xt,t.ShearTimeline=gt,t.ShearXTimeline=vt,t.ShearYTimeline=yt,t.Skeleton=le,t.SkeletonBinary=ge,t.SkeletonBounds=je,t.SkeletonClipping=Ke,t.SkeletonData=ce,t.SkeletonJson=Ze,t.Skin=ue,t.SkinEntry=de,t.Slot=oe,t.SlotData=fe,t.SpineLoader=ln,t.SpineVFXItem=hn,t.TextureAtlas=k,t.TextureAtlasPage=A,t.TextureAtlasRegion=I,t.TextureRegion=M,t.Timeline=at,t.TrackEntry=Pt,t.TransformConstraint=he,t.TransformConstraintData=me,t.TransformConstraintTimeline=Ct,t.TranslateTimeline=ct,t.TranslateXTimeline=dt,t.TranslateYTimeline=ut,t.Triangulator=He,t.VertexAttachment=x,t.createSkeletonData=l,t.getAnimationDuration=d,t.getAnimationList=c,t.getSkinList=u,t.getSpineVersion=function(t){var e=new ve(t);return e.readInt32(),e.readInt32(),e.readString()},t.getTextureOptions=function(e){var n,r,i=new TextDecoder("utf-8").decode(new Uint8Array(e,0)),a=new k(i),o=[],h=a.pages[0];try{for(var l=s(a.pages),c=l.next();!c.done;c=l.next()){var d=c.value;o.push(d.name)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var u=h.magFilter,f=void 0===u?t.TextureFilter.Linear:u,p=h.minFilter,m=void 0===p?t.TextureFilter.Linear:p,g=h.uWrap,v=void 0===g?t.TextureWrap.ClampToEdge:g,y=h.vWrap,x=void 0===y?t.TextureWrap.ClampToEdge:y;return{images:o,pma:h.pma,magFilter:f,minFilter:m,wrapS:v,wrapT:x}},t.version=cn,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
9
9
|
//# sourceMappingURL=index.min.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects player spine plugin
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 十弦
|
|
6
|
-
* Version: v1.1.
|
|
6
|
+
* Version: v1.1.3
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { glContext, assertExist, math, Geometry, Material, setMaskMode, createShaderWithMarcos, ShaderType, GLSLVersion, Mesh, PLAYER_OPTIONS_ENV_EDITOR, spec, HitTestType, VFXItem, DestroyOptions, AbstractPlugin, registerPlugin } from '@galacean/effects';
|
|
@@ -984,9 +984,8 @@ var MeshAttachment = /** @class */ (function (_super) {
|
|
|
984
984
|
var n = this.uvs.length;
|
|
985
985
|
var u = this.region.u, v = this.region.v, width = 0, height = 0;
|
|
986
986
|
if (this.region instanceof TextureAtlasRegion) {
|
|
987
|
-
var region = this.region;
|
|
988
|
-
var
|
|
989
|
-
var textureWidth = texture ? texture.width : 0, textureHeight = texture ? texture.height : 0;
|
|
987
|
+
var region = this.region, page = region.page;
|
|
988
|
+
var textureWidth = page.width, textureHeight = page.height;
|
|
990
989
|
switch (region.degrees) {
|
|
991
990
|
case 90:
|
|
992
991
|
u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;
|
|
@@ -11232,6 +11231,7 @@ var SpineVFXItem = /** @class */ (function (_super) {
|
|
|
11232
11231
|
(_a = this.content) === null || _a === void 0 ? void 0 : _a.update();
|
|
11233
11232
|
};
|
|
11234
11233
|
SpineVFXItem.prototype.setAnimation = function (animation, speed) {
|
|
11234
|
+
var _a;
|
|
11235
11235
|
if (!this.skeleton || !this.state) {
|
|
11236
11236
|
throw new Error('Set animation before skeleton create');
|
|
11237
11237
|
}
|
|
@@ -11239,13 +11239,19 @@ var SpineVFXItem = /** @class */ (function (_super) {
|
|
|
11239
11239
|
throw new Error('animationList is empty, check your spine file');
|
|
11240
11240
|
}
|
|
11241
11241
|
var loop = this.endBehavior === spec.ItemEndBehavior.loop;
|
|
11242
|
+
var listener = (_a = this.state.tracks[0]) === null || _a === void 0 ? void 0 : _a.listener;
|
|
11243
|
+
if (listener) {
|
|
11244
|
+
listener.end = function () { };
|
|
11245
|
+
}
|
|
11246
|
+
this.state.clearTracks();
|
|
11247
|
+
this.skeleton.setToSetupPose();
|
|
11242
11248
|
if (!this.animationList.includes(animation)) {
|
|
11243
|
-
console.warn("animation ".concat(animation, " not exists in animationList: ").concat(this.animationList, ", set to ").concat(this.animationList[0]));
|
|
11249
|
+
console.warn("animation ".concat(JSON.stringify(animation), " not exists in animationList: ").concat(this.animationList, ", set to ").concat(this.animationList[0]));
|
|
11244
11250
|
this.state.setAnimation(0, this.animationList[0], loop);
|
|
11245
11251
|
this.activeAnimation = [this.animationList[0]];
|
|
11246
11252
|
}
|
|
11247
11253
|
else {
|
|
11248
|
-
this.state.
|
|
11254
|
+
this.state.setAnimation(0, animation, loop);
|
|
11249
11255
|
this.activeAnimation = [animation];
|
|
11250
11256
|
}
|
|
11251
11257
|
if (!isNaN(speed)) {
|
|
@@ -11255,13 +11261,23 @@ var SpineVFXItem = /** @class */ (function (_super) {
|
|
|
11255
11261
|
SpineVFXItem.prototype.setAnimationList = function (animationList, speed) {
|
|
11256
11262
|
var e_1, _a;
|
|
11257
11263
|
var _this = this;
|
|
11264
|
+
var _b;
|
|
11258
11265
|
if (!this.skeleton || !this.state) {
|
|
11259
11266
|
throw new Error('Set animation before skeleton create');
|
|
11260
11267
|
}
|
|
11261
11268
|
if (!this.animationList.length) {
|
|
11262
|
-
throw new Error('animationList is empty, check your
|
|
11269
|
+
throw new Error('animationList is empty, please check your setting');
|
|
11270
|
+
}
|
|
11271
|
+
if (animationList.length === 1) {
|
|
11272
|
+
this.setAnimation(animationList[0], speed);
|
|
11273
|
+
return;
|
|
11274
|
+
}
|
|
11275
|
+
var listener = (_b = this.state.tracks[0]) === null || _b === void 0 ? void 0 : _b.listener;
|
|
11276
|
+
if (listener) {
|
|
11277
|
+
listener.end = function () { };
|
|
11263
11278
|
}
|
|
11264
11279
|
this.state.clearTracks();
|
|
11280
|
+
this.skeleton.setToSetupPose();
|
|
11265
11281
|
var _loop_1 = function (animation) {
|
|
11266
11282
|
var trackEntry = this_1.state.addAnimation(0, animation, false);
|
|
11267
11283
|
if (this_1.endBehavior === spec.ItemEndBehavior.loop) {
|
|
@@ -11545,7 +11561,7 @@ var SpineLoader = /** @class */ (function (_super) {
|
|
|
11545
11561
|
}(AbstractPlugin));
|
|
11546
11562
|
|
|
11547
11563
|
registerPlugin('spine', SpineLoader, SpineVFXItem);
|
|
11548
|
-
var version = "1.1.
|
|
11564
|
+
var version = "1.1.3";
|
|
11549
11565
|
console.info('[Galacean Effects Plugin Spine] version: ' + version);
|
|
11550
11566
|
|
|
11551
11567
|
export { AlphaTimeline, Animation, AnimationState, AnimationStateAdapter, AnimationStateData, AtlasAttachmentLoader, Attachment, AttachmentTimeline, BinaryInput, BlendMode, Bone, BoneData, BoundingBoxAttachment, CURRENT, ClippingAttachment, ConstraintData, CurveTimeline, CurveTimeline1, CurveTimeline2, DeformTimeline, DrawOrderTimeline, Event, EventData, EventQueue, EventTimeline, EventType, FIRST, HOLD_FIRST, HOLD_MIX, HOLD_SUBSEQUENT, IkConstraint, IkConstraintData, IkConstraintTimeline, MeshAttachment, MixBlend, MixDirection, PathAttachment, PathConstraint, PathConstraintData, PathConstraintMixTimeline, PathConstraintPositionTimeline, PathConstraintSpacingTimeline, PointAttachment, PositionMode, RGB2Timeline, RGBA2Timeline, RGBATimeline, RGBTimeline, RegionAttachment, RotateMode, RotateTimeline, SETUP, SUBSEQUENT, ScaleTimeline, ScaleXTimeline, ScaleYTimeline, SequenceTimeline, ShearTimeline, ShearXTimeline, ShearYTimeline, Skeleton, SkeletonBinary, SkeletonBounds, SkeletonClipping, SkeletonData, SkeletonJson, Skin, SkinEntry, Slot, SlotData, SpacingMode, SpineLoader, SpineVFXItem, TextureAtlas, TextureAtlasPage, TextureAtlasRegion, TextureFilter, TextureRegion, TextureWrap, Timeline, TrackEntry, TransformConstraint, TransformConstraintData, TransformConstraintTimeline, TransformMode, TranslateTimeline, TranslateXTimeline, TranslateYTimeline, Triangulator, VertexAttachment, createSkeletonData, getAnimationDuration, getAnimationList, getSkinList, getSpineVersion, getTextureOptions, version };
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-plugin-spine",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Galacean Effects player spine plugin",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"fpsmeter": "^0.3.1",
|
|
32
|
-
"@galacean/effects": "1.1.
|
|
32
|
+
"@galacean/effects": "1.1.3"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"dev": "vite",
|