diff --git a/.eslintignore b/.eslintignore index 23c487049..1b84fb0bf 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,6 +10,9 @@ src/utils/object/Extend.js src/structs/RTree.js src/dom/_ScaleManager.js src/dom/VisualBounds.js +plugins/spine/src/spine-canvas.js +plugins/spine/src/spine-webgl.js +webpack.* webpack.config.js webpack.dist.config.js webpack.fb.config.js diff --git a/package-lock.json b/package-lock.json index e28a6483c..c40dc94f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.11.0-beta1", + "version": "3.16.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -10,8 +10,8 @@ "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", "dev": true, "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" + "call-me-maybe": "1.0.1", + "glob-to-regexp": "0.3.0" } }, "@nodelib/fs.stat": { @@ -26,7 +26,7 @@ "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", "dev": true, "requires": { - "any-observable": "^0.3.0" + "any-observable": "0.3.0" } }, "@sindresorhus/is": { @@ -44,8 +44,8 @@ "@webassemblyjs/helper-module-context": "1.5.13", "@webassemblyjs/helper-wasm-bytecode": "1.5.13", "@webassemblyjs/wast-parser": "1.5.13", - "debug": "^3.1.0", - "mamacro": "^0.0.3" + "debug": "3.1.0", + "mamacro": "0.0.3" } }, "@webassemblyjs/floating-point-hex-parser": { @@ -66,7 +66,7 @@ "integrity": "sha512-v7igWf1mHcpJNbn4m7e77XOAWXCDT76Xe7Is1VQFXc4K5jRcFrl9D0NrqM4XifQ0bXiuTSkTKMYqDxu5MhNljA==", "dev": true, "requires": { - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/helper-code-frame": { @@ -90,8 +90,8 @@ "integrity": "sha512-zxJXULGPLB7r+k+wIlvGlXpT4CYppRz8fLUM/xobGHc9Z3T6qlmJD9ySJ2jknuktuuiR9AjnNpKYDECyaiX+QQ==", "dev": true, "requires": { - "debug": "^3.1.0", - "mamacro": "^0.0.3" + "debug": "3.1.0", + "mamacro": "0.0.3" } }, "@webassemblyjs/helper-wasm-bytecode": { @@ -110,7 +110,7 @@ "@webassemblyjs/helper-buffer": "1.5.13", "@webassemblyjs/helper-wasm-bytecode": "1.5.13", "@webassemblyjs/wasm-gen": "1.5.13", - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/ieee754": { @@ -119,7 +119,7 @@ "integrity": "sha512-TseswvXEPpG5TCBKoLx9tT7+/GMACjC1ruo09j46ULRZWYm8XHpDWaosOjTnI7kr4SRJFzA6MWoUkAB+YCGKKg==", "dev": true, "requires": { - "ieee754": "^1.1.11" + "ieee754": "1.1.12" } }, "@webassemblyjs/leb128": { @@ -159,7 +159,7 @@ "@webassemblyjs/wasm-opt": "1.5.13", "@webassemblyjs/wasm-parser": "1.5.13", "@webassemblyjs/wast-printer": "1.5.13", - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/wasm-gen": { @@ -185,7 +185,7 @@ "@webassemblyjs/helper-buffer": "1.5.13", "@webassemblyjs/wasm-gen": "1.5.13", "@webassemblyjs/wasm-parser": "1.5.13", - "debug": "^3.1.0" + "debug": "3.1.0" } }, "@webassemblyjs/wasm-parser": { @@ -213,8 +213,8 @@ "@webassemblyjs/helper-api-error": "1.5.13", "@webassemblyjs/helper-code-frame": "1.5.13", "@webassemblyjs/helper-fsm": "1.5.13", - "long": "^3.2.0", - "mamacro": "^0.0.3" + "long": "3.2.0", + "mamacro": "0.0.3" } }, "@webassemblyjs/wast-printer": { @@ -225,13 +225,13 @@ "requires": { "@webassemblyjs/ast": "1.5.13", "@webassemblyjs/wast-parser": "1.5.13", - "long": "^3.2.0" + "long": "3.2.0" } }, "acorn": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha1-9HPdR+AnegjijpvsWu6wR1HwuMk=", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", "dev": true }, "acorn-dynamic-import": { @@ -240,7 +240,7 @@ "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "dev": true, "requires": { - "acorn": "^5.0.0" + "acorn": "5.5.3" } }, "acorn-jsx": { @@ -249,7 +249,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "^3.0.4" + "acorn": "3.3.0" }, "dependencies": { "acorn": { @@ -266,10 +266,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ajv-keywords": { @@ -281,7 +281,7 @@ "ansi-escapes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha1-9zIHu4EgfXX9bIPxJa8m7qN4yjA=", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, "ansi-regex": { @@ -308,8 +308,8 @@ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" + "micromatch": "3.1.10", + "normalize-path": "2.1.1" } }, "aproba": { @@ -321,10 +321,10 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" } }, "arr-diff": { @@ -357,7 +357,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "^1.0.1" + "array-uniq": "1.0.3" } }, "array-uniq": { @@ -390,9 +390,9 @@ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "assert": { @@ -457,9 +457,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" }, "dependencies": { "chalk": { @@ -468,11 +468,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "strip-ansi": { @@ -481,7 +481,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -492,25 +492,25 @@ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.5", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" }, "dependencies": { "babylon": { @@ -542,14 +542,14 @@ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.5", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "dependencies": { "jsesc": { @@ -572,9 +572,9 @@ "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-builder-binary-assignment-operator-visitor": { @@ -583,9 +583,9 @@ "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "dev": true, "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-call-delegate": { @@ -594,10 +594,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-define-map": { @@ -606,10 +606,10 @@ "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.5" } }, "babel-helper-explode-assignable-expression": { @@ -618,9 +618,9 @@ "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-explode-class": { @@ -629,10 +629,10 @@ "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", "dev": true, "requires": { - "babel-helper-bindify-decorators": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-bindify-decorators": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-function-name": { @@ -641,11 +641,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-get-function-arity": { @@ -654,8 +654,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-hoist-variables": { @@ -664,8 +664,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-optimise-call-expression": { @@ -674,8 +674,8 @@ "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-regex": { @@ -684,9 +684,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.5" } }, "babel-helper-remap-async-to-generator": { @@ -695,11 +695,11 @@ "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-replace-supers": { @@ -708,12 +708,12 @@ "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", "dev": true, "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helpers": { @@ -722,8 +722,8 @@ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-messages": { @@ -732,7 +732,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-check-es2015-constants": { @@ -741,7 +741,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-syntax-async-functions": { @@ -816,9 +816,9 @@ "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-generators": "^6.5.0", - "babel-runtime": "^6.22.0" + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-generators": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-async-to-generator": { @@ -827,9 +827,9 @@ "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "dev": true, "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-class-constructor-call": { @@ -838,9 +838,9 @@ "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", "dev": true, "requires": { - "babel-plugin-syntax-class-constructor-call": "^6.18.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-plugin-syntax-class-constructor-call": "6.18.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-class-properties": { @@ -849,10 +849,10 @@ "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-plugin-syntax-class-properties": "^6.8.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-plugin-syntax-class-properties": "6.13.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-decorators": { @@ -861,11 +861,11 @@ "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", "dev": true, "requires": { - "babel-helper-explode-class": "^6.24.1", - "babel-plugin-syntax-decorators": "^6.13.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-explode-class": "6.24.1", + "babel-plugin-syntax-decorators": "6.13.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-arrow-functions": { @@ -874,7 +874,7 @@ "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoped-functions": { @@ -883,7 +883,7 @@ "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoping": { @@ -892,11 +892,11 @@ "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.5" } }, "babel-plugin-transform-es2015-classes": { @@ -905,15 +905,15 @@ "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "dev": true, "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-define-map": "6.26.0", + "babel-helper-function-name": "6.24.1", + "babel-helper-optimise-call-expression": "6.24.1", + "babel-helper-replace-supers": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-computed-properties": { @@ -922,8 +922,8 @@ "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -932,7 +932,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-duplicate-keys": { @@ -941,8 +941,8 @@ "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-for-of": { @@ -951,7 +951,7 @@ "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -960,9 +960,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-literals": { @@ -971,7 +971,7 @@ "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-modules-amd": { @@ -980,9 +980,9 @@ "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", "dev": true, "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -991,10 +991,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-modules-systemjs": { @@ -1003,9 +1003,9 @@ "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-umd": { @@ -1014,9 +1014,9 @@ "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", "dev": true, "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-object-super": { @@ -1025,8 +1025,8 @@ "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "dev": true, "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -1035,12 +1035,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-shorthand-properties": { @@ -1049,8 +1049,8 @@ "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-spread": { @@ -1059,7 +1059,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -1068,9 +1068,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-template-literals": { @@ -1079,7 +1079,7 @@ "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-typeof-symbol": { @@ -1088,7 +1088,7 @@ "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -1097,9 +1097,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { @@ -1108,9 +1108,9 @@ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "dev": true, "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-export-extensions": { @@ -1119,8 +1119,8 @@ "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", "dev": true, "requires": { - "babel-plugin-syntax-export-extensions": "^6.8.0", - "babel-runtime": "^6.22.0" + "babel-plugin-syntax-export-extensions": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-flow-strip-types": { @@ -1129,8 +1129,8 @@ "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", "dev": true, "requires": { - "babel-plugin-syntax-flow": "^6.18.0", - "babel-runtime": "^6.22.0" + "babel-plugin-syntax-flow": "6.18.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-object-rest-spread": { @@ -1139,8 +1139,8 @@ "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", "dev": true, "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-regenerator": { @@ -1149,7 +1149,7 @@ "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", "dev": true, "requires": { - "regenerator-transform": "^0.10.0" + "regenerator-transform": "0.10.1" } }, "babel-plugin-transform-strict-mode": { @@ -1158,8 +1158,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-preset-es2015": { @@ -1168,30 +1168,30 @@ "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", "dev": true, "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.24.1", - "babel-plugin-transform-es2015-classes": "^6.24.1", - "babel-plugin-transform-es2015-computed-properties": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.22.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", - "babel-plugin-transform-es2015-for-of": "^6.22.0", - "babel-plugin-transform-es2015-function-name": "^6.24.1", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-umd": "^6.24.1", - "babel-plugin-transform-es2015-object-super": "^6.24.1", - "babel-plugin-transform-es2015-parameters": "^6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", - "babel-plugin-transform-regenerator": "^6.24.1" + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0" } }, "babel-preset-stage-1": { @@ -1200,9 +1200,9 @@ "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", "dev": true, "requires": { - "babel-plugin-transform-class-constructor-call": "^6.24.1", - "babel-plugin-transform-export-extensions": "^6.22.0", - "babel-preset-stage-2": "^6.24.1" + "babel-plugin-transform-class-constructor-call": "6.24.1", + "babel-plugin-transform-export-extensions": "6.22.0", + "babel-preset-stage-2": "6.24.1" } }, "babel-preset-stage-2": { @@ -1211,10 +1211,10 @@ "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", "dev": true, "requires": { - "babel-plugin-syntax-dynamic-import": "^6.18.0", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-decorators": "^6.24.1", - "babel-preset-stage-3": "^6.24.1" + "babel-plugin-syntax-dynamic-import": "6.18.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-decorators": "6.24.1", + "babel-preset-stage-3": "6.24.1" } }, "babel-preset-stage-3": { @@ -1223,11 +1223,11 @@ "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", "dev": true, "requires": { - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-generator-functions": "^6.24.1", - "babel-plugin-transform-async-to-generator": "^6.24.1", - "babel-plugin-transform-exponentiation-operator": "^6.24.1", - "babel-plugin-transform-object-rest-spread": "^6.22.0" + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-generator-functions": "6.24.1", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "babel-plugin-transform-object-rest-spread": "6.26.0" } }, "babel-register": { @@ -1236,13 +1236,13 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" + "babel-core": "6.26.3", + "babel-runtime": "6.26.0", + "core-js": "2.5.7", + "home-or-tmp": "2.0.0", + "lodash": "4.17.5", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" } }, "babel-runtime": { @@ -1251,8 +1251,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -1261,11 +1261,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.5" }, "dependencies": { "babylon": { @@ -1282,15 +1282,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.5" }, "dependencies": { "babylon": { @@ -1322,10 +1322,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.5", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -1346,13 +1346,13 @@ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -1361,7 +1361,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -1370,7 +1370,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -1379,7 +1379,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -1388,9 +1388,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -1434,10 +1434,10 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -1447,16 +1447,16 @@ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -1482,12 +1482,12 @@ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, "browserify-cipher": { @@ -1496,9 +1496,9 @@ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "browserify-aes": "1.2.0", + "browserify-des": "1.0.2", + "evp_bytestokey": "1.0.3" } }, "browserify-des": { @@ -1507,10 +1507,10 @@ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3", + "safe-buffer": "5.1.2" }, "dependencies": { "safe-buffer": { @@ -1527,8 +1527,8 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" + "bn.js": "4.11.8", + "randombytes": "2.0.6" } }, "browserify-sign": { @@ -1537,13 +1537,13 @@ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" } }, "browserify-zlib": { @@ -1552,7 +1552,7 @@ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "pako": "~1.0.5" + "pako": "1.0.6" } }, "buffer": { @@ -1561,15 +1561,15 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "base64-js": "1.3.0", + "ieee754": "1.1.12", + "isarray": "1.0.0" } }, "buffer-from": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha1-TLiDLSNhJYmwQG6eKVbBfwb99TE=", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", "dev": true }, "buffer-xor": { @@ -1596,19 +1596,19 @@ "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", "dev": true, "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.2", + "mississippi": "2.0.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "5.3.0", + "unique-filename": "1.1.0", + "y18n": "4.0.0" } }, "cache-base": { @@ -1617,15 +1617,15 @@ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" } }, "cacheable-request": { @@ -1663,7 +1663,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "^0.2.0" + "callsites": "0.2.0" } }, "callsites": { @@ -1684,9 +1684,9 @@ "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.3.0" }, "dependencies": { "ansi-styles": { @@ -1695,7 +1695,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "supports-color": { @@ -1704,7 +1704,7 @@ "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -1721,19 +1721,19 @@ "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", "dev": true, "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "fsevents": "1.2.4", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "lodash.debounce": "4.0.8", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.1.0" } }, "chownr": { @@ -1748,7 +1748,7 @@ "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", "dev": true, "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.3" } }, "cipher-base": { @@ -1757,14 +1757,14 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", "dev": true }, "class-utils": { @@ -1773,10 +1773,10 @@ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -1785,7 +1785,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -1793,10 +1793,10 @@ "clean-webpack-plugin": { "version": "0.1.19", "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-0.1.19.tgz", - "integrity": "sha1-ztqLuWsA/haOmwgCcpYNIP3K3W0=", + "integrity": "sha512-M1Li5yLHECcN2MahoreuODul5LkjohJGFxLPTjl3j1ttKrF5rgjZET1SJduuqxLAuT1gAPOdkhg03qcaaU1KeA==", "dev": true, "requires": { - "rimraf": "^2.6.1" + "rimraf": "2.6.2" } }, "cli-cursor": { @@ -1805,7 +1805,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "2.0.0" } }, "cli-spinners": { @@ -1838,7 +1838,7 @@ "dev": true, "requires": { "slice-ansi": "0.0.4", - "string-width": "^1.0.1" + "string-width": "1.0.2" }, "dependencies": { "is-fullwidth-code-point": { @@ -1847,7 +1847,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "slice-ansi": { @@ -1862,9 +1862,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "strip-ansi": { @@ -1873,7 +1873,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -1890,9 +1890,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" } }, "clone": { @@ -1913,7 +1913,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "mimic-response": "1.0.1" } }, "clone-stats": { @@ -1928,9 +1928,9 @@ "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", "dev": true, "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" + "inherits": "2.0.3", + "process-nextick-args": "2.0.0", + "readable-stream": "2.3.5" } }, "co": { @@ -1951,17 +1951,17 @@ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" } }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha1-wSYRB66y8pTr/+ye2eytUppgl+0=", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { - "color-name": "^1.1.1" + "color-name": "1.1.3" } }, "color-name": { @@ -2003,13 +2003,13 @@ "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "buffer-from": "1.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.5", + "typedarray": "0.0.6" } }, "console-browserify": { @@ -2018,7 +2018,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "^0.1.4" + "date-now": "0.1.4" } }, "constants-browserify": { @@ -2039,12 +2039,12 @@ "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" + "aproba": "1.2.0", + "fs-write-stream-atomic": "1.0.10", + "iferr": "0.1.5", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, "copy-descriptor": { @@ -2071,8 +2071,8 @@ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" + "bn.js": "4.11.8", + "elliptic": "6.4.0" } }, "create-hash": { @@ -2081,11 +2081,11 @@ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" } }, "create-hmac": { @@ -2094,12 +2094,12 @@ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" } }, "cross-spawn": { @@ -2108,9 +2108,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" } }, "crypto-browserify": { @@ -2119,17 +2119,17 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.3", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" } }, "cyclist": { @@ -2165,7 +2165,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -2189,7 +2189,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "mimic-response": "1.0.1" } }, "deep-extend": { @@ -2210,8 +2210,8 @@ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -2220,7 +2220,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -2229,7 +2229,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -2238,9 +2238,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -2251,13 +2251,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" } }, "des.js": { @@ -2266,8 +2266,8 @@ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "dev": true, "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "detect-conflict": { @@ -2282,7 +2282,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "diff": { @@ -2297,9 +2297,9 @@ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" } }, "dir-glob": { @@ -2308,17 +2308,17 @@ "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "dev": true, "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" + "arrify": "1.0.1", + "path-type": "3.0.0" } }, "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2" + "esutils": "2.0.2" } }, "domain-browser": { @@ -2339,10 +2339,10 @@ "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "dev": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.5", + "stream-shift": "1.0.0" } }, "editions": { @@ -2369,13 +2369,13 @@ "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.5", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, "emojis-list": { @@ -2390,7 +2390,7 @@ "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { - "once": "^1.4.0" + "once": "1.4.0" } }, "enhanced-resolve": { @@ -2399,9 +2399,9 @@ "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" + "graceful-fs": "4.1.11", + "memory-fs": "0.4.1", + "tapable": "1.0.0" } }, "envinfo": { @@ -2416,7 +2416,7 @@ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "dev": true, "requires": { - "prr": "~1.0.1" + "prr": "1.0.1" } }, "error": { @@ -2425,8 +2425,8 @@ "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", "dev": true, "requires": { - "string-template": "~0.2.1", - "xtend": "~4.0.0" + "string-template": "0.2.1", + "xtend": "4.0.1" } }, "error-ex": { @@ -2435,7 +2435,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "escape-string-regexp": { @@ -2447,47 +2447,47 @@ "eslint": { "version": "4.19.1", "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha1-MtHWU+HZBAiFS/spbwdux+GGowA=", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.3.2", + "concat-stream": "1.6.2", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.4.0", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.11.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.5", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.0.1", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", "table": "4.0.2", - "text-table": "~0.2.0" + "text-table": "0.2.0" } }, "eslint-plugin-es5": { @@ -2502,30 +2502,30 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "4.2.1", + "estraverse": "4.2.0" } }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, "espree": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha1-sPRHGHyKi+2US4FaZgvd9d610ac=", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "5.5.3", + "acorn-jsx": "3.0.1" } }, "esprima": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", "dev": true }, "esquery": { @@ -2534,16 +2534,16 @@ "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "4.2.0" } }, "estraverse": { @@ -2561,7 +2561,7 @@ "eventemitter3": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha1-CQtNbNvWRe0Qv3UNS1QHlC17oWM=" + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" }, "events": { "version": "1.1.1", @@ -2575,8 +2575,8 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" } }, "execa": { @@ -2585,13 +2585,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "exit-hook": { @@ -2606,13 +2606,13 @@ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -2630,7 +2630,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -2639,7 +2639,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -2650,7 +2650,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.4" }, "dependencies": { "fill-range": { @@ -2659,11 +2659,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "is-number": { @@ -2672,7 +2672,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "isobject": { @@ -2690,7 +2690,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -2701,7 +2701,25 @@ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", "dev": true, "requires": { - "homedir-polyfill": "^1.0.1" + "homedir-polyfill": "1.0.1" + } + }, + "exports-loader": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/exports-loader/-/exports-loader-0.6.4.tgz", + "integrity": "sha1-1w/GEhl1s1/BKDDPUnVL4nQPyIY=", + "dev": true, + "requires": { + "loader-utils": "1.1.0", + "source-map": "0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, "extend-shallow": { @@ -2710,8 +2728,8 @@ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -2720,7 +2738,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -2731,9 +2749,9 @@ "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" + "chardet": "0.4.2", + "iconv-lite": "0.4.19", + "tmp": "0.0.33" } }, "extglob": { @@ -2742,14 +2760,14 @@ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -2758,7 +2776,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -2767,7 +2785,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -2776,7 +2794,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -2785,7 +2803,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -2794,9 +2812,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -2813,12 +2831,12 @@ "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "dev": true, "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" + "@mrmlnc/readdir-enhanced": "2.2.1", + "@nodelib/fs.stat": "1.1.0", + "glob-parent": "3.1.0", + "is-glob": "4.0.0", + "merge2": "1.2.2", + "micromatch": "3.1.10" } }, "fast-json-stable-stringify": { @@ -2839,7 +2857,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "1.0.5" } }, "file-entry-cache": { @@ -2848,8 +2866,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "1.3.0", + "object-assign": "4.1.1" } }, "filename-regex": { @@ -2864,10 +2882,10 @@ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -2876,7 +2894,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -2887,9 +2905,9 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "commondir": "1.0.1", + "make-dir": "1.3.0", + "pkg-dir": "2.0.0" } }, "find-up": { @@ -2898,7 +2916,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "first-chunk-stream": { @@ -2907,7 +2925,7 @@ "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", "dev": true, "requires": { - "readable-stream": "^2.0.2" + "readable-stream": "2.3.5" } }, "flat-cache": { @@ -2916,10 +2934,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" } }, "flow-parser": { @@ -2934,8 +2952,8 @@ "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" + "inherits": "2.0.3", + "readable-stream": "2.3.5" } }, "for-in": { @@ -2950,7 +2968,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "fragment-cache": { @@ -2959,7 +2977,7 @@ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "from2": { @@ -2968,8 +2986,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "inherits": "2.0.3", + "readable-stream": "2.3.5" } }, "fs-extra": { @@ -2978,9 +2996,9 @@ "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" } }, "fs-write-stream-atomic": { @@ -2989,10 +3007,10 @@ "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.5" } }, "fs.realpath": { @@ -3008,8 +3026,8 @@ "dev": true, "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "nan": "2.10.0", + "node-pre-gyp": "0.10.0" }, "dependencies": { "abbrev": { @@ -3560,8 +3578,8 @@ "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", "dev": true, "requires": { - "got": "^7.0.0", - "is-plain-obj": "^1.1.0" + "got": "7.1.0", + "is-plain-obj": "1.1.0" }, "dependencies": { "got": { @@ -3570,20 +3588,20 @@ "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", "dev": true, "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-plain-obj": "1.1.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "p-cancelable": "0.3.0", + "p-timeout": "1.2.1", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "url-parse-lax": "1.0.0", + "url-to-options": "1.0.1" } }, "p-cancelable": { @@ -3598,7 +3616,7 @@ "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", "dev": true, "requires": { - "p-finally": "^1.0.0" + "p-finally": "1.0.0" } }, "prepend-http": { @@ -3613,7 +3631,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "^1.0.1" + "prepend-http": "1.0.4" } } } @@ -3624,21 +3642,21 @@ "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", "dev": true, "requires": { - "gh-got": "^6.0.0" + "gh-got": "6.0.0" } }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-all": { @@ -3647,8 +3665,8 @@ "integrity": "sha1-iRPd+17hrHgSZWJBsD1SF8ZLAqs=", "dev": true, "requires": { - "glob": "^7.0.5", - "yargs": "~1.2.6" + "glob": "7.1.2", + "yargs": "1.2.6" }, "dependencies": { "minimist": { @@ -3663,7 +3681,7 @@ "integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=", "dev": true, "requires": { - "minimist": "^0.1.0" + "minimist": "0.1.0" } } } @@ -3674,8 +3692,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" }, "dependencies": { "glob-parent": { @@ -3684,7 +3702,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "is-extglob": { @@ -3699,7 +3717,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -3710,8 +3728,8 @@ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" }, "dependencies": { "is-glob": { @@ -3720,7 +3738,7 @@ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } } } @@ -3737,9 +3755,9 @@ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" + "global-prefix": "1.0.2", + "is-windows": "1.0.2", + "resolve-dir": "1.0.1" } }, "global-prefix": { @@ -3748,11 +3766,11 @@ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" + "expand-tilde": "2.0.2", + "homedir-polyfill": "1.0.1", + "ini": "1.3.5", + "is-windows": "1.0.2", + "which": "1.3.0" } }, "globals": { @@ -3767,12 +3785,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "got": { @@ -3781,23 +3799,23 @@ "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", "dev": true, "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" + "@sindresorhus/is": "0.7.0", + "cacheable-request": "2.1.4", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "mimic-response": "1.0.1", + "p-cancelable": "0.4.1", + "p-timeout": "2.0.1", + "pify": "3.0.0", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "url-parse-lax": "3.0.0", + "url-to-options": "1.0.1" }, "dependencies": { "pify": { @@ -3820,7 +3838,7 @@ "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", "dev": true, "requires": { - "lodash": "^4.17.2" + "lodash": "4.17.5" } }, "has-ansi": { @@ -3829,7 +3847,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-color": { @@ -3856,7 +3874,7 @@ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "has-symbol-support-x": "^1.4.1" + "has-symbol-support-x": "1.4.2" } }, "has-value": { @@ -3865,9 +3883,9 @@ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" } }, "has-values": { @@ -3876,8 +3894,8 @@ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "kind-of": { @@ -3886,7 +3904,7 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -3897,8 +3915,8 @@ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, "hash.js": { @@ -3907,8 +3925,8 @@ "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" } }, "hmac-drbg": { @@ -3917,9 +3935,9 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "hash.js": "1.1.5", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" } }, "home-or-tmp": { @@ -3928,8 +3946,8 @@ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "dev": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "homedir-polyfill": { @@ -3938,7 +3956,7 @@ "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", "dev": true, "requires": { - "parse-passwd": "^1.0.0" + "parse-passwd": "1.0.0" } }, "hosted-git-info": { @@ -3989,8 +4007,26 @@ "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", "dev": true, "requires": { - "pkg-dir": "^2.0.0", - "resolve-cwd": "^2.0.0" + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" + } + }, + "imports-loader": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/imports-loader/-/imports-loader-0.7.1.tgz", + "integrity": "sha1-8gS180cCoywdt9SNidXoZ6BEElM=", + "dev": true, + "requires": { + "loader-utils": "1.1.0", + "source-map": "0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, "imurmurhash": { @@ -4005,7 +4041,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "indexof": { @@ -4020,8 +4056,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -4039,23 +4075,23 @@ "inquirer": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha1-ndLyrXZdyrH/BEO0kUQqILoifck=", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.1.0", + "chalk": "2.3.2", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.1.0", + "figures": "2.0.0", + "lodash": "4.17.5", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" } }, "interpret": { @@ -4070,8 +4106,8 @@ "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" + "from2": "2.3.0", + "p-is-promise": "1.1.0" } }, "invariant": { @@ -4080,7 +4116,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.4.0" } }, "invert-kv": { @@ -4095,7 +4131,7 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -4104,7 +4140,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4121,7 +4157,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -4136,7 +4172,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-data-descriptor": { @@ -4145,7 +4181,7 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -4154,7 +4190,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4165,9 +4201,9 @@ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -4190,7 +4226,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-extendable": { @@ -4211,7 +4247,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -4226,7 +4262,7 @@ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } }, "is-number": { @@ -4235,7 +4271,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -4244,7 +4280,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -4261,7 +4297,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "^1.1.0" + "symbol-observable": "1.2.0" }, "dependencies": { "symbol-observable": { @@ -4281,10 +4317,10 @@ "is-path-in-cwd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha1-WsSLNF72dTOb1sekipEhELJBz1I=", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -4293,7 +4329,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-plain-obj": { @@ -4308,7 +4344,7 @@ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "is-posix-bracket": { @@ -4332,7 +4368,7 @@ "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, "is-retry-allowed": { @@ -4347,7 +4383,7 @@ "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", "dev": true, "requires": { - "scoped-regex": "^1.0.0" + "scoped-regex": "1.0.0" } }, "is-stream": { @@ -4398,9 +4434,9 @@ "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", "dev": true, "requires": { - "binaryextensions": "2", - "editions": "^1.3.3", - "textextensions": "2" + "binaryextensions": "2.1.1", + "editions": "1.3.4", + "textextensions": "2.2.0" } }, "isurl": { @@ -4409,8 +4445,8 @@ "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" + "has-to-string-tag-x": "1.4.1", + "is-object": "1.0.1" } }, "js-tokens": { @@ -4422,11 +4458,11 @@ "js-yaml": { "version": "3.11.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha1-WXwai9VxUvJtYizkEXhRpR9euu8=", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.10", + "esprima": "4.0.0" } }, "jscodeshift": { @@ -4435,21 +4471,21 @@ "integrity": "sha512-sRMollbhbmSDrR79JMAnhEjyZJlQQVozeeY9A6/KNuV26DNcuB3mGSCWXp0hks9dcwRNOELbNOiwraZaXXRk5Q==", "dev": true, "requires": { - "babel-plugin-transform-flow-strip-types": "^6.8.0", - "babel-preset-es2015": "^6.9.0", - "babel-preset-stage-1": "^6.5.0", - "babel-register": "^6.9.0", - "babylon": "^7.0.0-beta.47", - "colors": "^1.1.2", - "flow-parser": "^0.*", - "lodash": "^4.13.1", - "micromatch": "^2.3.7", - "neo-async": "^2.5.0", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-preset-es2015": "6.24.1", + "babel-preset-stage-1": "6.24.1", + "babel-register": "6.26.0", + "babylon": "7.0.0-beta.47", + "colors": "1.3.0", + "flow-parser": "0.76.0", + "lodash": "4.17.5", + "micromatch": "2.3.11", + "neo-async": "2.5.1", "node-dir": "0.1.8", - "nomnom": "^1.8.1", - "recast": "^0.15.0", - "temp": "^0.8.1", - "write-file-atomic": "^1.2.0" + "nomnom": "1.8.1", + "recast": "0.15.2", + "temp": "0.8.3", + "write-file-atomic": "1.3.4" }, "dependencies": { "arr-diff": { @@ -4585,7 +4621,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "4.1.11" } }, "keyv": { @@ -4609,7 +4645,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "levn": { @@ -4618,8 +4654,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "1.1.2", + "type-check": "0.3.2" } }, "listr": { @@ -4628,22 +4664,22 @@ "integrity": "sha512-MSMUUVN1f8aRnPi4034RkOqdiUlpYW+FqwFE3aL0uYNPRavkt2S2SsSpDDofn8BDpqv2RNnsdOcCHWsChcq77A==", "dev": true, "requires": { - "@samverschueren/stream-to-observable": "^0.3.0", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-observable": "^1.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.4.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^6.1.0", - "strip-ansi": "^3.0.1" + "@samverschueren/stream-to-observable": "0.3.0", + "cli-truncate": "0.2.1", + "figures": "1.7.0", + "indent-string": "2.1.0", + "is-observable": "1.1.0", + "is-promise": "2.1.0", + "is-stream": "1.1.0", + "listr-silent-renderer": "1.1.1", + "listr-update-renderer": "0.4.0", + "listr-verbose-renderer": "0.4.1", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "ora": "0.2.3", + "p-map": "1.2.0", + "rxjs": "6.2.1", + "strip-ansi": "3.0.1" }, "dependencies": { "chalk": { @@ -4684,7 +4720,7 @@ "integrity": "sha512-OwMxHxmnmHTUpgO+V7dZChf3Tixf4ih95cmXjzzadULziVl/FKhHScGLj4goEw9weePVOH2Q0+GcCBUhKCZc/g==", "dev": true, "requires": { - "tslib": "^1.9.0" + "tslib": "1.9.3" } }, "strip-ansi": { @@ -4710,14 +4746,14 @@ "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "elegant-spinner": "1.0.1", + "figures": "1.7.0", + "indent-string": "3.2.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "chalk": { @@ -4726,11 +4762,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "figures": { @@ -4739,8 +4775,8 @@ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" } }, "indent-string": { @@ -4755,7 +4791,7 @@ "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "dev": true, "requires": { - "chalk": "^1.0.0" + "chalk": "1.1.3" } }, "strip-ansi": { @@ -4764,7 +4800,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -4775,10 +4811,10 @@ "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.29.0", + "figures": "1.7.0" }, "dependencies": { "chalk": { @@ -4787,11 +4823,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "cli-cursor": { @@ -4800,7 +4836,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "restore-cursor": "1.0.1" } }, "figures": { @@ -4809,8 +4845,8 @@ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" } }, "onetime": { @@ -4825,8 +4861,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, "strip-ansi": { @@ -4835,7 +4871,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -4846,10 +4882,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" }, "dependencies": { "pify": { @@ -4878,9 +4914,9 @@ "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "dev": true, "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1" } }, "locate-path": { @@ -4889,14 +4925,14 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, "lodash": { "version": "4.17.5", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", "dev": true }, "lodash.debounce": { @@ -4911,7 +4947,7 @@ "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "2.3.2" } }, "log-update": { @@ -4920,8 +4956,8 @@ "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", "dev": true, "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" + "ansi-escapes": "1.4.0", + "cli-cursor": "1.0.2" }, "dependencies": { "ansi-escapes": { @@ -4936,7 +4972,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "restore-cursor": "1.0.1" } }, "onetime": { @@ -4951,8 +4987,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } } } @@ -4969,7 +5005,7 @@ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" + "js-tokens": "3.0.2" } }, "lowercase-keys": { @@ -4981,11 +5017,11 @@ "lru-cache": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha1-RSNLLm4vKzPaElYkxGZJKaAiTD8=", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "make-dir": { @@ -4994,7 +5030,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" }, "dependencies": { "pify": { @@ -5023,7 +5059,7 @@ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, "math-random": { @@ -5038,8 +5074,8 @@ "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, "mem": { @@ -5048,7 +5084,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "mem-fs": { @@ -5057,9 +5093,9 @@ "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", "dev": true, "requires": { - "through2": "^2.0.0", - "vinyl": "^1.1.0", - "vinyl-file": "^2.0.0" + "through2": "2.0.3", + "vinyl": "1.2.0", + "vinyl-file": "2.0.0" } }, "mem-fs-editor": { @@ -5068,17 +5104,17 @@ "integrity": "sha512-tgWmwI/+6vwu6POan82dTjxEpwAoaj0NAFnghtVo/FcLK2/7IhPUtFUUYlwou4MOY6OtjTUJtwpfH1h+eSUziw==", "dev": true, "requires": { - "commondir": "^1.0.1", - "deep-extend": "^0.6.0", - "ejs": "^2.5.9", - "glob": "^7.0.3", - "globby": "^7.1.1", - "isbinaryfile": "^3.0.2", - "mkdirp": "^0.5.0", - "multimatch": "^2.0.0", - "rimraf": "^2.2.8", - "through2": "^2.0.0", - "vinyl": "^2.0.1" + "commondir": "1.0.1", + "deep-extend": "0.6.0", + "ejs": "2.6.1", + "glob": "7.1.2", + "globby": "7.1.1", + "isbinaryfile": "3.0.2", + "mkdirp": "0.5.1", + "multimatch": "2.1.0", + "rimraf": "2.6.2", + "through2": "2.0.3", + "vinyl": "2.2.0" }, "dependencies": { "clone": { @@ -5099,12 +5135,12 @@ "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.7", + "pify": "3.0.0", + "slash": "1.0.0" } }, "pify": { @@ -5125,12 +5161,12 @@ "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "dev": true, "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" + "clone": "2.1.1", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.1.2", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" } } } @@ -5141,8 +5177,8 @@ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true, "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" + "errno": "0.1.7", + "readable-stream": "2.3.5" } }, "merge2": { @@ -5157,19 +5193,19 @@ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.13", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "miller-rabin": { @@ -5178,14 +5214,14 @@ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "bn.js": "4.11.8", + "brorand": "1.1.0" } }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, "mimic-response": { @@ -5209,10 +5245,10 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -5227,16 +5263,16 @@ "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "dev": true, "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" + "concat-stream": "1.6.2", + "duplexify": "3.6.0", + "end-of-stream": "1.4.1", + "flush-write-stream": "1.0.3", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "2.0.1", + "pumpify": "1.5.1", + "stream-each": "1.2.2", + "through2": "2.0.3" } }, "mixin-deep": { @@ -5245,8 +5281,8 @@ "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -5255,7 +5291,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -5275,12 +5311,12 @@ "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "dev": true, "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" + "aproba": "1.2.0", + "copy-concurrently": "1.0.5", + "fs-write-stream-atomic": "1.0.10", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "run-queue": "1.0.3" } }, "ms": { @@ -5295,10 +5331,10 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true, "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" } }, "mute-stream": { @@ -5320,17 +5356,17 @@ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } }, "natural-compare": { @@ -5363,28 +5399,28 @@ "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "dev": true, "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", + "assert": "1.4.1", + "browserify-zlib": "0.2.0", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "1.0.0", + "os-browserify": "0.3.0", "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.5", + "stream-browserify": "2.0.1", + "stream-http": "2.8.3", + "string_decoder": "1.0.3", + "timers-browserify": "2.0.10", "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", + "url": "0.11.0", + "util": "0.10.4", "vm-browserify": "0.0.4" }, "dependencies": { @@ -5402,10 +5438,10 @@ "integrity": "sha512-hKvVhaJliSdKaQ7MosSLPQfefwMd0GhncudU5zAmSk/iXZq2tZVxezSrZrUls5QyKufkRto9S2IMRfTzhKXQAw==", "dev": true, "requires": { - "chalk": "^1.1.3", - "graceful-fs": "^4.1.11", - "minimist": "^1.2.0", - "promisify-node": "^0.5.0" + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "minimist": "1.2.0", + "promisify-node": "0.5.0" }, "dependencies": { "chalk": { @@ -5444,7 +5480,7 @@ "integrity": "sha1-VyKxhPLfcycWEGSnkdLoQskWezQ=", "dev": true, "requires": { - "asap": "~2.0.3" + "asap": "2.0.6" } }, "nomnom": { @@ -5453,8 +5489,8 @@ "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", "dev": true, "requires": { - "chalk": "~0.4.0", - "underscore": "~1.6.0" + "chalk": "0.4.0", + "underscore": "1.6.0" }, "dependencies": { "ansi-styles": { @@ -5469,9 +5505,9 @@ "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" } }, "strip-ansi": { @@ -5488,10 +5524,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.7.1", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -5500,7 +5536,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "normalize-url": { @@ -5509,9 +5545,9 @@ "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" + "prepend-http": "2.0.0", + "query-string": "5.1.1", + "sort-keys": "2.0.0" } }, "npm-run-path": { @@ -5520,7 +5556,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -5541,9 +5577,9 @@ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -5552,7 +5588,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "kind-of": { @@ -5561,7 +5597,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -5572,7 +5608,7 @@ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" } }, "object.omit": { @@ -5581,8 +5617,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "object.pick": { @@ -5591,7 +5627,7 @@ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" } }, "once": { @@ -5600,7 +5636,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onetime": { @@ -5609,7 +5645,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "optionator": { @@ -5618,12 +5654,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" } }, "ora": { @@ -5632,10 +5668,10 @@ "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", "dev": true, "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-spinners": "0.1.2", + "object-assign": "4.1.1" }, "dependencies": { "chalk": { @@ -5644,11 +5680,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "cli-cursor": { @@ -5657,7 +5693,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "restore-cursor": "1.0.1" } }, "onetime": { @@ -5672,8 +5708,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, "strip-ansi": { @@ -5682,7 +5718,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -5705,9 +5741,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "os-tmpdir": { @@ -5728,7 +5764,7 @@ "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", "dev": true, "requires": { - "p-reduce": "^1.0.0" + "p-reduce": "1.0.0" } }, "p-finally": { @@ -5755,7 +5791,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -5764,7 +5800,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.3.0" } }, "p-map": { @@ -5785,7 +5821,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "^1.0.0" + "p-finally": "1.0.0" } }, "p-try": { @@ -5806,9 +5842,9 @@ "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "dev": true, "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" + "cyclist": "0.2.2", + "inherits": "2.0.3", + "readable-stream": "2.3.5" } }, "parse-asn1": { @@ -5817,11 +5853,11 @@ "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.16" } }, "parse-glob": { @@ -5830,10 +5866,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" }, "dependencies": { "is-extglob": { @@ -5848,7 +5884,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -5859,8 +5895,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "1.3.2", + "json-parse-better-errors": "1.0.2" } }, "parse-passwd": { @@ -5923,7 +5959,7 @@ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" }, "dependencies": { "pify": { @@ -5940,11 +5976,11 @@ "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", "dev": true, "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" } }, "pify": { @@ -5965,7 +6001,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -5974,13 +6010,13 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "^2.1.0" + "find-up": "2.1.0" } }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, "posix-character-classes": { @@ -6034,7 +6070,7 @@ "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, "progress": { @@ -6055,8 +6091,8 @@ "integrity": "sha512-GR2E4qgCoKFTprhULqP2OP3bl8kHo16XtnqtkHH6be7tPW1yL6rXd15nl3oV2sLTFv1+j6tqoF69VVpFtJ/j+A==", "dev": true, "requires": { - "nodegit-promise": "^4.0.0", - "object-assign": "^4.1.1" + "nodegit-promise": "4.0.0", + "object-assign": "4.1.1" } }, "prr": { @@ -6077,11 +6113,11 @@ "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" } }, "pump": { @@ -6090,8 +6126,8 @@ "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "end-of-stream": "1.4.1", + "once": "1.4.0" } }, "pumpify": { @@ -6100,9 +6136,9 @@ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" + "duplexify": "3.6.0", + "inherits": "2.0.3", + "pump": "2.0.1" } }, "punycode": { @@ -6117,9 +6153,9 @@ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" + "decode-uri-component": "0.2.0", + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" } }, "querystring": { @@ -6140,9 +6176,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" }, "dependencies": { "is-number": { @@ -6159,7 +6195,7 @@ "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "dev": true, "requires": { - "safe-buffer": "^5.1.0" + "safe-buffer": "5.1.1" } }, "randomfill": { @@ -6168,8 +6204,8 @@ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "randombytes": "2.0.6", + "safe-buffer": "5.1.1" } }, "read-chunk": { @@ -6178,8 +6214,8 @@ "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", "dev": true, "requires": { - "pify": "^3.0.0", - "safe-buffer": "^5.1.1" + "pify": "3.0.0", + "safe-buffer": "5.1.1" }, "dependencies": { "pify": { @@ -6196,9 +6232,9 @@ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "3.0.0" } }, "read-pkg-up": { @@ -6207,8 +6243,8 @@ "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "find-up": "2.1.0", + "read-pkg": "3.0.0" } }, "readable-stream": { @@ -6217,13 +6253,13 @@ "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" } }, "readdirp": { @@ -6232,10 +6268,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.5", + "set-immediate-shim": "1.0.1" } }, "recast": { @@ -6245,9 +6281,9 @@ "dev": true, "requires": { "ast-types": "0.11.5", - "esprima": "~4.0.0", - "private": "~0.1.5", - "source-map": "~0.6.1" + "esprima": "4.0.0", + "private": "0.1.8", + "source-map": "0.6.1" } }, "rechoir": { @@ -6256,7 +6292,7 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "^1.1.6" + "resolve": "1.8.1" } }, "regenerate": { @@ -6277,9 +6313,9 @@ "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", "dev": true, "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "private": "0.1.8" } }, "regex-cache": { @@ -6288,7 +6324,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "regex-not": { @@ -6297,8 +6333,8 @@ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "regexpp": { @@ -6313,9 +6349,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" + "regenerate": "1.4.0", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, "regjsgen": { @@ -6330,7 +6366,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "~0.5.0" + "jsesc": "0.5.0" } }, "remove-trailing-separator": { @@ -6357,7 +6393,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "replace-ext": { @@ -6384,8 +6420,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" + "caller-path": "0.1.0", + "resolve-from": "1.0.1" } }, "resolve": { @@ -6394,7 +6430,7 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } }, "resolve-cwd": { @@ -6403,7 +6439,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "3.0.0" }, "dependencies": { "resolve-from": { @@ -6420,8 +6456,8 @@ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "dev": true, "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" + "expand-tilde": "2.0.2", + "global-modules": "1.0.0" } }, "resolve-from": { @@ -6442,7 +6478,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "^1.0.0" + "lowercase-keys": "1.0.1" } }, "restore-cursor": { @@ -6451,8 +6487,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, "ret": { @@ -6464,10 +6500,10 @@ "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "ripemd160": { @@ -6476,8 +6512,8 @@ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "hash-base": "3.0.4", + "inherits": "2.0.3" } }, "run-async": { @@ -6486,7 +6522,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "^2.1.0" + "is-promise": "2.1.0" } }, "run-queue": { @@ -6495,7 +6531,7 @@ "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "dev": true, "requires": { - "aproba": "^1.1.1" + "aproba": "1.2.0" } }, "rx-lite": { @@ -6510,7 +6546,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "*" + "rx-lite": "4.0.8" } }, "rxjs": { @@ -6534,7 +6570,7 @@ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "schema-utils": { @@ -6543,8 +6579,8 @@ "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" + "ajv": "6.5.2", + "ajv-keywords": "3.2.0" }, "dependencies": { "ajv": { @@ -6553,10 +6589,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" } }, "ajv-keywords": { @@ -6588,7 +6624,7 @@ "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "serialize-javascript": { @@ -6615,10 +6651,10 @@ "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -6627,7 +6663,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -6644,8 +6680,8 @@ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, "shebang-command": { @@ -6654,7 +6690,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -6669,9 +6705,9 @@ "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", "dev": true, "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" + "glob": "7.1.2", + "interpret": "1.1.0", + "rechoir": "0.6.2" } }, "signal-exit": { @@ -6689,10 +6725,10 @@ "slice-ansi": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0" + "is-fullwidth-code-point": "2.0.0" } }, "slide": { @@ -6707,14 +6743,14 @@ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" }, "dependencies": { "debug": { @@ -6732,7 +6768,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -6741,7 +6777,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "source-map": { @@ -6758,9 +6794,9 @@ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -6769,7 +6805,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -6778,7 +6814,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -6787,7 +6823,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -6796,9 +6832,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } } } @@ -6809,7 +6845,7 @@ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -6818,7 +6854,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -6829,7 +6865,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "^1.0.0" + "is-plain-obj": "1.1.0" } }, "source-list-map": { @@ -6850,11 +6886,11 @@ "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-support": { @@ -6863,7 +6899,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "^0.5.6" + "source-map": "0.5.7" }, "dependencies": { "source-map": { @@ -6886,8 +6922,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -6902,8 +6938,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -6918,7 +6954,7 @@ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "sprintf-js": { @@ -6933,7 +6969,7 @@ "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", "dev": true, "requires": { - "safe-buffer": "^5.1.1" + "safe-buffer": "5.1.1" } }, "static-extend": { @@ -6942,8 +6978,8 @@ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -6952,7 +6988,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -6963,8 +6999,8 @@ "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "dev": true, "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" + "inherits": "2.0.3", + "readable-stream": "2.3.5" } }, "stream-each": { @@ -6973,8 +7009,8 @@ "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "stream-shift": "1.0.0" } }, "stream-http": { @@ -6983,11 +7019,11 @@ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", "dev": true, "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" }, "dependencies": { "readable-stream": { @@ -6996,13 +7032,13 @@ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "string_decoder": { @@ -7011,7 +7047,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.1" } } } @@ -7037,11 +7073,11 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "string_decoder": { @@ -7050,7 +7086,7 @@ "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.1" } }, "strip-ansi": { @@ -7059,7 +7095,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" }, "dependencies": { "ansi-regex": { @@ -7076,7 +7112,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-bom-stream": { @@ -7085,8 +7121,8 @@ "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", "dev": true, "requires": { - "first-chunk-stream": "^2.0.0", - "strip-bom": "^2.0.0" + "first-chunk-stream": "2.0.0", + "strip-bom": "2.0.0" } }, "strip-eof": { @@ -7116,15 +7152,15 @@ "table": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha1-ozRHN1OR52atNNNIbm4q7chNLjY=", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.3.2", + "lodash": "4.17.5", "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "string-width": "2.1.1" } }, "tapable": { @@ -7139,8 +7175,8 @@ "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", "dev": true, "requires": { - "os-tmpdir": "^1.0.0", - "rimraf": "~2.2.6" + "os-tmpdir": "1.0.2", + "rimraf": "2.2.8" }, "dependencies": { "rimraf": { @@ -7175,8 +7211,8 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2.3.5", + "xtend": "4.0.1" } }, "timed-out": { @@ -7191,16 +7227,16 @@ "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "dev": true, "requires": { - "setimmediate": "^1.0.4" + "setimmediate": "1.0.5" } }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "1.0.2" } }, "to-arraybuffer": { @@ -7221,7 +7257,7 @@ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -7230,7 +7266,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -7241,10 +7277,10 @@ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -7253,8 +7289,8 @@ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" } }, "trim-right": { @@ -7281,7 +7317,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "1.1.2" } }, "typedarray": { @@ -7296,8 +7332,8 @@ "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", "dev": true, "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" + "commander": "2.13.0", + "source-map": "0.6.1" } }, "uglifyjs-webpack-plugin": { @@ -7306,14 +7342,14 @@ "integrity": "sha512-1VicfKhCYHLS8m1DCApqBhoulnASsEoJ/BvpUpP4zoNAPpKzdH+ghk0olGJMmwX2/jprK2j3hAHdUbczBSy2FA==", "dev": true, "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" + "cacache": "10.0.4", + "find-cache-dir": "1.0.0", + "schema-utils": "0.4.5", + "serialize-javascript": "1.5.0", + "source-map": "0.6.1", + "uglify-es": "3.3.9", + "webpack-sources": "1.1.0", + "worker-farm": "1.6.0" } }, "underscore": { @@ -7328,10 +7364,10 @@ "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -7340,7 +7376,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -7349,10 +7385,10 @@ "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } @@ -7363,7 +7399,7 @@ "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", "dev": true, "requires": { - "unique-slug": "^2.0.0" + "unique-slug": "2.0.0" } }, "unique-slug": { @@ -7372,7 +7408,7 @@ "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "dev": true, "requires": { - "imurmurhash": "^0.1.4" + "imurmurhash": "0.1.4" } }, "universalify": { @@ -7387,8 +7423,8 @@ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -7397,9 +7433,9 @@ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -7439,7 +7475,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "^2.1.0" + "punycode": "2.1.1" } }, "urix": { @@ -7472,7 +7508,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "^2.0.0" + "prepend-http": "2.0.0" } }, "url-to-options": { @@ -7487,7 +7523,7 @@ "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "dev": true, "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" } }, "util": { @@ -7517,8 +7553,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "vinyl": { @@ -7527,8 +7563,8 @@ "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", "dev": true, "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", + "clone": "1.0.4", + "clone-stats": "0.0.1", "replace-ext": "0.0.1" } }, @@ -7538,12 +7574,12 @@ "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.3.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^2.0.0", - "vinyl": "^1.1.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0", + "strip-bom-stream": "2.0.0", + "vinyl": "1.2.0" } }, "vivid-cli": { @@ -7567,9 +7603,9 @@ "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "dev": true, "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "chokidar": "2.0.4", + "graceful-fs": "4.1.11", + "neo-async": "2.5.1" } }, "webpack": { @@ -7583,26 +7619,26 @@ "@webassemblyjs/wasm-edit": "1.5.13", "@webassemblyjs/wasm-opt": "1.5.13", "@webassemblyjs/wasm-parser": "1.5.13", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^3.7.1", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.0.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.0.1" + "acorn": "5.7.1", + "acorn-dynamic-import": "3.0.0", + "ajv": "6.5.2", + "ajv-keywords": "3.2.0", + "chrome-trace-event": "1.0.0", + "enhanced-resolve": "4.1.0", + "eslint-scope": "3.7.1", + "json-parse-better-errors": "1.0.2", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "micromatch": "3.1.10", + "mkdirp": "0.5.1", + "neo-async": "2.5.1", + "node-libs-browser": "2.1.0", + "schema-utils": "0.4.5", + "tapable": "1.0.0", + "uglifyjs-webpack-plugin": "1.2.7", + "watchpack": "1.6.0", + "webpack-sources": "1.1.0" }, "dependencies": { "acorn": { @@ -7617,10 +7653,10 @@ "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" } }, "ajv-keywords": { @@ -7649,7 +7685,7 @@ "integrity": "sha512-MGO0nVniCLFAQz1qv22zM02QPjcpAoJdy7ED0i3Zy7SY1IecgXCm460ib7H/Wq7e9oL5VL6S2BxaObxwIcag0g==", "dev": true, "requires": { - "jscodeshift": "^0.4.0" + "jscodeshift": "0.4.1" }, "dependencies": { "arr-diff": { @@ -7658,7 +7694,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "array-unique": { @@ -7685,9 +7721,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "expand-brackets": { @@ -7696,7 +7732,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "extglob": { @@ -7705,7 +7741,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "is-extglob": { @@ -7720,7 +7756,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "jscodeshift": { @@ -7729,21 +7765,21 @@ "integrity": "sha512-iOX6If+hsw0q99V3n31t4f5VlD1TQZddH08xbT65ZqA7T4Vkx68emrDZMUOLVvCEAJ6NpAk7DECe3fjC/t52AQ==", "dev": true, "requires": { - "async": "^1.5.0", - "babel-plugin-transform-flow-strip-types": "^6.8.0", - "babel-preset-es2015": "^6.9.0", - "babel-preset-stage-1": "^6.5.0", - "babel-register": "^6.9.0", - "babylon": "^6.17.3", - "colors": "^1.1.2", - "flow-parser": "^0.*", - "lodash": "^4.13.1", - "micromatch": "^2.3.7", + "async": "1.5.2", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-preset-es2015": "6.24.1", + "babel-preset-stage-1": "6.24.1", + "babel-register": "6.26.0", + "babylon": "6.18.0", + "colors": "1.3.0", + "flow-parser": "0.76.0", + "lodash": "4.17.5", + "micromatch": "2.3.11", "node-dir": "0.1.8", - "nomnom": "^1.8.1", - "recast": "^0.12.5", - "temp": "^0.8.1", - "write-file-atomic": "^1.2.0" + "nomnom": "1.8.1", + "recast": "0.12.9", + "temp": "0.8.3", + "write-file-atomic": "1.3.4" } }, "kind-of": { @@ -7752,7 +7788,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "micromatch": { @@ -7761,19 +7797,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, "recast": { @@ -7783,10 +7819,10 @@ "dev": true, "requires": { "ast-types": "0.10.1", - "core-js": "^2.4.1", - "esprima": "~4.0.0", - "private": "~0.1.5", - "source-map": "~0.6.1" + "core-js": "2.5.7", + "esprima": "4.0.0", + "private": "0.1.8", + "source-map": "0.6.1" } } } @@ -7797,32 +7833,32 @@ "integrity": "sha512-CiWQR+1JS77rmyiO6y1q8Kt/O+e8nUUC9YfJ25JtSmzDwbqJV7vIsh3+QKRHVTbTCa0DaVh8iY1LBiagUIDB3g==", "dev": true, "requires": { - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "diff": "^3.5.0", - "enhanced-resolve": "^4.0.0", - "envinfo": "^5.7.0", - "glob-all": "^3.1.0", - "global-modules": "^1.0.0", - "got": "^8.3.1", - "import-local": "^1.0.0", - "inquirer": "^5.2.0", - "interpret": "^1.1.0", - "jscodeshift": "^0.5.0", - "listr": "^0.14.1", - "loader-utils": "^1.1.0", - "lodash": "^4.17.10", - "log-symbols": "^2.2.0", - "mkdirp": "^0.5.1", - "p-each-series": "^1.0.0", - "p-lazy": "^1.0.0", - "prettier": "^1.12.1", - "supports-color": "^5.4.0", - "v8-compile-cache": "^2.0.0", - "webpack-addons": "^1.1.5", - "yargs": "^11.1.0", - "yeoman-environment": "^2.1.1", - "yeoman-generator": "^2.0.5" + "chalk": "2.4.1", + "cross-spawn": "6.0.5", + "diff": "3.5.0", + "enhanced-resolve": "4.1.0", + "envinfo": "5.10.0", + "glob-all": "3.1.0", + "global-modules": "1.0.0", + "got": "8.3.2", + "import-local": "1.0.0", + "inquirer": "5.2.0", + "interpret": "1.1.0", + "jscodeshift": "0.5.1", + "listr": "0.14.1", + "loader-utils": "1.1.0", + "lodash": "4.17.10", + "log-symbols": "2.2.0", + "mkdirp": "0.5.1", + "p-each-series": "1.0.0", + "p-lazy": "1.0.0", + "prettier": "1.13.7", + "supports-color": "5.4.0", + "v8-compile-cache": "2.0.0", + "webpack-addons": "1.1.5", + "yargs": "11.1.0", + "yeoman-environment": "2.3.0", + "yeoman-generator": "2.0.5" }, "dependencies": { "ansi-styles": { @@ -7831,7 +7867,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -7840,9 +7876,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "cross-spawn": { @@ -7896,6 +7932,16 @@ } } }, + "webpack-provide-global-plugin": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/webpack-provide-global-plugin/-/webpack-provide-global-plugin-0.0.1.tgz", + "integrity": "sha1-i2Bd9I35xOh+BfgohPAlFATQszA=", + "dev": true, + "requires": { + "exports-loader": "0.6.4", + "imports-loader": "0.7.1" + } + }, "webpack-shell-plugin": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/webpack-shell-plugin/-/webpack-shell-plugin-0.5.0.tgz", @@ -7908,17 +7954,17 @@ "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "dev": true, "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" + "source-list-map": "2.0.0", + "source-map": "0.6.1" } }, "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -7939,7 +7985,7 @@ "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", "dev": true, "requires": { - "errno": "~0.1.7" + "errno": "0.1.7" } }, "wrap-ansi": { @@ -7948,8 +7994,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "is-fullwidth-code-point": { @@ -7958,7 +8004,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "string-width": { @@ -7967,9 +8013,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "strip-ansi": { @@ -7978,7 +8024,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } } } @@ -7995,7 +8041,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "^0.5.1" + "mkdirp": "0.5.1" } }, "write-file-atomic": { @@ -8004,9 +8050,9 @@ "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" } }, "xtend": { @@ -8033,18 +8079,18 @@ "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.3", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" }, "dependencies": { "y18n": { @@ -8061,7 +8107,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" } }, "yeoman-environment": { @@ -8070,21 +8116,21 @@ "integrity": "sha512-PHSAkVOqYdcR+C+Uht1SGC4eVD/9OhygYFkYaI66xF8vKIeS1RNYay+umj2ZrQeJ50tF5Q/RSO6qGDz9y3Ifug==", "dev": true, "requires": { - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "diff": "^3.3.1", - "escape-string-regexp": "^1.0.2", - "globby": "^8.0.1", - "grouped-queue": "^0.3.3", - "inquirer": "^5.2.0", - "is-scoped": "^1.0.0", - "lodash": "^4.17.10", - "log-symbols": "^2.1.0", - "mem-fs": "^1.1.0", - "strip-ansi": "^4.0.0", - "text-table": "^0.2.0", - "untildify": "^3.0.2" + "chalk": "2.3.2", + "cross-spawn": "6.0.5", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "globby": "8.0.1", + "grouped-queue": "0.3.3", + "inquirer": "5.2.0", + "is-scoped": "1.0.0", + "lodash": "4.17.10", + "log-symbols": "2.2.0", + "mem-fs": "1.1.3", + "strip-ansi": "4.0.0", + "text-table": "0.2.0", + "untildify": "3.0.3" }, "dependencies": { "cross-spawn": { @@ -8093,11 +8139,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", + "shebang-command": "1.2.0", + "which": "1.3.0" } }, "globby": { @@ -8106,13 +8152,13 @@ "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "fast-glob": "2.2.2", + "glob": "7.1.2", + "ignore": "3.3.7", + "pify": "3.0.0", + "slash": "1.0.0" } }, "inquirer": { @@ -8121,19 +8167,19 @@ "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.1.0", + "chalk": "2.3.2", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.1.0", + "figures": "2.0.0", + "lodash": "4.17.10", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rxjs": "5.5.11", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" } }, "lodash": { @@ -8156,31 +8202,31 @@ "integrity": "sha512-rV6tJ8oYzm4mmdF2T3wjY+Q42jKF2YiiD0VKfJ8/0ZYwmhCKC9Xs2346HVLPj/xE13i68psnFJv7iS6gWRkeAg==", "dev": true, "requires": { - "async": "^2.6.0", - "chalk": "^2.3.0", - "cli-table": "^0.3.1", - "cross-spawn": "^6.0.5", - "dargs": "^5.1.0", - "dateformat": "^3.0.3", - "debug": "^3.1.0", - "detect-conflict": "^1.0.0", - "error": "^7.0.2", - "find-up": "^2.1.0", - "github-username": "^4.0.0", - "istextorbinary": "^2.2.1", - "lodash": "^4.17.10", - "make-dir": "^1.1.0", - "mem-fs-editor": "^4.0.0", - "minimist": "^1.2.0", - "pretty-bytes": "^4.0.2", - "read-chunk": "^2.1.0", - "read-pkg-up": "^3.0.0", - "rimraf": "^2.6.2", - "run-async": "^2.0.0", - "shelljs": "^0.8.0", - "text-table": "^0.2.0", - "through2": "^2.0.0", - "yeoman-environment": "^2.0.5" + "async": "2.6.1", + "chalk": "2.3.2", + "cli-table": "0.3.1", + "cross-spawn": "6.0.5", + "dargs": "5.1.0", + "dateformat": "3.0.3", + "debug": "3.1.0", + "detect-conflict": "1.0.1", + "error": "7.0.2", + "find-up": "2.1.0", + "github-username": "4.1.0", + "istextorbinary": "2.2.1", + "lodash": "4.17.10", + "make-dir": "1.3.0", + "mem-fs-editor": "4.0.3", + "minimist": "1.2.0", + "pretty-bytes": "4.0.2", + "read-chunk": "2.1.0", + "read-pkg-up": "3.0.0", + "rimraf": "2.6.2", + "run-async": "2.3.0", + "shelljs": "0.8.2", + "text-table": "0.2.0", + "through2": "2.0.3", + "yeoman-environment": "2.3.0" }, "dependencies": { "async": { @@ -8189,7 +8235,7 @@ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "dev": true, "requires": { - "lodash": "^4.17.10" + "lodash": "4.17.10" } }, "cross-spawn": { @@ -8198,11 +8244,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", + "shebang-command": "1.2.0", + "which": "1.3.0" } }, "lodash": { diff --git a/package.json b/package.json index 3879dd72b..cfc47cf79 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,9 @@ "distfb": "webpack --config webpack.fb.dist.config.js", "distfull": "npm run dist && npm run distfb", "plugin.cam3d": "webpack --config plugins/camera3d/webpack.config.js", + "plugin.spine": "webpack --config plugins/spine/webpack.config.js", + "plugin.spine.dist": "webpack --config plugins/spine/webpack.dist.config.js", + "plugin.spine.watch": "webpack --config plugins/spine/webpack.config.js --watch", "lint": "eslint --config .eslintrc.json \"src/**/*.js\"", "lintfix": "eslint --config .eslintrc.json \"src/**/*.js\" --fix", "sloc": "node-sloc \"./src\" --include-extensions \"js\"", diff --git a/plugins/spine/copy-to-examples.js b/plugins/spine/copy-to-examples.js new file mode 100644 index 000000000..0a1f5a3b1 --- /dev/null +++ b/plugins/spine/copy-to-examples.js @@ -0,0 +1,33 @@ +var fs = require('fs-extra'); + +var source = './plugins/spine/dist/SpinePlugin.js'; +var sourceMap = './plugins/spine/dist/SpinePlugin.js.map'; +var dest = '../phaser3-examples/public/plugins/SpinePlugin.js'; +var destMap = '../phaser3-examples/public/plugins/SpinePlugin.js.map'; + +if (fs.existsSync(dest)) +{ + fs.copy(sourceMap, destMap, function (err) { + + if (err) + { + return console.error(err); + } + + }); + + fs.copy(source, dest, function (err) { + + if (err) + { + return console.error(err); + } + + console.log('Build copied to ' + dest); + + }); +} +else +{ + console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples'); +} diff --git a/plugins/spine/dist/SpinePlugin.js b/plugins/spine/dist/SpinePlugin.js new file mode 100644 index 000000000..2f914e5f4 --- /dev/null +++ b/plugins/spine/dist/SpinePlugin.js @@ -0,0 +1,7570 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("SpinePlugin", [], factory); + else if(typeof exports === 'object') + exports["SpinePlugin"] = factory(); + else + root["SpinePlugin"] = factory(); +})(window, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./SpinePlugin.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "../../../src/plugins/BasePlugin.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/plugins/BasePlugin.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2018 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @classdesc + * A Global Plugin is installed just once into the Game owned Plugin Manager. + * It can listen for Game events and respond to them. + * + * @class BasePlugin + * @memberof Phaser.Plugins + * @constructor + * @since 3.8.0 + * + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager. + */ +var BasePlugin = new Class({ + + initialize: + + function BasePlugin (pluginManager) + { + /** + * A handy reference to the Plugin Manager that is responsible for this plugin. + * Can be used as a route to gain access to game systems and events. + * + * @name Phaser.Plugins.BasePlugin#pluginManager + * @type {Phaser.Plugins.PluginManager} + * @protected + * @since 3.8.0 + */ + this.pluginManager = pluginManager; + + /** + * A reference to the Game instance this plugin is running under. + * + * @name Phaser.Plugins.BasePlugin#game + * @type {Phaser.Game} + * @protected + * @since 3.8.0 + */ + this.game = pluginManager.game; + + /** + * A reference to the Scene that has installed this plugin. + * Only set if it's a Scene Plugin, otherwise `null`. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + * You cannot use it during the `init` method, but you can during the `boot` method. + * + * @name Phaser.Plugins.BasePlugin#scene + * @type {?Phaser.Scene} + * @protected + * @since 3.8.0 + */ + this.scene; + + /** + * A reference to the Scene Systems of the Scene that has installed this plugin. + * Only set if it's a Scene Plugin, otherwise `null`. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + * You cannot use it during the `init` method, but you can during the `boot` method. + * + * @name Phaser.Plugins.BasePlugin#systems + * @type {?Phaser.Scenes.Systems} + * @protected + * @since 3.8.0 + */ + this.systems; + }, + + /** + * Called by the PluginManager when this plugin is first instantiated. + * It will never be called again on this instance. + * In here you can set-up whatever you need for this plugin to run. + * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this. + * + * @method Phaser.Plugins.BasePlugin#init + * @since 3.8.0 + * + * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually). + */ + init: function () + { + }, + + /** + * Called by the PluginManager when this plugin is started. + * If a plugin is stopped, and then started again, this will get called again. + * Typically called immediately after `BasePlugin.init`. + * + * @method Phaser.Plugins.BasePlugin#start + * @since 3.8.0 + */ + start: function () + { + // Here are the game-level events you can listen to. + // At the very least you should offer a destroy handler for when the game closes down. + + // var eventEmitter = this.game.events; + + // eventEmitter.once('destroy', this.gameDestroy, this); + // eventEmitter.on('pause', this.gamePause, this); + // eventEmitter.on('resume', this.gameResume, this); + // eventEmitter.on('resize', this.gameResize, this); + // eventEmitter.on('prestep', this.gamePreStep, this); + // eventEmitter.on('step', this.gameStep, this); + // eventEmitter.on('poststep', this.gamePostStep, this); + // eventEmitter.on('prerender', this.gamePreRender, this); + // eventEmitter.on('postrender', this.gamePostRender, this); + }, + + /** + * Called by the PluginManager when this plugin is stopped. + * The game code has requested that your plugin stop doing whatever it does. + * It is now considered as 'inactive' by the PluginManager. + * Handle that process here (i.e. stop listening for events, etc) + * If the plugin is started again then `BasePlugin.start` will be called again. + * + * @method Phaser.Plugins.BasePlugin#stop + * @since 3.8.0 + */ + stop: function () + { + }, + + /** + * If this is a Scene Plugin (i.e. installed into a Scene) then this method is called when the Scene boots. + * By this point the plugin properties `scene` and `systems` will have already been set. + * In here you can listen for Scene events and set-up whatever you need for this plugin to run. + * + * @method Phaser.Plugins.BasePlugin#boot + * @since 3.8.0 + */ + boot: function () + { + // Here are the Scene events you can listen to. + // At the very least you should offer a destroy handler for when the Scene closes down. + + // var eventEmitter = this.systems.events; + + // eventEmitter.once('destroy', this.sceneDestroy, this); + // eventEmitter.on('start', this.sceneStart, this); + // eventEmitter.on('preupdate', this.scenePreUpdate, this); + // eventEmitter.on('update', this.sceneUpdate, this); + // eventEmitter.on('postupdate', this.scenePostUpdate, this); + // eventEmitter.on('pause', this.scenePause, this); + // eventEmitter.on('resume', this.sceneResume, this); + // eventEmitter.on('sleep', this.sceneSleep, this); + // eventEmitter.on('wake', this.sceneWake, this); + // eventEmitter.on('shutdown', this.sceneShutdown, this); + // eventEmitter.on('destroy', this.sceneDestroy, this); + }, + + /** + * Game instance has been destroyed. + * You must release everything in here, all references, all objects, free it all up. + * + * @method Phaser.Plugins.BasePlugin#destroy + * @since 3.8.0 + */ + destroy: function () + { + this.pluginManager = null; + this.game = null; + this.scene = null; + this.systems = null; + } + +}); + +module.exports = BasePlugin; + + +/***/ }), + +/***/ "../../../src/utils/Class.js": +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/utils/Class.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +// Taken from klasse by mattdesl https://github.com/mattdesl/klasse + +function hasGetterOrSetter (def) +{ + return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); +} + +function getProperty (definition, k, isClassDescriptor) +{ + // This may be a lightweight object, OR it might be a property that was defined previously. + + // For simple class descriptors we can just assume its NOT previously defined. + var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k); + + if (!isClassDescriptor && def.value && typeof def.value === 'object') + { + def = def.value; + } + + // This might be a regular property, or it may be a getter/setter the user defined in a class. + if (def && hasGetterOrSetter(def)) + { + if (typeof def.enumerable === 'undefined') + { + def.enumerable = true; + } + + if (typeof def.configurable === 'undefined') + { + def.configurable = true; + } + + return def; + } + else + { + return false; + } +} + +function hasNonConfigurable (obj, k) +{ + var prop = Object.getOwnPropertyDescriptor(obj, k); + + if (!prop) + { + return false; + } + + if (prop.value && typeof prop.value === 'object') + { + prop = prop.value; + } + + if (prop.configurable === false) + { + return true; + } + + return false; +} + +function extend (ctor, definition, isClassDescriptor, extend) +{ + for (var k in definition) + { + if (!definition.hasOwnProperty(k)) + { + continue; + } + + var def = getProperty(definition, k, isClassDescriptor); + + if (def !== false) + { + // If Extends is used, we will check its prototype to see if the final variable exists. + + var parent = extend || ctor; + + if (hasNonConfigurable(parent.prototype, k)) + { + // Just skip the final property + if (Class.ignoreFinals) + { + continue; + } + + // We cannot re-define a property that is configurable=false. + // So we will consider them final and throw an error. This is by + // default so it is clear to the developer what is happening. + // You can set ignoreFinals to true if you need to extend a class + // which has configurable=false; it will simply not re-define final properties. + throw new Error('cannot override final property \'' + k + '\', set Class.ignoreFinals = true to skip'); + } + + Object.defineProperty(ctor.prototype, k, def); + } + else + { + ctor.prototype[k] = definition[k]; + } + } +} + +function mixin (myClass, mixins) +{ + if (!mixins) + { + return; + } + + if (!Array.isArray(mixins)) + { + mixins = [ mixins ]; + } + + for (var i = 0; i < mixins.length; i++) + { + extend(myClass, mixins[i].prototype || mixins[i]); + } +} + +/** + * Creates a new class with the given descriptor. + * The constructor, defined by the name `initialize`, + * is an optional function. If unspecified, an anonymous + * function will be used which calls the parent class (if + * one exists). + * + * You can also use `Extends` and `Mixins` to provide subclassing + * and inheritance. + * + * @class Class + * @constructor + * @param {Object} definition a dictionary of functions for the class + * @example + * + * var MyClass = new Phaser.Class({ + * + * initialize: function() { + * this.foo = 2.0; + * }, + * + * bar: function() { + * return this.foo + 5; + * } + * }); + */ +function Class (definition) +{ + if (!definition) + { + definition = {}; + } + + // The variable name here dictates what we see in Chrome debugger + var initialize; + var Extends; + + if (definition.initialize) + { + if (typeof definition.initialize !== 'function') + { + throw new Error('initialize must be a function'); + } + + initialize = definition.initialize; + + // Usually we should avoid 'delete' in V8 at all costs. + // However, its unlikely to make any performance difference + // here since we only call this on class creation (i.e. not object creation). + delete definition.initialize; + } + else if (definition.Extends) + { + var base = definition.Extends; + + initialize = function () + { + base.apply(this, arguments); + }; + } + else + { + initialize = function () {}; + } + + if (definition.Extends) + { + initialize.prototype = Object.create(definition.Extends.prototype); + initialize.prototype.constructor = initialize; + + // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin) + + Extends = definition.Extends; + + delete definition.Extends; + } + else + { + initialize.prototype.constructor = initialize; + } + + // Grab the mixins, if they are specified... + var mixins = null; + + if (definition.Mixins) + { + mixins = definition.Mixins; + delete definition.Mixins; + } + + // First, mixin if we can. + mixin(initialize, mixins); + + // Now we grab the actual definition which defines the overrides. + extend(initialize, definition, true, Extends); + + return initialize; +} + +Class.extend = extend; +Class.mixin = mixin; +Class.ignoreFinals = false; + +module.exports = Class; + + +/***/ }), + +/***/ "./SpinePlugin.js": +/*!************************!*\ + !*** ./SpinePlugin.js ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(/*! ../../../src/utils/Class */ "../../../src/utils/Class.js"); +var BasePlugin = __webpack_require__(/*! ../../../src/plugins/BasePlugin */ "../../../src/plugins/BasePlugin.js"); +var SpineCanvas = __webpack_require__(/*! SpineCanvas */ "./spine-canvas.js"); + +// var SpineGL = require('SpineGL'); + +/** + * @classdesc + * TODO + * + * @class SpinePlugin + * @constructor + * + * @param {Phaser.Scene} scene - The Scene to which this plugin is being installed. + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager. + */ +var SpinePlugin = new Class({ + + Extends: BasePlugin, + + initialize: + + function SpinePlugin (pluginManager) + { + console.log('SpinePlugin enabled'); + + BasePlugin.call(this, pluginManager); + + // console.log(SpineCanvas.canvas); + // console.log(SpineGL.webgl); + + this.skeletonRenderer = new SpineCanvas.canvas.SkeletonRenderer(this.game.context); + + this.textureManager = this.game.textures; + this.textCache = this.game.cache.text; + this.jsonCache = this.game.cache.json; + + // console.log(this.skeletonRenderer); + // pluginManager.registerGameObject('sprite3D', this.sprite3DFactory, this.sprite3DCreator); + }, + + /** + * Creates a new Sprite3D Game Object and adds it to the Scene. + * + * @method Phaser.GameObjects.GameObjectFactory#sprite3D + * @since 3.0.0 + * + * @param {number} x - The horizontal position of this Game Object. + * @param {number} y - The vertical position of this Game Object. + * @param {number} z - The z position of this Game Object. + * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * + * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created. + */ + sprite3DFactory: function (x, y, z, key, frame) + { + // var sprite = new Sprite3D(this.scene, x, y, z, key, frame); + + // this.displayList.add(sprite.gameObject); + // this.updateList.add(sprite.gameObject); + + // return sprite; + }, + + createSkeleton: function (textureKey, atlasKey, jsonKey) + { + var canvasTexture = new SpineCanvas.canvas.CanvasTexture(this.textureManager.get(textureKey).getSourceImage()); + + var atlas = new SpineCanvas.TextureAtlas(this.textCache.get(atlasKey), function () { return canvasTexture; }); + + var atlasLoader = new SpineCanvas.AtlasAttachmentLoader(atlas); + + var skeletonJson = new SpineCanvas.SkeletonJson(atlasLoader); + + var skeletonData = skeletonJson.readSkeletonData(this.jsonCache.get(jsonKey)); + + var skeleton = new SpineCanvas.Skeleton(skeletonData); + + skeleton.flipY = true; + skeleton.setToSetupPose(); + skeleton.updateWorldTransform(); + + skeleton.setSkinByName('default'); + + return skeleton; + }, + + getBounds: function (skeleton) + { + var offset = new SpineCanvas.Vector2(); + var size = new SpineCanvas.Vector2(); + + skeleton.getBounds(offset, size, []); + + return { offset: offset, size: size }; + }, + + createAnimationState: function (skeleton, animationName) + { + var state = new SpineCanvas.AnimationState(new SpineCanvas.AnimationStateData(skeleton.data)); + + state.setAnimation(0, animationName, true); + + return state; + }, + + /** + * The Scene that owns this plugin is shutting down. + * We need to kill and reset all internal properties as well as stop listening to Scene events. + * + * @method Camera3DPlugin#shutdown + * @private + * @since 3.0.0 + */ + shutdown: function () + { + var eventEmitter = this.systems.events; + + eventEmitter.off('update', this.update, this); + eventEmitter.off('shutdown', this.shutdown, this); + + this.removeAll(); + }, + + /** + * The Scene that owns this plugin is being destroyed. + * We need to shutdown and then kill off all external references. + * + * @method Camera3DPlugin#destroy + * @private + * @since 3.0.0 + */ + destroy: function () + { + this.shutdown(); + + this.pluginManager = null; + this.game = null; + this.scene = null; + this.systems = null; + } + +}); + +module.exports = SpinePlugin; + + +/***/ }), + +/***/ "./spine-canvas.js": +/*!*************************!*\ + !*** ./spine-canvas.js ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/*** IMPORTS FROM imports-loader ***/ +(function() { + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var spine; +(function (spine) { + var Animation = (function () { + function Animation(name, timelines, duration) { + if (name == null) + throw new Error("name cannot be null."); + if (timelines == null) + throw new Error("timelines cannot be null."); + this.name = name; + this.timelines = timelines; + this.duration = duration; + } + Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, pose, direction) { + if (skeleton == null) + throw new Error("skeleton cannot be null."); + if (loop && this.duration != 0) { + time %= this.duration; + if (lastTime > 0) + lastTime %= this.duration; + } + var timelines = this.timelines; + for (var i = 0, n = timelines.length; i < n; i++) + timelines[i].apply(skeleton, lastTime, time, events, alpha, pose, direction); + }; + Animation.binarySearch = function (values, target, step) { + if (step === void 0) { step = 1; } + var low = 0; + var high = values.length / step - 2; + if (high == 0) + return step; + var current = high >>> 1; + while (true) { + if (values[(current + 1) * step] <= target) + low = current + 1; + else + high = current; + if (low == high) + return (low + 1) * step; + current = (low + high) >>> 1; + } + }; + Animation.linearSearch = function (values, target, step) { + for (var i = 0, last = values.length - step; i <= last; i += step) + if (values[i] > target) + return i; + return -1; + }; + return Animation; + }()); + spine.Animation = Animation; + var MixPose; + (function (MixPose) { + MixPose[MixPose["setup"] = 0] = "setup"; + MixPose[MixPose["current"] = 1] = "current"; + MixPose[MixPose["currentLayered"] = 2] = "currentLayered"; + })(MixPose = spine.MixPose || (spine.MixPose = {})); + var MixDirection; + (function (MixDirection) { + MixDirection[MixDirection["in"] = 0] = "in"; + MixDirection[MixDirection["out"] = 1] = "out"; + })(MixDirection = spine.MixDirection || (spine.MixDirection = {})); + var TimelineType; + (function (TimelineType) { + TimelineType[TimelineType["rotate"] = 0] = "rotate"; + TimelineType[TimelineType["translate"] = 1] = "translate"; + TimelineType[TimelineType["scale"] = 2] = "scale"; + TimelineType[TimelineType["shear"] = 3] = "shear"; + TimelineType[TimelineType["attachment"] = 4] = "attachment"; + TimelineType[TimelineType["color"] = 5] = "color"; + TimelineType[TimelineType["deform"] = 6] = "deform"; + TimelineType[TimelineType["event"] = 7] = "event"; + TimelineType[TimelineType["drawOrder"] = 8] = "drawOrder"; + TimelineType[TimelineType["ikConstraint"] = 9] = "ikConstraint"; + TimelineType[TimelineType["transformConstraint"] = 10] = "transformConstraint"; + TimelineType[TimelineType["pathConstraintPosition"] = 11] = "pathConstraintPosition"; + TimelineType[TimelineType["pathConstraintSpacing"] = 12] = "pathConstraintSpacing"; + TimelineType[TimelineType["pathConstraintMix"] = 13] = "pathConstraintMix"; + TimelineType[TimelineType["twoColor"] = 14] = "twoColor"; + })(TimelineType = spine.TimelineType || (spine.TimelineType = {})); + var CurveTimeline = (function () { + function CurveTimeline(frameCount) { + if (frameCount <= 0) + throw new Error("frameCount must be > 0: " + frameCount); + this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE); + } + CurveTimeline.prototype.getFrameCount = function () { + return this.curves.length / CurveTimeline.BEZIER_SIZE + 1; + }; + CurveTimeline.prototype.setLinear = function (frameIndex) { + this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR; + }; + CurveTimeline.prototype.setStepped = function (frameIndex) { + this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED; + }; + CurveTimeline.prototype.getCurveType = function (frameIndex) { + var index = frameIndex * CurveTimeline.BEZIER_SIZE; + if (index == this.curves.length) + return CurveTimeline.LINEAR; + var type = this.curves[index]; + if (type == CurveTimeline.LINEAR) + return CurveTimeline.LINEAR; + if (type == CurveTimeline.STEPPED) + return CurveTimeline.STEPPED; + return CurveTimeline.BEZIER; + }; + CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) { + var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03; + var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006; + var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy; + var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667; + var i = frameIndex * CurveTimeline.BEZIER_SIZE; + var curves = this.curves; + curves[i++] = CurveTimeline.BEZIER; + var x = dfx, y = dfy; + for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) { + curves[i] = x; + curves[i + 1] = y; + dfx += ddfx; + dfy += ddfy; + ddfx += dddfx; + ddfy += dddfy; + x += dfx; + y += dfy; + } + }; + CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) { + percent = spine.MathUtils.clamp(percent, 0, 1); + var curves = this.curves; + var i = frameIndex * CurveTimeline.BEZIER_SIZE; + var type = curves[i]; + if (type == CurveTimeline.LINEAR) + return percent; + if (type == CurveTimeline.STEPPED) + return 0; + i++; + var x = 0; + for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) { + x = curves[i]; + if (x >= percent) { + var prevX = void 0, prevY = void 0; + if (i == start) { + prevX = 0; + prevY = 0; + } + else { + prevX = curves[i - 2]; + prevY = curves[i - 1]; + } + return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX); + } + } + var y = curves[i - 1]; + return y + (1 - y) * (percent - x) / (1 - x); + }; + CurveTimeline.LINEAR = 0; + CurveTimeline.STEPPED = 1; + CurveTimeline.BEZIER = 2; + CurveTimeline.BEZIER_SIZE = 10 * 2 - 1; + return CurveTimeline; + }()); + spine.CurveTimeline = CurveTimeline; + var RotateTimeline = (function (_super) { + __extends(RotateTimeline, _super); + function RotateTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount << 1); + return _this; + } + RotateTimeline.prototype.getPropertyId = function () { + return (TimelineType.rotate << 24) + this.boneIndex; + }; + RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) { + frameIndex <<= 1; + this.frames[frameIndex] = time; + this.frames[frameIndex + RotateTimeline.ROTATION] = degrees; + }; + RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + bone.rotation = bone.data.rotation; + return; + case MixPose.current: + var r_1 = bone.data.rotation - bone.rotation; + r_1 -= (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360; + bone.rotation += r_1 * alpha; + } + return; + } + if (time >= frames[frames.length - RotateTimeline.ENTRIES]) { + if (pose == MixPose.setup) + bone.rotation = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] * alpha; + else { + var r_2 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation; + r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360; + bone.rotation += r_2 * alpha; + } + return; + } + var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES); + var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime)); + var r = frames[frame + RotateTimeline.ROTATION] - prevRotation; + r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; + r = prevRotation + r * percent; + if (pose == MixPose.setup) { + r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; + bone.rotation = bone.data.rotation + r * alpha; + } + else { + r = bone.data.rotation + r - bone.rotation; + r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; + bone.rotation += r * alpha; + } + }; + RotateTimeline.ENTRIES = 2; + RotateTimeline.PREV_TIME = -2; + RotateTimeline.PREV_ROTATION = -1; + RotateTimeline.ROTATION = 1; + return RotateTimeline; + }(CurveTimeline)); + spine.RotateTimeline = RotateTimeline; + var TranslateTimeline = (function (_super) { + __extends(TranslateTimeline, _super); + function TranslateTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES); + return _this; + } + TranslateTimeline.prototype.getPropertyId = function () { + return (TimelineType.translate << 24) + this.boneIndex; + }; + TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) { + frameIndex *= TranslateTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + TranslateTimeline.X] = x; + this.frames[frameIndex + TranslateTimeline.Y] = y; + }; + TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + bone.x = bone.data.x; + bone.y = bone.data.y; + return; + case MixPose.current: + bone.x += (bone.data.x - bone.x) * alpha; + bone.y += (bone.data.y - bone.y) * alpha; + } + return; + } + var x = 0, y = 0; + if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) { + x = frames[frames.length + TranslateTimeline.PREV_X]; + y = frames[frames.length + TranslateTimeline.PREV_Y]; + } + else { + var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES); + x = frames[frame + TranslateTimeline.PREV_X]; + y = frames[frame + TranslateTimeline.PREV_Y]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime)); + x += (frames[frame + TranslateTimeline.X] - x) * percent; + y += (frames[frame + TranslateTimeline.Y] - y) * percent; + } + if (pose == MixPose.setup) { + bone.x = bone.data.x + x * alpha; + bone.y = bone.data.y + y * alpha; + } + else { + bone.x += (bone.data.x + x - bone.x) * alpha; + bone.y += (bone.data.y + y - bone.y) * alpha; + } + }; + TranslateTimeline.ENTRIES = 3; + TranslateTimeline.PREV_TIME = -3; + TranslateTimeline.PREV_X = -2; + TranslateTimeline.PREV_Y = -1; + TranslateTimeline.X = 1; + TranslateTimeline.Y = 2; + return TranslateTimeline; + }(CurveTimeline)); + spine.TranslateTimeline = TranslateTimeline; + var ScaleTimeline = (function (_super) { + __extends(ScaleTimeline, _super); + function ScaleTimeline(frameCount) { + return _super.call(this, frameCount) || this; + } + ScaleTimeline.prototype.getPropertyId = function () { + return (TimelineType.scale << 24) + this.boneIndex; + }; + ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + bone.scaleX = bone.data.scaleX; + bone.scaleY = bone.data.scaleY; + return; + case MixPose.current: + bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha; + bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha; + } + return; + } + var x = 0, y = 0; + if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) { + x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX; + y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY; + } + else { + var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES); + x = frames[frame + ScaleTimeline.PREV_X]; + y = frames[frame + ScaleTimeline.PREV_Y]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime)); + x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX; + y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY; + } + if (alpha == 1) { + bone.scaleX = x; + bone.scaleY = y; + } + else { + var bx = 0, by = 0; + if (pose == MixPose.setup) { + bx = bone.data.scaleX; + by = bone.data.scaleY; + } + else { + bx = bone.scaleX; + by = bone.scaleY; + } + if (direction == MixDirection.out) { + x = Math.abs(x) * spine.MathUtils.signum(bx); + y = Math.abs(y) * spine.MathUtils.signum(by); + } + else { + bx = Math.abs(bx) * spine.MathUtils.signum(x); + by = Math.abs(by) * spine.MathUtils.signum(y); + } + bone.scaleX = bx + (x - bx) * alpha; + bone.scaleY = by + (y - by) * alpha; + } + }; + return ScaleTimeline; + }(TranslateTimeline)); + spine.ScaleTimeline = ScaleTimeline; + var ShearTimeline = (function (_super) { + __extends(ShearTimeline, _super); + function ShearTimeline(frameCount) { + return _super.call(this, frameCount) || this; + } + ShearTimeline.prototype.getPropertyId = function () { + return (TimelineType.shear << 24) + this.boneIndex; + }; + ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) { + var frames = this.frames; + var bone = skeleton.bones[this.boneIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + bone.shearX = bone.data.shearX; + bone.shearY = bone.data.shearY; + return; + case MixPose.current: + bone.shearX += (bone.data.shearX - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY - bone.shearY) * alpha; + } + return; + } + var x = 0, y = 0; + if (time >= frames[frames.length - ShearTimeline.ENTRIES]) { + x = frames[frames.length + ShearTimeline.PREV_X]; + y = frames[frames.length + ShearTimeline.PREV_Y]; + } + else { + var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES); + x = frames[frame + ShearTimeline.PREV_X]; + y = frames[frame + ShearTimeline.PREV_Y]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime)); + x = x + (frames[frame + ShearTimeline.X] - x) * percent; + y = y + (frames[frame + ShearTimeline.Y] - y) * percent; + } + if (pose == MixPose.setup) { + bone.shearX = bone.data.shearX + x * alpha; + bone.shearY = bone.data.shearY + y * alpha; + } + else { + bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha; + bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha; + } + }; + return ShearTimeline; + }(TranslateTimeline)); + spine.ShearTimeline = ShearTimeline; + var ColorTimeline = (function (_super) { + __extends(ColorTimeline, _super); + function ColorTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES); + return _this; + } + ColorTimeline.prototype.getPropertyId = function () { + return (TimelineType.color << 24) + this.slotIndex; + }; + ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) { + frameIndex *= ColorTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + ColorTimeline.R] = r; + this.frames[frameIndex + ColorTimeline.G] = g; + this.frames[frameIndex + ColorTimeline.B] = b; + this.frames[frameIndex + ColorTimeline.A] = a; + }; + ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) { + var slot = skeleton.slots[this.slotIndex]; + var frames = this.frames; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + slot.color.setFromColor(slot.data.color); + return; + case MixPose.current: + var color = slot.color, setup = slot.data.color; + color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha); + } + return; + } + var r = 0, g = 0, b = 0, a = 0; + if (time >= frames[frames.length - ColorTimeline.ENTRIES]) { + var i = frames.length; + r = frames[i + ColorTimeline.PREV_R]; + g = frames[i + ColorTimeline.PREV_G]; + b = frames[i + ColorTimeline.PREV_B]; + a = frames[i + ColorTimeline.PREV_A]; + } + else { + var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES); + r = frames[frame + ColorTimeline.PREV_R]; + g = frames[frame + ColorTimeline.PREV_G]; + b = frames[frame + ColorTimeline.PREV_B]; + a = frames[frame + ColorTimeline.PREV_A]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime)); + r += (frames[frame + ColorTimeline.R] - r) * percent; + g += (frames[frame + ColorTimeline.G] - g) * percent; + b += (frames[frame + ColorTimeline.B] - b) * percent; + a += (frames[frame + ColorTimeline.A] - a) * percent; + } + if (alpha == 1) + slot.color.set(r, g, b, a); + else { + var color = slot.color; + if (pose == MixPose.setup) + color.setFromColor(slot.data.color); + color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha); + } + }; + ColorTimeline.ENTRIES = 5; + ColorTimeline.PREV_TIME = -5; + ColorTimeline.PREV_R = -4; + ColorTimeline.PREV_G = -3; + ColorTimeline.PREV_B = -2; + ColorTimeline.PREV_A = -1; + ColorTimeline.R = 1; + ColorTimeline.G = 2; + ColorTimeline.B = 3; + ColorTimeline.A = 4; + return ColorTimeline; + }(CurveTimeline)); + spine.ColorTimeline = ColorTimeline; + var TwoColorTimeline = (function (_super) { + __extends(TwoColorTimeline, _super); + function TwoColorTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES); + return _this; + } + TwoColorTimeline.prototype.getPropertyId = function () { + return (TimelineType.twoColor << 24) + this.slotIndex; + }; + TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) { + frameIndex *= TwoColorTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + TwoColorTimeline.R] = r; + this.frames[frameIndex + TwoColorTimeline.G] = g; + this.frames[frameIndex + TwoColorTimeline.B] = b; + this.frames[frameIndex + TwoColorTimeline.A] = a; + this.frames[frameIndex + TwoColorTimeline.R2] = r2; + this.frames[frameIndex + TwoColorTimeline.G2] = g2; + this.frames[frameIndex + TwoColorTimeline.B2] = b2; + }; + TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) { + var slot = skeleton.slots[this.slotIndex]; + var frames = this.frames; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + slot.color.setFromColor(slot.data.color); + slot.darkColor.setFromColor(slot.data.darkColor); + return; + case MixPose.current: + var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor; + light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha); + dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0); + } + return; + } + var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0; + if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) { + var i = frames.length; + r = frames[i + TwoColorTimeline.PREV_R]; + g = frames[i + TwoColorTimeline.PREV_G]; + b = frames[i + TwoColorTimeline.PREV_B]; + a = frames[i + TwoColorTimeline.PREV_A]; + r2 = frames[i + TwoColorTimeline.PREV_R2]; + g2 = frames[i + TwoColorTimeline.PREV_G2]; + b2 = frames[i + TwoColorTimeline.PREV_B2]; + } + else { + var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES); + r = frames[frame + TwoColorTimeline.PREV_R]; + g = frames[frame + TwoColorTimeline.PREV_G]; + b = frames[frame + TwoColorTimeline.PREV_B]; + a = frames[frame + TwoColorTimeline.PREV_A]; + r2 = frames[frame + TwoColorTimeline.PREV_R2]; + g2 = frames[frame + TwoColorTimeline.PREV_G2]; + b2 = frames[frame + TwoColorTimeline.PREV_B2]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime)); + r += (frames[frame + TwoColorTimeline.R] - r) * percent; + g += (frames[frame + TwoColorTimeline.G] - g) * percent; + b += (frames[frame + TwoColorTimeline.B] - b) * percent; + a += (frames[frame + TwoColorTimeline.A] - a) * percent; + r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent; + g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent; + b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent; + } + if (alpha == 1) { + slot.color.set(r, g, b, a); + slot.darkColor.set(r2, g2, b2, 1); + } + else { + var light = slot.color, dark = slot.darkColor; + if (pose == MixPose.setup) { + light.setFromColor(slot.data.color); + dark.setFromColor(slot.data.darkColor); + } + light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha); + dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0); + } + }; + TwoColorTimeline.ENTRIES = 8; + TwoColorTimeline.PREV_TIME = -8; + TwoColorTimeline.PREV_R = -7; + TwoColorTimeline.PREV_G = -6; + TwoColorTimeline.PREV_B = -5; + TwoColorTimeline.PREV_A = -4; + TwoColorTimeline.PREV_R2 = -3; + TwoColorTimeline.PREV_G2 = -2; + TwoColorTimeline.PREV_B2 = -1; + TwoColorTimeline.R = 1; + TwoColorTimeline.G = 2; + TwoColorTimeline.B = 3; + TwoColorTimeline.A = 4; + TwoColorTimeline.R2 = 5; + TwoColorTimeline.G2 = 6; + TwoColorTimeline.B2 = 7; + return TwoColorTimeline; + }(CurveTimeline)); + spine.TwoColorTimeline = TwoColorTimeline; + var AttachmentTimeline = (function () { + function AttachmentTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.attachmentNames = new Array(frameCount); + } + AttachmentTimeline.prototype.getPropertyId = function () { + return (TimelineType.attachment << 24) + this.slotIndex; + }; + AttachmentTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) { + this.frames[frameIndex] = time; + this.attachmentNames[frameIndex] = attachmentName; + }; + AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) { + var slot = skeleton.slots[this.slotIndex]; + if (direction == MixDirection.out && pose == MixPose.setup) { + var attachmentName_1 = slot.data.attachmentName; + slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + return; + } + var frames = this.frames; + if (time < frames[0]) { + if (pose == MixPose.setup) { + var attachmentName_2 = slot.data.attachmentName; + slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); + } + return; + } + var frameIndex = 0; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = Animation.binarySearch(frames, time, 1) - 1; + var attachmentName = this.attachmentNames[frameIndex]; + skeleton.slots[this.slotIndex] + .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); + }; + return AttachmentTimeline; + }()); + spine.AttachmentTimeline = AttachmentTimeline; + var zeros = null; + var DeformTimeline = (function (_super) { + __extends(DeformTimeline, _super); + function DeformTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount); + _this.frameVertices = new Array(frameCount); + if (zeros == null) + zeros = spine.Utils.newFloatArray(64); + return _this; + } + DeformTimeline.prototype.getPropertyId = function () { + return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex; + }; + DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) { + this.frames[frameIndex] = time; + this.frameVertices[frameIndex] = vertices; + }; + DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + var slot = skeleton.slots[this.slotIndex]; + var slotAttachment = slot.getAttachment(); + if (!(slotAttachment instanceof spine.VertexAttachment) || !slotAttachment.applyDeform(this.attachment)) + return; + var verticesArray = slot.attachmentVertices; + if (verticesArray.length == 0) + alpha = 1; + var frameVertices = this.frameVertices; + var vertexCount = frameVertices[0].length; + var frames = this.frames; + if (time < frames[0]) { + var vertexAttachment = slotAttachment; + switch (pose) { + case MixPose.setup: + verticesArray.length = 0; + return; + case MixPose.current: + if (alpha == 1) { + verticesArray.length = 0; + break; + } + var vertices_1 = spine.Utils.setArraySize(verticesArray, vertexCount); + if (vertexAttachment.bones == null) { + var setupVertices = vertexAttachment.vertices; + for (var i = 0; i < vertexCount; i++) + vertices_1[i] += (setupVertices[i] - vertices_1[i]) * alpha; + } + else { + alpha = 1 - alpha; + for (var i = 0; i < vertexCount; i++) + vertices_1[i] *= alpha; + } + } + return; + } + var vertices = spine.Utils.setArraySize(verticesArray, vertexCount); + if (time >= frames[frames.length - 1]) { + var lastVertices = frameVertices[frames.length - 1]; + if (alpha == 1) { + spine.Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount); + } + else if (pose == MixPose.setup) { + var vertexAttachment = slotAttachment; + if (vertexAttachment.bones == null) { + var setupVertices_1 = vertexAttachment.vertices; + for (var i_1 = 0; i_1 < vertexCount; i_1++) { + var setup = setupVertices_1[i_1]; + vertices[i_1] = setup + (lastVertices[i_1] - setup) * alpha; + } + } + else { + for (var i_2 = 0; i_2 < vertexCount; i_2++) + vertices[i_2] = lastVertices[i_2] * alpha; + } + } + else { + for (var i_3 = 0; i_3 < vertexCount; i_3++) + vertices[i_3] += (lastVertices[i_3] - vertices[i_3]) * alpha; + } + return; + } + var frame = Animation.binarySearch(frames, time); + var prevVertices = frameVertices[frame - 1]; + var nextVertices = frameVertices[frame]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime)); + if (alpha == 1) { + for (var i_4 = 0; i_4 < vertexCount; i_4++) { + var prev = prevVertices[i_4]; + vertices[i_4] = prev + (nextVertices[i_4] - prev) * percent; + } + } + else if (pose == MixPose.setup) { + var vertexAttachment = slotAttachment; + if (vertexAttachment.bones == null) { + var setupVertices_2 = vertexAttachment.vertices; + for (var i_5 = 0; i_5 < vertexCount; i_5++) { + var prev = prevVertices[i_5], setup = setupVertices_2[i_5]; + vertices[i_5] = setup + (prev + (nextVertices[i_5] - prev) * percent - setup) * alpha; + } + } + else { + for (var i_6 = 0; i_6 < vertexCount; i_6++) { + var prev = prevVertices[i_6]; + vertices[i_6] = (prev + (nextVertices[i_6] - prev) * percent) * alpha; + } + } + } + else { + for (var i_7 = 0; i_7 < vertexCount; i_7++) { + var prev = prevVertices[i_7]; + vertices[i_7] += (prev + (nextVertices[i_7] - prev) * percent - vertices[i_7]) * alpha; + } + } + }; + return DeformTimeline; + }(CurveTimeline)); + spine.DeformTimeline = DeformTimeline; + var EventTimeline = (function () { + function EventTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.events = new Array(frameCount); + } + EventTimeline.prototype.getPropertyId = function () { + return TimelineType.event << 24; + }; + EventTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + EventTimeline.prototype.setFrame = function (frameIndex, event) { + this.frames[frameIndex] = event.time; + this.events[frameIndex] = event; + }; + EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + if (firedEvents == null) + return; + var frames = this.frames; + var frameCount = this.frames.length; + if (lastTime > time) { + this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, pose, direction); + lastTime = -1; + } + else if (lastTime >= frames[frameCount - 1]) + return; + if (time < frames[0]) + return; + var frame = 0; + if (lastTime < frames[0]) + frame = 0; + else { + frame = Animation.binarySearch(frames, lastTime); + var frameTime = frames[frame]; + while (frame > 0) { + if (frames[frame - 1] != frameTime) + break; + frame--; + } + } + for (; frame < frameCount && time >= frames[frame]; frame++) + firedEvents.push(this.events[frame]); + }; + return EventTimeline; + }()); + spine.EventTimeline = EventTimeline; + var DrawOrderTimeline = (function () { + function DrawOrderTimeline(frameCount) { + this.frames = spine.Utils.newFloatArray(frameCount); + this.drawOrders = new Array(frameCount); + } + DrawOrderTimeline.prototype.getPropertyId = function () { + return TimelineType.drawOrder << 24; + }; + DrawOrderTimeline.prototype.getFrameCount = function () { + return this.frames.length; + }; + DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) { + this.frames[frameIndex] = time; + this.drawOrders[frameIndex] = drawOrder; + }; + DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + var drawOrder = skeleton.drawOrder; + var slots = skeleton.slots; + if (direction == MixDirection.out && pose == MixPose.setup) { + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + return; + } + var frames = this.frames; + if (time < frames[0]) { + if (pose == MixPose.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + return; + } + var frame = 0; + if (time >= frames[frames.length - 1]) + frame = frames.length - 1; + else + frame = Animation.binarySearch(frames, time) - 1; + var drawOrderToSetupIndex = this.drawOrders[frame]; + if (drawOrderToSetupIndex == null) + spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length); + else { + for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++) + drawOrder[i] = slots[drawOrderToSetupIndex[i]]; + } + }; + return DrawOrderTimeline; + }()); + spine.DrawOrderTimeline = DrawOrderTimeline; + var IkConstraintTimeline = (function (_super) { + __extends(IkConstraintTimeline, _super); + function IkConstraintTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES); + return _this; + } + IkConstraintTimeline.prototype.getPropertyId = function () { + return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex; + }; + IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, bendDirection) { + frameIndex *= IkConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + IkConstraintTimeline.MIX] = mix; + this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection; + }; + IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + var frames = this.frames; + var constraint = skeleton.ikConstraints[this.ikConstraintIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + constraint.mix = constraint.data.mix; + constraint.bendDirection = constraint.data.bendDirection; + return; + case MixPose.current: + constraint.mix += (constraint.data.mix - constraint.mix) * alpha; + constraint.bendDirection = constraint.data.bendDirection; + } + return; + } + if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) { + if (pose == MixPose.setup) { + constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha; + constraint.bendDirection = direction == MixDirection.out ? constraint.data.bendDirection + : frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]; + } + else { + constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha; + if (direction == MixDirection["in"]) + constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION]; + } + return; + } + var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES); + var mix = frames[frame + IkConstraintTimeline.PREV_MIX]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime)); + if (pose == MixPose.setup) { + constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha; + constraint.bendDirection = direction == MixDirection.out ? constraint.data.bendDirection : frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]; + } + else { + constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha; + if (direction == MixDirection["in"]) + constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION]; + } + }; + IkConstraintTimeline.ENTRIES = 3; + IkConstraintTimeline.PREV_TIME = -3; + IkConstraintTimeline.PREV_MIX = -2; + IkConstraintTimeline.PREV_BEND_DIRECTION = -1; + IkConstraintTimeline.MIX = 1; + IkConstraintTimeline.BEND_DIRECTION = 2; + return IkConstraintTimeline; + }(CurveTimeline)); + spine.IkConstraintTimeline = IkConstraintTimeline; + var TransformConstraintTimeline = (function (_super) { + __extends(TransformConstraintTimeline, _super); + function TransformConstraintTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES); + return _this; + } + TransformConstraintTimeline.prototype.getPropertyId = function () { + return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex; + }; + TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) { + frameIndex *= TransformConstraintTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix; + this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix; + this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix; + this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix; + }; + TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + var frames = this.frames; + var constraint = skeleton.transformConstraints[this.transformConstraintIndex]; + if (time < frames[0]) { + var data = constraint.data; + switch (pose) { + case MixPose.setup: + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + constraint.scaleMix = data.scaleMix; + constraint.shearMix = data.shearMix; + return; + case MixPose.current: + constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha; + constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha; + constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha; + constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha; + } + return; + } + var rotate = 0, translate = 0, scale = 0, shear = 0; + if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) { + var i = frames.length; + rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE]; + translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE]; + scale = frames[i + TransformConstraintTimeline.PREV_SCALE]; + shear = frames[i + TransformConstraintTimeline.PREV_SHEAR]; + } + else { + var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES); + rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE]; + translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE]; + scale = frames[frame + TransformConstraintTimeline.PREV_SCALE]; + shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime)); + rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent; + translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent; + scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent; + shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent; + } + if (pose == MixPose.setup) { + var data = constraint.data; + constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha; + constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha; + constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha; + constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha; + } + else { + constraint.rotateMix += (rotate - constraint.rotateMix) * alpha; + constraint.translateMix += (translate - constraint.translateMix) * alpha; + constraint.scaleMix += (scale - constraint.scaleMix) * alpha; + constraint.shearMix += (shear - constraint.shearMix) * alpha; + } + }; + TransformConstraintTimeline.ENTRIES = 5; + TransformConstraintTimeline.PREV_TIME = -5; + TransformConstraintTimeline.PREV_ROTATE = -4; + TransformConstraintTimeline.PREV_TRANSLATE = -3; + TransformConstraintTimeline.PREV_SCALE = -2; + TransformConstraintTimeline.PREV_SHEAR = -1; + TransformConstraintTimeline.ROTATE = 1; + TransformConstraintTimeline.TRANSLATE = 2; + TransformConstraintTimeline.SCALE = 3; + TransformConstraintTimeline.SHEAR = 4; + return TransformConstraintTimeline; + }(CurveTimeline)); + spine.TransformConstraintTimeline = TransformConstraintTimeline; + var PathConstraintPositionTimeline = (function (_super) { + __extends(PathConstraintPositionTimeline, _super); + function PathConstraintPositionTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES); + return _this; + } + PathConstraintPositionTimeline.prototype.getPropertyId = function () { + return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex; + }; + PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) { + frameIndex *= PathConstraintPositionTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value; + }; + PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + var frames = this.frames; + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + constraint.position = constraint.data.position; + return; + case MixPose.current: + constraint.position += (constraint.data.position - constraint.position) * alpha; + } + return; + } + var position = 0; + if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES]) + position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE]; + else { + var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES); + position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime)); + position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent; + } + if (pose == MixPose.setup) + constraint.position = constraint.data.position + (position - constraint.data.position) * alpha; + else + constraint.position += (position - constraint.position) * alpha; + }; + PathConstraintPositionTimeline.ENTRIES = 2; + PathConstraintPositionTimeline.PREV_TIME = -2; + PathConstraintPositionTimeline.PREV_VALUE = -1; + PathConstraintPositionTimeline.VALUE = 1; + return PathConstraintPositionTimeline; + }(CurveTimeline)); + spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline; + var PathConstraintSpacingTimeline = (function (_super) { + __extends(PathConstraintSpacingTimeline, _super); + function PathConstraintSpacingTimeline(frameCount) { + return _super.call(this, frameCount) || this; + } + PathConstraintSpacingTimeline.prototype.getPropertyId = function () { + return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex; + }; + PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + var frames = this.frames; + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + constraint.spacing = constraint.data.spacing; + return; + case MixPose.current: + constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha; + } + return; + } + var spacing = 0; + if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES]) + spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE]; + else { + var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES); + spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime)); + spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent; + } + if (pose == MixPose.setup) + constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha; + else + constraint.spacing += (spacing - constraint.spacing) * alpha; + }; + return PathConstraintSpacingTimeline; + }(PathConstraintPositionTimeline)); + spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline; + var PathConstraintMixTimeline = (function (_super) { + __extends(PathConstraintMixTimeline, _super); + function PathConstraintMixTimeline(frameCount) { + var _this = _super.call(this, frameCount) || this; + _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES); + return _this; + } + PathConstraintMixTimeline.prototype.getPropertyId = function () { + return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex; + }; + PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) { + frameIndex *= PathConstraintMixTimeline.ENTRIES; + this.frames[frameIndex] = time; + this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix; + this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix; + }; + PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) { + var frames = this.frames; + var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; + if (time < frames[0]) { + switch (pose) { + case MixPose.setup: + constraint.rotateMix = constraint.data.rotateMix; + constraint.translateMix = constraint.data.translateMix; + return; + case MixPose.current: + constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha; + constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha; + } + return; + } + var rotate = 0, translate = 0; + if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) { + rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE]; + translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE]; + } + else { + var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES); + rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE]; + translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE]; + var frameTime = frames[frame]; + var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime)); + rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent; + translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent; + } + if (pose == MixPose.setup) { + constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha; + constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha; + } + else { + constraint.rotateMix += (rotate - constraint.rotateMix) * alpha; + constraint.translateMix += (translate - constraint.translateMix) * alpha; + } + }; + PathConstraintMixTimeline.ENTRIES = 3; + PathConstraintMixTimeline.PREV_TIME = -3; + PathConstraintMixTimeline.PREV_ROTATE = -2; + PathConstraintMixTimeline.PREV_TRANSLATE = -1; + PathConstraintMixTimeline.ROTATE = 1; + PathConstraintMixTimeline.TRANSLATE = 2; + return PathConstraintMixTimeline; + }(CurveTimeline)); + spine.PathConstraintMixTimeline = PathConstraintMixTimeline; +})(spine || (spine = {})); +var spine; +(function (spine) { + var AnimationState = (function () { + function AnimationState(data) { + this.tracks = new Array(); + this.events = new Array(); + this.listeners = new Array(); + this.queue = new EventQueue(this); + this.propertyIDs = new spine.IntSet(); + this.mixingTo = new Array(); + this.animationsChanged = false; + this.timeScale = 1; + this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); }); + this.data = data; + } + AnimationState.prototype.update = function (delta) { + delta *= this.timeScale; + var tracks = this.tracks; + for (var i = 0, n = tracks.length; i < n; i++) { + var current = tracks[i]; + if (current == null) + continue; + current.animationLast = current.nextAnimationLast; + current.trackLast = current.nextTrackLast; + var currentDelta = delta * current.timeScale; + if (current.delay > 0) { + current.delay -= currentDelta; + if (current.delay > 0) + continue; + currentDelta = -current.delay; + current.delay = 0; + } + var next = current.next; + if (next != null) { + var nextTime = current.trackLast - next.delay; + if (nextTime >= 0) { + next.delay = 0; + next.trackTime = nextTime + delta * next.timeScale; + current.trackTime += currentDelta; + this.setCurrent(i, next, true); + while (next.mixingFrom != null) { + next.mixTime += currentDelta; + next = next.mixingFrom; + } + continue; + } + } + else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) { + tracks[i] = null; + this.queue.end(current); + this.disposeNext(current); + continue; + } + if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) { + var from = current.mixingFrom; + current.mixingFrom = null; + while (from != null) { + this.queue.end(from); + from = from.mixingFrom; + } + } + current.trackTime += currentDelta; + } + this.queue.drain(); + }; + AnimationState.prototype.updateMixingFrom = function (to, delta) { + var from = to.mixingFrom; + if (from == null) + return true; + var finished = this.updateMixingFrom(from, delta); + from.animationLast = from.nextAnimationLast; + from.trackLast = from.nextTrackLast; + if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) { + if (from.totalAlpha == 0 || to.mixDuration == 0) { + to.mixingFrom = from.mixingFrom; + to.interruptAlpha = from.interruptAlpha; + this.queue.end(from); + } + return finished; + } + from.trackTime += delta * from.timeScale; + to.mixTime += delta * to.timeScale; + return false; + }; + AnimationState.prototype.apply = function (skeleton) { + if (skeleton == null) + throw new Error("skeleton cannot be null."); + if (this.animationsChanged) + this._animationsChanged(); + var events = this.events; + var tracks = this.tracks; + var applied = false; + for (var i = 0, n = tracks.length; i < n; i++) { + var current = tracks[i]; + if (current == null || current.delay > 0) + continue; + applied = true; + var currentPose = i == 0 ? spine.MixPose.current : spine.MixPose.currentLayered; + var mix = current.alpha; + if (current.mixingFrom != null) + mix *= this.applyMixingFrom(current, skeleton, currentPose); + else if (current.trackTime >= current.trackEnd && current.next == null) + mix = 0; + var animationLast = current.animationLast, animationTime = current.getAnimationTime(); + var timelineCount = current.animation.timelines.length; + var timelines = current.animation.timelines; + if (mix == 1) { + for (var ii = 0; ii < timelineCount; ii++) + timelines[ii].apply(skeleton, animationLast, animationTime, events, 1, spine.MixPose.setup, spine.MixDirection["in"]); + } + else { + var timelineData = current.timelineData; + var firstFrame = current.timelinesRotation.length == 0; + if (firstFrame) + spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); + var timelinesRotation = current.timelinesRotation; + for (var ii = 0; ii < timelineCount; ii++) { + var timeline = timelines[ii]; + var pose = timelineData[ii] >= AnimationState.FIRST ? spine.MixPose.setup : currentPose; + if (timeline instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline, skeleton, animationTime, mix, pose, timelinesRotation, ii << 1, firstFrame); + } + else { + spine.Utils.webkit602BugfixHelper(mix, pose); + timeline.apply(skeleton, animationLast, animationTime, events, mix, pose, spine.MixDirection["in"]); + } + } + } + this.queueEvents(current, animationTime); + events.length = 0; + current.nextAnimationLast = animationTime; + current.nextTrackLast = current.trackTime; + } + this.queue.drain(); + return applied; + }; + AnimationState.prototype.applyMixingFrom = function (to, skeleton, currentPose) { + var from = to.mixingFrom; + if (from.mixingFrom != null) + this.applyMixingFrom(from, skeleton, currentPose); + var mix = 0; + if (to.mixDuration == 0) { + mix = 1; + currentPose = spine.MixPose.setup; + } + else { + mix = to.mixTime / to.mixDuration; + if (mix > 1) + mix = 1; + } + var events = mix < from.eventThreshold ? this.events : null; + var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold; + var animationLast = from.animationLast, animationTime = from.getAnimationTime(); + var timelineCount = from.animation.timelines.length; + var timelines = from.animation.timelines; + var timelineData = from.timelineData; + var timelineDipMix = from.timelineDipMix; + var firstFrame = from.timelinesRotation.length == 0; + if (firstFrame) + spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null); + var timelinesRotation = from.timelinesRotation; + var pose; + var alphaDip = from.alpha * to.interruptAlpha, alphaMix = alphaDip * (1 - mix), alpha = 0; + from.totalAlpha = 0; + for (var i = 0; i < timelineCount; i++) { + var timeline = timelines[i]; + switch (timelineData[i]) { + case AnimationState.SUBSEQUENT: + if (!attachments && timeline instanceof spine.AttachmentTimeline) + continue; + if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) + continue; + pose = currentPose; + alpha = alphaMix; + break; + case AnimationState.FIRST: + pose = spine.MixPose.setup; + alpha = alphaMix; + break; + case AnimationState.DIP: + pose = spine.MixPose.setup; + alpha = alphaDip; + break; + default: + pose = spine.MixPose.setup; + alpha = alphaDip; + var dipMix = timelineDipMix[i]; + alpha *= Math.max(0, 1 - dipMix.mixTime / dipMix.mixDuration); + break; + } + from.totalAlpha += alpha; + if (timeline instanceof spine.RotateTimeline) + this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i << 1, firstFrame); + else { + spine.Utils.webkit602BugfixHelper(alpha, pose); + timeline.apply(skeleton, animationLast, animationTime, events, alpha, pose, spine.MixDirection.out); + } + } + if (to.mixDuration > 0) + this.queueEvents(from, animationTime); + this.events.length = 0; + from.nextAnimationLast = animationTime; + from.nextTrackLast = from.trackTime; + return mix; + }; + AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, pose, timelinesRotation, i, firstFrame) { + if (firstFrame) + timelinesRotation[i] = 0; + if (alpha == 1) { + timeline.apply(skeleton, 0, time, null, 1, pose, spine.MixDirection["in"]); + return; + } + var rotateTimeline = timeline; + var frames = rotateTimeline.frames; + var bone = skeleton.bones[rotateTimeline.boneIndex]; + if (time < frames[0]) { + if (pose == spine.MixPose.setup) + bone.rotation = bone.data.rotation; + return; + } + var r2 = 0; + if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES]) + r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION]; + else { + var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES); + var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION]; + var frameTime = frames[frame]; + var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime)); + r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation; + r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360; + r2 = prevRotation + r2 * percent + bone.data.rotation; + r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360; + } + var r1 = pose == spine.MixPose.setup ? bone.data.rotation : bone.rotation; + var total = 0, diff = r2 - r1; + if (diff == 0) { + total = timelinesRotation[i]; + } + else { + diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360; + var lastTotal = 0, lastDiff = 0; + if (firstFrame) { + lastTotal = 0; + lastDiff = diff; + } + else { + lastTotal = timelinesRotation[i]; + lastDiff = timelinesRotation[i + 1]; + } + var current = diff > 0, dir = lastTotal >= 0; + if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) { + if (Math.abs(lastTotal) > 180) + lastTotal += 360 * spine.MathUtils.signum(lastTotal); + dir = current; + } + total = diff + lastTotal - lastTotal % 360; + if (dir != current) + total += 360 * spine.MathUtils.signum(lastTotal); + timelinesRotation[i] = total; + } + timelinesRotation[i + 1] = diff; + r1 += total * alpha; + bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360; + }; + AnimationState.prototype.queueEvents = function (entry, animationTime) { + var animationStart = entry.animationStart, animationEnd = entry.animationEnd; + var duration = animationEnd - animationStart; + var trackLastWrapped = entry.trackLast % duration; + var events = this.events; + var i = 0, n = events.length; + for (; i < n; i++) { + var event_1 = events[i]; + if (event_1.time < trackLastWrapped) + break; + if (event_1.time > animationEnd) + continue; + this.queue.event(entry, event_1); + } + var complete = false; + if (entry.loop) + complete = duration == 0 || trackLastWrapped > entry.trackTime % duration; + else + complete = animationTime >= animationEnd && entry.animationLast < animationEnd; + if (complete) + this.queue.complete(entry); + for (; i < n; i++) { + var event_2 = events[i]; + if (event_2.time < animationStart) + continue; + this.queue.event(entry, events[i]); + } + }; + AnimationState.prototype.clearTracks = function () { + var oldDrainDisabled = this.queue.drainDisabled; + this.queue.drainDisabled = true; + for (var i = 0, n = this.tracks.length; i < n; i++) + this.clearTrack(i); + this.tracks.length = 0; + this.queue.drainDisabled = oldDrainDisabled; + this.queue.drain(); + }; + AnimationState.prototype.clearTrack = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return; + var current = this.tracks[trackIndex]; + if (current == null) + return; + this.queue.end(current); + this.disposeNext(current); + var entry = current; + while (true) { + var from = entry.mixingFrom; + if (from == null) + break; + this.queue.end(from); + entry.mixingFrom = null; + entry = from; + } + this.tracks[current.trackIndex] = null; + this.queue.drain(); + }; + AnimationState.prototype.setCurrent = function (index, current, interrupt) { + var from = this.expandToIndex(index); + this.tracks[index] = current; + if (from != null) { + if (interrupt) + this.queue.interrupt(from); + current.mixingFrom = from; + current.mixTime = 0; + if (from.mixingFrom != null && from.mixDuration > 0) + current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration); + from.timelinesRotation.length = 0; + } + this.queue.start(current); + }; + AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) { + var animation = this.data.skeletonData.findAnimation(animationName); + if (animation == null) + throw new Error("Animation not found: " + animationName); + return this.setAnimationWith(trackIndex, animation, loop); + }; + AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) { + if (animation == null) + throw new Error("animation cannot be null."); + var interrupt = true; + var current = this.expandToIndex(trackIndex); + if (current != null) { + if (current.nextTrackLast == -1) { + this.tracks[trackIndex] = current.mixingFrom; + this.queue.interrupt(current); + this.queue.end(current); + this.disposeNext(current); + current = current.mixingFrom; + interrupt = false; + } + else + this.disposeNext(current); + } + var entry = this.trackEntry(trackIndex, animation, loop, current); + this.setCurrent(trackIndex, entry, interrupt); + this.queue.drain(); + return entry; + }; + AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) { + var animation = this.data.skeletonData.findAnimation(animationName); + if (animation == null) + throw new Error("Animation not found: " + animationName); + return this.addAnimationWith(trackIndex, animation, loop, delay); + }; + AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) { + if (animation == null) + throw new Error("animation cannot be null."); + var last = this.expandToIndex(trackIndex); + if (last != null) { + while (last.next != null) + last = last.next; + } + var entry = this.trackEntry(trackIndex, animation, loop, last); + if (last == null) { + this.setCurrent(trackIndex, entry, true); + this.queue.drain(); + } + else { + last.next = entry; + if (delay <= 0) { + var duration = last.animationEnd - last.animationStart; + if (duration != 0) { + if (last.loop) + delay += duration * (1 + ((last.trackTime / duration) | 0)); + else + delay += duration; + delay -= this.data.getMix(last.animation, animation); + } + else + delay = 0; + } + } + entry.delay = delay; + return entry; + }; + AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) { + var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false); + entry.mixDuration = mixDuration; + entry.trackEnd = mixDuration; + return entry; + }; + AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) { + if (delay <= 0) + delay -= mixDuration; + var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay); + entry.mixDuration = mixDuration; + entry.trackEnd = mixDuration; + return entry; + }; + AnimationState.prototype.setEmptyAnimations = function (mixDuration) { + var oldDrainDisabled = this.queue.drainDisabled; + this.queue.drainDisabled = true; + for (var i = 0, n = this.tracks.length; i < n; i++) { + var current = this.tracks[i]; + if (current != null) + this.setEmptyAnimation(current.trackIndex, mixDuration); + } + this.queue.drainDisabled = oldDrainDisabled; + this.queue.drain(); + }; + AnimationState.prototype.expandToIndex = function (index) { + if (index < this.tracks.length) + return this.tracks[index]; + spine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null); + this.tracks.length = index + 1; + return null; + }; + AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) { + var entry = this.trackEntryPool.obtain(); + entry.trackIndex = trackIndex; + entry.animation = animation; + entry.loop = loop; + entry.eventThreshold = 0; + entry.attachmentThreshold = 0; + entry.drawOrderThreshold = 0; + entry.animationStart = 0; + entry.animationEnd = animation.duration; + entry.animationLast = -1; + entry.nextAnimationLast = -1; + entry.delay = 0; + entry.trackTime = 0; + entry.trackLast = -1; + entry.nextTrackLast = -1; + entry.trackEnd = Number.MAX_VALUE; + entry.timeScale = 1; + entry.alpha = 1; + entry.interruptAlpha = 1; + entry.mixTime = 0; + entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + return entry; + }; + AnimationState.prototype.disposeNext = function (entry) { + var next = entry.next; + while (next != null) { + this.queue.dispose(next); + next = next.next; + } + entry.next = null; + }; + AnimationState.prototype._animationsChanged = function () { + this.animationsChanged = false; + var propertyIDs = this.propertyIDs; + propertyIDs.clear(); + var mixingTo = this.mixingTo; + for (var i = 0, n = this.tracks.length; i < n; i++) { + var entry = this.tracks[i]; + if (entry != null) + entry.setTimelineData(null, mixingTo, propertyIDs); + } + }; + AnimationState.prototype.getCurrent = function (trackIndex) { + if (trackIndex >= this.tracks.length) + return null; + return this.tracks[trackIndex]; + }; + AnimationState.prototype.addListener = function (listener) { + if (listener == null) + throw new Error("listener cannot be null."); + this.listeners.push(listener); + }; + AnimationState.prototype.removeListener = function (listener) { + var index = this.listeners.indexOf(listener); + if (index >= 0) + this.listeners.splice(index, 1); + }; + AnimationState.prototype.clearListeners = function () { + this.listeners.length = 0; + }; + AnimationState.prototype.clearListenerNotifications = function () { + this.queue.clear(); + }; + AnimationState.emptyAnimation = new spine.Animation("", [], 0); + AnimationState.SUBSEQUENT = 0; + AnimationState.FIRST = 1; + AnimationState.DIP = 2; + AnimationState.DIP_MIX = 3; + return AnimationState; + }()); + spine.AnimationState = AnimationState; + var TrackEntry = (function () { + function TrackEntry() { + this.timelineData = new Array(); + this.timelineDipMix = new Array(); + this.timelinesRotation = new Array(); + } + TrackEntry.prototype.reset = function () { + this.next = null; + this.mixingFrom = null; + this.animation = null; + this.listener = null; + this.timelineData.length = 0; + this.timelineDipMix.length = 0; + this.timelinesRotation.length = 0; + }; + TrackEntry.prototype.setTimelineData = function (to, mixingToArray, propertyIDs) { + if (to != null) + mixingToArray.push(to); + var lastEntry = this.mixingFrom != null ? this.mixingFrom.setTimelineData(this, mixingToArray, propertyIDs) : this; + if (to != null) + mixingToArray.pop(); + var mixingTo = mixingToArray; + var mixingToLast = mixingToArray.length - 1; + var timelines = this.animation.timelines; + var timelinesCount = this.animation.timelines.length; + var timelineData = spine.Utils.setArraySize(this.timelineData, timelinesCount); + this.timelineDipMix.length = 0; + var timelineDipMix = spine.Utils.setArraySize(this.timelineDipMix, timelinesCount); + outer: for (var i = 0; i < timelinesCount; i++) { + var id = timelines[i].getPropertyId(); + if (!propertyIDs.add(id)) + timelineData[i] = AnimationState.SUBSEQUENT; + else if (to == null || !to.hasTimeline(id)) + timelineData[i] = AnimationState.FIRST; + else { + for (var ii = mixingToLast; ii >= 0; ii--) { + var entry = mixingTo[ii]; + if (!entry.hasTimeline(id)) { + if (entry.mixDuration > 0) { + timelineData[i] = AnimationState.DIP_MIX; + timelineDipMix[i] = entry; + continue outer; + } + } + } + timelineData[i] = AnimationState.DIP; + } + } + return lastEntry; + }; + TrackEntry.prototype.hasTimeline = function (id) { + var timelines = this.animation.timelines; + for (var i = 0, n = timelines.length; i < n; i++) + if (timelines[i].getPropertyId() == id) + return true; + return false; + }; + TrackEntry.prototype.getAnimationTime = function () { + if (this.loop) { + var duration = this.animationEnd - this.animationStart; + if (duration == 0) + return this.animationStart; + return (this.trackTime % duration) + this.animationStart; + } + return Math.min(this.trackTime + this.animationStart, this.animationEnd); + }; + TrackEntry.prototype.setAnimationLast = function (animationLast) { + this.animationLast = animationLast; + this.nextAnimationLast = animationLast; + }; + TrackEntry.prototype.isComplete = function () { + return this.trackTime >= this.animationEnd - this.animationStart; + }; + TrackEntry.prototype.resetRotationDirections = function () { + this.timelinesRotation.length = 0; + }; + return TrackEntry; + }()); + spine.TrackEntry = TrackEntry; + var EventQueue = (function () { + function EventQueue(animState) { + this.objects = []; + this.drainDisabled = false; + this.animState = animState; + } + EventQueue.prototype.start = function (entry) { + this.objects.push(EventType.start); + this.objects.push(entry); + this.animState.animationsChanged = true; + }; + EventQueue.prototype.interrupt = function (entry) { + this.objects.push(EventType.interrupt); + this.objects.push(entry); + }; + EventQueue.prototype.end = function (entry) { + this.objects.push(EventType.end); + this.objects.push(entry); + this.animState.animationsChanged = true; + }; + EventQueue.prototype.dispose = function (entry) { + this.objects.push(EventType.dispose); + this.objects.push(entry); + }; + EventQueue.prototype.complete = function (entry) { + this.objects.push(EventType.complete); + this.objects.push(entry); + }; + EventQueue.prototype.event = function (entry, event) { + this.objects.push(EventType.event); + this.objects.push(entry); + this.objects.push(event); + }; + EventQueue.prototype.drain = function () { + if (this.drainDisabled) + return; + this.drainDisabled = true; + var objects = this.objects; + var listeners = this.animState.listeners; + for (var i = 0; i < objects.length; i += 2) { + var type = objects[i]; + var entry = objects[i + 1]; + switch (type) { + case EventType.start: + if (entry.listener != null && entry.listener.start) + entry.listener.start(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].start) + listeners[ii].start(entry); + break; + case EventType.interrupt: + if (entry.listener != null && entry.listener.interrupt) + entry.listener.interrupt(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].interrupt) + listeners[ii].interrupt(entry); + break; + case EventType.end: + if (entry.listener != null && entry.listener.end) + entry.listener.end(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].end) + listeners[ii].end(entry); + case EventType.dispose: + if (entry.listener != null && entry.listener.dispose) + entry.listener.dispose(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].dispose) + listeners[ii].dispose(entry); + this.animState.trackEntryPool.free(entry); + break; + case EventType.complete: + if (entry.listener != null && entry.listener.complete) + entry.listener.complete(entry); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].complete) + listeners[ii].complete(entry); + break; + case EventType.event: + var event_3 = objects[i++ + 2]; + if (entry.listener != null && entry.listener.event) + entry.listener.event(entry, event_3); + for (var ii = 0; ii < listeners.length; ii++) + if (listeners[ii].event) + listeners[ii].event(entry, event_3); + break; + } + } + this.clear(); + this.drainDisabled = false; + }; + EventQueue.prototype.clear = function () { + this.objects.length = 0; + }; + return EventQueue; + }()); + spine.EventQueue = EventQueue; + var EventType; + (function (EventType) { + EventType[EventType["start"] = 0] = "start"; + EventType[EventType["interrupt"] = 1] = "interrupt"; + EventType[EventType["end"] = 2] = "end"; + EventType[EventType["dispose"] = 3] = "dispose"; + EventType[EventType["complete"] = 4] = "complete"; + EventType[EventType["event"] = 5] = "event"; + })(EventType = spine.EventType || (spine.EventType = {})); + var AnimationStateAdapter2 = (function () { + function AnimationStateAdapter2() { + } + AnimationStateAdapter2.prototype.start = function (entry) { + }; + AnimationStateAdapter2.prototype.interrupt = function (entry) { + }; + AnimationStateAdapter2.prototype.end = function (entry) { + }; + AnimationStateAdapter2.prototype.dispose = function (entry) { + }; + AnimationStateAdapter2.prototype.complete = function (entry) { + }; + AnimationStateAdapter2.prototype.event = function (entry, event) { + }; + return AnimationStateAdapter2; + }()); + spine.AnimationStateAdapter2 = AnimationStateAdapter2; +})(spine || (spine = {})); +var spine; +(function (spine) { + var AnimationStateData = (function () { + function AnimationStateData(skeletonData) { + this.animationToMixTime = {}; + this.defaultMix = 0; + if (skeletonData == null) + throw new Error("skeletonData cannot be null."); + this.skeletonData = skeletonData; + } + AnimationStateData.prototype.setMix = function (fromName, toName, duration) { + var from = this.skeletonData.findAnimation(fromName); + if (from == null) + throw new Error("Animation not found: " + fromName); + var to = this.skeletonData.findAnimation(toName); + if (to == null) + throw new Error("Animation not found: " + toName); + this.setMixWith(from, to, duration); + }; + AnimationStateData.prototype.setMixWith = function (from, to, duration) { + if (from == null) + throw new Error("from cannot be null."); + if (to == null) + throw new Error("to cannot be null."); + var key = from.name + "." + to.name; + this.animationToMixTime[key] = duration; + }; + AnimationStateData.prototype.getMix = function (from, to) { + var key = from.name + "." + to.name; + var value = this.animationToMixTime[key]; + return value === undefined ? this.defaultMix : value; + }; + return AnimationStateData; + }()); + spine.AnimationStateData = AnimationStateData; +})(spine || (spine = {})); +var spine; +(function (spine) { + var AssetManager = (function () { + function AssetManager(textureLoader, pathPrefix) { + if (pathPrefix === void 0) { pathPrefix = ""; } + this.assets = {}; + this.errors = {}; + this.toLoad = 0; + this.loaded = 0; + this.textureLoader = textureLoader; + this.pathPrefix = pathPrefix; + } + AssetManager.downloadText = function (url, success, error) { + var request = new XMLHttpRequest(); + request.open("GET", url, true); + request.onload = function () { + if (request.status == 200) { + success(request.responseText); + } + else { + error(request.status, request.responseText); + } + }; + request.onerror = function () { + error(request.status, request.responseText); + }; + request.send(); + }; + AssetManager.downloadBinary = function (url, success, error) { + var request = new XMLHttpRequest(); + request.open("GET", url, true); + request.responseType = "arraybuffer"; + request.onload = function () { + if (request.status == 200) { + success(new Uint8Array(request.response)); + } + else { + error(request.status, request.responseText); + } + }; + request.onerror = function () { + error(request.status, request.responseText); + }; + request.send(); + }; + AssetManager.prototype.loadText = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + path = this.pathPrefix + path; + this.toLoad++; + AssetManager.downloadText(path, function (data) { + _this.assets[path] = data; + if (success) + success(path, data); + _this.toLoad--; + _this.loaded++; + }, function (state, responseText) { + _this.errors[path] = "Couldn't load text " + path + ": status " + status + ", " + responseText; + if (error) + error(path, "Couldn't load text " + path + ": status " + status + ", " + responseText); + _this.toLoad--; + _this.loaded++; + }); + }; + AssetManager.prototype.loadTexture = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + path = this.pathPrefix + path; + this.toLoad++; + var img = new Image(); + img.crossOrigin = "anonymous"; + img.onload = function (ev) { + var texture = _this.textureLoader(img); + _this.assets[path] = texture; + _this.toLoad--; + _this.loaded++; + if (success) + success(path, img); + }; + img.onerror = function (ev) { + _this.errors[path] = "Couldn't load image " + path; + _this.toLoad--; + _this.loaded++; + if (error) + error(path, "Couldn't load image " + path); + }; + img.src = path; + }; + AssetManager.prototype.loadTextureData = function (path, data, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + path = this.pathPrefix + path; + this.toLoad++; + var img = new Image(); + img.onload = function (ev) { + var texture = _this.textureLoader(img); + _this.assets[path] = texture; + _this.toLoad--; + _this.loaded++; + if (success) + success(path, img); + }; + img.onerror = function (ev) { + _this.errors[path] = "Couldn't load image " + path; + _this.toLoad--; + _this.loaded++; + if (error) + error(path, "Couldn't load image " + path); + }; + img.src = data; + }; + AssetManager.prototype.loadTextureAtlas = function (path, success, error) { + var _this = this; + if (success === void 0) { success = null; } + if (error === void 0) { error = null; } + var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; + path = this.pathPrefix + path; + this.toLoad++; + AssetManager.downloadText(path, function (atlasData) { + var pagesLoaded = { count: 0 }; + var atlasPages = new Array(); + try { + var atlas = new spine.TextureAtlas(atlasData, function (path) { + atlasPages.push(parent + "/" + path); + var image = document.createElement("img"); + image.width = 16; + image.height = 16; + return new spine.FakeTexture(image); + }); + } + catch (e) { + var ex = e; + _this.errors[path] = "Couldn't load texture atlas " + path + ": " + ex.message; + if (error) + error(path, "Couldn't load texture atlas " + path + ": " + ex.message); + _this.toLoad--; + _this.loaded++; + return; + } + var _loop_1 = function (atlasPage) { + var pageLoadError = false; + _this.loadTexture(atlasPage, function (imagePath, image) { + pagesLoaded.count++; + if (pagesLoaded.count == atlasPages.length) { + if (!pageLoadError) { + try { + var atlas = new spine.TextureAtlas(atlasData, function (path) { + return _this.get(parent + "/" + path); + }); + _this.assets[path] = atlas; + if (success) + success(path, atlas); + _this.toLoad--; + _this.loaded++; + } + catch (e) { + var ex = e; + _this.errors[path] = "Couldn't load texture atlas " + path + ": " + ex.message; + if (error) + error(path, "Couldn't load texture atlas " + path + ": " + ex.message); + _this.toLoad--; + _this.loaded++; + } + } + else { + _this.errors[path] = "Couldn't load texture atlas page " + imagePath + "} of atlas " + path; + if (error) + error(path, "Couldn't load texture atlas page " + imagePath + " of atlas " + path); + _this.toLoad--; + _this.loaded++; + } + } + }, function (imagePath, errorMessage) { + pageLoadError = true; + pagesLoaded.count++; + if (pagesLoaded.count == atlasPages.length) { + _this.errors[path] = "Couldn't load texture atlas page " + imagePath + "} of atlas " + path; + if (error) + error(path, "Couldn't load texture atlas page " + imagePath + " of atlas " + path); + _this.toLoad--; + _this.loaded++; + } + }); + }; + for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) { + var atlasPage = atlasPages_1[_i]; + _loop_1(atlasPage); + } + }, function (state, responseText) { + _this.errors[path] = "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText; + if (error) + error(path, "Couldn't load texture atlas " + path + ": status " + status + ", " + responseText); + _this.toLoad--; + _this.loaded++; + }); + }; + AssetManager.prototype.get = function (path) { + path = this.pathPrefix + path; + return this.assets[path]; + }; + AssetManager.prototype.remove = function (path) { + path = this.pathPrefix + path; + var asset = this.assets[path]; + if (asset.dispose) + asset.dispose(); + this.assets[path] = null; + }; + AssetManager.prototype.removeAll = function () { + for (var key in this.assets) { + var asset = this.assets[key]; + if (asset.dispose) + asset.dispose(); + } + this.assets = {}; + }; + AssetManager.prototype.isLoadingComplete = function () { + return this.toLoad == 0; + }; + AssetManager.prototype.getToLoad = function () { + return this.toLoad; + }; + AssetManager.prototype.getLoaded = function () { + return this.loaded; + }; + AssetManager.prototype.dispose = function () { + this.removeAll(); + }; + AssetManager.prototype.hasErrors = function () { + return Object.keys(this.errors).length > 0; + }; + AssetManager.prototype.getErrors = function () { + return this.errors; + }; + return AssetManager; + }()); + spine.AssetManager = AssetManager; +})(spine || (spine = {})); +var spine; +(function (spine) { + var AtlasAttachmentLoader = (function () { + function AtlasAttachmentLoader(atlas) { + this.atlas = atlas; + } + AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + if (region == null) + throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")"); + region.renderObject = region; + var attachment = new spine.RegionAttachment(name); + attachment.setRegion(region); + return attachment; + }; + AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) { + var region = this.atlas.findRegion(path); + if (region == null) + throw new Error("Region not found in atlas: " + path + " (mesh attachment: " + name + ")"); + region.renderObject = region; + var attachment = new spine.MeshAttachment(name); + attachment.region = region; + return attachment; + }; + AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) { + return new spine.BoundingBoxAttachment(name); + }; + AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) { + return new spine.PathAttachment(name); + }; + AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) { + return new spine.PointAttachment(name); + }; + AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) { + return new spine.ClippingAttachment(name); + }; + return AtlasAttachmentLoader; + }()); + spine.AtlasAttachmentLoader = AtlasAttachmentLoader; +})(spine || (spine = {})); +var spine; +(function (spine) { + var BlendMode; + (function (BlendMode) { + BlendMode[BlendMode["Normal"] = 0] = "Normal"; + BlendMode[BlendMode["Additive"] = 1] = "Additive"; + BlendMode[BlendMode["Multiply"] = 2] = "Multiply"; + BlendMode[BlendMode["Screen"] = 3] = "Screen"; + })(BlendMode = spine.BlendMode || (spine.BlendMode = {})); +})(spine || (spine = {})); +var spine; +(function (spine) { + var Bone = (function () { + function Bone(data, skeleton, parent) { + 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.appliedValid = false; + this.a = 0; + this.b = 0; + this.worldX = 0; + this.c = 0; + this.d = 0; + this.worldY = 0; + this.sorted = false; + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.skeleton = skeleton; + this.parent = parent; + this.setToSetupPose(); + } + Bone.prototype.update = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + Bone.prototype.updateWorldTransform = function () { + this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY); + }; + Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) { + this.ax = x; + this.ay = y; + this.arotation = rotation; + this.ascaleX = scaleX; + this.ascaleY = scaleY; + this.ashearX = shearX; + this.ashearY = shearY; + this.appliedValid = true; + var parent = this.parent; + if (parent == null) { + var rotationY = rotation + 90 + shearY; + var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX; + var lb = spine.MathUtils.cosDeg(rotationY) * scaleY; + var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX; + var ld = spine.MathUtils.sinDeg(rotationY) * scaleY; + var skeleton = this.skeleton; + if (skeleton.flipX) { + x = -x; + la = -la; + lb = -lb; + } + if (skeleton.flipY) { + y = -y; + lc = -lc; + ld = -ld; + } + this.a = la; + this.b = lb; + this.c = lc; + this.d = ld; + this.worldX = x + skeleton.x; + this.worldY = y + skeleton.y; + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + this.worldX = pa * x + pb * y + parent.worldX; + this.worldY = pc * x + pd * y + parent.worldY; + switch (this.data.transformMode) { + case spine.TransformMode.Normal: { + var rotationY = rotation + 90 + shearY; + var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX; + var lb = spine.MathUtils.cosDeg(rotationY) * scaleY; + var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX; + var ld = spine.MathUtils.sinDeg(rotationY) * scaleY; + this.a = pa * la + pb * lc; + this.b = pa * lb + pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + return; + } + case spine.TransformMode.OnlyTranslation: { + var rotationY = rotation + 90 + shearY; + this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX; + this.b = spine.MathUtils.cosDeg(rotationY) * scaleY; + this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX; + this.d = spine.MathUtils.sinDeg(rotationY) * scaleY; + break; + } + case spine.TransformMode.NoRotationOrReflection: { + var s = pa * pa + pc * pc; + var prx = 0; + if (s > 0.0001) { + s = Math.abs(pa * pd - pb * pc) / s; + pb = pc * s; + pd = pa * s; + prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; + } + else { + pa = 0; + pc = 0; + prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg; + } + var rx = rotation + shearX - prx; + var ry = rotation + shearY - prx + 90; + var la = spine.MathUtils.cosDeg(rx) * scaleX; + var lb = spine.MathUtils.cosDeg(ry) * scaleY; + var lc = spine.MathUtils.sinDeg(rx) * scaleX; + var ld = spine.MathUtils.sinDeg(ry) * scaleY; + this.a = pa * la - pb * lc; + this.b = pa * lb - pb * ld; + this.c = pc * la + pd * lc; + this.d = pc * lb + pd * ld; + break; + } + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: { + var cos = spine.MathUtils.cosDeg(rotation); + var sin = spine.MathUtils.sinDeg(rotation); + var za = pa * cos + pb * sin; + var zc = pc * cos + pd * sin; + var s = Math.sqrt(za * za + zc * zc); + if (s > 0.00001) + s = 1 / s; + za *= s; + zc *= s; + s = Math.sqrt(za * za + zc * zc); + var r = Math.PI / 2 + Math.atan2(zc, za); + var zb = Math.cos(r) * s; + var zd = Math.sin(r) * s; + var la = spine.MathUtils.cosDeg(shearX) * scaleX; + var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY; + var lc = spine.MathUtils.sinDeg(shearX) * scaleX; + var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY; + if (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) { + zb = -zb; + zd = -zd; + } + this.a = za * la + zb * lc; + this.b = za * lb + zb * ld; + this.c = zc * la + zd * lc; + this.d = zc * lb + zd * ld; + return; + } + } + if (this.skeleton.flipX) { + this.a = -this.a; + this.b = -this.b; + } + if (this.skeleton.flipY) { + this.c = -this.c; + this.d = -this.d; + } + }; + Bone.prototype.setToSetupPose = function () { + var data = this.data; + this.x = data.x; + this.y = data.y; + this.rotation = data.rotation; + this.scaleX = data.scaleX; + this.scaleY = data.scaleY; + this.shearX = data.shearX; + this.shearY = data.shearY; + }; + Bone.prototype.getWorldRotationX = function () { + return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldRotationY = function () { + return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg; + }; + Bone.prototype.getWorldScaleX = function () { + return Math.sqrt(this.a * this.a + this.c * this.c); + }; + Bone.prototype.getWorldScaleY = function () { + return Math.sqrt(this.b * this.b + this.d * this.d); + }; + Bone.prototype.updateAppliedTransform = function () { + this.appliedValid = true; + var parent = this.parent; + if (parent == null) { + this.ax = this.worldX; + this.ay = this.worldY; + this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.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; + this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg; + return; + } + var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d; + var pid = 1 / (pa * pd - pb * pc); + var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY; + this.ax = (dx * pd * pid - dy * pb * pid); + this.ay = (dy * pa * pid - dx * pc * pid); + var ia = pid * pd; + var id = pid * pa; + var ib = pid * pb; + var ic = pid * pc; + var ra = ia * this.a - ib * this.c; + var rb = ia * this.b - ib * this.d; + var rc = id * this.c - ic * this.a; + var rd = id * this.d - ic * this.b; + this.ashearX = 0; + this.ascaleX = Math.sqrt(ra * ra + rc * rc); + if (this.ascaleX > 0.0001) { + var det = ra * rd - rb * rc; + this.ascaleY = det / this.ascaleX; + this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg; + this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg; + } + else { + this.ascaleX = 0; + this.ascaleY = Math.sqrt(rb * rb + rd * rd); + this.ashearY = 0; + this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg; + } + }; + Bone.prototype.worldToLocal = function (world) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var invDet = 1 / (a * d - b * c); + var x = world.x - this.worldX, y = world.y - this.worldY; + world.x = (x * d * invDet - y * b * invDet); + world.y = (y * a * invDet - x * c * invDet); + return world; + }; + Bone.prototype.localToWorld = function (local) { + var x = local.x, y = local.y; + local.x = x * this.a + y * this.b + this.worldX; + local.y = x * this.c + y * this.d + this.worldY; + return local; + }; + Bone.prototype.worldToLocalRotation = function (worldRotation) { + var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation); + return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg; + }; + Bone.prototype.localToWorldRotation = function (localRotation) { + var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation); + return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg; + }; + Bone.prototype.rotateWorld = function (degrees) { + var a = this.a, b = this.b, c = this.c, d = this.d; + var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees); + this.a = cos * a - sin * c; + this.b = cos * b - sin * d; + this.c = sin * a + cos * c; + this.d = sin * b + cos * d; + this.appliedValid = false; + }; + return Bone; + }()); + spine.Bone = Bone; +})(spine || (spine = {})); +var spine; +(function (spine) { + var BoneData = (function () { + function BoneData(index, name, parent) { + this.x = 0; + this.y = 0; + this.rotation = 0; + this.scaleX = 1; + this.scaleY = 1; + this.shearX = 0; + this.shearY = 0; + this.transformMode = TransformMode.Normal; + if (index < 0) + throw new Error("index must be >= 0."); + if (name == null) + throw new Error("name cannot be null."); + this.index = index; + this.name = name; + this.parent = parent; + } + return BoneData; + }()); + spine.BoneData = BoneData; + var TransformMode; + (function (TransformMode) { + TransformMode[TransformMode["Normal"] = 0] = "Normal"; + TransformMode[TransformMode["OnlyTranslation"] = 1] = "OnlyTranslation"; + TransformMode[TransformMode["NoRotationOrReflection"] = 2] = "NoRotationOrReflection"; + TransformMode[TransformMode["NoScale"] = 3] = "NoScale"; + TransformMode[TransformMode["NoScaleOrReflection"] = 4] = "NoScaleOrReflection"; + })(TransformMode = spine.TransformMode || (spine.TransformMode = {})); +})(spine || (spine = {})); +var spine; +(function (spine) { + var Event = (function () { + function Event(time, data) { + if (data == null) + throw new Error("data cannot be null."); + this.time = time; + this.data = data; + } + return Event; + }()); + spine.Event = Event; +})(spine || (spine = {})); +var spine; +(function (spine) { + var EventData = (function () { + function EventData(name) { + this.name = name; + } + return EventData; + }()); + spine.EventData = EventData; +})(spine || (spine = {})); +var spine; +(function (spine) { + var IkConstraint = (function () { + function IkConstraint(data, skeleton) { + this.mix = 1; + this.bendDirection = 0; + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.mix = data.mix; + this.bendDirection = data.bendDirection; + this.bones = new Array(); + for (var i = 0; i < data.bones.length; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findBone(data.target.name); + } + IkConstraint.prototype.getOrder = function () { + return this.data.order; + }; + IkConstraint.prototype.apply = function () { + this.update(); + }; + IkConstraint.prototype.update = function () { + var target = this.target; + var bones = this.bones; + switch (bones.length) { + case 1: + this.apply1(bones[0], target.worldX, target.worldY, this.mix); + break; + case 2: + this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix); + break; + } + }; + IkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) { + if (!bone.appliedValid) + bone.updateAppliedTransform(); + var p = bone.parent; + var id = 1 / (p.a * p.d - p.b * p.c); + var x = targetX - p.worldX, y = targetY - p.worldY; + var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; + var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + if (bone.ascaleX < 0) + rotationIK += 180; + if (rotationIK > 180) + rotationIK -= 360; + else if (rotationIK < -180) + rotationIK += 360; + bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, bone.ascaleX, bone.ascaleY, bone.ashearX, bone.ashearY); + }; + IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, alpha) { + if (alpha == 0) { + child.updateWorldTransform(); + return; + } + if (!parent.appliedValid) + parent.updateAppliedTransform(); + if (!child.appliedValid) + child.updateAppliedTransform(); + var px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, csx = child.ascaleX; + var os1 = 0, os2 = 0, s2 = 0; + if (psx < 0) { + psx = -psx; + os1 = 180; + s2 = -1; + } + else { + os1 = 0; + s2 = 1; + } + if (psy < 0) { + psy = -psy; + s2 = -s2; + } + if (csx < 0) { + csx = -csx; + os2 = 180; + } + else + os2 = 0; + var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d; + var u = Math.abs(psx - psy) <= 0.0001; + if (!u) { + cy = 0; + cwx = a * cx + parent.worldX; + cwy = c * cx + parent.worldY; + } + else { + cy = child.ay; + cwx = a * cx + b * cy + parent.worldX; + cwy = c * cx + d * cy + parent.worldY; + } + var pp = parent.parent; + a = pp.a; + b = pp.b; + c = pp.c; + d = pp.d; + var id = 1 / (a * d - b * c), x = targetX - pp.worldX, y = targetY - pp.worldY; + var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py; + x = cwx - pp.worldX; + y = cwy - pp.worldY; + var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py; + var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1 = 0, a2 = 0; + outer: if (u) { + l2 *= psx; + var cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2); + if (cos < -1) + cos = -1; + else if (cos > 1) + cos = 1; + a2 = Math.acos(cos) * bendDir; + a = l1 + l2 * cos; + b = l2 * Math.sin(a2); + a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b); + } + else { + a = psx * l2; + b = psy * l2; + var aa = a * a, bb = b * b, dd = tx * tx + ty * ty, ta = Math.atan2(ty, tx); + c = bb * l1 * l1 + aa * dd - aa * bb; + var c1 = -2 * bb * l1, c2 = bb - aa; + d = c1 * c1 - 4 * c2 * c; + if (d >= 0) { + var q = Math.sqrt(d); + if (c1 < 0) + q = -q; + q = -(c1 + q) / 2; + var r0 = q / c2, r1 = c / q; + var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1; + if (r * r <= dd) { + y = Math.sqrt(dd - r * r) * bendDir; + a1 = ta - Math.atan2(y, r); + a2 = Math.atan2(y / psy, (r - l1) / psx); + break outer; + } + } + var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0; + var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0; + c = -a * l1 / (aa - bb); + if (c >= -1 && c <= 1) { + c = Math.acos(c); + x = a * Math.cos(c) + l1; + y = b * Math.sin(c); + d = x * x + y * y; + if (d < minDist) { + minAngle = c; + minDist = d; + minX = x; + minY = y; + } + if (d > maxDist) { + maxAngle = c; + maxDist = d; + maxX = x; + maxY = y; + } + } + if (dd <= (minDist + maxDist) / 2) { + a1 = ta - Math.atan2(minY * bendDir, minX); + a2 = minAngle * bendDir; + } + else { + a1 = ta - Math.atan2(maxY * bendDir, maxX); + a2 = maxAngle * bendDir; + } + } + var os = Math.atan2(cy, cx) * s2; + var rotation = parent.arotation; + a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation; + if (a1 > 180) + a1 -= 360; + else if (a1 < -180) + a1 += 360; + parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.ascaleX, parent.ascaleY, 0, 0); + rotation = child.arotation; + a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation; + if (a2 > 180) + a2 -= 360; + else if (a2 < -180) + a2 += 360; + child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY); + }; + return IkConstraint; + }()); + spine.IkConstraint = IkConstraint; +})(spine || (spine = {})); +var spine; +(function (spine) { + var IkConstraintData = (function () { + function IkConstraintData(name) { + this.order = 0; + this.bones = new Array(); + this.bendDirection = 1; + this.mix = 1; + this.name = name; + } + return IkConstraintData; + }()); + spine.IkConstraintData = IkConstraintData; +})(spine || (spine = {})); +var spine; +(function (spine) { + var PathConstraint = (function () { + function PathConstraint(data, skeleton) { + this.position = 0; + this.spacing = 0; + this.rotateMix = 0; + this.translateMix = 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(); + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.bones = new Array(); + for (var i = 0, n = data.bones.length; i < n; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findSlot(data.target.name); + this.position = data.position; + this.spacing = data.spacing; + this.rotateMix = data.rotateMix; + this.translateMix = data.translateMix; + } + PathConstraint.prototype.apply = function () { + this.update(); + }; + PathConstraint.prototype.update = function () { + var attachment = this.target.getAttachment(); + if (!(attachment instanceof spine.PathAttachment)) + return; + var rotateMix = this.rotateMix, translateMix = this.translateMix; + var translate = translateMix > 0, rotate = rotateMix > 0; + if (!translate && !rotate) + return; + var data = this.data; + var spacingMode = data.spacingMode; + var lengthSpacing = spacingMode == spine.SpacingMode.Length; + var rotateMode = data.rotateMode; + var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale; + var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1; + var bones = this.bones; + var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null; + var spacing = this.spacing; + if (scale || lengthSpacing) { + if (scale) + lengths = spine.Utils.setArraySize(this.lengths, boneCount); + for (var i = 0, n = spacesCount - 1; i < n;) { + var bone = bones[i]; + var setupLength = bone.data.length; + if (setupLength < PathConstraint.epsilon) { + if (scale) + lengths[i] = 0; + spaces[++i] = 0; + } + else { + var x = setupLength * bone.a, y = setupLength * bone.c; + var length_1 = Math.sqrt(x * x + y * y); + if (scale) + lengths[i] = length_1; + spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_1 / setupLength; + } + } + } + else { + for (var i = 1; i < spacesCount; i++) + spaces[i] = spacing; + } + var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, spacingMode == spine.SpacingMode.Percent); + var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation; + var tip = false; + if (offsetRotation == 0) + tip = rotateMode == spine.RotateMode.Chain; + else { + tip = false; + var p = this.target.bone; + offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad; + } + for (var i = 0, p = 3; i < boneCount; i++, p += 3) { + var bone = bones[i]; + bone.worldX += (boneX - bone.worldX) * translateMix; + bone.worldY += (boneY - bone.worldY) * translateMix; + var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY; + if (scale) { + var length_2 = lengths[i]; + if (length_2 != 0) { + var s = (Math.sqrt(dx * dx + dy * dy) / length_2 - 1) * rotateMix + 1; + bone.a *= s; + bone.c *= s; + } + } + boneX = x; + boneY = y; + if (rotate) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0; + if (tangents) + r = positions[p - 1]; + else if (spaces[i + 1] == 0) + r = positions[p + 2]; + else + r = Math.atan2(dy, dx); + r -= Math.atan2(c, a); + if (tip) { + cos = Math.cos(r); + sin = Math.sin(r); + var length_3 = bone.data.length; + boneX += (length_3 * (cos * a - sin * c) - dx) * rotateMix; + boneY += (length_3 * (sin * a + cos * c) - dy) * rotateMix; + } + else { + r += offsetRotation; + } + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + cos = Math.cos(r); + sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + } + bone.appliedValid = false; + } + }; + PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) { + var target = this.target; + var position = this.position; + var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null; + var closed = path.closed; + var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE; + if (!path.constantSpeed) { + var lengths = path.lengths; + curveCount -= closed ? 1 : 2; + var pathLength_1 = lengths[curveCount]; + if (percentPosition) + position *= pathLength_1; + if (percentSpacing) { + for (var i = 0; i < spacesCount; i++) + spaces[i] *= pathLength_1; + } + world = spine.Utils.setArraySize(this.world, 8); + for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) { + var space = spaces[i]; + position += space; + var p = position; + if (closed) { + p %= pathLength_1; + if (p < 0) + p += pathLength_1; + curve = 0; + } + else if (p < 0) { + if (prevCurve != PathConstraint.BEFORE) { + prevCurve = PathConstraint.BEFORE; + path.computeWorldVertices(target, 2, 4, world, 0, 2); + } + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength_1) { + if (prevCurve != PathConstraint.AFTER) { + prevCurve = PathConstraint.AFTER; + path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2); + } + this.addAfterPosition(p - pathLength_1, world, 0, out, o); + continue; + } + for (;; curve++) { + var length_4 = lengths[curve]; + if (p > length_4) + continue; + if (curve == 0) + p /= length_4; + else { + var prev = lengths[curve - 1]; + p = (p - prev) / (length_4 - prev); + } + break; + } + if (curve != prevCurve) { + prevCurve = curve; + if (closed && curve == curveCount) { + path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2); + path.computeWorldVertices(target, 0, 4, world, 4, 2); + } + else + path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2); + } + this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0)); + } + return out; + } + if (closed) { + verticesLength += 2; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2); + path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2); + world[verticesLength - 2] = world[0]; + world[verticesLength - 1] = world[1]; + } + else { + curveCount--; + verticesLength -= 4; + world = spine.Utils.setArraySize(this.world, verticesLength); + path.computeWorldVertices(target, 2, verticesLength, world, 0, 2); + } + var curves = spine.Utils.setArraySize(this.curves, curveCount); + var pathLength = 0; + var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0; + var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0; + for (var i = 0, w = 2; i < curveCount; i++, w += 6) { + cx1 = world[w]; + cy1 = world[w + 1]; + cx2 = world[w + 2]; + cy2 = world[w + 3]; + x2 = world[w + 4]; + y2 = world[w + 5]; + tmpx = (x1 - cx1 * 2 + cx2) * 0.1875; + tmpy = (y1 - cy1 * 2 + cy2) * 0.1875; + dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375; + dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375; + ddfx = tmpx * 2 + dddfx; + ddfy = tmpy * 2 + dddfy; + dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667; + dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + dfx += ddfx; + dfy += ddfy; + ddfx += dddfx; + ddfy += dddfy; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + dfx += ddfx; + dfy += ddfy; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + dfx += ddfx + dddfx; + dfy += ddfy + dddfy; + pathLength += Math.sqrt(dfx * dfx + dfy * dfy); + curves[i] = pathLength; + x1 = x2; + y1 = y2; + } + if (percentPosition) + position *= pathLength; + if (percentSpacing) { + for (var i = 0; i < spacesCount; i++) + spaces[i] *= pathLength; + } + var segments = this.segments; + var curveLength = 0; + for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) { + var space = spaces[i]; + position += space; + var p = position; + if (closed) { + p %= pathLength; + if (p < 0) + p += pathLength; + curve = 0; + } + else if (p < 0) { + this.addBeforePosition(p, world, 0, out, o); + continue; + } + else if (p > pathLength) { + this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o); + continue; + } + for (;; curve++) { + var length_5 = curves[curve]; + if (p > length_5) + continue; + if (curve == 0) + p /= length_5; + else { + var prev = curves[curve - 1]; + p = (p - prev) / (length_5 - prev); + } + break; + } + if (curve != prevCurve) { + prevCurve = curve; + var ii = curve * 6; + x1 = world[ii]; + y1 = world[ii + 1]; + cx1 = world[ii + 2]; + cy1 = world[ii + 3]; + cx2 = world[ii + 4]; + cy2 = world[ii + 5]; + x2 = world[ii + 6]; + y2 = world[ii + 7]; + tmpx = (x1 - cx1 * 2 + cx2) * 0.03; + tmpy = (y1 - cy1 * 2 + cy2) * 0.03; + dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006; + dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006; + ddfx = tmpx * 2 + dddfx; + ddfy = tmpy * 2 + dddfy; + dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667; + dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667; + curveLength = Math.sqrt(dfx * dfx + dfy * dfy); + segments[0] = curveLength; + for (ii = 1; ii < 8; ii++) { + dfx += ddfx; + dfy += ddfy; + ddfx += dddfx; + ddfy += dddfy; + curveLength += Math.sqrt(dfx * dfx + dfy * dfy); + segments[ii] = curveLength; + } + dfx += ddfx; + dfy += ddfy; + curveLength += Math.sqrt(dfx * dfx + dfy * dfy); + segments[8] = curveLength; + dfx += ddfx + dddfx; + dfy += ddfy + dddfy; + curveLength += Math.sqrt(dfx * dfx + dfy * dfy); + segments[9] = curveLength; + segment = 0; + } + p *= curveLength; + for (;; segment++) { + var length_6 = segments[segment]; + if (p > length_6) + continue; + if (segment == 0) + p /= length_6; + else { + var prev = segments[segment - 1]; + p = segment + (p - prev) / (length_6 - prev); + } + break; + } + this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0)); + } + return out; + }; + PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) { + var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx); + out[o] = x1 + p * Math.cos(r); + out[o + 1] = y1 + p * Math.sin(r); + out[o + 2] = r; + }; + PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) { + var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx); + out[o] = x1 + p * Math.cos(r); + out[o + 1] = y1 + p * Math.sin(r); + out[o + 2] = r; + }; + PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) { + if (p == 0 || isNaN(p)) + p = 0.0001; + var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u; + var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p; + var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt; + out[o] = x; + out[o + 1] = y; + if (tangents) + out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt)); + }; + PathConstraint.prototype.getOrder = function () { + return this.data.order; + }; + PathConstraint.NONE = -1; + PathConstraint.BEFORE = -2; + PathConstraint.AFTER = -3; + PathConstraint.epsilon = 0.00001; + return PathConstraint; + }()); + spine.PathConstraint = PathConstraint; +})(spine || (spine = {})); +var spine; +(function (spine) { + var PathConstraintData = (function () { + function PathConstraintData(name) { + this.order = 0; + this.bones = new Array(); + this.name = name; + } + return PathConstraintData; + }()); + spine.PathConstraintData = PathConstraintData; + var PositionMode; + (function (PositionMode) { + PositionMode[PositionMode["Fixed"] = 0] = "Fixed"; + PositionMode[PositionMode["Percent"] = 1] = "Percent"; + })(PositionMode = spine.PositionMode || (spine.PositionMode = {})); + var SpacingMode; + (function (SpacingMode) { + SpacingMode[SpacingMode["Length"] = 0] = "Length"; + SpacingMode[SpacingMode["Fixed"] = 1] = "Fixed"; + SpacingMode[SpacingMode["Percent"] = 2] = "Percent"; + })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {})); + var RotateMode; + (function (RotateMode) { + RotateMode[RotateMode["Tangent"] = 0] = "Tangent"; + RotateMode[RotateMode["Chain"] = 1] = "Chain"; + RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale"; + })(RotateMode = spine.RotateMode || (spine.RotateMode = {})); +})(spine || (spine = {})); +var spine; +(function (spine) { + var Assets = (function () { + function Assets(clientId) { + this.toLoad = new Array(); + this.assets = {}; + this.clientId = clientId; + } + Assets.prototype.loaded = function () { + var i = 0; + for (var v in this.assets) + i++; + return i; + }; + return Assets; + }()); + var SharedAssetManager = (function () { + function SharedAssetManager(pathPrefix) { + if (pathPrefix === void 0) { pathPrefix = ""; } + this.clientAssets = {}; + this.queuedAssets = {}; + this.rawAssets = {}; + this.errors = {}; + this.pathPrefix = pathPrefix; + } + SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) { + var clientAssets = this.clientAssets[clientId]; + if (clientAssets === null || clientAssets === undefined) { + clientAssets = new Assets(clientId); + this.clientAssets[clientId] = clientAssets; + } + if (textureLoader !== null) + clientAssets.textureLoader = textureLoader; + clientAssets.toLoad.push(path); + if (this.queuedAssets[path] === path) { + return false; + } + else { + this.queuedAssets[path] = path; + return true; + } + }; + SharedAssetManager.prototype.loadText = function (clientId, path) { + var _this = this; + path = this.pathPrefix + path; + if (!this.queueAsset(clientId, null, path)) + return; + var request = new XMLHttpRequest(); + request.onreadystatechange = function () { + if (request.readyState == XMLHttpRequest.DONE) { + if (request.status >= 200 && request.status < 300) { + _this.rawAssets[path] = request.responseText; + } + else { + _this.errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + } + } + }; + request.open("GET", path, true); + request.send(); + }; + SharedAssetManager.prototype.loadJson = function (clientId, path) { + var _this = this; + path = this.pathPrefix + path; + if (!this.queueAsset(clientId, null, path)) + return; + var request = new XMLHttpRequest(); + request.onreadystatechange = function () { + if (request.readyState == XMLHttpRequest.DONE) { + if (request.status >= 200 && request.status < 300) { + _this.rawAssets[path] = JSON.parse(request.responseText); + } + else { + _this.errors[path] = "Couldn't load text " + path + ": status " + request.status + ", " + request.responseText; + } + } + }; + request.open("GET", path, true); + request.send(); + }; + SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) { + var _this = this; + path = this.pathPrefix + path; + if (!this.queueAsset(clientId, textureLoader, path)) + return; + var img = new Image(); + img.src = path; + img.crossOrigin = "anonymous"; + img.onload = function (ev) { + _this.rawAssets[path] = img; + }; + img.onerror = function (ev) { + _this.errors[path] = "Couldn't load image " + path; + }; + }; + SharedAssetManager.prototype.get = function (clientId, path) { + path = this.pathPrefix + path; + var clientAssets = this.clientAssets[clientId]; + if (clientAssets === null || clientAssets === undefined) + return true; + return clientAssets.assets[path]; + }; + SharedAssetManager.prototype.updateClientAssets = function (clientAssets) { + for (var i = 0; i < clientAssets.toLoad.length; i++) { + var path = clientAssets.toLoad[i]; + var asset = clientAssets.assets[path]; + if (asset === null || asset === undefined) { + var rawAsset = this.rawAssets[path]; + if (rawAsset === null || rawAsset === undefined) + continue; + if (rawAsset instanceof HTMLImageElement) { + clientAssets.assets[path] = clientAssets.textureLoader(rawAsset); + } + else { + clientAssets.assets[path] = rawAsset; + } + } + } + }; + SharedAssetManager.prototype.isLoadingComplete = function (clientId) { + var clientAssets = this.clientAssets[clientId]; + if (clientAssets === null || clientAssets === undefined) + return true; + this.updateClientAssets(clientAssets); + return clientAssets.toLoad.length == clientAssets.loaded(); + }; + SharedAssetManager.prototype.dispose = function () { + }; + SharedAssetManager.prototype.hasErrors = function () { + return Object.keys(this.errors).length > 0; + }; + SharedAssetManager.prototype.getErrors = function () { + return this.errors; + }; + return SharedAssetManager; + }()); + spine.SharedAssetManager = SharedAssetManager; +})(spine || (spine = {})); +var spine; +(function (spine) { + var Skeleton = (function () { + function Skeleton(data) { + this._updateCache = new Array(); + this.updateCacheReset = new Array(); + this.time = 0; + this.flipX = false; + this.flipY = false; + this.x = 0; + this.y = 0; + if (data == null) + throw new Error("data cannot be null."); + this.data = data; + this.bones = new Array(); + for (var i = 0; i < data.bones.length; i++) { + var boneData = data.bones[i]; + var bone = void 0; + if (boneData.parent == null) + bone = new spine.Bone(boneData, this, null); + else { + var parent_1 = this.bones[boneData.parent.index]; + bone = new spine.Bone(boneData, this, parent_1); + parent_1.children.push(bone); + } + this.bones.push(bone); + } + this.slots = new Array(); + this.drawOrder = new Array(); + for (var i = 0; i < data.slots.length; i++) { + var slotData = data.slots[i]; + var bone = this.bones[slotData.boneData.index]; + var slot = new spine.Slot(slotData, bone); + this.slots.push(slot); + this.drawOrder.push(slot); + } + this.ikConstraints = new Array(); + for (var i = 0; i < data.ikConstraints.length; i++) { + var ikConstraintData = data.ikConstraints[i]; + this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this)); + } + this.transformConstraints = new Array(); + for (var i = 0; i < data.transformConstraints.length; i++) { + var transformConstraintData = data.transformConstraints[i]; + this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this)); + } + this.pathConstraints = new Array(); + for (var i = 0; i < data.pathConstraints.length; i++) { + var pathConstraintData = data.pathConstraints[i]; + this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this)); + } + this.color = new spine.Color(1, 1, 1, 1); + this.updateCache(); + } + Skeleton.prototype.updateCache = function () { + var updateCache = this._updateCache; + updateCache.length = 0; + this.updateCacheReset.length = 0; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + bones[i].sorted = false; + var ikConstraints = this.ikConstraints; + var transformConstraints = this.transformConstraints; + var pathConstraints = this.pathConstraints; + var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length; + var constraintCount = ikCount + transformCount + pathCount; + outer: for (var i = 0; i < constraintCount; i++) { + for (var ii = 0; ii < ikCount; ii++) { + var constraint = ikConstraints[ii]; + if (constraint.data.order == i) { + this.sortIkConstraint(constraint); + continue outer; + } + } + for (var ii = 0; ii < transformCount; ii++) { + var constraint = transformConstraints[ii]; + if (constraint.data.order == i) { + this.sortTransformConstraint(constraint); + continue outer; + } + } + for (var ii = 0; ii < pathCount; ii++) { + var constraint = pathConstraints[ii]; + if (constraint.data.order == i) { + this.sortPathConstraint(constraint); + continue outer; + } + } + } + for (var i = 0, n = bones.length; i < n; i++) + this.sortBone(bones[i]); + }; + Skeleton.prototype.sortIkConstraint = function (constraint) { + var target = constraint.target; + this.sortBone(target); + var constrained = constraint.bones; + var parent = constrained[0]; + this.sortBone(parent); + if (constrained.length > 1) { + var child = constrained[constrained.length - 1]; + if (!(this._updateCache.indexOf(child) > -1)) + this.updateCacheReset.push(child); + } + this._updateCache.push(constraint); + this.sortReset(parent.children); + constrained[constrained.length - 1].sorted = true; + }; + Skeleton.prototype.sortPathConstraint = function (constraint) { + var slot = constraint.target; + var slotIndex = slot.data.index; + var slotBone = slot.bone; + if (this.skin != null) + this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone); + if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin) + this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone); + for (var i = 0, n = this.data.skins.length; i < n; i++) + this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone); + var attachment = slot.getAttachment(); + if (attachment instanceof spine.PathAttachment) + this.sortPathConstraintAttachmentWith(attachment, slotBone); + var constrained = constraint.bones; + var boneCount = constrained.length; + for (var i = 0; i < boneCount; i++) + this.sortBone(constrained[i]); + this._updateCache.push(constraint); + for (var i = 0; i < boneCount; i++) + this.sortReset(constrained[i].children); + for (var i = 0; i < boneCount; i++) + constrained[i].sorted = true; + }; + Skeleton.prototype.sortTransformConstraint = function (constraint) { + this.sortBone(constraint.target); + var constrained = constraint.bones; + var boneCount = constrained.length; + if (constraint.data.local) { + for (var i = 0; i < boneCount; i++) { + var child = constrained[i]; + this.sortBone(child.parent); + if (!(this._updateCache.indexOf(child) > -1)) + this.updateCacheReset.push(child); + } + } + else { + for (var i = 0; i < boneCount; i++) { + this.sortBone(constrained[i]); + } + } + this._updateCache.push(constraint); + for (var ii = 0; ii < boneCount; ii++) + this.sortReset(constrained[ii].children); + for (var ii = 0; ii < boneCount; ii++) + constrained[ii].sorted = true; + }; + Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) { + var attachments = skin.attachments[slotIndex]; + if (!attachments) + return; + for (var key in attachments) { + this.sortPathConstraintAttachmentWith(attachments[key], slotBone); + } + }; + Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) { + if (!(attachment instanceof spine.PathAttachment)) + return; + var pathBones = attachment.bones; + if (pathBones == null) + this.sortBone(slotBone); + else { + var bones = this.bones; + var i = 0; + while (i < pathBones.length) { + var boneCount = pathBones[i++]; + for (var n = i + boneCount; i < n; i++) { + var boneIndex = pathBones[i]; + this.sortBone(bones[boneIndex]); + } + } + } + }; + Skeleton.prototype.sortBone = function (bone) { + if (bone.sorted) + return; + var parent = bone.parent; + if (parent != null) + this.sortBone(parent); + bone.sorted = true; + this._updateCache.push(bone); + }; + Skeleton.prototype.sortReset = function (bones) { + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (bone.sorted) + this.sortReset(bone.children); + bone.sorted = false; + } + }; + Skeleton.prototype.updateWorldTransform = function () { + var updateCacheReset = this.updateCacheReset; + for (var i = 0, n = updateCacheReset.length; i < n; i++) { + var bone = updateCacheReset[i]; + bone.ax = bone.x; + bone.ay = bone.y; + bone.arotation = bone.rotation; + bone.ascaleX = bone.scaleX; + bone.ascaleY = bone.scaleY; + bone.ashearX = bone.shearX; + bone.ashearY = bone.shearY; + bone.appliedValid = true; + } + var updateCache = this._updateCache; + for (var i = 0, n = updateCache.length; i < n; i++) + updateCache[i].update(); + }; + Skeleton.prototype.setToSetupPose = function () { + this.setBonesToSetupPose(); + this.setSlotsToSetupPose(); + }; + Skeleton.prototype.setBonesToSetupPose = function () { + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + bones[i].setToSetupPose(); + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + constraint.bendDirection = constraint.data.bendDirection; + constraint.mix = constraint.data.mix; + } + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + var data = constraint.data; + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + constraint.scaleMix = data.scaleMix; + constraint.shearMix = data.shearMix; + } + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + var data = constraint.data; + constraint.position = data.position; + constraint.spacing = data.spacing; + constraint.rotateMix = data.rotateMix; + constraint.translateMix = data.translateMix; + } + }; + Skeleton.prototype.setSlotsToSetupPose = function () { + var slots = this.slots; + spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length); + for (var i = 0, n = slots.length; i < n; i++) + slots[i].setToSetupPose(); + }; + Skeleton.prototype.getRootBone = function () { + if (this.bones.length == 0) + return null; + return this.bones[0]; + }; + Skeleton.prototype.findBone = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (bone.data.name == boneName) + return bone; + } + return null; + }; + Skeleton.prototype.findBoneIndex = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + if (bones[i].data.name == boneName) + return i; + return -1; + }; + Skeleton.prototype.findSlot = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.data.name == slotName) + return slot; + } + return null; + }; + Skeleton.prototype.findSlotIndex = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) + if (slots[i].data.name == slotName) + return i; + return -1; + }; + Skeleton.prototype.setSkinByName = function (skinName) { + var skin = this.data.findSkin(skinName); + if (skin == null) + throw new Error("Skin not found: " + skinName); + this.setSkin(skin); + }; + Skeleton.prototype.setSkin = function (newSkin) { + if (newSkin != null) { + if (this.skin != null) + newSkin.attachAll(this, this.skin); + else { + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + var name_1 = slot.data.attachmentName; + if (name_1 != null) { + var attachment = newSkin.getAttachment(i, name_1); + if (attachment != null) + slot.setAttachment(attachment); + } + } + } + } + this.skin = newSkin; + }; + Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) { + return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName); + }; + Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) { + if (attachmentName == null) + throw new Error("attachmentName cannot be null."); + if (this.skin != null) { + var attachment = this.skin.getAttachment(slotIndex, attachmentName); + if (attachment != null) + return attachment; + } + if (this.data.defaultSkin != null) + return this.data.defaultSkin.getAttachment(slotIndex, attachmentName); + return null; + }; + Skeleton.prototype.setAttachment = function (slotName, attachmentName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.data.name == slotName) { + var attachment = null; + if (attachmentName != null) { + attachment = this.getAttachment(i, attachmentName); + if (attachment == null) + throw new Error("Attachment not found: " + attachmentName + ", for slot: " + slotName); + } + slot.setAttachment(attachment); + return; + } + } + throw new Error("Slot not found: " + slotName); + }; + Skeleton.prototype.findIkConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var ikConstraint = ikConstraints[i]; + if (ikConstraint.data.name == constraintName) + return ikConstraint; + } + return null; + }; + Skeleton.prototype.findTransformConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + if (constraint.data.name == constraintName) + return constraint; + } + return null; + }; + Skeleton.prototype.findPathConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + if (constraint.data.name == constraintName) + return constraint; + } + return null; + }; + Skeleton.prototype.getBounds = function (offset, size, temp) { + if (offset == null) + throw new Error("offset cannot be null."); + if (size == null) + throw new Error("size cannot be null."); + var drawOrder = this.drawOrder; + var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + var verticesLength = 0; + var vertices = null; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.RegionAttachment) { + verticesLength = 8; + vertices = spine.Utils.setArraySize(temp, verticesLength, 0); + attachment.computeWorldVertices(slot.bone, vertices, 0, 2); + } + else if (attachment instanceof spine.MeshAttachment) { + var mesh = attachment; + verticesLength = mesh.worldVerticesLength; + vertices = spine.Utils.setArraySize(temp, verticesLength, 0); + mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2); + } + if (vertices != null) { + for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) { + var x = vertices[ii], y = vertices[ii + 1]; + minX = Math.min(minX, x); + minY = Math.min(minY, y); + maxX = Math.max(maxX, x); + maxY = Math.max(maxY, y); + } + } + } + offset.set(minX, minY); + size.set(maxX - minX, maxY - minY); + }; + Skeleton.prototype.update = function (delta) { + this.time += delta; + }; + return Skeleton; + }()); + spine.Skeleton = Skeleton; +})(spine || (spine = {})); +var spine; +(function (spine) { + var SkeletonBounds = (function () { + function SkeletonBounds() { + this.minX = 0; + this.minY = 0; + this.maxX = 0; + this.maxY = 0; + this.boundingBoxes = new Array(); + this.polygons = new Array(); + this.polygonPool = new spine.Pool(function () { + return spine.Utils.newFloatArray(16); + }); + } + SkeletonBounds.prototype.update = function (skeleton, updateAabb) { + if (skeleton == null) + throw new Error("skeleton cannot be null."); + var boundingBoxes = this.boundingBoxes; + var polygons = this.polygons; + var polygonPool = this.polygonPool; + var slots = skeleton.slots; + var slotCount = slots.length; + boundingBoxes.length = 0; + polygonPool.freeAll(polygons); + polygons.length = 0; + for (var i = 0; i < slotCount; i++) { + var slot = slots[i]; + var attachment = slot.getAttachment(); + if (attachment instanceof spine.BoundingBoxAttachment) { + var boundingBox = attachment; + boundingBoxes.push(boundingBox); + var polygon = polygonPool.obtain(); + if (polygon.length != boundingBox.worldVerticesLength) { + polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength); + } + polygons.push(polygon); + boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2); + } + } + if (updateAabb) { + this.aabbCompute(); + } + else { + this.minX = Number.POSITIVE_INFINITY; + this.minY = Number.POSITIVE_INFINITY; + this.maxX = Number.NEGATIVE_INFINITY; + this.maxY = Number.NEGATIVE_INFINITY; + } + }; + SkeletonBounds.prototype.aabbCompute = function () { + var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY; + var polygons = this.polygons; + for (var i = 0, n = polygons.length; i < n; i++) { + var polygon = polygons[i]; + var vertices = polygon; + for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) { + var x = vertices[ii]; + var y = vertices[ii + 1]; + minX = Math.min(minX, x); + minY = Math.min(minY, y); + maxX = Math.max(maxX, x); + maxY = Math.max(maxY, y); + } + } + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + SkeletonBounds.prototype.aabbContainsPoint = function (x, y) { + return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY; + }; + SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY)) + return false; + var m = (y2 - y1) / (x2 - x1); + var y = m * (minX - x1) + y1; + if (y > minY && y < maxY) + return true; + y = m * (maxX - x1) + y1; + if (y > minY && y < maxY) + return true; + var x = (minY - y1) / m + x1; + if (x > minX && x < maxX) + return true; + x = (maxY - y1) / m + x1; + if (x > minX && x < maxX) + return true; + return false; + }; + SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) { + return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY; + }; + SkeletonBounds.prototype.containsPoint = function (x, y) { + var polygons = this.polygons; + for (var i = 0, n = polygons.length; i < n; i++) + if (this.containsPointPolygon(polygons[i], x, y)) + return this.boundingBoxes[i]; + return null; + }; + SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) { + var vertices = polygon; + var nn = polygon.length; + var prevIndex = nn - 2; + var inside = false; + for (var ii = 0; ii < nn; ii += 2) { + var vertexY = vertices[ii + 1]; + var prevY = vertices[prevIndex + 1]; + if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) { + var vertexX = vertices[ii]; + if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) + inside = !inside; + } + prevIndex = ii; + } + return inside; + }; + SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) { + var polygons = this.polygons; + for (var i = 0, n = polygons.length; i < n; i++) + if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2)) + return this.boundingBoxes[i]; + return null; + }; + SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) { + var vertices = polygon; + var nn = polygon.length; + var width12 = x1 - x2, height12 = y1 - y2; + var det1 = x1 * y2 - y1 * x2; + var x3 = vertices[nn - 2], y3 = vertices[nn - 1]; + for (var ii = 0; ii < nn; ii += 2) { + var x4 = vertices[ii], y4 = vertices[ii + 1]; + var det2 = x3 * y4 - y3 * x4; + var width34 = x3 - x4, height34 = y3 - y4; + var det3 = width12 * height34 - height12 * width34; + var x = (det1 * width34 - width12 * det2) / det3; + if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) { + var y = (det1 * height34 - height12 * det2) / det3; + if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) + return true; + } + x3 = x4; + y3 = y4; + } + return false; + }; + SkeletonBounds.prototype.getPolygon = function (boundingBox) { + if (boundingBox == null) + throw new Error("boundingBox cannot be null."); + var index = this.boundingBoxes.indexOf(boundingBox); + return index == -1 ? null : this.polygons[index]; + }; + SkeletonBounds.prototype.getWidth = function () { + return this.maxX - this.minX; + }; + SkeletonBounds.prototype.getHeight = function () { + return this.maxY - this.minY; + }; + return SkeletonBounds; + }()); + spine.SkeletonBounds = SkeletonBounds; +})(spine || (spine = {})); +var spine; +(function (spine) { + var SkeletonClipping = (function () { + function SkeletonClipping() { + this.triangulator = new spine.Triangulator(); + this.clippingPolygon = new Array(); + this.clipOutput = new Array(); + this.clippedVertices = new Array(); + this.clippedTriangles = new Array(); + this.scratch = new Array(); + } + SkeletonClipping.prototype.clipStart = function (slot, clip) { + if (this.clipAttachment != null) + return 0; + this.clipAttachment = clip; + var n = clip.worldVerticesLength; + var vertices = spine.Utils.setArraySize(this.clippingPolygon, n); + clip.computeWorldVertices(slot, 0, n, vertices, 0, 2); + var clippingPolygon = this.clippingPolygon; + SkeletonClipping.makeClockwise(clippingPolygon); + var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); + for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + var polygon = clippingPolygons[i]; + SkeletonClipping.makeClockwise(polygon); + polygon.push(polygon[0]); + polygon.push(polygon[1]); + } + return clippingPolygons.length; + }; + SkeletonClipping.prototype.clipEndWithSlot = function (slot) { + if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data) + this.clipEnd(); + }; + SkeletonClipping.prototype.clipEnd = function () { + if (this.clipAttachment == null) + return; + this.clipAttachment = null; + this.clippingPolygons = null; + this.clippedVertices.length = 0; + this.clippedTriangles.length = 0; + this.clippingPolygon.length = 0; + }; + SkeletonClipping.prototype.isClipping = function () { + return this.clipAttachment != null; + }; + SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) { + var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices; + var clippedTriangles = this.clippedTriangles; + var polygons = this.clippingPolygons; + var polygonsCount = this.clippingPolygons.length; + var vertexSize = twoColor ? 12 : 8; + var index = 0; + clippedVertices.length = 0; + clippedTriangles.length = 0; + outer: for (var i = 0; i < trianglesLength; i += 3) { + var vertexOffset = triangles[i] << 1; + var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1]; + var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1]; + vertexOffset = triangles[i + 1] << 1; + var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1]; + var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1]; + vertexOffset = triangles[i + 2] << 1; + var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1]; + var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1]; + for (var p = 0; p < polygonsCount; p++) { + var s = clippedVertices.length; + if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) { + var clipOutputLength = clipOutput.length; + if (clipOutputLength == 0) + continue; + var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1; + var d = 1 / (d0 * d2 + d1 * (y1 - y3)); + var clipOutputCount = clipOutputLength >> 1; + var clipOutputItems = this.clipOutput; + var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize); + for (var ii = 0; ii < clipOutputLength; ii += 2) { + var x = clipOutputItems[ii], y = clipOutputItems[ii + 1]; + clippedVerticesItems[s] = x; + clippedVerticesItems[s + 1] = y; + clippedVerticesItems[s + 2] = light.r; + clippedVerticesItems[s + 3] = light.g; + clippedVerticesItems[s + 4] = light.b; + clippedVerticesItems[s + 5] = light.a; + var c0 = x - x3, c1 = y - y3; + var a = (d0 * c0 + d1 * c1) * d; + var b = (d4 * c0 + d2 * c1) * d; + var c = 1 - a - b; + clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c; + clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c; + if (twoColor) { + clippedVerticesItems[s + 8] = dark.r; + clippedVerticesItems[s + 9] = dark.g; + clippedVerticesItems[s + 10] = dark.b; + clippedVerticesItems[s + 11] = dark.a; + } + s += vertexSize; + } + s = clippedTriangles.length; + var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2)); + clipOutputCount--; + for (var ii = 1; ii < clipOutputCount; ii++) { + clippedTrianglesItems[s] = index; + clippedTrianglesItems[s + 1] = (index + ii); + clippedTrianglesItems[s + 2] = (index + ii + 1); + s += 3; + } + index += clipOutputCount + 1; + } + else { + var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize); + clippedVerticesItems[s] = x1; + clippedVerticesItems[s + 1] = y1; + clippedVerticesItems[s + 2] = light.r; + clippedVerticesItems[s + 3] = light.g; + clippedVerticesItems[s + 4] = light.b; + clippedVerticesItems[s + 5] = light.a; + if (!twoColor) { + clippedVerticesItems[s + 6] = u1; + clippedVerticesItems[s + 7] = v1; + clippedVerticesItems[s + 8] = x2; + clippedVerticesItems[s + 9] = y2; + clippedVerticesItems[s + 10] = light.r; + clippedVerticesItems[s + 11] = light.g; + clippedVerticesItems[s + 12] = light.b; + clippedVerticesItems[s + 13] = light.a; + clippedVerticesItems[s + 14] = u2; + clippedVerticesItems[s + 15] = v2; + clippedVerticesItems[s + 16] = x3; + clippedVerticesItems[s + 17] = y3; + clippedVerticesItems[s + 18] = light.r; + clippedVerticesItems[s + 19] = light.g; + clippedVerticesItems[s + 20] = light.b; + clippedVerticesItems[s + 21] = light.a; + clippedVerticesItems[s + 22] = u3; + clippedVerticesItems[s + 23] = v3; + } + else { + clippedVerticesItems[s + 6] = u1; + clippedVerticesItems[s + 7] = v1; + clippedVerticesItems[s + 8] = dark.r; + clippedVerticesItems[s + 9] = dark.g; + clippedVerticesItems[s + 10] = dark.b; + clippedVerticesItems[s + 11] = dark.a; + clippedVerticesItems[s + 12] = x2; + clippedVerticesItems[s + 13] = y2; + clippedVerticesItems[s + 14] = light.r; + clippedVerticesItems[s + 15] = light.g; + clippedVerticesItems[s + 16] = light.b; + clippedVerticesItems[s + 17] = light.a; + clippedVerticesItems[s + 18] = u2; + clippedVerticesItems[s + 19] = v2; + clippedVerticesItems[s + 20] = dark.r; + clippedVerticesItems[s + 21] = dark.g; + clippedVerticesItems[s + 22] = dark.b; + clippedVerticesItems[s + 23] = dark.a; + clippedVerticesItems[s + 24] = x3; + clippedVerticesItems[s + 25] = y3; + clippedVerticesItems[s + 26] = light.r; + clippedVerticesItems[s + 27] = light.g; + clippedVerticesItems[s + 28] = light.b; + clippedVerticesItems[s + 29] = light.a; + clippedVerticesItems[s + 30] = u3; + clippedVerticesItems[s + 31] = v3; + clippedVerticesItems[s + 32] = dark.r; + clippedVerticesItems[s + 33] = dark.g; + clippedVerticesItems[s + 34] = dark.b; + clippedVerticesItems[s + 35] = dark.a; + } + s = clippedTriangles.length; + var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3); + clippedTrianglesItems[s] = index; + clippedTrianglesItems[s + 1] = (index + 1); + clippedTrianglesItems[s + 2] = (index + 2); + index += 3; + continue outer; + } + } + } + }; + SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) { + var originalOutput = output; + var clipped = false; + var input = null; + if (clippingArea.length % 4 >= 2) { + input = output; + output = this.scratch; + } + else + input = this.scratch; + input.length = 0; + input.push(x1); + input.push(y1); + input.push(x2); + input.push(y2); + input.push(x3); + input.push(y3); + input.push(x1); + input.push(y1); + output.length = 0; + var clippingVertices = clippingArea; + var clippingVerticesLast = clippingArea.length - 4; + for (var i = 0;; i += 2) { + var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1]; + var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3]; + var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2; + var inputVertices = input; + var inputVerticesLength = input.length - 2, outputStart = output.length; + for (var ii = 0; ii < inputVerticesLength; ii += 2) { + var inputX = inputVertices[ii], inputY = inputVertices[ii + 1]; + var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3]; + var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0; + if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) { + if (side2) { + output.push(inputX2); + output.push(inputY2); + continue; + } + var c0 = inputY2 - inputY, c2 = inputX2 - inputX; + var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY)); + output.push(edgeX + (edgeX2 - edgeX) * ua); + output.push(edgeY + (edgeY2 - edgeY) * ua); + } + else if (side2) { + var c0 = inputY2 - inputY, c2 = inputX2 - inputX; + var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY)); + output.push(edgeX + (edgeX2 - edgeX) * ua); + output.push(edgeY + (edgeY2 - edgeY) * ua); + output.push(inputX2); + output.push(inputY2); + } + clipped = true; + } + if (outputStart == output.length) { + originalOutput.length = 0; + return true; + } + output.push(output[0]); + output.push(output[1]); + if (i == clippingVerticesLast) + break; + var temp = output; + output = input; + output.length = 0; + input = temp; + } + if (originalOutput != output) { + originalOutput.length = 0; + for (var i = 0, n = output.length - 2; i < n; i++) + originalOutput[i] = output[i]; + } + else + originalOutput.length = originalOutput.length - 2; + return clipped; + }; + SkeletonClipping.makeClockwise = function (polygon) { + var vertices = polygon; + var verticeslength = polygon.length; + var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0; + for (var i = 0, n = verticeslength - 3; i < n; i += 2) { + p1x = vertices[i]; + p1y = vertices[i + 1]; + p2x = vertices[i + 2]; + p2y = vertices[i + 3]; + area += p1x * p2y - p2x * p1y; + } + if (area < 0) + return; + for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) { + var x = vertices[i], y = vertices[i + 1]; + var other = lastX - i; + vertices[i] = vertices[other]; + vertices[i + 1] = vertices[other + 1]; + vertices[other] = x; + vertices[other + 1] = y; + } + }; + return SkeletonClipping; + }()); + spine.SkeletonClipping = SkeletonClipping; +})(spine || (spine = {})); +var spine; +(function (spine) { + var SkeletonData = (function () { + function SkeletonData() { + this.bones = new Array(); + this.slots = new Array(); + this.skins = new Array(); + this.events = new Array(); + this.animations = new Array(); + this.ikConstraints = new Array(); + this.transformConstraints = new Array(); + this.pathConstraints = new Array(); + this.fps = 0; + } + SkeletonData.prototype.findBone = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (bone.name == boneName) + return bone; + } + return null; + }; + SkeletonData.prototype.findBoneIndex = function (boneName) { + if (boneName == null) + throw new Error("boneName cannot be null."); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) + if (bones[i].name == boneName) + return i; + return -1; + }; + SkeletonData.prototype.findSlot = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.name == slotName) + return slot; + } + return null; + }; + SkeletonData.prototype.findSlotIndex = function (slotName) { + if (slotName == null) + throw new Error("slotName cannot be null."); + var slots = this.slots; + for (var i = 0, n = slots.length; i < n; i++) + if (slots[i].name == slotName) + return i; + return -1; + }; + SkeletonData.prototype.findSkin = function (skinName) { + if (skinName == null) + throw new Error("skinName cannot be null."); + var skins = this.skins; + for (var i = 0, n = skins.length; i < n; i++) { + var skin = skins[i]; + if (skin.name == skinName) + return skin; + } + return null; + }; + SkeletonData.prototype.findEvent = function (eventDataName) { + if (eventDataName == null) + throw new Error("eventDataName cannot be null."); + var events = this.events; + for (var i = 0, n = events.length; i < n; i++) { + var event_4 = events[i]; + if (event_4.name == eventDataName) + return event_4; + } + return null; + }; + SkeletonData.prototype.findAnimation = function (animationName) { + if (animationName == null) + throw new Error("animationName cannot be null."); + var animations = this.animations; + for (var i = 0, n = animations.length; i < n; i++) { + var animation = animations[i]; + if (animation.name == animationName) + return animation; + } + return null; + }; + SkeletonData.prototype.findIkConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var ikConstraints = this.ikConstraints; + for (var i = 0, n = ikConstraints.length; i < n; i++) { + var constraint = ikConstraints[i]; + if (constraint.name == constraintName) + return constraint; + } + return null; + }; + SkeletonData.prototype.findTransformConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var transformConstraints = this.transformConstraints; + for (var i = 0, n = transformConstraints.length; i < n; i++) { + var constraint = transformConstraints[i]; + if (constraint.name == constraintName) + return constraint; + } + return null; + }; + SkeletonData.prototype.findPathConstraint = function (constraintName) { + if (constraintName == null) + throw new Error("constraintName cannot be null."); + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) { + var constraint = pathConstraints[i]; + if (constraint.name == constraintName) + return constraint; + } + return null; + }; + SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) { + if (pathConstraintName == null) + throw new Error("pathConstraintName cannot be null."); + var pathConstraints = this.pathConstraints; + for (var i = 0, n = pathConstraints.length; i < n; i++) + if (pathConstraints[i].name == pathConstraintName) + return i; + return -1; + }; + return SkeletonData; + }()); + spine.SkeletonData = SkeletonData; +})(spine || (spine = {})); +var spine; +(function (spine) { + var SkeletonJson = (function () { + function SkeletonJson(attachmentLoader) { + this.scale = 1; + this.linkedMeshes = new Array(); + this.attachmentLoader = attachmentLoader; + } + SkeletonJson.prototype.readSkeletonData = function (json) { + var scale = this.scale; + var skeletonData = new spine.SkeletonData(); + var root = typeof (json) === "string" ? JSON.parse(json) : json; + var skeletonMap = root.skeleton; + if (skeletonMap != null) { + skeletonData.hash = skeletonMap.hash; + skeletonData.version = skeletonMap.spine; + skeletonData.width = skeletonMap.width; + skeletonData.height = skeletonMap.height; + skeletonData.fps = skeletonMap.fps; + skeletonData.imagesPath = skeletonMap.images; + } + if (root.bones) { + for (var i = 0; i < root.bones.length; i++) { + var boneMap = root.bones[i]; + var parent_2 = null; + var parentName = this.getValue(boneMap, "parent", null); + if (parentName != null) { + parent_2 = skeletonData.findBone(parentName); + if (parent_2 == null) + throw new Error("Parent bone not found: " + parentName); + } + var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_2); + data.length = this.getValue(boneMap, "length", 0) * scale; + data.x = this.getValue(boneMap, "x", 0) * scale; + data.y = this.getValue(boneMap, "y", 0) * scale; + data.rotation = this.getValue(boneMap, "rotation", 0); + data.scaleX = this.getValue(boneMap, "scaleX", 1); + data.scaleY = this.getValue(boneMap, "scaleY", 1); + data.shearX = this.getValue(boneMap, "shearX", 0); + data.shearY = this.getValue(boneMap, "shearY", 0); + data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, "transform", "normal")); + skeletonData.bones.push(data); + } + } + if (root.slots) { + for (var i = 0; i < root.slots.length; i++) { + var slotMap = root.slots[i]; + var slotName = slotMap.name; + var boneName = slotMap.bone; + var boneData = skeletonData.findBone(boneName); + if (boneData == null) + throw new Error("Slot bone not found: " + boneName); + var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData); + var color = this.getValue(slotMap, "color", null); + if (color != null) + data.color.setFromString(color); + var dark = this.getValue(slotMap, "dark", null); + if (dark != null) { + data.darkColor = new spine.Color(1, 1, 1, 1); + data.darkColor.setFromString(dark); + } + data.attachmentName = this.getValue(slotMap, "attachment", null); + data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal")); + skeletonData.slots.push(data); + } + } + if (root.ik) { + for (var i = 0; i < root.ik.length; i++) { + var constraintMap = root.ik[i]; + var data = new spine.IkConstraintData(constraintMap.name); + data.order = this.getValue(constraintMap, "order", 0); + for (var j = 0; j < constraintMap.bones.length; j++) { + var boneName = constraintMap.bones[j]; + var bone = skeletonData.findBone(boneName); + if (bone == null) + throw new Error("IK bone not found: " + boneName); + data.bones.push(bone); + } + var targetName = constraintMap.target; + data.target = skeletonData.findBone(targetName); + if (data.target == null) + throw new Error("IK target bone not found: " + targetName); + data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1; + data.mix = this.getValue(constraintMap, "mix", 1); + skeletonData.ikConstraints.push(data); + } + } + if (root.transform) { + for (var i = 0; i < root.transform.length; i++) { + var constraintMap = root.transform[i]; + var data = new spine.TransformConstraintData(constraintMap.name); + data.order = this.getValue(constraintMap, "order", 0); + for (var j = 0; j < constraintMap.bones.length; j++) { + var boneName = constraintMap.bones[j]; + var bone = skeletonData.findBone(boneName); + if (bone == null) + throw new Error("Transform constraint bone not found: " + boneName); + data.bones.push(bone); + } + var targetName = constraintMap.target; + data.target = skeletonData.findBone(targetName); + if (data.target == null) + throw new Error("Transform constraint target bone not found: " + targetName); + data.local = this.getValue(constraintMap, "local", false); + data.relative = this.getValue(constraintMap, "relative", false); + data.offsetRotation = this.getValue(constraintMap, "rotation", 0); + data.offsetX = this.getValue(constraintMap, "x", 0) * scale; + data.offsetY = this.getValue(constraintMap, "y", 0) * scale; + data.offsetScaleX = this.getValue(constraintMap, "scaleX", 0); + data.offsetScaleY = this.getValue(constraintMap, "scaleY", 0); + data.offsetShearY = this.getValue(constraintMap, "shearY", 0); + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + data.scaleMix = this.getValue(constraintMap, "scaleMix", 1); + data.shearMix = this.getValue(constraintMap, "shearMix", 1); + skeletonData.transformConstraints.push(data); + } + } + if (root.path) { + for (var i = 0; i < root.path.length; i++) { + var constraintMap = root.path[i]; + var data = new spine.PathConstraintData(constraintMap.name); + data.order = this.getValue(constraintMap, "order", 0); + for (var j = 0; j < constraintMap.bones.length; j++) { + var boneName = constraintMap.bones[j]; + var bone = skeletonData.findBone(boneName); + if (bone == null) + throw new Error("Transform constraint bone not found: " + boneName); + data.bones.push(bone); + } + var targetName = constraintMap.target; + data.target = skeletonData.findSlot(targetName); + if (data.target == null) + throw new Error("Path target slot not found: " + targetName); + data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, "positionMode", "percent")); + data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, "spacingMode", "length")); + data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, "rotateMode", "tangent")); + data.offsetRotation = this.getValue(constraintMap, "rotation", 0); + data.position = this.getValue(constraintMap, "position", 0); + if (data.positionMode == spine.PositionMode.Fixed) + data.position *= scale; + data.spacing = this.getValue(constraintMap, "spacing", 0); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + data.spacing *= scale; + data.rotateMix = this.getValue(constraintMap, "rotateMix", 1); + data.translateMix = this.getValue(constraintMap, "translateMix", 1); + skeletonData.pathConstraints.push(data); + } + } + if (root.skins) { + for (var skinName in root.skins) { + var skinMap = root.skins[skinName]; + var skin = new spine.Skin(skinName); + for (var slotName in skinMap) { + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotName); + var slotMap = skinMap[slotName]; + for (var entryName in slotMap) { + var attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName, skeletonData); + if (attachment != null) + skin.addAttachment(slotIndex, entryName, attachment); + } + } + skeletonData.skins.push(skin); + if (skin.name == "default") + skeletonData.defaultSkin = skin; + } + } + for (var i = 0, n = this.linkedMeshes.length; i < n; i++) { + var linkedMesh = this.linkedMeshes[i]; + var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin); + if (skin == null) + throw new Error("Skin not found: " + linkedMesh.skin); + var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent); + if (parent_3 == null) + throw new Error("Parent mesh not found: " + linkedMesh.parent); + linkedMesh.mesh.setParentMesh(parent_3); + linkedMesh.mesh.updateUVs(); + } + this.linkedMeshes.length = 0; + if (root.events) { + for (var eventName in root.events) { + var eventMap = root.events[eventName]; + var data = new spine.EventData(eventName); + data.intValue = this.getValue(eventMap, "int", 0); + data.floatValue = this.getValue(eventMap, "float", 0); + data.stringValue = this.getValue(eventMap, "string", ""); + skeletonData.events.push(data); + } + } + if (root.animations) { + for (var animationName in root.animations) { + var animationMap = root.animations[animationName]; + this.readAnimation(animationMap, animationName, skeletonData); + } + } + return skeletonData; + }; + SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) { + var scale = this.scale; + name = this.getValue(map, "name", name); + var type = this.getValue(map, "type", "region"); + switch (type) { + case "region": { + var path = this.getValue(map, "path", name); + var region = this.attachmentLoader.newRegionAttachment(skin, name, path); + if (region == null) + return null; + region.path = path; + region.x = this.getValue(map, "x", 0) * scale; + region.y = this.getValue(map, "y", 0) * scale; + region.scaleX = this.getValue(map, "scaleX", 1); + region.scaleY = this.getValue(map, "scaleY", 1); + region.rotation = this.getValue(map, "rotation", 0); + region.width = map.width * scale; + region.height = map.height * scale; + var color = this.getValue(map, "color", null); + if (color != null) + region.color.setFromString(color); + region.updateOffset(); + return region; + } + case "boundingbox": { + var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name); + if (box == null) + return null; + this.readVertices(map, box, map.vertexCount << 1); + var color = this.getValue(map, "color", null); + if (color != null) + box.color.setFromString(color); + return box; + } + case "mesh": + case "linkedmesh": { + var path = this.getValue(map, "path", name); + var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path); + if (mesh == null) + return null; + mesh.path = path; + var color = this.getValue(map, "color", null); + if (color != null) + mesh.color.setFromString(color); + var parent_4 = this.getValue(map, "parent", null); + if (parent_4 != null) { + mesh.inheritDeform = this.getValue(map, "deform", true); + this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent_4)); + return mesh; + } + var uvs = map.uvs; + this.readVertices(map, mesh, uvs.length); + mesh.triangles = map.triangles; + mesh.regionUVs = uvs; + mesh.updateUVs(); + mesh.hullLength = this.getValue(map, "hull", 0) * 2; + return mesh; + } + case "path": { + var path = this.attachmentLoader.newPathAttachment(skin, name); + if (path == null) + return null; + path.closed = this.getValue(map, "closed", false); + path.constantSpeed = this.getValue(map, "constantSpeed", true); + var vertexCount = map.vertexCount; + this.readVertices(map, path, vertexCount << 1); + var lengths = spine.Utils.newArray(vertexCount / 3, 0); + for (var i = 0; i < map.lengths.length; i++) + lengths[i] = map.lengths[i] * scale; + path.lengths = lengths; + var color = this.getValue(map, "color", null); + if (color != null) + path.color.setFromString(color); + return path; + } + case "point": { + var point = this.attachmentLoader.newPointAttachment(skin, name); + if (point == null) + return null; + point.x = this.getValue(map, "x", 0) * scale; + point.y = this.getValue(map, "y", 0) * scale; + point.rotation = this.getValue(map, "rotation", 0); + var color = this.getValue(map, "color", null); + if (color != null) + point.color.setFromString(color); + return point; + } + case "clipping": { + var clip = this.attachmentLoader.newClippingAttachment(skin, name); + if (clip == null) + return null; + var end = this.getValue(map, "end", null); + if (end != null) { + var slot = skeletonData.findSlot(end); + if (slot == null) + throw new Error("Clipping end slot not found: " + end); + clip.endSlot = slot; + } + var vertexCount = map.vertexCount; + this.readVertices(map, clip, vertexCount << 1); + var color = this.getValue(map, "color", null); + if (color != null) + clip.color.setFromString(color); + return clip; + } + } + return null; + }; + SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) { + var scale = this.scale; + attachment.worldVerticesLength = verticesLength; + var vertices = map.vertices; + if (verticesLength == vertices.length) { + var scaledVertices = spine.Utils.toFloatArray(vertices); + if (scale != 1) { + for (var i = 0, n = vertices.length; i < n; i++) + scaledVertices[i] *= scale; + } + attachment.vertices = scaledVertices; + return; + } + var weights = new Array(); + var bones = new Array(); + for (var i = 0, n = vertices.length; i < n;) { + var boneCount = vertices[i++]; + bones.push(boneCount); + for (var nn = i + boneCount * 4; i < nn; i += 4) { + bones.push(vertices[i]); + weights.push(vertices[i + 1] * scale); + weights.push(vertices[i + 2] * scale); + weights.push(vertices[i + 3]); + } + } + attachment.bones = bones; + attachment.vertices = spine.Utils.toFloatArray(weights); + }; + SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) { + var scale = this.scale; + var timelines = new Array(); + var duration = 0; + if (map.slots) { + for (var slotName in map.slots) { + var slotMap = map.slots[slotName]; + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotName); + for (var timelineName in slotMap) { + var timelineMap = slotMap[timelineName]; + if (timelineName == "attachment") { + var timeline = new spine.AttachmentTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex++, valueMap.time, valueMap.name); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + else if (timelineName == "color") { + var timeline = new spine.ColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var color = new spine.Color(); + color.setFromString(valueMap.color); + timeline.setFrame(frameIndex, valueMap.time, color.r, color.g, color.b, color.a); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]); + } + else if (timelineName == "twoColor") { + var timeline = new spine.TwoColorTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var light = new spine.Color(); + var dark = new spine.Color(); + light.setFromString(valueMap.light); + dark.setFromString(valueMap.dark); + timeline.setFrame(frameIndex, valueMap.time, light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")"); + } + } + } + if (map.bones) { + for (var boneName in map.bones) { + var boneMap = map.bones[boneName]; + var boneIndex = skeletonData.findBoneIndex(boneName); + if (boneIndex == -1) + throw new Error("Bone not found: " + boneName); + for (var timelineName in boneMap) { + var timelineMap = boneMap[timelineName]; + if (timelineName === "rotate") { + var timeline = new spine.RotateTimeline(timelineMap.length); + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, valueMap.angle); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]); + } + else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") { + var timeline = null; + var timelineScale = 1; + if (timelineName === "scale") + timeline = new spine.ScaleTimeline(timelineMap.length); + else if (timelineName === "shear") + timeline = new spine.ShearTimeline(timelineMap.length); + else { + timeline = new spine.TranslateTimeline(timelineMap.length); + timelineScale = scale; + } + timeline.boneIndex = boneIndex; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + var x = this.getValue(valueMap, "x", 0), y = this.getValue(valueMap, "y", 0); + timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]); + } + else + throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")"); + } + } + } + if (map.ik) { + for (var constraintName in map.ik) { + var constraintMap = map.ik[constraintName]; + var constraint = skeletonData.findIkConstraint(constraintName); + var timeline = new spine.IkConstraintTimeline(constraintMap.length); + timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint); + var frameIndex = 0; + for (var i = 0; i < constraintMap.length; i++) { + var valueMap = constraintMap[i]; + timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "bendPositive", true) ? 1 : -1); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]); + } + } + if (map.transform) { + for (var constraintName in map.transform) { + var constraintMap = map.transform[constraintName]; + var constraint = skeletonData.findTransformConstraint(constraintName); + var timeline = new spine.TransformConstraintTimeline(constraintMap.length); + timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint); + var frameIndex = 0; + for (var i = 0; i < constraintMap.length; i++) { + var valueMap = constraintMap[i]; + timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1), this.getValue(valueMap, "scaleMix", 1), this.getValue(valueMap, "shearMix", 1)); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]); + } + } + if (map.paths) { + for (var constraintName in map.paths) { + var constraintMap = map.paths[constraintName]; + var index = skeletonData.findPathConstraintIndex(constraintName); + if (index == -1) + throw new Error("Path constraint not found: " + constraintName); + var data = skeletonData.pathConstraints[index]; + for (var timelineName in constraintMap) { + var timelineMap = constraintMap[timelineName]; + if (timelineName === "position" || timelineName === "spacing") { + var timeline = null; + var timelineScale = 1; + if (timelineName === "spacing") { + timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length); + if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed) + timelineScale = scale; + } + else { + timeline = new spine.PathConstraintPositionTimeline(timelineMap.length); + if (data.positionMode == spine.PositionMode.Fixed) + timelineScale = scale; + } + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]); + } + else if (timelineName === "mix") { + var timeline = new spine.PathConstraintMixTimeline(timelineMap.length); + timeline.pathConstraintIndex = index; + var frameIndex = 0; + for (var i = 0; i < timelineMap.length; i++) { + var valueMap = timelineMap[i]; + timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1)); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]); + } + } + } + } + if (map.deform) { + for (var deformName in map.deform) { + var deformMap = map.deform[deformName]; + var skin = skeletonData.findSkin(deformName); + if (skin == null) + throw new Error("Skin not found: " + deformName); + for (var slotName in deformMap) { + var slotMap = deformMap[slotName]; + var slotIndex = skeletonData.findSlotIndex(slotName); + if (slotIndex == -1) + throw new Error("Slot not found: " + slotMap.name); + for (var timelineName in slotMap) { + var timelineMap = slotMap[timelineName]; + var attachment = skin.getAttachment(slotIndex, timelineName); + if (attachment == null) + throw new Error("Deform attachment not found: " + timelineMap.name); + var weighted = attachment.bones != null; + var vertices = attachment.vertices; + var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length; + var timeline = new spine.DeformTimeline(timelineMap.length); + timeline.slotIndex = slotIndex; + timeline.attachment = attachment; + var frameIndex = 0; + for (var j = 0; j < timelineMap.length; j++) { + var valueMap = timelineMap[j]; + var deform = void 0; + var verticesValue = this.getValue(valueMap, "vertices", null); + if (verticesValue == null) + deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices; + else { + deform = spine.Utils.newFloatArray(deformLength); + var start = this.getValue(valueMap, "offset", 0); + spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length); + if (scale != 1) { + for (var i = start, n = i + verticesValue.length; i < n; i++) + deform[i] *= scale; + } + if (!weighted) { + for (var i = 0; i < deformLength; i++) + deform[i] += vertices[i]; + } + } + timeline.setFrame(frameIndex, valueMap.time, deform); + this.readCurve(valueMap, timeline, frameIndex); + frameIndex++; + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + } + } + } + var drawOrderNode = map.drawOrder; + if (drawOrderNode == null) + drawOrderNode = map.draworder; + if (drawOrderNode != null) { + var timeline = new spine.DrawOrderTimeline(drawOrderNode.length); + var slotCount = skeletonData.slots.length; + var frameIndex = 0; + for (var j = 0; j < drawOrderNode.length; j++) { + var drawOrderMap = drawOrderNode[j]; + var drawOrder = null; + var offsets = this.getValue(drawOrderMap, "offsets", null); + if (offsets != null) { + drawOrder = spine.Utils.newArray(slotCount, -1); + var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0); + var originalIndex = 0, unchangedIndex = 0; + for (var i = 0; i < offsets.length; i++) { + var offsetMap = offsets[i]; + var slotIndex = skeletonData.findSlotIndex(offsetMap.slot); + if (slotIndex == -1) + throw new Error("Slot not found: " + offsetMap.slot); + while (originalIndex != slotIndex) + unchanged[unchangedIndex++] = originalIndex++; + drawOrder[originalIndex + offsetMap.offset] = originalIndex++; + } + while (originalIndex < slotCount) + unchanged[unchangedIndex++] = originalIndex++; + for (var i = slotCount - 1; i >= 0; i--) + if (drawOrder[i] == -1) + drawOrder[i] = unchanged[--unchangedIndex]; + } + timeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + if (map.events) { + var timeline = new spine.EventTimeline(map.events.length); + var frameIndex = 0; + for (var i = 0; i < map.events.length; i++) { + var eventMap = map.events[i]; + var eventData = skeletonData.findEvent(eventMap.name); + if (eventData == null) + throw new Error("Event not found: " + eventMap.name); + var event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData); + event_5.intValue = this.getValue(eventMap, "int", eventData.intValue); + event_5.floatValue = this.getValue(eventMap, "float", eventData.floatValue); + event_5.stringValue = this.getValue(eventMap, "string", eventData.stringValue); + timeline.setFrame(frameIndex++, event_5); + } + timelines.push(timeline); + duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]); + } + if (isNaN(duration)) { + throw new Error("Error while parsing animation, duration is NaN"); + } + skeletonData.animations.push(new spine.Animation(name, timelines, duration)); + }; + SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { + if (!map.curve) + return; + if (map.curve === "stepped") + timeline.setStepped(frameIndex); + else if (Object.prototype.toString.call(map.curve) === '[object Array]') { + var curve = map.curve; + timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]); + } + }; + SkeletonJson.prototype.getValue = function (map, prop, defaultValue) { + return map[prop] !== undefined ? map[prop] : defaultValue; + }; + SkeletonJson.blendModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "normal") + return spine.BlendMode.Normal; + if (str == "additive") + return spine.BlendMode.Additive; + if (str == "multiply") + return spine.BlendMode.Multiply; + if (str == "screen") + return spine.BlendMode.Screen; + throw new Error("Unknown blend mode: " + str); + }; + SkeletonJson.positionModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "fixed") + return spine.PositionMode.Fixed; + if (str == "percent") + return spine.PositionMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.spacingModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "length") + return spine.SpacingMode.Length; + if (str == "fixed") + return spine.SpacingMode.Fixed; + if (str == "percent") + return spine.SpacingMode.Percent; + throw new Error("Unknown position mode: " + str); + }; + SkeletonJson.rotateModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "tangent") + return spine.RotateMode.Tangent; + if (str == "chain") + return spine.RotateMode.Chain; + if (str == "chainscale") + return spine.RotateMode.ChainScale; + throw new Error("Unknown rotate mode: " + str); + }; + SkeletonJson.transformModeFromString = function (str) { + str = str.toLowerCase(); + if (str == "normal") + return spine.TransformMode.Normal; + if (str == "onlytranslation") + return spine.TransformMode.OnlyTranslation; + if (str == "norotationorreflection") + return spine.TransformMode.NoRotationOrReflection; + if (str == "noscale") + return spine.TransformMode.NoScale; + if (str == "noscaleorreflection") + return spine.TransformMode.NoScaleOrReflection; + throw new Error("Unknown transform mode: " + str); + }; + return SkeletonJson; + }()); + spine.SkeletonJson = SkeletonJson; + var LinkedMesh = (function () { + function LinkedMesh(mesh, skin, slotIndex, parent) { + this.mesh = mesh; + this.skin = skin; + this.slotIndex = slotIndex; + this.parent = parent; + } + return LinkedMesh; + }()); +})(spine || (spine = {})); +var spine; +(function (spine) { + var Skin = (function () { + function Skin(name) { + this.attachments = new Array(); + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + Skin.prototype.addAttachment = function (slotIndex, name, attachment) { + if (attachment == null) + throw new Error("attachment cannot be null."); + var attachments = this.attachments; + if (slotIndex >= attachments.length) + attachments.length = slotIndex + 1; + if (!attachments[slotIndex]) + attachments[slotIndex] = {}; + attachments[slotIndex][name] = attachment; + }; + Skin.prototype.getAttachment = function (slotIndex, name) { + var dictionary = this.attachments[slotIndex]; + return dictionary ? dictionary[name] : null; + }; + Skin.prototype.attachAll = function (skeleton, oldSkin) { + var slotIndex = 0; + for (var i = 0; i < skeleton.slots.length; i++) { + var slot = skeleton.slots[i]; + var slotAttachment = slot.getAttachment(); + if (slotAttachment && slotIndex < oldSkin.attachments.length) { + var dictionary = oldSkin.attachments[slotIndex]; + for (var key in dictionary) { + var skinAttachment = dictionary[key]; + if (slotAttachment == skinAttachment) { + var attachment = this.getAttachment(slotIndex, key); + if (attachment != null) + slot.setAttachment(attachment); + break; + } + } + } + slotIndex++; + } + }; + return Skin; + }()); + spine.Skin = Skin; +})(spine || (spine = {})); +var spine; +(function (spine) { + var Slot = (function () { + function Slot(data, bone) { + this.attachmentVertices = new Array(); + if (data == null) + throw new Error("data cannot be null."); + if (bone == null) + throw new Error("bone cannot be null."); + this.data = data; + this.bone = bone; + this.color = new spine.Color(); + this.darkColor = data.darkColor == null ? null : new spine.Color(); + this.setToSetupPose(); + } + Slot.prototype.getAttachment = function () { + return this.attachment; + }; + Slot.prototype.setAttachment = function (attachment) { + if (this.attachment == attachment) + return; + this.attachment = attachment; + this.attachmentTime = this.bone.skeleton.time; + this.attachmentVertices.length = 0; + }; + Slot.prototype.setAttachmentTime = function (time) { + this.attachmentTime = this.bone.skeleton.time - time; + }; + Slot.prototype.getAttachmentTime = function () { + return this.bone.skeleton.time - this.attachmentTime; + }; + Slot.prototype.setToSetupPose = function () { + this.color.setFromColor(this.data.color); + if (this.darkColor != null) + this.darkColor.setFromColor(this.data.darkColor); + if (this.data.attachmentName == null) + this.attachment = null; + else { + this.attachment = null; + this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName)); + } + }; + return Slot; + }()); + spine.Slot = Slot; +})(spine || (spine = {})); +var spine; +(function (spine) { + var SlotData = (function () { + function SlotData(index, name, boneData) { + this.color = new spine.Color(1, 1, 1, 1); + if (index < 0) + throw new Error("index must be >= 0."); + if (name == null) + throw new Error("name cannot be null."); + if (boneData == null) + throw new Error("boneData cannot be null."); + this.index = index; + this.name = name; + this.boneData = boneData; + } + return SlotData; + }()); + spine.SlotData = SlotData; +})(spine || (spine = {})); +var spine; +(function (spine) { + var Texture = (function () { + function Texture(image) { + this._image = image; + } + Texture.prototype.getImage = function () { + return this._image; + }; + Texture.filterFromString = function (text) { + switch (text.toLowerCase()) { + case "nearest": return TextureFilter.Nearest; + case "linear": return TextureFilter.Linear; + case "mipmap": return TextureFilter.MipMap; + case "mipmapnearestnearest": return TextureFilter.MipMapNearestNearest; + case "mipmaplinearnearest": return TextureFilter.MipMapLinearNearest; + case "mipmapnearestlinear": return TextureFilter.MipMapNearestLinear; + case "mipmaplinearlinear": return TextureFilter.MipMapLinearLinear; + default: throw new Error("Unknown texture filter " + text); + } + }; + Texture.wrapFromString = function (text) { + switch (text.toLowerCase()) { + case "mirroredtepeat": return TextureWrap.MirroredRepeat; + case "clamptoedge": return TextureWrap.ClampToEdge; + case "repeat": return TextureWrap.Repeat; + default: throw new Error("Unknown texture wrap " + text); + } + }; + return Texture; + }()); + spine.Texture = Texture; + var TextureFilter; + (function (TextureFilter) { + TextureFilter[TextureFilter["Nearest"] = 9728] = "Nearest"; + TextureFilter[TextureFilter["Linear"] = 9729] = "Linear"; + TextureFilter[TextureFilter["MipMap"] = 9987] = "MipMap"; + TextureFilter[TextureFilter["MipMapNearestNearest"] = 9984] = "MipMapNearestNearest"; + TextureFilter[TextureFilter["MipMapLinearNearest"] = 9985] = "MipMapLinearNearest"; + TextureFilter[TextureFilter["MipMapNearestLinear"] = 9986] = "MipMapNearestLinear"; + TextureFilter[TextureFilter["MipMapLinearLinear"] = 9987] = "MipMapLinearLinear"; + })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {})); + var TextureWrap; + (function (TextureWrap) { + TextureWrap[TextureWrap["MirroredRepeat"] = 33648] = "MirroredRepeat"; + TextureWrap[TextureWrap["ClampToEdge"] = 33071] = "ClampToEdge"; + TextureWrap[TextureWrap["Repeat"] = 10497] = "Repeat"; + })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {})); + var TextureRegion = (function () { + function TextureRegion() { + this.u = 0; + this.v = 0; + this.u2 = 0; + this.v2 = 0; + this.width = 0; + this.height = 0; + this.rotate = false; + this.offsetX = 0; + this.offsetY = 0; + this.originalWidth = 0; + this.originalHeight = 0; + } + return TextureRegion; + }()); + spine.TextureRegion = TextureRegion; + var FakeTexture = (function (_super) { + __extends(FakeTexture, _super); + function FakeTexture() { + return _super !== null && _super.apply(this, arguments) || this; + } + FakeTexture.prototype.setFilters = function (minFilter, magFilter) { }; + FakeTexture.prototype.setWraps = function (uWrap, vWrap) { }; + FakeTexture.prototype.dispose = function () { }; + return FakeTexture; + }(spine.Texture)); + spine.FakeTexture = FakeTexture; +})(spine || (spine = {})); +var spine; +(function (spine) { + var TextureAtlas = (function () { + function TextureAtlas(atlasText, textureLoader) { + this.pages = new Array(); + this.regions = new Array(); + this.load(atlasText, textureLoader); + } + TextureAtlas.prototype.load = function (atlasText, textureLoader) { + if (textureLoader == null) + throw new Error("textureLoader cannot be null."); + var reader = new TextureAtlasReader(atlasText); + var tuple = new Array(4); + var page = null; + while (true) { + var line = reader.readLine(); + if (line == null) + break; + line = line.trim(); + if (line.length == 0) + page = null; + else if (!page) { + page = new TextureAtlasPage(); + page.name = line; + if (reader.readTuple(tuple) == 2) { + page.width = parseInt(tuple[0]); + page.height = parseInt(tuple[1]); + reader.readTuple(tuple); + } + reader.readTuple(tuple); + page.minFilter = spine.Texture.filterFromString(tuple[0]); + page.magFilter = spine.Texture.filterFromString(tuple[1]); + var direction = reader.readValue(); + page.uWrap = spine.TextureWrap.ClampToEdge; + page.vWrap = spine.TextureWrap.ClampToEdge; + if (direction == "x") + page.uWrap = spine.TextureWrap.Repeat; + else if (direction == "y") + page.vWrap = spine.TextureWrap.Repeat; + else if (direction == "xy") + page.uWrap = page.vWrap = spine.TextureWrap.Repeat; + page.texture = textureLoader(line); + page.texture.setFilters(page.minFilter, page.magFilter); + page.texture.setWraps(page.uWrap, page.vWrap); + page.width = page.texture.getImage().width; + page.height = page.texture.getImage().height; + this.pages.push(page); + } + else { + var region = new TextureAtlasRegion(); + region.name = line; + region.page = page; + region.rotate = reader.readValue() == "true"; + reader.readTuple(tuple); + var x = parseInt(tuple[0]); + var y = parseInt(tuple[1]); + reader.readTuple(tuple); + var width = parseInt(tuple[0]); + var height = parseInt(tuple[1]); + region.u = x / page.width; + region.v = y / page.height; + if (region.rotate) { + region.u2 = (x + height) / page.width; + region.v2 = (y + width) / page.height; + } + else { + region.u2 = (x + width) / page.width; + region.v2 = (y + height) / page.height; + } + region.x = x; + region.y = y; + region.width = Math.abs(width); + region.height = Math.abs(height); + if (reader.readTuple(tuple) == 4) { + if (reader.readTuple(tuple) == 4) { + reader.readTuple(tuple); + } + } + region.originalWidth = parseInt(tuple[0]); + region.originalHeight = parseInt(tuple[1]); + reader.readTuple(tuple); + region.offsetX = parseInt(tuple[0]); + region.offsetY = parseInt(tuple[1]); + region.index = parseInt(reader.readValue()); + region.texture = page.texture; + this.regions.push(region); + } + } + }; + TextureAtlas.prototype.findRegion = function (name) { + for (var i = 0; i < this.regions.length; i++) { + if (this.regions[i].name == name) { + return this.regions[i]; + } + } + return null; + }; + TextureAtlas.prototype.dispose = function () { + for (var i = 0; i < this.pages.length; i++) { + this.pages[i].texture.dispose(); + } + }; + return TextureAtlas; + }()); + spine.TextureAtlas = TextureAtlas; + var TextureAtlasReader = (function () { + function TextureAtlasReader(text) { + this.index = 0; + this.lines = text.split(/\r\n|\r|\n/); + } + TextureAtlasReader.prototype.readLine = function () { + if (this.index >= this.lines.length) + return null; + return this.lines[this.index++]; + }; + TextureAtlasReader.prototype.readValue = function () { + var line = this.readLine(); + var colon = line.indexOf(":"); + if (colon == -1) + throw new Error("Invalid line: " + line); + return line.substring(colon + 1).trim(); + }; + TextureAtlasReader.prototype.readTuple = function (tuple) { + var line = this.readLine(); + var colon = line.indexOf(":"); + if (colon == -1) + throw new Error("Invalid line: " + line); + var i = 0, lastMatch = colon + 1; + for (; i < 3; i++) { + var comma = line.indexOf(",", lastMatch); + if (comma == -1) + break; + tuple[i] = line.substr(lastMatch, comma - lastMatch).trim(); + lastMatch = comma + 1; + } + tuple[i] = line.substring(lastMatch).trim(); + return i + 1; + }; + return TextureAtlasReader; + }()); + var TextureAtlasPage = (function () { + function TextureAtlasPage() { + } + return TextureAtlasPage; + }()); + spine.TextureAtlasPage = TextureAtlasPage; + var TextureAtlasRegion = (function (_super) { + __extends(TextureAtlasRegion, _super); + function TextureAtlasRegion() { + return _super !== null && _super.apply(this, arguments) || this; + } + return TextureAtlasRegion; + }(spine.TextureRegion)); + spine.TextureAtlasRegion = TextureAtlasRegion; +})(spine || (spine = {})); +var spine; +(function (spine) { + var TransformConstraint = (function () { + function TransformConstraint(data, skeleton) { + this.rotateMix = 0; + this.translateMix = 0; + this.scaleMix = 0; + this.shearMix = 0; + this.temp = new spine.Vector2(); + if (data == null) + throw new Error("data cannot be null."); + if (skeleton == null) + throw new Error("skeleton cannot be null."); + this.data = data; + this.rotateMix = data.rotateMix; + this.translateMix = data.translateMix; + this.scaleMix = data.scaleMix; + this.shearMix = data.shearMix; + this.bones = new Array(); + for (var i = 0; i < data.bones.length; i++) + this.bones.push(skeleton.findBone(data.bones[i].name)); + this.target = skeleton.findBone(data.target.name); + } + TransformConstraint.prototype.apply = function () { + this.update(); + }; + TransformConstraint.prototype.update = function () { + if (this.data.local) { + if (this.data.relative) + this.applyRelativeLocal(); + else + this.applyAbsoluteLocal(); + } + else { + if (this.data.relative) + this.applyRelativeWorld(); + else + this.applyAbsoluteWorld(); + } + }; + TransformConstraint.prototype.applyAbsoluteWorld = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var ta = target.a, tb = target.b, tc = target.c, td = target.d; + var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad; + var offsetRotation = this.data.offsetRotation * degRadReflect; + var offsetShearY = this.data.offsetShearY * degRadReflect; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + var modified = false; + if (rotateMix != 0) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation; + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + modified = true; + } + if (translateMix != 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + bone.worldX += (temp.x - bone.worldX) * translateMix; + bone.worldY += (temp.y - bone.worldY) * translateMix; + modified = true; + } + if (scaleMix > 0) { + var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c); + var ts = Math.sqrt(ta * ta + tc * tc); + if (s > 0.00001) + s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s; + bone.a *= s; + bone.c *= s; + s = Math.sqrt(bone.b * bone.b + bone.d * bone.d); + ts = Math.sqrt(tb * tb + td * td); + if (s > 0.00001) + s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s; + bone.b *= s; + bone.d *= s; + modified = true; + } + if (shearMix > 0) { + var b = bone.b, d = bone.d; + var by = Math.atan2(d, b); + var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a)); + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r = by + (r + offsetShearY) * shearMix; + var s = Math.sqrt(b * b + d * d); + bone.b = Math.cos(r) * s; + bone.d = Math.sin(r) * s; + modified = true; + } + if (modified) + bone.appliedValid = false; + } + }; + TransformConstraint.prototype.applyRelativeWorld = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + var ta = target.a, tb = target.b, tc = target.c, td = target.d; + var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad; + var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect; + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + var modified = false; + if (rotateMix != 0) { + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var r = Math.atan2(tc, ta) + offsetRotation; + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + r *= rotateMix; + var cos = Math.cos(r), sin = Math.sin(r); + bone.a = cos * a - sin * c; + bone.b = cos * b - sin * d; + bone.c = sin * a + cos * c; + bone.d = sin * b + cos * d; + modified = true; + } + if (translateMix != 0) { + var temp = this.temp; + target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY)); + bone.worldX += temp.x * translateMix; + bone.worldY += temp.y * translateMix; + modified = true; + } + if (scaleMix > 0) { + var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1; + bone.a *= s; + bone.c *= s; + s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1; + bone.b *= s; + bone.d *= s; + modified = true; + } + if (shearMix > 0) { + var r = Math.atan2(td, tb) - Math.atan2(tc, ta); + if (r > spine.MathUtils.PI) + r -= spine.MathUtils.PI2; + else if (r < -spine.MathUtils.PI) + r += spine.MathUtils.PI2; + var b = bone.b, d = bone.d; + r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix; + var s = Math.sqrt(b * b + d * d); + bone.b = Math.cos(r) * s; + bone.d = Math.sin(r) * s; + modified = true; + } + if (modified) + bone.appliedValid = false; + } + }; + TransformConstraint.prototype.applyAbsoluteLocal = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + if (!target.appliedValid) + target.updateAppliedTransform(); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (!bone.appliedValid) + bone.updateAppliedTransform(); + var rotation = bone.arotation; + if (rotateMix != 0) { + var r = target.arotation - rotation + this.data.offsetRotation; + r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; + rotation += r * rotateMix; + } + var x = bone.ax, y = bone.ay; + if (translateMix != 0) { + x += (target.ax - x + this.data.offsetX) * translateMix; + y += (target.ay - y + this.data.offsetY) * translateMix; + } + var scaleX = bone.ascaleX, scaleY = bone.ascaleY; + if (scaleMix > 0) { + if (scaleX > 0.00001) + scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX; + if (scaleY > 0.00001) + scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY; + } + var shearY = bone.ashearY; + if (shearMix > 0) { + var r = target.ashearY - shearY + this.data.offsetShearY; + r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360; + bone.shearY += r * shearMix; + } + bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY); + } + }; + TransformConstraint.prototype.applyRelativeLocal = function () { + var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix; + var target = this.target; + if (!target.appliedValid) + target.updateAppliedTransform(); + var bones = this.bones; + for (var i = 0, n = bones.length; i < n; i++) { + var bone = bones[i]; + if (!bone.appliedValid) + bone.updateAppliedTransform(); + var rotation = bone.arotation; + if (rotateMix != 0) + rotation += (target.arotation + this.data.offsetRotation) * rotateMix; + var x = bone.ax, y = bone.ay; + if (translateMix != 0) { + x += (target.ax + this.data.offsetX) * translateMix; + y += (target.ay + this.data.offsetY) * translateMix; + } + var scaleX = bone.ascaleX, scaleY = bone.ascaleY; + if (scaleMix > 0) { + if (scaleX > 0.00001) + scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1; + if (scaleY > 0.00001) + scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1; + } + var shearY = bone.ashearY; + if (shearMix > 0) + shearY += (target.ashearY + this.data.offsetShearY) * shearMix; + bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY); + } + }; + TransformConstraint.prototype.getOrder = function () { + return this.data.order; + }; + return TransformConstraint; + }()); + spine.TransformConstraint = TransformConstraint; +})(spine || (spine = {})); +var spine; +(function (spine) { + var TransformConstraintData = (function () { + function TransformConstraintData(name) { + this.order = 0; + this.bones = new Array(); + this.rotateMix = 0; + this.translateMix = 0; + this.scaleMix = 0; + this.shearMix = 0; + this.offsetRotation = 0; + this.offsetX = 0; + this.offsetY = 0; + this.offsetScaleX = 0; + this.offsetScaleY = 0; + this.offsetShearY = 0; + this.relative = false; + this.local = false; + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return TransformConstraintData; + }()); + spine.TransformConstraintData = TransformConstraintData; +})(spine || (spine = {})); +var spine; +(function (spine) { + var Triangulator = (function () { + function Triangulator() { + this.convexPolygons = new Array(); + this.convexPolygonsIndices = new Array(); + this.indicesArray = new Array(); + this.isConcaveArray = new Array(); + this.triangles = new Array(); + this.polygonPool = new spine.Pool(function () { + return new Array(); + }); + this.polygonIndicesPool = new spine.Pool(function () { + return new Array(); + }); + } + Triangulator.prototype.triangulate = function (verticesArray) { + var vertices = verticesArray; + var vertexCount = verticesArray.length >> 1; + var indices = this.indicesArray; + indices.length = 0; + for (var i = 0; i < vertexCount; i++) + indices[i] = i; + var isConcave = this.isConcaveArray; + isConcave.length = 0; + for (var i = 0, n = vertexCount; i < n; ++i) + isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices); + var triangles = this.triangles; + triangles.length = 0; + while (vertexCount > 3) { + var previous = vertexCount - 1, i = 0, next = 1; + while (true) { + outer: if (!isConcave[i]) { + var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1; + var p1x = vertices[p1], p1y = vertices[p1 + 1]; + var p2x = vertices[p2], p2y = vertices[p2 + 1]; + var p3x = vertices[p3], p3y = vertices[p3 + 1]; + for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) { + if (!isConcave[ii]) + continue; + var v = indices[ii] << 1; + var vx = vertices[v], vy = vertices[v + 1]; + if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) { + if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) { + if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy)) + break outer; + } + } + } + break; + } + if (next == 0) { + do { + if (!isConcave[i]) + break; + i--; + } while (i > 0); + break; + } + previous = i; + i = next; + next = (next + 1) % vertexCount; + } + triangles.push(indices[(vertexCount + i - 1) % vertexCount]); + triangles.push(indices[i]); + triangles.push(indices[(i + 1) % vertexCount]); + indices.splice(i, 1); + isConcave.splice(i, 1); + vertexCount--; + var previousIndex = (vertexCount + i - 1) % vertexCount; + var nextIndex = i == vertexCount ? 0 : i; + isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices); + isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices); + } + if (vertexCount == 3) { + triangles.push(indices[2]); + triangles.push(indices[0]); + triangles.push(indices[1]); + } + return triangles; + }; + Triangulator.prototype.decompose = function (verticesArray, triangles) { + var vertices = verticesArray; + var convexPolygons = this.convexPolygons; + this.polygonPool.freeAll(convexPolygons); + convexPolygons.length = 0; + var convexPolygonsIndices = this.convexPolygonsIndices; + this.polygonIndicesPool.freeAll(convexPolygonsIndices); + convexPolygonsIndices.length = 0; + var polygonIndices = this.polygonIndicesPool.obtain(); + polygonIndices.length = 0; + var polygon = this.polygonPool.obtain(); + polygon.length = 0; + var fanBaseIndex = -1, lastWinding = 0; + for (var i = 0, n = triangles.length; i < n; i += 3) { + var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1; + var x1 = vertices[t1], y1 = vertices[t1 + 1]; + var x2 = vertices[t2], y2 = vertices[t2 + 1]; + var x3 = vertices[t3], y3 = vertices[t3 + 1]; + var merged = false; + if (fanBaseIndex == t1) { + var o = polygon.length - 4; + var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3); + var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]); + if (winding1 == lastWinding && winding2 == lastWinding) { + polygon.push(x3); + polygon.push(y3); + polygonIndices.push(t3); + merged = true; + } + } + if (!merged) { + if (polygon.length > 0) { + convexPolygons.push(polygon); + convexPolygonsIndices.push(polygonIndices); + } + else { + this.polygonPool.free(polygon); + this.polygonIndicesPool.free(polygonIndices); + } + polygon = this.polygonPool.obtain(); + polygon.length = 0; + polygon.push(x1); + polygon.push(y1); + polygon.push(x2); + polygon.push(y2); + polygon.push(x3); + polygon.push(y3); + polygonIndices = this.polygonIndicesPool.obtain(); + polygonIndices.length = 0; + polygonIndices.push(t1); + polygonIndices.push(t2); + polygonIndices.push(t3); + lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3); + fanBaseIndex = t1; + } + } + if (polygon.length > 0) { + convexPolygons.push(polygon); + convexPolygonsIndices.push(polygonIndices); + } + for (var i = 0, n = convexPolygons.length; i < n; i++) { + polygonIndices = convexPolygonsIndices[i]; + if (polygonIndices.length == 0) + continue; + var firstIndex = polygonIndices[0]; + var lastIndex = polygonIndices[polygonIndices.length - 1]; + polygon = convexPolygons[i]; + var o = polygon.length - 4; + var prevPrevX = polygon[o], prevPrevY = polygon[o + 1]; + var prevX = polygon[o + 2], prevY = polygon[o + 3]; + var firstX = polygon[0], firstY = polygon[1]; + var secondX = polygon[2], secondY = polygon[3]; + var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY); + for (var ii = 0; ii < n; ii++) { + if (ii == i) + continue; + var otherIndices = convexPolygonsIndices[ii]; + if (otherIndices.length != 3) + continue; + var otherFirstIndex = otherIndices[0]; + var otherSecondIndex = otherIndices[1]; + var otherLastIndex = otherIndices[2]; + var otherPoly = convexPolygons[ii]; + var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1]; + if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex) + continue; + var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3); + var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY); + if (winding1 == winding && winding2 == winding) { + otherPoly.length = 0; + otherIndices.length = 0; + polygon.push(x3); + polygon.push(y3); + polygonIndices.push(otherLastIndex); + prevPrevX = prevX; + prevPrevY = prevY; + prevX = x3; + prevY = y3; + ii = 0; + } + } + } + for (var i = convexPolygons.length - 1; i >= 0; i--) { + polygon = convexPolygons[i]; + if (polygon.length == 0) { + convexPolygons.splice(i, 1); + this.polygonPool.free(polygon); + polygonIndices = convexPolygonsIndices[i]; + convexPolygonsIndices.splice(i, 1); + this.polygonIndicesPool.free(polygonIndices); + } + } + return convexPolygons; + }; + Triangulator.isConcave = function (index, vertexCount, vertices, indices) { + var previous = indices[(vertexCount + index - 1) % vertexCount] << 1; + var current = indices[index] << 1; + var next = indices[(index + 1) % vertexCount] << 1; + return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]); + }; + Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) { + return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0; + }; + Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) { + var px = p2x - p1x, py = p2y - p1y; + return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1; + }; + return Triangulator; + }()); + spine.Triangulator = Triangulator; +})(spine || (spine = {})); +var spine; +(function (spine) { + var IntSet = (function () { + function IntSet() { + this.array = new Array(); + } + IntSet.prototype.add = function (value) { + var contains = this.contains(value); + this.array[value | 0] = value | 0; + return !contains; + }; + IntSet.prototype.contains = function (value) { + return this.array[value | 0] != undefined; + }; + IntSet.prototype.remove = function (value) { + this.array[value | 0] = undefined; + }; + IntSet.prototype.clear = function () { + this.array.length = 0; + }; + return IntSet; + }()); + spine.IntSet = IntSet; + var Color = (function () { + function Color(r, g, b, a) { + if (r === void 0) { r = 0; } + if (g === void 0) { g = 0; } + if (b === void 0) { b = 0; } + if (a === void 0) { a = 0; } + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } + Color.prototype.set = function (r, g, b, a) { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + this.clamp(); + return this; + }; + Color.prototype.setFromColor = function (c) { + this.r = c.r; + this.g = c.g; + this.b = c.b; + this.a = c.a; + return this; + }; + Color.prototype.setFromString = function (hex) { + hex = hex.charAt(0) == '#' ? hex.substr(1) : hex; + this.r = parseInt(hex.substr(0, 2), 16) / 255.0; + this.g = parseInt(hex.substr(2, 2), 16) / 255.0; + this.b = parseInt(hex.substr(4, 2), 16) / 255.0; + this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0; + return this; + }; + Color.prototype.add = function (r, g, b, a) { + this.r += r; + this.g += g; + this.b += b; + this.a += a; + this.clamp(); + return this; + }; + Color.prototype.clamp = function () { + if (this.r < 0) + this.r = 0; + else if (this.r > 1) + this.r = 1; + if (this.g < 0) + this.g = 0; + else if (this.g > 1) + this.g = 1; + if (this.b < 0) + this.b = 0; + else if (this.b > 1) + this.b = 1; + if (this.a < 0) + this.a = 0; + else if (this.a > 1) + this.a = 1; + return this; + }; + Color.WHITE = new Color(1, 1, 1, 1); + Color.RED = new Color(1, 0, 0, 1); + Color.GREEN = new Color(0, 1, 0, 1); + Color.BLUE = new Color(0, 0, 1, 1); + Color.MAGENTA = new Color(1, 0, 1, 1); + return Color; + }()); + spine.Color = Color; + var MathUtils = (function () { + function MathUtils() { + } + MathUtils.clamp = function (value, min, max) { + if (value < min) + return min; + if (value > max) + return max; + return value; + }; + MathUtils.cosDeg = function (degrees) { + return Math.cos(degrees * MathUtils.degRad); + }; + MathUtils.sinDeg = function (degrees) { + return Math.sin(degrees * MathUtils.degRad); + }; + MathUtils.signum = function (value) { + return value > 0 ? 1 : value < 0 ? -1 : 0; + }; + MathUtils.toInt = function (x) { + return x > 0 ? Math.floor(x) : Math.ceil(x); + }; + MathUtils.cbrt = function (x) { + var y = Math.pow(Math.abs(x), 1 / 3); + return x < 0 ? -y : y; + }; + MathUtils.randomTriangular = function (min, max) { + return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5); + }; + MathUtils.randomTriangularWith = function (min, max, mode) { + var u = Math.random(); + var d = max - min; + if (u <= (mode - min) / d) + return min + Math.sqrt(u * d * (mode - min)); + return max - Math.sqrt((1 - u) * d * (max - mode)); + }; + MathUtils.PI = 3.1415927; + MathUtils.PI2 = MathUtils.PI * 2; + MathUtils.radiansToDegrees = 180 / MathUtils.PI; + MathUtils.radDeg = MathUtils.radiansToDegrees; + MathUtils.degreesToRadians = MathUtils.PI / 180; + MathUtils.degRad = MathUtils.degreesToRadians; + return MathUtils; + }()); + spine.MathUtils = MathUtils; + var Interpolation = (function () { + function Interpolation() { + } + Interpolation.prototype.apply = function (start, end, a) { + return start + (end - start) * this.applyInternal(a); + }; + return Interpolation; + }()); + spine.Interpolation = Interpolation; + var Pow = (function (_super) { + __extends(Pow, _super); + function Pow(power) { + var _this = _super.call(this) || this; + _this.power = 2; + _this.power = power; + return _this; + } + Pow.prototype.applyInternal = function (a) { + if (a <= 0.5) + return Math.pow(a * 2, this.power) / 2; + return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1; + }; + return Pow; + }(Interpolation)); + spine.Pow = Pow; + var PowOut = (function (_super) { + __extends(PowOut, _super); + function PowOut(power) { + return _super.call(this, power) || this; + } + PowOut.prototype.applyInternal = function (a) { + return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1; + }; + return PowOut; + }(Pow)); + spine.PowOut = PowOut; + var Utils = (function () { + function Utils() { + } + Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) { + for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) { + dest[j] = source[i]; + } + }; + Utils.setArraySize = function (array, size, value) { + if (value === void 0) { value = 0; } + var oldSize = array.length; + if (oldSize == size) + return array; + array.length = size; + if (oldSize < size) { + for (var i = oldSize; i < size; i++) + array[i] = value; + } + return array; + }; + Utils.ensureArrayCapacity = function (array, size, value) { + if (value === void 0) { value = 0; } + if (array.length >= size) + return array; + return Utils.setArraySize(array, size, value); + }; + Utils.newArray = function (size, defaultValue) { + var array = new Array(size); + for (var i = 0; i < size; i++) + array[i] = defaultValue; + return array; + }; + Utils.newFloatArray = function (size) { + if (Utils.SUPPORTS_TYPED_ARRAYS) { + return new Float32Array(size); + } + else { + var array = new Array(size); + for (var i = 0; i < array.length; i++) + array[i] = 0; + return array; + } + }; + Utils.newShortArray = function (size) { + if (Utils.SUPPORTS_TYPED_ARRAYS) { + return new Int16Array(size); + } + else { + var array = new Array(size); + for (var i = 0; i < array.length; i++) + array[i] = 0; + return array; + } + }; + Utils.toFloatArray = function (array) { + return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array; + }; + Utils.toSinglePrecision = function (value) { + return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value; + }; + Utils.webkit602BugfixHelper = function (alpha, pose) { + }; + Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined"; + return Utils; + }()); + spine.Utils = Utils; + var DebugUtils = (function () { + function DebugUtils() { + } + DebugUtils.logBones = function (skeleton) { + for (var i = 0; i < skeleton.bones.length; i++) { + var bone = skeleton.bones[i]; + console.log(bone.data.name + ", " + bone.a + ", " + bone.b + ", " + bone.c + ", " + bone.d + ", " + bone.worldX + ", " + bone.worldY); + } + }; + return DebugUtils; + }()); + spine.DebugUtils = DebugUtils; + var Pool = (function () { + function Pool(instantiator) { + this.items = new Array(); + this.instantiator = instantiator; + } + Pool.prototype.obtain = function () { + return this.items.length > 0 ? this.items.pop() : this.instantiator(); + }; + Pool.prototype.free = function (item) { + if (item.reset) + item.reset(); + this.items.push(item); + }; + Pool.prototype.freeAll = function (items) { + for (var i = 0; i < items.length; i++) { + if (items[i].reset) + items[i].reset(); + this.items[i] = items[i]; + } + }; + Pool.prototype.clear = function () { + this.items.length = 0; + }; + return Pool; + }()); + spine.Pool = Pool; + var Vector2 = (function () { + function Vector2(x, y) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + this.x = x; + this.y = y; + } + Vector2.prototype.set = function (x, y) { + this.x = x; + this.y = y; + return this; + }; + Vector2.prototype.length = function () { + var x = this.x; + var y = this.y; + return Math.sqrt(x * x + y * y); + }; + Vector2.prototype.normalize = function () { + var len = this.length(); + if (len != 0) { + this.x /= len; + this.y /= len; + } + return this; + }; + return Vector2; + }()); + spine.Vector2 = Vector2; + var TimeKeeper = (function () { + function TimeKeeper() { + this.maxDelta = 0.064; + this.framesPerSecond = 0; + this.delta = 0; + this.totalTime = 0; + this.lastTime = Date.now() / 1000; + this.frameCount = 0; + this.frameTime = 0; + } + TimeKeeper.prototype.update = function () { + var now = Date.now() / 1000; + this.delta = now - this.lastTime; + this.frameTime += this.delta; + this.totalTime += this.delta; + if (this.delta > this.maxDelta) + this.delta = this.maxDelta; + this.lastTime = now; + this.frameCount++; + if (this.frameTime > 1) { + this.framesPerSecond = this.frameCount / this.frameTime; + this.frameTime = 0; + this.frameCount = 0; + } + }; + return TimeKeeper; + }()); + spine.TimeKeeper = TimeKeeper; + var WindowedMean = (function () { + function WindowedMean(windowSize) { + if (windowSize === void 0) { windowSize = 32; } + this.addedValues = 0; + this.lastValue = 0; + this.mean = 0; + this.dirty = true; + this.values = new Array(windowSize); + } + WindowedMean.prototype.hasEnoughData = function () { + return this.addedValues >= this.values.length; + }; + WindowedMean.prototype.addValue = function (value) { + if (this.addedValues < this.values.length) + this.addedValues++; + this.values[this.lastValue++] = value; + if (this.lastValue > this.values.length - 1) + this.lastValue = 0; + this.dirty = true; + }; + WindowedMean.prototype.getMean = function () { + if (this.hasEnoughData()) { + if (this.dirty) { + var mean = 0; + for (var i = 0; i < this.values.length; i++) { + mean += this.values[i]; + } + this.mean = mean / this.values.length; + this.dirty = false; + } + return this.mean; + } + else { + return 0; + } + }; + return WindowedMean; + }()); + spine.WindowedMean = WindowedMean; +})(spine || (spine = {})); +(function () { + if (!Math.fround) { + Math.fround = (function (array) { + return function (x) { + return array[0] = x, array[0]; + }; + })(new Float32Array(1)); + } +})(); +var spine; +(function (spine) { + var Attachment = (function () { + function Attachment(name) { + if (name == null) + throw new Error("name cannot be null."); + this.name = name; + } + return Attachment; + }()); + spine.Attachment = Attachment; + var VertexAttachment = (function (_super) { + __extends(VertexAttachment, _super); + function VertexAttachment(name) { + var _this = _super.call(this, name) || this; + _this.id = (VertexAttachment.nextID++ & 65535) << 11; + _this.worldVerticesLength = 0; + return _this; + } + VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) { + count = offset + (count >> 1) * stride; + var skeleton = slot.bone.skeleton; + var deformArray = slot.attachmentVertices; + var vertices = this.vertices; + var bones = this.bones; + if (bones == null) { + if (deformArray.length > 0) + vertices = deformArray; + var bone = slot.bone; + var x = bone.worldX; + var y = bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) { + var vx = vertices[v_1], vy = vertices[v_1 + 1]; + worldVertices[w] = vx * a + vy * b + x; + worldVertices[w + 1] = vx * c + vy * d + y; + } + return; + } + var v = 0, skip = 0; + for (var i = 0; i < start; i += 2) { + var n = bones[v]; + v += n + 1; + skip += n; + } + var skeletonBones = skeleton.bones; + if (deformArray.length == 0) { + for (var w = offset, b = skip * 3; w < count; w += stride) { + var wx = 0, wy = 0; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + else { + var deform = deformArray; + for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) { + var wx = 0, wy = 0; + var n = bones[v++]; + n += v; + for (; v < n; v++, b += 3, f += 2) { + var bone = skeletonBones[bones[v]]; + var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2]; + wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight; + wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight; + } + worldVertices[w] = wx; + worldVertices[w + 1] = wy; + } + } + }; + VertexAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment; + }; + VertexAttachment.nextID = 0; + return VertexAttachment; + }(Attachment)); + spine.VertexAttachment = VertexAttachment; +})(spine || (spine = {})); +var spine; +(function (spine) { + var AttachmentType; + (function (AttachmentType) { + AttachmentType[AttachmentType["Region"] = 0] = "Region"; + AttachmentType[AttachmentType["BoundingBox"] = 1] = "BoundingBox"; + AttachmentType[AttachmentType["Mesh"] = 2] = "Mesh"; + AttachmentType[AttachmentType["LinkedMesh"] = 3] = "LinkedMesh"; + AttachmentType[AttachmentType["Path"] = 4] = "Path"; + AttachmentType[AttachmentType["Point"] = 5] = "Point"; + })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {})); +})(spine || (spine = {})); +var spine; +(function (spine) { + var BoundingBoxAttachment = (function (_super) { + __extends(BoundingBoxAttachment, _super); + function BoundingBoxAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new spine.Color(1, 1, 1, 1); + return _this; + } + return BoundingBoxAttachment; + }(spine.VertexAttachment)); + spine.BoundingBoxAttachment = BoundingBoxAttachment; +})(spine || (spine = {})); +var spine; +(function (spine) { + var ClippingAttachment = (function (_super) { + __extends(ClippingAttachment, _super); + function ClippingAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1); + return _this; + } + return ClippingAttachment; + }(spine.VertexAttachment)); + spine.ClippingAttachment = ClippingAttachment; +})(spine || (spine = {})); +var spine; +(function (spine) { + var MeshAttachment = (function (_super) { + __extends(MeshAttachment, _super); + function MeshAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new spine.Color(1, 1, 1, 1); + _this.inheritDeform = false; + _this.tempColor = new spine.Color(0, 0, 0, 0); + return _this; + } + MeshAttachment.prototype.updateUVs = function () { + var u = 0, v = 0, width = 0, height = 0; + if (this.region == null) { + u = v = 0; + width = height = 1; + } + else { + u = this.region.u; + v = this.region.v; + width = this.region.u2 - u; + height = this.region.v2 - v; + } + var regionUVs = this.regionUVs; + if (this.uvs == null || this.uvs.length != regionUVs.length) + this.uvs = spine.Utils.newFloatArray(regionUVs.length); + var uvs = this.uvs; + if (this.region.rotate) { + for (var i = 0, n = uvs.length; i < n; i += 2) { + uvs[i] = u + regionUVs[i + 1] * width; + uvs[i + 1] = v + height - regionUVs[i] * height; + } + } + else { + for (var i = 0, n = uvs.length; i < n; i += 2) { + uvs[i] = u + regionUVs[i] * width; + uvs[i + 1] = v + regionUVs[i + 1] * height; + } + } + }; + MeshAttachment.prototype.applyDeform = function (sourceAttachment) { + return this == sourceAttachment || (this.inheritDeform && this.parentMesh == sourceAttachment); + }; + MeshAttachment.prototype.getParentMesh = function () { + return this.parentMesh; + }; + MeshAttachment.prototype.setParentMesh = function (parentMesh) { + this.parentMesh = parentMesh; + if (parentMesh != null) { + this.bones = parentMesh.bones; + this.vertices = parentMesh.vertices; + this.worldVerticesLength = parentMesh.worldVerticesLength; + this.regionUVs = parentMesh.regionUVs; + this.triangles = parentMesh.triangles; + this.hullLength = parentMesh.hullLength; + this.worldVerticesLength = parentMesh.worldVerticesLength; + } + }; + return MeshAttachment; + }(spine.VertexAttachment)); + spine.MeshAttachment = MeshAttachment; +})(spine || (spine = {})); +var spine; +(function (spine) { + var PathAttachment = (function (_super) { + __extends(PathAttachment, _super); + function PathAttachment(name) { + var _this = _super.call(this, name) || this; + _this.closed = false; + _this.constantSpeed = false; + _this.color = new spine.Color(1, 1, 1, 1); + return _this; + } + return PathAttachment; + }(spine.VertexAttachment)); + spine.PathAttachment = PathAttachment; +})(spine || (spine = {})); +var spine; +(function (spine) { + var PointAttachment = (function (_super) { + __extends(PointAttachment, _super); + function PointAttachment(name) { + var _this = _super.call(this, name) || this; + _this.color = new spine.Color(0.38, 0.94, 0, 1); + return _this; + } + PointAttachment.prototype.computeWorldPosition = function (bone, point) { + point.x = this.x * bone.a + this.y * bone.b + bone.worldX; + point.y = this.x * bone.c + this.y * bone.d + bone.worldY; + return point; + }; + PointAttachment.prototype.computeWorldRotation = function (bone) { + var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation); + var x = cos * bone.a + sin * bone.b; + var y = cos * bone.c + sin * bone.d; + return Math.atan2(y, x) * spine.MathUtils.radDeg; + }; + return PointAttachment; + }(spine.VertexAttachment)); + spine.PointAttachment = PointAttachment; +})(spine || (spine = {})); +var spine; +(function (spine) { + var RegionAttachment = (function (_super) { + __extends(RegionAttachment, _super); + function RegionAttachment(name) { + var _this = _super.call(this, name) || this; + _this.x = 0; + _this.y = 0; + _this.scaleX = 1; + _this.scaleY = 1; + _this.rotation = 0; + _this.width = 0; + _this.height = 0; + _this.color = new spine.Color(1, 1, 1, 1); + _this.offset = spine.Utils.newFloatArray(8); + _this.uvs = spine.Utils.newFloatArray(8); + _this.tempColor = new spine.Color(1, 1, 1, 1); + return _this; + } + RegionAttachment.prototype.updateOffset = function () { + var regionScaleX = this.width / this.region.originalWidth * this.scaleX; + var regionScaleY = this.height / this.region.originalHeight * this.scaleY; + var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX; + var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY; + var localX2 = localX + this.region.width * regionScaleX; + var localY2 = localY + this.region.height * regionScaleY; + var radians = this.rotation * Math.PI / 180; + var cos = Math.cos(radians); + var sin = Math.sin(radians); + var localXCos = localX * cos + this.x; + var localXSin = localX * sin; + var localYCos = localY * cos + this.y; + var localYSin = localY * sin; + var localX2Cos = localX2 * cos + this.x; + var localX2Sin = localX2 * sin; + var localY2Cos = localY2 * cos + this.y; + var localY2Sin = localY2 * sin; + var offset = this.offset; + offset[RegionAttachment.OX1] = localXCos - localYSin; + offset[RegionAttachment.OY1] = localYCos + localXSin; + offset[RegionAttachment.OX2] = localXCos - localY2Sin; + offset[RegionAttachment.OY2] = localY2Cos + localXSin; + offset[RegionAttachment.OX3] = localX2Cos - localY2Sin; + offset[RegionAttachment.OY3] = localY2Cos + localX2Sin; + offset[RegionAttachment.OX4] = localX2Cos - localYSin; + offset[RegionAttachment.OY4] = localYCos + localX2Sin; + }; + RegionAttachment.prototype.setRegion = function (region) { + this.region = region; + var uvs = this.uvs; + if (region.rotate) { + uvs[2] = region.u; + uvs[3] = region.v2; + uvs[4] = region.u; + uvs[5] = region.v; + uvs[6] = region.u2; + uvs[7] = region.v; + uvs[0] = region.u2; + uvs[1] = region.v2; + } + else { + uvs[0] = region.u; + uvs[1] = region.v2; + uvs[2] = region.u; + uvs[3] = region.v; + uvs[4] = region.u2; + uvs[5] = region.v; + uvs[6] = region.u2; + uvs[7] = region.v2; + } + }; + RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) { + var vertexOffset = this.offset; + var x = bone.worldX, y = bone.worldY; + var a = bone.a, b = bone.b, c = bone.c, d = bone.d; + var offsetX = 0, offsetY = 0; + offsetX = vertexOffset[RegionAttachment.OX1]; + offsetY = vertexOffset[RegionAttachment.OY1]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + offset += stride; + offsetX = vertexOffset[RegionAttachment.OX2]; + offsetY = vertexOffset[RegionAttachment.OY2]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + offset += stride; + offsetX = vertexOffset[RegionAttachment.OX3]; + offsetY = vertexOffset[RegionAttachment.OY3]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + offset += stride; + offsetX = vertexOffset[RegionAttachment.OX4]; + offsetY = vertexOffset[RegionAttachment.OY4]; + worldVertices[offset] = offsetX * a + offsetY * b + x; + worldVertices[offset + 1] = offsetX * c + offsetY * d + y; + }; + RegionAttachment.OX1 = 0; + RegionAttachment.OY1 = 1; + RegionAttachment.OX2 = 2; + RegionAttachment.OY2 = 3; + RegionAttachment.OX3 = 4; + RegionAttachment.OY3 = 5; + RegionAttachment.OX4 = 6; + RegionAttachment.OY4 = 7; + RegionAttachment.X1 = 0; + RegionAttachment.Y1 = 1; + RegionAttachment.C1R = 2; + RegionAttachment.C1G = 3; + RegionAttachment.C1B = 4; + RegionAttachment.C1A = 5; + RegionAttachment.U1 = 6; + RegionAttachment.V1 = 7; + RegionAttachment.X2 = 8; + RegionAttachment.Y2 = 9; + RegionAttachment.C2R = 10; + RegionAttachment.C2G = 11; + RegionAttachment.C2B = 12; + RegionAttachment.C2A = 13; + RegionAttachment.U2 = 14; + RegionAttachment.V2 = 15; + RegionAttachment.X3 = 16; + RegionAttachment.Y3 = 17; + RegionAttachment.C3R = 18; + RegionAttachment.C3G = 19; + RegionAttachment.C3B = 20; + RegionAttachment.C3A = 21; + RegionAttachment.U3 = 22; + RegionAttachment.V3 = 23; + RegionAttachment.X4 = 24; + RegionAttachment.Y4 = 25; + RegionAttachment.C4R = 26; + RegionAttachment.C4G = 27; + RegionAttachment.C4B = 28; + RegionAttachment.C4A = 29; + RegionAttachment.U4 = 30; + RegionAttachment.V4 = 31; + return RegionAttachment; + }(spine.Attachment)); + spine.RegionAttachment = RegionAttachment; +})(spine || (spine = {})); +var spine; +(function (spine) { + var JitterEffect = (function () { + function JitterEffect(jitterX, jitterY) { + this.jitterX = 0; + this.jitterY = 0; + this.jitterX = jitterX; + this.jitterY = jitterY; + } + JitterEffect.prototype.begin = function (skeleton) { + }; + JitterEffect.prototype.transform = function (position, uv, light, dark) { + position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY); + position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY); + }; + JitterEffect.prototype.end = function () { + }; + return JitterEffect; + }()); + spine.JitterEffect = JitterEffect; +})(spine || (spine = {})); +var spine; +(function (spine) { + var SwirlEffect = (function () { + function SwirlEffect(radius) { + this.centerX = 0; + this.centerY = 0; + this.radius = 0; + this.angle = 0; + this.worldX = 0; + this.worldY = 0; + this.radius = radius; + } + SwirlEffect.prototype.begin = function (skeleton) { + this.worldX = skeleton.x + this.centerX; + this.worldY = skeleton.y + this.centerY; + }; + SwirlEffect.prototype.transform = function (position, uv, light, dark) { + var radAngle = this.angle * spine.MathUtils.degreesToRadians; + var x = position.x - this.worldX; + var y = position.y - this.worldY; + var dist = Math.sqrt(x * x + y * y); + if (dist < this.radius) { + var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius); + var cos = Math.cos(theta); + var sin = Math.sin(theta); + position.x = cos * x - sin * y + this.worldX; + position.y = sin * x + cos * y + this.worldY; + } + }; + SwirlEffect.prototype.end = function () { + }; + SwirlEffect.interpolation = new spine.PowOut(2); + return SwirlEffect; + }()); + spine.SwirlEffect = SwirlEffect; +})(spine || (spine = {})); +var spine; +(function (spine) { + var canvas; + (function (canvas) { + var AssetManager = (function (_super) { + __extends(AssetManager, _super); + function AssetManager(pathPrefix) { + if (pathPrefix === void 0) { pathPrefix = ""; } + return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this; + } + return AssetManager; + }(spine.AssetManager)); + canvas.AssetManager = AssetManager; + })(canvas = spine.canvas || (spine.canvas = {})); +})(spine || (spine = {})); +var spine; +(function (spine) { + var canvas; + (function (canvas) { + var CanvasTexture = (function (_super) { + __extends(CanvasTexture, _super); + function CanvasTexture(image) { + return _super.call(this, image) || this; + } + CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { }; + CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { }; + CanvasTexture.prototype.dispose = function () { }; + return CanvasTexture; + }(spine.Texture)); + canvas.CanvasTexture = CanvasTexture; + })(canvas = spine.canvas || (spine.canvas = {})); +})(spine || (spine = {})); +var spine; +(function (spine) { + var canvas; + (function (canvas) { + var SkeletonRenderer = (function () { + function SkeletonRenderer(context) { + this.triangleRendering = false; + this.debugRendering = false; + this.vertices = spine.Utils.newFloatArray(8 * 1024); + this.tempColor = new spine.Color(); + this.ctx = context; + } + SkeletonRenderer.prototype.draw = function (skeleton) { + if (this.triangleRendering) + this.drawTriangles(skeleton); + else + this.drawImages(skeleton); + }; + SkeletonRenderer.prototype.drawImages = function (skeleton) { + var ctx = this.ctx; + var drawOrder = skeleton.drawOrder; + if (this.debugRendering) + ctx.strokeStyle = "green"; + ctx.save(); + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + var attachment = slot.getAttachment(); + var regionAttachment = null; + var region = null; + var image = null; + if (attachment instanceof spine.RegionAttachment) { + regionAttachment = attachment; + region = regionAttachment.region; + image = region.texture.getImage(); + } + else + continue; + var skeleton_1 = slot.bone.skeleton; + var skeletonColor = skeleton_1.color; + var slotColor = slot.color; + var regionColor = regionAttachment.color; + var alpha = skeletonColor.a * slotColor.a * regionColor.a; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha); + var att = attachment; + var bone = slot.bone; + var w = region.width; + var h = region.height; + ctx.save(); + ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY); + ctx.translate(attachment.offset[0], attachment.offset[1]); + ctx.rotate(attachment.rotation * Math.PI / 180); + var atlasScale = att.width / w; + ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY); + ctx.translate(w / 2, h / 2); + if (attachment.region.rotate) { + var t = w; + w = h; + h = t; + ctx.rotate(-Math.PI / 2); + } + ctx.scale(1, -1); + ctx.translate(-w / 2, -h / 2); + if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { + ctx.globalAlpha = color.a; + } + ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h); + if (this.debugRendering) + ctx.strokeRect(0, 0, w, h); + ctx.restore(); + } + ctx.restore(); + }; + SkeletonRenderer.prototype.drawTriangles = function (skeleton) { + var blendMode = null; + var vertices = this.vertices; + var triangles = null; + var drawOrder = skeleton.drawOrder; + for (var i = 0, n = drawOrder.length; i < n; i++) { + var slot = drawOrder[i]; + var attachment = slot.getAttachment(); + var texture = null; + var region = null; + if (attachment instanceof spine.RegionAttachment) { + var regionAttachment = attachment; + vertices = this.computeRegionVertices(slot, regionAttachment, false); + triangles = SkeletonRenderer.QUAD_TRIANGLES; + region = regionAttachment.region; + texture = region.texture.getImage(); + } + else if (attachment instanceof spine.MeshAttachment) { + var mesh = attachment; + vertices = this.computeMeshVertices(slot, mesh, false); + triangles = mesh.triangles; + texture = mesh.region.renderObject.texture.getImage(); + } + else + continue; + if (texture != null) { + var slotBlendMode = slot.data.blendMode; + if (slotBlendMode != blendMode) { + blendMode = slotBlendMode; + } + var skeleton_2 = slot.bone.skeleton; + var skeletonColor = skeleton_2.color; + var slotColor = slot.color; + var attachmentColor = attachment.color; + var alpha = skeletonColor.a * slotColor.a * attachmentColor.a; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha); + var ctx = this.ctx; + if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) { + ctx.globalAlpha = color.a; + } + for (var j = 0; j < triangles.length; j += 3) { + var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8; + var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7]; + var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7]; + var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7]; + this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2); + if (this.debugRendering) { + ctx.strokeStyle = "green"; + ctx.beginPath(); + ctx.moveTo(x0, y0); + ctx.lineTo(x1, y1); + ctx.lineTo(x2, y2); + ctx.lineTo(x0, y0); + ctx.stroke(); + } + } + } + } + this.ctx.globalAlpha = 1; + }; + SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) { + var ctx = this.ctx; + u0 *= img.width; + v0 *= img.height; + u1 *= img.width; + v1 *= img.height; + u2 *= img.width; + v2 *= img.height; + ctx.beginPath(); + ctx.moveTo(x0, y0); + ctx.lineTo(x1, y1); + ctx.lineTo(x2, y2); + ctx.closePath(); + x1 -= x0; + y1 -= y0; + x2 -= x0; + y2 -= y0; + u1 -= u0; + v1 -= v0; + u2 -= u0; + v2 -= v0; + var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0; + ctx.save(); + ctx.transform(a, b, c, d, e, f); + ctx.clip(); + ctx.drawImage(img, 0, 0); + ctx.restore(); + }; + SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color; + var slotColor = slot.color; + var regionColor = region.color; + var alpha = skeletonColor.a * slotColor.a * regionColor.a; + var multiplier = pma ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha); + region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE); + var vertices = this.vertices; + var uvs = region.uvs; + vertices[spine.RegionAttachment.C1R] = color.r; + vertices[spine.RegionAttachment.C1G] = color.g; + vertices[spine.RegionAttachment.C1B] = color.b; + vertices[spine.RegionAttachment.C1A] = color.a; + vertices[spine.RegionAttachment.U1] = uvs[0]; + vertices[spine.RegionAttachment.V1] = uvs[1]; + vertices[spine.RegionAttachment.C2R] = color.r; + vertices[spine.RegionAttachment.C2G] = color.g; + vertices[spine.RegionAttachment.C2B] = color.b; + vertices[spine.RegionAttachment.C2A] = color.a; + vertices[spine.RegionAttachment.U2] = uvs[2]; + vertices[spine.RegionAttachment.V2] = uvs[3]; + vertices[spine.RegionAttachment.C3R] = color.r; + vertices[spine.RegionAttachment.C3G] = color.g; + vertices[spine.RegionAttachment.C3B] = color.b; + vertices[spine.RegionAttachment.C3A] = color.a; + vertices[spine.RegionAttachment.U3] = uvs[4]; + vertices[spine.RegionAttachment.V3] = uvs[5]; + vertices[spine.RegionAttachment.C4R] = color.r; + vertices[spine.RegionAttachment.C4G] = color.g; + vertices[spine.RegionAttachment.C4B] = color.b; + vertices[spine.RegionAttachment.C4A] = color.a; + vertices[spine.RegionAttachment.U4] = uvs[6]; + vertices[spine.RegionAttachment.V4] = uvs[7]; + return vertices; + }; + SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) { + var skeleton = slot.bone.skeleton; + var skeletonColor = skeleton.color; + var slotColor = slot.color; + var regionColor = mesh.color; + var alpha = skeletonColor.a * slotColor.a * regionColor.a; + var multiplier = pma ? alpha : 1; + var color = this.tempColor; + color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha); + var numVertices = mesh.worldVerticesLength / 2; + if (this.vertices.length < mesh.worldVerticesLength) { + this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength); + } + var vertices = this.vertices; + mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE); + var uvs = mesh.uvs; + for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) { + vertices[v++] = color.r; + vertices[v++] = color.g; + vertices[v++] = color.b; + vertices[v++] = color.a; + vertices[v++] = uvs[u++]; + vertices[v++] = uvs[u++]; + v += 2; + } + return vertices; + }; + SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0]; + SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4; + return SkeletonRenderer; + }()); + canvas.SkeletonRenderer = SkeletonRenderer; + })(canvas = spine.canvas || (spine.canvas = {})); +})(spine || (spine = {})); +//# sourceMappingURL=spine-canvas.js.map + +/*** EXPORTS FROM exports-loader ***/ +module.exports = spine; +}.call(window)); + +/***/ }) + +/******/ }); +}); +//# sourceMappingURL=SpinePlugin.js.map \ No newline at end of file diff --git a/plugins/spine/dist/SpinePlugin.js.map b/plugins/spine/dist/SpinePlugin.js.map new file mode 100644 index 000000000..f82a127ce --- /dev/null +++ b/plugins/spine/dist/SpinePlugin.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///D:/wamp/www/phaser/src/plugins/BasePlugin.js","webpack:///D:/wamp/www/phaser/src/utils/Class.js","webpack:///./SpinePlugin.js","webpack:///./spine-canvas.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9KA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,4FAA4F,sBAAsB,EAAE;;AAEpH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvJA;AACA;;AAEA;AACA;AACA,IAAI,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC7E,mBAAmB,uDAAuD;AAC1E;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,gDAAgD;AAClD;AACA;AACA;AACA;AACA,EAAE,+DAA+D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,+DAA+D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,OAAO;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,6CAA6C;AACtD;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,oBAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,sDAAsD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,gFAAgF;AAChF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,+CAA+C,0BAA0B;AACzE;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,sDAAsD;AACxD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,kEAAkE;AACpE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,EAAE,+DAA+D;AACjE;AACA;AACA;AACA;AACA;AACA,EAAE,4DAA4D;AAC9D;AACA;AACA;AACA;AACA;AACA,EAAE,yDAAyD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,+BAA+B;AACjD;AACA;AACA;AACA;AACA,kBAAkB,sCAAsC;AACxD;AACA;AACA;AACA;AACA,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,qBAAqB;AAC9C,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA,kBAAkB,eAAe;AACjC;AACA,kBAAkB,eAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,qBAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,OAAO;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA,yBAAyB,kBAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,kEAAkE;AACpE;AACA;AACA;AACA;AACA;AACA,EAAE,4DAA4D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE,4DAA4D;AAC5D,+CAA+C;AAC/C;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B,sBAAsB,OAAO;AAC7B,sBAAsB,OAAO;AAC7B,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,2CAA2C,+BAA+B;AAC1E;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,WAAW;AAChE;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,qEAAqE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iBAAiB;AACjD,+CAA+C,8CAA8C,EAAE;AAC/F;AACA;AACA,GAAG;AACH;AACA,EAAE,6CAA6C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,+DAA+D;AAC/D,kDAAkD;AAClD;AACA,GAAG;AACH;AACA,EAAE,6CAA6C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,EAAE,6CAA6C;AAC/C,CAAC,sBAAsB;AACvB;;AAEA;AACA;AACA,CAAC,e","file":"SpinePlugin.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"SpinePlugin\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SpinePlugin\"] = factory();\n\telse\n\t\troot[\"SpinePlugin\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","/**\r\n* @author Richard Davey \r\n* @copyright 2018 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems;\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * If this is a Scene Plugin (i.e. installed into a Scene) then this method is called when the Scene boots.\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n * In here you can listen for Scene events and set-up whatever you need for this plugin to run.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n // Here are the Scene events you can listen to.\r\n // At the very least you should offer a destroy handler for when the Scene closes down.\r\n\r\n // var eventEmitter = this.systems.events;\r\n\r\n // eventEmitter.once('destroy', this.sceneDestroy, this);\r\n // eventEmitter.on('start', this.sceneStart, this);\r\n // eventEmitter.on('preupdate', this.scenePreUpdate, this);\r\n // eventEmitter.on('update', this.sceneUpdate, this);\r\n // eventEmitter.on('postupdate', this.scenePostUpdate, this);\r\n // eventEmitter.on('pause', this.scenePause, this);\r\n // eventEmitter.on('resume', this.sceneResume, this);\r\n // eventEmitter.on('sleep', this.sceneSleep, this);\r\n // eventEmitter.on('wake', this.sceneWake, this);\r\n // eventEmitter.on('shutdown', this.sceneShutdown, this);\r\n // eventEmitter.on('destroy', this.sceneDestroy, this);\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar BasePlugin = require('../../../src/plugins/BasePlugin');\r\nvar SpineCanvas = require('SpineCanvas');\r\n\r\n// var SpineGL = require('SpineGL');\r\n\r\n/**\r\n * @classdesc\r\n * TODO\r\n *\r\n * @class SpinePlugin\r\n * @constructor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this plugin is being installed.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (pluginManager)\r\n {\r\n console.log('SpinePlugin enabled');\r\n\r\n BasePlugin.call(this, pluginManager);\r\n\r\n // console.log(SpineCanvas.canvas);\r\n // console.log(SpineGL.webgl);\r\n\r\n this.skeletonRenderer = new SpineCanvas.canvas.SkeletonRenderer(this.game.context);\r\n\r\n this.textureManager = this.game.textures;\r\n this.textCache = this.game.cache.text;\r\n this.jsonCache = this.game.cache.json;\r\n\r\n // console.log(this.skeletonRenderer);\r\n // pluginManager.registerGameObject('sprite3D', this.sprite3DFactory, this.sprite3DCreator);\r\n },\r\n\r\n /**\r\n * Creates a new Sprite3D Game Object and adds it to the Scene.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#sprite3D\r\n * @since 3.0.0\r\n * \r\n * @param {number} x - The horizontal position of this Game Object.\r\n * @param {number} y - The vertical position of this Game Object.\r\n * @param {number} z - The z position of this Game Object.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created.\r\n */\r\n sprite3DFactory: function (x, y, z, key, frame)\r\n {\r\n // var sprite = new Sprite3D(this.scene, x, y, z, key, frame);\r\n\r\n // this.displayList.add(sprite.gameObject);\r\n // this.updateList.add(sprite.gameObject);\r\n\r\n // return sprite;\r\n },\r\n\r\n createSkeleton: function (textureKey, atlasKey, jsonKey)\r\n {\r\n var canvasTexture = new SpineCanvas.canvas.CanvasTexture(this.textureManager.get(textureKey).getSourceImage());\r\n\r\n var atlas = new SpineCanvas.TextureAtlas(this.textCache.get(atlasKey), function () { return canvasTexture; });\r\n\r\n var atlasLoader = new SpineCanvas.AtlasAttachmentLoader(atlas);\r\n \r\n var skeletonJson = new SpineCanvas.SkeletonJson(atlasLoader);\r\n\r\n var skeletonData = skeletonJson.readSkeletonData(this.jsonCache.get(jsonKey));\r\n\r\n var skeleton = new SpineCanvas.Skeleton(skeletonData);\r\n\r\n skeleton.flipY = true;\r\n skeleton.setToSetupPose();\r\n skeleton.updateWorldTransform();\r\n\r\n skeleton.setSkinByName('default');\r\n \r\n return skeleton;\r\n },\r\n\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new SpineCanvas.Vector2();\r\n var size = new SpineCanvas.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n createAnimationState: function (skeleton, animationName)\r\n {\r\n var state = new SpineCanvas.AnimationState(new SpineCanvas.AnimationStateData(skeleton.data));\r\n\r\n state.setAnimation(0, animationName, true);\r\n\r\n return state;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Camera3DPlugin#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('update', this.update, this);\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n this.removeAll();\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Camera3DPlugin#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpinePlugin;\r\n","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\nvar __extends = (this && this.__extends) || (function () {\r\n\tvar extendStatics = Object.setPrototypeOf ||\r\n\t\t({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n\t\tfunction (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\treturn function (d, b) {\r\n\t\textendStatics(d, b);\r\n\t\tfunction __() { this.constructor = d; }\r\n\t\td.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n\tvar Animation = (function () {\r\n\t\tfunction Animation(name, timelines, duration) {\r\n\t\t\tif (name == null)\r\n\t\t\t\tthrow new Error(\"name cannot be null.\");\r\n\t\t\tif (timelines == null)\r\n\t\t\t\tthrow new Error(\"timelines cannot be null.\");\r\n\t\t\tthis.name = name;\r\n\t\t\tthis.timelines = timelines;\r\n\t\t\tthis.duration = duration;\r\n\t\t}\r\n\t\tAnimation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, pose, direction) {\r\n\t\t\tif (skeleton == null)\r\n\t\t\t\tthrow new Error(\"skeleton cannot be null.\");\r\n\t\t\tif (loop && this.duration != 0) {\r\n\t\t\t\ttime %= this.duration;\r\n\t\t\t\tif (lastTime > 0)\r\n\t\t\t\t\tlastTime %= this.duration;\r\n\t\t\t}\r\n\t\t\tvar timelines = this.timelines;\r\n\t\t\tfor (var i = 0, n = timelines.length; i < n; i++)\r\n\t\t\t\ttimelines[i].apply(skeleton, lastTime, time, events, alpha, pose, direction);\r\n\t\t};\r\n\t\tAnimation.binarySearch = function (values, target, step) {\r\n\t\t\tif (step === void 0) { step = 1; }\r\n\t\t\tvar low = 0;\r\n\t\t\tvar high = values.length / step - 2;\r\n\t\t\tif (high == 0)\r\n\t\t\t\treturn step;\r\n\t\t\tvar current = high >>> 1;\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (values[(current + 1) * step] <= target)\r\n\t\t\t\t\tlow = current + 1;\r\n\t\t\t\telse\r\n\t\t\t\t\thigh = current;\r\n\t\t\t\tif (low == high)\r\n\t\t\t\t\treturn (low + 1) * step;\r\n\t\t\t\tcurrent = (low + high) >>> 1;\r\n\t\t\t}\r\n\t\t};\r\n\t\tAnimation.linearSearch = function (values, target, step) {\r\n\t\t\tfor (var i = 0, last = values.length - step; i <= last; i += step)\r\n\t\t\t\tif (values[i] > target)\r\n\t\t\t\t\treturn i;\r\n\t\t\treturn -1;\r\n\t\t};\r\n\t\treturn Animation;\r\n\t}());\r\n\tspine.Animation = Animation;\r\n\tvar MixPose;\r\n\t(function (MixPose) {\r\n\t\tMixPose[MixPose[\"setup\"] = 0] = \"setup\";\r\n\t\tMixPose[MixPose[\"current\"] = 1] = \"current\";\r\n\t\tMixPose[MixPose[\"currentLayered\"] = 2] = \"currentLayered\";\r\n\t})(MixPose = spine.MixPose || (spine.MixPose = {}));\r\n\tvar MixDirection;\r\n\t(function (MixDirection) {\r\n\t\tMixDirection[MixDirection[\"in\"] = 0] = \"in\";\r\n\t\tMixDirection[MixDirection[\"out\"] = 1] = \"out\";\r\n\t})(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n\tvar TimelineType;\r\n\t(function (TimelineType) {\r\n\t\tTimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n\t\tTimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n\t\tTimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n\t\tTimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n\t\tTimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n\t\tTimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n\t\tTimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n\t\tTimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n\t\tTimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n\t\tTimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n\t\tTimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n\t\tTimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n\t\tTimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n\t\tTimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n\t\tTimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n\t})(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n\tvar CurveTimeline = (function () {\r\n\t\tfunction CurveTimeline(frameCount) {\r\n\t\t\tif (frameCount <= 0)\r\n\t\t\t\tthrow new Error(\"frameCount must be > 0: \" + frameCount);\r\n\t\t\tthis.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n\t\t}\r\n\t\tCurveTimeline.prototype.getFrameCount = function () {\r\n\t\t\treturn this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n\t\t};\r\n\t\tCurveTimeline.prototype.setLinear = function (frameIndex) {\r\n\t\t\tthis.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n\t\t};\r\n\t\tCurveTimeline.prototype.setStepped = function (frameIndex) {\r\n\t\t\tthis.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n\t\t};\r\n\t\tCurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n\t\t\tvar index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n\t\t\tif (index == this.curves.length)\r\n\t\t\t\treturn CurveTimeline.LINEAR;\r\n\t\t\tvar type = this.curves[index];\r\n\t\t\tif (type == CurveTimeline.LINEAR)\r\n\t\t\t\treturn CurveTimeline.LINEAR;\r\n\t\t\tif (type == CurveTimeline.STEPPED)\r\n\t\t\t\treturn CurveTimeline.STEPPED;\r\n\t\t\treturn CurveTimeline.BEZIER;\r\n\t\t};\r\n\t\tCurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n\t\t\tvar tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n\t\t\tvar dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n\t\t\tvar ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n\t\t\tvar dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n\t\t\tvar i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n\t\t\tvar curves = this.curves;\r\n\t\t\tcurves[i++] = CurveTimeline.BEZIER;\r\n\t\t\tvar x = dfx, y = dfy;\r\n\t\t\tfor (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n\t\t\t\tcurves[i] = x;\r\n\t\t\t\tcurves[i + 1] = y;\r\n\t\t\t\tdfx += ddfx;\r\n\t\t\t\tdfy += ddfy;\r\n\t\t\t\tddfx += dddfx;\r\n\t\t\t\tddfy += dddfy;\r\n\t\t\t\tx += dfx;\r\n\t\t\t\ty += dfy;\r\n\t\t\t}\r\n\t\t};\r\n\t\tCurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n\t\t\tpercent = spine.MathUtils.clamp(percent, 0, 1);\r\n\t\t\tvar curves = this.curves;\r\n\t\t\tvar i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n\t\t\tvar type = curves[i];\r\n\t\t\tif (type == CurveTimeline.LINEAR)\r\n\t\t\t\treturn percent;\r\n\t\t\tif (type == CurveTimeline.STEPPED)\r\n\t\t\t\treturn 0;\r\n\t\t\ti++;\r\n\t\t\tvar x = 0;\r\n\t\t\tfor (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n\t\t\t\tx = curves[i];\r\n\t\t\t\tif (x >= percent) {\r\n\t\t\t\t\tvar prevX = void 0, prevY = void 0;\r\n\t\t\t\t\tif (i == start) {\r\n\t\t\t\t\t\tprevX = 0;\r\n\t\t\t\t\t\tprevY = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tprevX = curves[i - 2];\r\n\t\t\t\t\t\tprevY = curves[i - 1];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar y = curves[i - 1];\r\n\t\t\treturn y + (1 - y) * (percent - x) / (1 - x);\r\n\t\t};\r\n\t\tCurveTimeline.LINEAR = 0;\r\n\t\tCurveTimeline.STEPPED = 1;\r\n\t\tCurveTimeline.BEZIER = 2;\r\n\t\tCurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n\t\treturn CurveTimeline;\r\n\t}());\r\n\tspine.CurveTimeline = CurveTimeline;\r\n\tvar RotateTimeline = (function (_super) {\r\n\t\t__extends(RotateTimeline, _super);\r\n\t\tfunction RotateTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tRotateTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.rotate << 24) + this.boneIndex;\r\n\t\t};\r\n\t\tRotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n\t\t\tframeIndex <<= 1;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n\t\t};\r\n\t\tRotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar bone = skeleton.bones[this.boneIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tbone.rotation = bone.data.rotation;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tvar r_1 = bone.data.rotation - bone.rotation;\r\n\t\t\t\t\t\tr_1 -= (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360;\r\n\t\t\t\t\t\tbone.rotation += r_1 * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n\t\t\t\tif (pose == MixPose.setup)\r\n\t\t\t\t\tbone.rotation = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] * alpha;\r\n\t\t\t\telse {\r\n\t\t\t\t\tvar r_2 = bone.data.rotation + frames[frames.length + RotateTimeline.PREV_ROTATION] - bone.rotation;\r\n\t\t\t\t\tr_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n\t\t\t\t\tbone.rotation += r_2 * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n\t\t\tvar prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n\t\t\tvar frameTime = frames[frame];\r\n\t\t\tvar percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n\t\t\tvar r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n\t\t\tr -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n\t\t\tr = prevRotation + r * percent;\r\n\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\tr -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n\t\t\t\tbone.rotation = bone.data.rotation + r * alpha;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tr = bone.data.rotation + r - bone.rotation;\r\n\t\t\t\tr -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n\t\t\t\tbone.rotation += r * alpha;\r\n\t\t\t}\r\n\t\t};\r\n\t\tRotateTimeline.ENTRIES = 2;\r\n\t\tRotateTimeline.PREV_TIME = -2;\r\n\t\tRotateTimeline.PREV_ROTATION = -1;\r\n\t\tRotateTimeline.ROTATION = 1;\r\n\t\treturn RotateTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.RotateTimeline = RotateTimeline;\r\n\tvar TranslateTimeline = (function (_super) {\r\n\t\t__extends(TranslateTimeline, _super);\r\n\t\tfunction TranslateTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tTranslateTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.translate << 24) + this.boneIndex;\r\n\t\t};\r\n\t\tTranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n\t\t\tframeIndex *= TranslateTimeline.ENTRIES;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + TranslateTimeline.X] = x;\r\n\t\t\tthis.frames[frameIndex + TranslateTimeline.Y] = y;\r\n\t\t};\r\n\t\tTranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar bone = skeleton.bones[this.boneIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tbone.x = bone.data.x;\r\n\t\t\t\t\t\tbone.y = bone.data.y;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tbone.x += (bone.data.x - bone.x) * alpha;\r\n\t\t\t\t\t\tbone.y += (bone.data.y - bone.y) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar x = 0, y = 0;\r\n\t\t\tif (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n\t\t\t\tx = frames[frames.length + TranslateTimeline.PREV_X];\r\n\t\t\t\ty = frames[frames.length + TranslateTimeline.PREV_Y];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n\t\t\t\tx = frames[frame + TranslateTimeline.PREV_X];\r\n\t\t\t\ty = frames[frame + TranslateTimeline.PREV_Y];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tx += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n\t\t\t\ty += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n\t\t\t}\r\n\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\tbone.x = bone.data.x + x * alpha;\r\n\t\t\t\tbone.y = bone.data.y + y * alpha;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbone.x += (bone.data.x + x - bone.x) * alpha;\r\n\t\t\t\tbone.y += (bone.data.y + y - bone.y) * alpha;\r\n\t\t\t}\r\n\t\t};\r\n\t\tTranslateTimeline.ENTRIES = 3;\r\n\t\tTranslateTimeline.PREV_TIME = -3;\r\n\t\tTranslateTimeline.PREV_X = -2;\r\n\t\tTranslateTimeline.PREV_Y = -1;\r\n\t\tTranslateTimeline.X = 1;\r\n\t\tTranslateTimeline.Y = 2;\r\n\t\treturn TranslateTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.TranslateTimeline = TranslateTimeline;\r\n\tvar ScaleTimeline = (function (_super) {\r\n\t\t__extends(ScaleTimeline, _super);\r\n\t\tfunction ScaleTimeline(frameCount) {\r\n\t\t\treturn _super.call(this, frameCount) || this;\r\n\t\t}\r\n\t\tScaleTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.scale << 24) + this.boneIndex;\r\n\t\t};\r\n\t\tScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar bone = skeleton.bones[this.boneIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tbone.scaleX = bone.data.scaleX;\r\n\t\t\t\t\t\tbone.scaleY = bone.data.scaleY;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tbone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n\t\t\t\t\t\tbone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar x = 0, y = 0;\r\n\t\t\tif (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n\t\t\t\tx = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n\t\t\t\ty = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n\t\t\t\tx = frames[frame + ScaleTimeline.PREV_X];\r\n\t\t\t\ty = frames[frame + ScaleTimeline.PREV_Y];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tx = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n\t\t\t\ty = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n\t\t\t}\r\n\t\t\tif (alpha == 1) {\r\n\t\t\t\tbone.scaleX = x;\r\n\t\t\t\tbone.scaleY = y;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar bx = 0, by = 0;\r\n\t\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\t\tbx = bone.data.scaleX;\r\n\t\t\t\t\tby = bone.data.scaleY;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbx = bone.scaleX;\r\n\t\t\t\t\tby = bone.scaleY;\r\n\t\t\t\t}\r\n\t\t\t\tif (direction == MixDirection.out) {\r\n\t\t\t\t\tx = Math.abs(x) * spine.MathUtils.signum(bx);\r\n\t\t\t\t\ty = Math.abs(y) * spine.MathUtils.signum(by);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbx = Math.abs(bx) * spine.MathUtils.signum(x);\r\n\t\t\t\t\tby = Math.abs(by) * spine.MathUtils.signum(y);\r\n\t\t\t\t}\r\n\t\t\t\tbone.scaleX = bx + (x - bx) * alpha;\r\n\t\t\t\tbone.scaleY = by + (y - by) * alpha;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn ScaleTimeline;\r\n\t}(TranslateTimeline));\r\n\tspine.ScaleTimeline = ScaleTimeline;\r\n\tvar ShearTimeline = (function (_super) {\r\n\t\t__extends(ShearTimeline, _super);\r\n\t\tfunction ShearTimeline(frameCount) {\r\n\t\t\treturn _super.call(this, frameCount) || this;\r\n\t\t}\r\n\t\tShearTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.shear << 24) + this.boneIndex;\r\n\t\t};\r\n\t\tShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar bone = skeleton.bones[this.boneIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tbone.shearX = bone.data.shearX;\r\n\t\t\t\t\t\tbone.shearY = bone.data.shearY;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tbone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n\t\t\t\t\t\tbone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar x = 0, y = 0;\r\n\t\t\tif (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n\t\t\t\tx = frames[frames.length + ShearTimeline.PREV_X];\r\n\t\t\t\ty = frames[frames.length + ShearTimeline.PREV_Y];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n\t\t\t\tx = frames[frame + ShearTimeline.PREV_X];\r\n\t\t\t\ty = frames[frame + ShearTimeline.PREV_Y];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tx = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n\t\t\t\ty = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n\t\t\t}\r\n\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\tbone.shearX = bone.data.shearX + x * alpha;\r\n\t\t\t\tbone.shearY = bone.data.shearY + y * alpha;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n\t\t\t\tbone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn ShearTimeline;\r\n\t}(TranslateTimeline));\r\n\tspine.ShearTimeline = ShearTimeline;\r\n\tvar ColorTimeline = (function (_super) {\r\n\t\t__extends(ColorTimeline, _super);\r\n\t\tfunction ColorTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tColorTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.color << 24) + this.slotIndex;\r\n\t\t};\r\n\t\tColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n\t\t\tframeIndex *= ColorTimeline.ENTRIES;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + ColorTimeline.R] = r;\r\n\t\t\tthis.frames[frameIndex + ColorTimeline.G] = g;\r\n\t\t\tthis.frames[frameIndex + ColorTimeline.B] = b;\r\n\t\t\tthis.frames[frameIndex + ColorTimeline.A] = a;\r\n\t\t};\r\n\t\tColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) {\r\n\t\t\tvar slot = skeleton.slots[this.slotIndex];\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tslot.color.setFromColor(slot.data.color);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tvar color = slot.color, setup = slot.data.color;\r\n\t\t\t\t\t\tcolor.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar r = 0, g = 0, b = 0, a = 0;\r\n\t\t\tif (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n\t\t\t\tvar i = frames.length;\r\n\t\t\t\tr = frames[i + ColorTimeline.PREV_R];\r\n\t\t\t\tg = frames[i + ColorTimeline.PREV_G];\r\n\t\t\t\tb = frames[i + ColorTimeline.PREV_B];\r\n\t\t\t\ta = frames[i + ColorTimeline.PREV_A];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n\t\t\t\tr = frames[frame + ColorTimeline.PREV_R];\r\n\t\t\t\tg = frames[frame + ColorTimeline.PREV_G];\r\n\t\t\t\tb = frames[frame + ColorTimeline.PREV_B];\r\n\t\t\t\ta = frames[frame + ColorTimeline.PREV_A];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tr += (frames[frame + ColorTimeline.R] - r) * percent;\r\n\t\t\t\tg += (frames[frame + ColorTimeline.G] - g) * percent;\r\n\t\t\t\tb += (frames[frame + ColorTimeline.B] - b) * percent;\r\n\t\t\t\ta += (frames[frame + ColorTimeline.A] - a) * percent;\r\n\t\t\t}\r\n\t\t\tif (alpha == 1)\r\n\t\t\t\tslot.color.set(r, g, b, a);\r\n\t\t\telse {\r\n\t\t\t\tvar color = slot.color;\r\n\t\t\t\tif (pose == MixPose.setup)\r\n\t\t\t\t\tcolor.setFromColor(slot.data.color);\r\n\t\t\t\tcolor.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n\t\t\t}\r\n\t\t};\r\n\t\tColorTimeline.ENTRIES = 5;\r\n\t\tColorTimeline.PREV_TIME = -5;\r\n\t\tColorTimeline.PREV_R = -4;\r\n\t\tColorTimeline.PREV_G = -3;\r\n\t\tColorTimeline.PREV_B = -2;\r\n\t\tColorTimeline.PREV_A = -1;\r\n\t\tColorTimeline.R = 1;\r\n\t\tColorTimeline.G = 2;\r\n\t\tColorTimeline.B = 3;\r\n\t\tColorTimeline.A = 4;\r\n\t\treturn ColorTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.ColorTimeline = ColorTimeline;\r\n\tvar TwoColorTimeline = (function (_super) {\r\n\t\t__extends(TwoColorTimeline, _super);\r\n\t\tfunction TwoColorTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tTwoColorTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.twoColor << 24) + this.slotIndex;\r\n\t\t};\r\n\t\tTwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n\t\t\tframeIndex *= TwoColorTimeline.ENTRIES;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + TwoColorTimeline.R] = r;\r\n\t\t\tthis.frames[frameIndex + TwoColorTimeline.G] = g;\r\n\t\t\tthis.frames[frameIndex + TwoColorTimeline.B] = b;\r\n\t\t\tthis.frames[frameIndex + TwoColorTimeline.A] = a;\r\n\t\t\tthis.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n\t\t\tthis.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n\t\t\tthis.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n\t\t};\r\n\t\tTwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) {\r\n\t\t\tvar slot = skeleton.slots[this.slotIndex];\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tslot.color.setFromColor(slot.data.color);\r\n\t\t\t\t\t\tslot.darkColor.setFromColor(slot.data.darkColor);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tvar light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n\t\t\t\t\t\tlight.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n\t\t\t\t\t\tdark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n\t\t\tif (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n\t\t\t\tvar i = frames.length;\r\n\t\t\t\tr = frames[i + TwoColorTimeline.PREV_R];\r\n\t\t\t\tg = frames[i + TwoColorTimeline.PREV_G];\r\n\t\t\t\tb = frames[i + TwoColorTimeline.PREV_B];\r\n\t\t\t\ta = frames[i + TwoColorTimeline.PREV_A];\r\n\t\t\t\tr2 = frames[i + TwoColorTimeline.PREV_R2];\r\n\t\t\t\tg2 = frames[i + TwoColorTimeline.PREV_G2];\r\n\t\t\t\tb2 = frames[i + TwoColorTimeline.PREV_B2];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n\t\t\t\tr = frames[frame + TwoColorTimeline.PREV_R];\r\n\t\t\t\tg = frames[frame + TwoColorTimeline.PREV_G];\r\n\t\t\t\tb = frames[frame + TwoColorTimeline.PREV_B];\r\n\t\t\t\ta = frames[frame + TwoColorTimeline.PREV_A];\r\n\t\t\t\tr2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n\t\t\t\tg2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n\t\t\t\tb2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tr += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n\t\t\t\tg += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n\t\t\t\tb += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n\t\t\t\ta += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n\t\t\t\tr2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n\t\t\t\tg2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n\t\t\t\tb2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n\t\t\t}\r\n\t\t\tif (alpha == 1) {\r\n\t\t\t\tslot.color.set(r, g, b, a);\r\n\t\t\t\tslot.darkColor.set(r2, g2, b2, 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar light = slot.color, dark = slot.darkColor;\r\n\t\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\t\tlight.setFromColor(slot.data.color);\r\n\t\t\t\t\tdark.setFromColor(slot.data.darkColor);\r\n\t\t\t\t}\r\n\t\t\t\tlight.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n\t\t\t\tdark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n\t\t\t}\r\n\t\t};\r\n\t\tTwoColorTimeline.ENTRIES = 8;\r\n\t\tTwoColorTimeline.PREV_TIME = -8;\r\n\t\tTwoColorTimeline.PREV_R = -7;\r\n\t\tTwoColorTimeline.PREV_G = -6;\r\n\t\tTwoColorTimeline.PREV_B = -5;\r\n\t\tTwoColorTimeline.PREV_A = -4;\r\n\t\tTwoColorTimeline.PREV_R2 = -3;\r\n\t\tTwoColorTimeline.PREV_G2 = -2;\r\n\t\tTwoColorTimeline.PREV_B2 = -1;\r\n\t\tTwoColorTimeline.R = 1;\r\n\t\tTwoColorTimeline.G = 2;\r\n\t\tTwoColorTimeline.B = 3;\r\n\t\tTwoColorTimeline.A = 4;\r\n\t\tTwoColorTimeline.R2 = 5;\r\n\t\tTwoColorTimeline.G2 = 6;\r\n\t\tTwoColorTimeline.B2 = 7;\r\n\t\treturn TwoColorTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.TwoColorTimeline = TwoColorTimeline;\r\n\tvar AttachmentTimeline = (function () {\r\n\t\tfunction AttachmentTimeline(frameCount) {\r\n\t\t\tthis.frames = spine.Utils.newFloatArray(frameCount);\r\n\t\t\tthis.attachmentNames = new Array(frameCount);\r\n\t\t}\r\n\t\tAttachmentTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.attachment << 24) + this.slotIndex;\r\n\t\t};\r\n\t\tAttachmentTimeline.prototype.getFrameCount = function () {\r\n\t\t\treturn this.frames.length;\r\n\t\t};\r\n\t\tAttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.attachmentNames[frameIndex] = attachmentName;\r\n\t\t};\r\n\t\tAttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, pose, direction) {\r\n\t\t\tvar slot = skeleton.slots[this.slotIndex];\r\n\t\t\tif (direction == MixDirection.out && pose == MixPose.setup) {\r\n\t\t\t\tvar attachmentName_1 = slot.data.attachmentName;\r\n\t\t\t\tslot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\t\tvar attachmentName_2 = slot.data.attachmentName;\r\n\t\t\t\t\tslot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2));\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar frameIndex = 0;\r\n\t\t\tif (time >= frames[frames.length - 1])\r\n\t\t\t\tframeIndex = frames.length - 1;\r\n\t\t\telse\r\n\t\t\t\tframeIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n\t\t\tvar attachmentName = this.attachmentNames[frameIndex];\r\n\t\t\tskeleton.slots[this.slotIndex]\r\n\t\t\t\t.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n\t\t};\r\n\t\treturn AttachmentTimeline;\r\n\t}());\r\n\tspine.AttachmentTimeline = AttachmentTimeline;\r\n\tvar zeros = null;\r\n\tvar DeformTimeline = (function (_super) {\r\n\t\t__extends(DeformTimeline, _super);\r\n\t\tfunction DeformTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount);\r\n\t\t\t_this.frameVertices = new Array(frameCount);\r\n\t\t\tif (zeros == null)\r\n\t\t\t\tzeros = spine.Utils.newFloatArray(64);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tDeformTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n\t\t};\r\n\t\tDeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frameVertices[frameIndex] = vertices;\r\n\t\t};\r\n\t\tDeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tvar slot = skeleton.slots[this.slotIndex];\r\n\t\t\tvar slotAttachment = slot.getAttachment();\r\n\t\t\tif (!(slotAttachment instanceof spine.VertexAttachment) || !slotAttachment.applyDeform(this.attachment))\r\n\t\t\t\treturn;\r\n\t\t\tvar verticesArray = slot.attachmentVertices;\r\n\t\t\tif (verticesArray.length == 0)\r\n\t\t\t\talpha = 1;\r\n\t\t\tvar frameVertices = this.frameVertices;\r\n\t\t\tvar vertexCount = frameVertices[0].length;\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tvar vertexAttachment = slotAttachment;\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tverticesArray.length = 0;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tif (alpha == 1) {\r\n\t\t\t\t\t\t\tverticesArray.length = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar vertices_1 = spine.Utils.setArraySize(verticesArray, vertexCount);\r\n\t\t\t\t\t\tif (vertexAttachment.bones == null) {\r\n\t\t\t\t\t\t\tvar setupVertices = vertexAttachment.vertices;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < vertexCount; i++)\r\n\t\t\t\t\t\t\t\tvertices_1[i] += (setupVertices[i] - vertices_1[i]) * alpha;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\talpha = 1 - alpha;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < vertexCount; i++)\r\n\t\t\t\t\t\t\t\tvertices_1[i] *= alpha;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar vertices = spine.Utils.setArraySize(verticesArray, vertexCount);\r\n\t\t\tif (time >= frames[frames.length - 1]) {\r\n\t\t\t\tvar lastVertices = frameVertices[frames.length - 1];\r\n\t\t\t\tif (alpha == 1) {\r\n\t\t\t\t\tspine.Utils.arrayCopy(lastVertices, 0, vertices, 0, vertexCount);\r\n\t\t\t\t}\r\n\t\t\t\telse if (pose == MixPose.setup) {\r\n\t\t\t\t\tvar vertexAttachment = slotAttachment;\r\n\t\t\t\t\tif (vertexAttachment.bones == null) {\r\n\t\t\t\t\t\tvar setupVertices_1 = vertexAttachment.vertices;\r\n\t\t\t\t\t\tfor (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n\t\t\t\t\t\t\tvar setup = setupVertices_1[i_1];\r\n\t\t\t\t\t\t\tvertices[i_1] = setup + (lastVertices[i_1] - setup) * alpha;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tfor (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n\t\t\t\t\t\t\tvertices[i_2] = lastVertices[i_2] * alpha;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfor (var i_3 = 0; i_3 < vertexCount; i_3++)\r\n\t\t\t\t\t\tvertices[i_3] += (lastVertices[i_3] - vertices[i_3]) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar frame = Animation.binarySearch(frames, time);\r\n\t\t\tvar prevVertices = frameVertices[frame - 1];\r\n\t\t\tvar nextVertices = frameVertices[frame];\r\n\t\t\tvar frameTime = frames[frame];\r\n\t\t\tvar percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n\t\t\tif (alpha == 1) {\r\n\t\t\t\tfor (var i_4 = 0; i_4 < vertexCount; i_4++) {\r\n\t\t\t\t\tvar prev = prevVertices[i_4];\r\n\t\t\t\t\tvertices[i_4] = prev + (nextVertices[i_4] - prev) * percent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (pose == MixPose.setup) {\r\n\t\t\t\tvar vertexAttachment = slotAttachment;\r\n\t\t\t\tif (vertexAttachment.bones == null) {\r\n\t\t\t\t\tvar setupVertices_2 = vertexAttachment.vertices;\r\n\t\t\t\t\tfor (var i_5 = 0; i_5 < vertexCount; i_5++) {\r\n\t\t\t\t\t\tvar prev = prevVertices[i_5], setup = setupVertices_2[i_5];\r\n\t\t\t\t\t\tvertices[i_5] = setup + (prev + (nextVertices[i_5] - prev) * percent - setup) * alpha;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfor (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n\t\t\t\t\t\tvar prev = prevVertices[i_6];\r\n\t\t\t\t\t\tvertices[i_6] = (prev + (nextVertices[i_6] - prev) * percent) * alpha;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfor (var i_7 = 0; i_7 < vertexCount; i_7++) {\r\n\t\t\t\t\tvar prev = prevVertices[i_7];\r\n\t\t\t\t\tvertices[i_7] += (prev + (nextVertices[i_7] - prev) * percent - vertices[i_7]) * alpha;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn DeformTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.DeformTimeline = DeformTimeline;\r\n\tvar EventTimeline = (function () {\r\n\t\tfunction EventTimeline(frameCount) {\r\n\t\t\tthis.frames = spine.Utils.newFloatArray(frameCount);\r\n\t\t\tthis.events = new Array(frameCount);\r\n\t\t}\r\n\t\tEventTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn TimelineType.event << 24;\r\n\t\t};\r\n\t\tEventTimeline.prototype.getFrameCount = function () {\r\n\t\t\treturn this.frames.length;\r\n\t\t};\r\n\t\tEventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n\t\t\tthis.frames[frameIndex] = event.time;\r\n\t\t\tthis.events[frameIndex] = event;\r\n\t\t};\r\n\t\tEventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tif (firedEvents == null)\r\n\t\t\t\treturn;\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar frameCount = this.frames.length;\r\n\t\t\tif (lastTime > time) {\r\n\t\t\t\tthis.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, pose, direction);\r\n\t\t\t\tlastTime = -1;\r\n\t\t\t}\r\n\t\t\telse if (lastTime >= frames[frameCount - 1])\r\n\t\t\t\treturn;\r\n\t\t\tif (time < frames[0])\r\n\t\t\t\treturn;\r\n\t\t\tvar frame = 0;\r\n\t\t\tif (lastTime < frames[0])\r\n\t\t\t\tframe = 0;\r\n\t\t\telse {\r\n\t\t\t\tframe = Animation.binarySearch(frames, lastTime);\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\twhile (frame > 0) {\r\n\t\t\t\t\tif (frames[frame - 1] != frameTime)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tframe--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (; frame < frameCount && time >= frames[frame]; frame++)\r\n\t\t\t\tfiredEvents.push(this.events[frame]);\r\n\t\t};\r\n\t\treturn EventTimeline;\r\n\t}());\r\n\tspine.EventTimeline = EventTimeline;\r\n\tvar DrawOrderTimeline = (function () {\r\n\t\tfunction DrawOrderTimeline(frameCount) {\r\n\t\t\tthis.frames = spine.Utils.newFloatArray(frameCount);\r\n\t\t\tthis.drawOrders = new Array(frameCount);\r\n\t\t}\r\n\t\tDrawOrderTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn TimelineType.drawOrder << 24;\r\n\t\t};\r\n\t\tDrawOrderTimeline.prototype.getFrameCount = function () {\r\n\t\t\treturn this.frames.length;\r\n\t\t};\r\n\t\tDrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.drawOrders[frameIndex] = drawOrder;\r\n\t\t};\r\n\t\tDrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tvar drawOrder = skeleton.drawOrder;\r\n\t\t\tvar slots = skeleton.slots;\r\n\t\t\tif (direction == MixDirection.out && pose == MixPose.setup) {\r\n\t\t\t\tspine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tif (pose == MixPose.setup)\r\n\t\t\t\t\tspine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar frame = 0;\r\n\t\t\tif (time >= frames[frames.length - 1])\r\n\t\t\t\tframe = frames.length - 1;\r\n\t\t\telse\r\n\t\t\t\tframe = Animation.binarySearch(frames, time) - 1;\r\n\t\t\tvar drawOrderToSetupIndex = this.drawOrders[frame];\r\n\t\t\tif (drawOrderToSetupIndex == null)\r\n\t\t\t\tspine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n\t\t\telse {\r\n\t\t\t\tfor (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n\t\t\t\t\tdrawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn DrawOrderTimeline;\r\n\t}());\r\n\tspine.DrawOrderTimeline = DrawOrderTimeline;\r\n\tvar IkConstraintTimeline = (function (_super) {\r\n\t\t__extends(IkConstraintTimeline, _super);\r\n\t\tfunction IkConstraintTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tIkConstraintTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n\t\t};\r\n\t\tIkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, bendDirection) {\r\n\t\t\tframeIndex *= IkConstraintTimeline.ENTRIES;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n\t\t\tthis.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n\t\t};\r\n\t\tIkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tconstraint.mix = constraint.data.mix;\r\n\t\t\t\t\t\tconstraint.bendDirection = constraint.data.bendDirection;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tconstraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n\t\t\t\t\t\tconstraint.bendDirection = constraint.data.bendDirection;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n\t\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\t\tconstraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n\t\t\t\t\tconstraint.bendDirection = direction == MixDirection.out ? constraint.data.bendDirection\r\n\t\t\t\t\t\t: frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tconstraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n\t\t\t\t\tif (direction == MixDirection[\"in\"])\r\n\t\t\t\t\t\tconstraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n\t\t\tvar mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n\t\t\tvar frameTime = frames[frame];\r\n\t\t\tvar percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\tconstraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n\t\t\t\tconstraint.bendDirection = direction == MixDirection.out ? constraint.data.bendDirection : frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconstraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n\t\t\t\tif (direction == MixDirection[\"in\"])\r\n\t\t\t\t\tconstraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n\t\t\t}\r\n\t\t};\r\n\t\tIkConstraintTimeline.ENTRIES = 3;\r\n\t\tIkConstraintTimeline.PREV_TIME = -3;\r\n\t\tIkConstraintTimeline.PREV_MIX = -2;\r\n\t\tIkConstraintTimeline.PREV_BEND_DIRECTION = -1;\r\n\t\tIkConstraintTimeline.MIX = 1;\r\n\t\tIkConstraintTimeline.BEND_DIRECTION = 2;\r\n\t\treturn IkConstraintTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.IkConstraintTimeline = IkConstraintTimeline;\r\n\tvar TransformConstraintTimeline = (function (_super) {\r\n\t\t__extends(TransformConstraintTimeline, _super);\r\n\t\tfunction TransformConstraintTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tTransformConstraintTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n\t\t};\r\n\t\tTransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n\t\t\tframeIndex *= TransformConstraintTimeline.ENTRIES;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n\t\t\tthis.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n\t\t\tthis.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n\t\t\tthis.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n\t\t};\r\n\t\tTransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tvar data = constraint.data;\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tconstraint.rotateMix = data.rotateMix;\r\n\t\t\t\t\t\tconstraint.translateMix = data.translateMix;\r\n\t\t\t\t\t\tconstraint.scaleMix = data.scaleMix;\r\n\t\t\t\t\t\tconstraint.shearMix = data.shearMix;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tconstraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n\t\t\t\t\t\tconstraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n\t\t\t\t\t\tconstraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n\t\t\t\t\t\tconstraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar rotate = 0, translate = 0, scale = 0, shear = 0;\r\n\t\t\tif (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n\t\t\t\tvar i = frames.length;\r\n\t\t\t\trotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n\t\t\t\ttranslate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n\t\t\t\tscale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n\t\t\t\tshear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n\t\t\t\trotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n\t\t\t\ttranslate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n\t\t\t\tscale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n\t\t\t\tshear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\trotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n\t\t\t\ttranslate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n\t\t\t\tscale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n\t\t\t\tshear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n\t\t\t}\r\n\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\tvar data = constraint.data;\r\n\t\t\t\tconstraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n\t\t\t\tconstraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n\t\t\t\tconstraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n\t\t\t\tconstraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconstraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n\t\t\t\tconstraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n\t\t\t\tconstraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n\t\t\t\tconstraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n\t\t\t}\r\n\t\t};\r\n\t\tTransformConstraintTimeline.ENTRIES = 5;\r\n\t\tTransformConstraintTimeline.PREV_TIME = -5;\r\n\t\tTransformConstraintTimeline.PREV_ROTATE = -4;\r\n\t\tTransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n\t\tTransformConstraintTimeline.PREV_SCALE = -2;\r\n\t\tTransformConstraintTimeline.PREV_SHEAR = -1;\r\n\t\tTransformConstraintTimeline.ROTATE = 1;\r\n\t\tTransformConstraintTimeline.TRANSLATE = 2;\r\n\t\tTransformConstraintTimeline.SCALE = 3;\r\n\t\tTransformConstraintTimeline.SHEAR = 4;\r\n\t\treturn TransformConstraintTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n\tvar PathConstraintPositionTimeline = (function (_super) {\r\n\t\t__extends(PathConstraintPositionTimeline, _super);\r\n\t\tfunction PathConstraintPositionTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tPathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n\t\t};\r\n\t\tPathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n\t\t\tframeIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n\t\t};\r\n\t\tPathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tconstraint.position = constraint.data.position;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tconstraint.position += (constraint.data.position - constraint.position) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar position = 0;\r\n\t\t\tif (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n\t\t\t\tposition = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n\t\t\t\tposition = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tposition += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n\t\t\t}\r\n\t\t\tif (pose == MixPose.setup)\r\n\t\t\t\tconstraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n\t\t\telse\r\n\t\t\t\tconstraint.position += (position - constraint.position) * alpha;\r\n\t\t};\r\n\t\tPathConstraintPositionTimeline.ENTRIES = 2;\r\n\t\tPathConstraintPositionTimeline.PREV_TIME = -2;\r\n\t\tPathConstraintPositionTimeline.PREV_VALUE = -1;\r\n\t\tPathConstraintPositionTimeline.VALUE = 1;\r\n\t\treturn PathConstraintPositionTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n\tvar PathConstraintSpacingTimeline = (function (_super) {\r\n\t\t__extends(PathConstraintSpacingTimeline, _super);\r\n\t\tfunction PathConstraintSpacingTimeline(frameCount) {\r\n\t\t\treturn _super.call(this, frameCount) || this;\r\n\t\t}\r\n\t\tPathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n\t\t};\r\n\t\tPathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tconstraint.spacing = constraint.data.spacing;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tconstraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar spacing = 0;\r\n\t\t\tif (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n\t\t\t\tspacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n\t\t\t\tspacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tspacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n\t\t\t}\r\n\t\t\tif (pose == MixPose.setup)\r\n\t\t\t\tconstraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n\t\t\telse\r\n\t\t\t\tconstraint.spacing += (spacing - constraint.spacing) * alpha;\r\n\t\t};\r\n\t\treturn PathConstraintSpacingTimeline;\r\n\t}(PathConstraintPositionTimeline));\r\n\tspine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n\tvar PathConstraintMixTimeline = (function (_super) {\r\n\t\t__extends(PathConstraintMixTimeline, _super);\r\n\t\tfunction PathConstraintMixTimeline(frameCount) {\r\n\t\t\tvar _this = _super.call(this, frameCount) || this;\r\n\t\t\t_this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tPathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n\t\t\treturn (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n\t\t};\r\n\t\tPathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n\t\t\tframeIndex *= PathConstraintMixTimeline.ENTRIES;\r\n\t\t\tthis.frames[frameIndex] = time;\r\n\t\t\tthis.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n\t\t\tthis.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n\t\t};\r\n\t\tPathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, pose, direction) {\r\n\t\t\tvar frames = this.frames;\r\n\t\t\tvar constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tswitch (pose) {\r\n\t\t\t\t\tcase MixPose.setup:\r\n\t\t\t\t\t\tconstraint.rotateMix = constraint.data.rotateMix;\r\n\t\t\t\t\t\tconstraint.translateMix = constraint.data.translateMix;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tcase MixPose.current:\r\n\t\t\t\t\t\tconstraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n\t\t\t\t\t\tconstraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar rotate = 0, translate = 0;\r\n\t\t\tif (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n\t\t\t\trotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n\t\t\t\ttranslate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n\t\t\t\trotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n\t\t\t\ttranslate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\trotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n\t\t\t\ttranslate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n\t\t\t}\r\n\t\t\tif (pose == MixPose.setup) {\r\n\t\t\t\tconstraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n\t\t\t\tconstraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconstraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n\t\t\t\tconstraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n\t\t\t}\r\n\t\t};\r\n\t\tPathConstraintMixTimeline.ENTRIES = 3;\r\n\t\tPathConstraintMixTimeline.PREV_TIME = -3;\r\n\t\tPathConstraintMixTimeline.PREV_ROTATE = -2;\r\n\t\tPathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n\t\tPathConstraintMixTimeline.ROTATE = 1;\r\n\t\tPathConstraintMixTimeline.TRANSLATE = 2;\r\n\t\treturn PathConstraintMixTimeline;\r\n\t}(CurveTimeline));\r\n\tspine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar AnimationState = (function () {\r\n\t\tfunction AnimationState(data) {\r\n\t\t\tthis.tracks = new Array();\r\n\t\t\tthis.events = new Array();\r\n\t\t\tthis.listeners = new Array();\r\n\t\t\tthis.queue = new EventQueue(this);\r\n\t\t\tthis.propertyIDs = new spine.IntSet();\r\n\t\t\tthis.mixingTo = new Array();\r\n\t\t\tthis.animationsChanged = false;\r\n\t\t\tthis.timeScale = 1;\r\n\t\t\tthis.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n\t\t\tthis.data = data;\r\n\t\t}\r\n\t\tAnimationState.prototype.update = function (delta) {\r\n\t\t\tdelta *= this.timeScale;\r\n\t\t\tvar tracks = this.tracks;\r\n\t\t\tfor (var i = 0, n = tracks.length; i < n; i++) {\r\n\t\t\t\tvar current = tracks[i];\r\n\t\t\t\tif (current == null)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tcurrent.animationLast = current.nextAnimationLast;\r\n\t\t\t\tcurrent.trackLast = current.nextTrackLast;\r\n\t\t\t\tvar currentDelta = delta * current.timeScale;\r\n\t\t\t\tif (current.delay > 0) {\r\n\t\t\t\t\tcurrent.delay -= currentDelta;\r\n\t\t\t\t\tif (current.delay > 0)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tcurrentDelta = -current.delay;\r\n\t\t\t\t\tcurrent.delay = 0;\r\n\t\t\t\t}\r\n\t\t\t\tvar next = current.next;\r\n\t\t\t\tif (next != null) {\r\n\t\t\t\t\tvar nextTime = current.trackLast - next.delay;\r\n\t\t\t\t\tif (nextTime >= 0) {\r\n\t\t\t\t\t\tnext.delay = 0;\r\n\t\t\t\t\t\tnext.trackTime = nextTime + delta * next.timeScale;\r\n\t\t\t\t\t\tcurrent.trackTime += currentDelta;\r\n\t\t\t\t\t\tthis.setCurrent(i, next, true);\r\n\t\t\t\t\t\twhile (next.mixingFrom != null) {\r\n\t\t\t\t\t\t\tnext.mixTime += currentDelta;\r\n\t\t\t\t\t\t\tnext = next.mixingFrom;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n\t\t\t\t\ttracks[i] = null;\r\n\t\t\t\t\tthis.queue.end(current);\r\n\t\t\t\t\tthis.disposeNext(current);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n\t\t\t\t\tvar from = current.mixingFrom;\r\n\t\t\t\t\tcurrent.mixingFrom = null;\r\n\t\t\t\t\twhile (from != null) {\r\n\t\t\t\t\t\tthis.queue.end(from);\r\n\t\t\t\t\t\tfrom = from.mixingFrom;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcurrent.trackTime += currentDelta;\r\n\t\t\t}\r\n\t\t\tthis.queue.drain();\r\n\t\t};\r\n\t\tAnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n\t\t\tvar from = to.mixingFrom;\r\n\t\t\tif (from == null)\r\n\t\t\t\treturn true;\r\n\t\t\tvar finished = this.updateMixingFrom(from, delta);\r\n\t\t\tfrom.animationLast = from.nextAnimationLast;\r\n\t\t\tfrom.trackLast = from.nextTrackLast;\r\n\t\t\tif (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {\r\n\t\t\t\tif (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n\t\t\t\t\tto.mixingFrom = from.mixingFrom;\r\n\t\t\t\t\tto.interruptAlpha = from.interruptAlpha;\r\n\t\t\t\t\tthis.queue.end(from);\r\n\t\t\t\t}\r\n\t\t\t\treturn finished;\r\n\t\t\t}\r\n\t\t\tfrom.trackTime += delta * from.timeScale;\r\n\t\t\tto.mixTime += delta * to.timeScale;\r\n\t\t\treturn false;\r\n\t\t};\r\n\t\tAnimationState.prototype.apply = function (skeleton) {\r\n\t\t\tif (skeleton == null)\r\n\t\t\t\tthrow new Error(\"skeleton cannot be null.\");\r\n\t\t\tif (this.animationsChanged)\r\n\t\t\t\tthis._animationsChanged();\r\n\t\t\tvar events = this.events;\r\n\t\t\tvar tracks = this.tracks;\r\n\t\t\tvar applied = false;\r\n\t\t\tfor (var i = 0, n = tracks.length; i < n; i++) {\r\n\t\t\t\tvar current = tracks[i];\r\n\t\t\t\tif (current == null || current.delay > 0)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tapplied = true;\r\n\t\t\t\tvar currentPose = i == 0 ? spine.MixPose.current : spine.MixPose.currentLayered;\r\n\t\t\t\tvar mix = current.alpha;\r\n\t\t\t\tif (current.mixingFrom != null)\r\n\t\t\t\t\tmix *= this.applyMixingFrom(current, skeleton, currentPose);\r\n\t\t\t\telse if (current.trackTime >= current.trackEnd && current.next == null)\r\n\t\t\t\t\tmix = 0;\r\n\t\t\t\tvar animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n\t\t\t\tvar timelineCount = current.animation.timelines.length;\r\n\t\t\t\tvar timelines = current.animation.timelines;\r\n\t\t\t\tif (mix == 1) {\r\n\t\t\t\t\tfor (var ii = 0; ii < timelineCount; ii++)\r\n\t\t\t\t\t\ttimelines[ii].apply(skeleton, animationLast, animationTime, events, 1, spine.MixPose.setup, spine.MixDirection[\"in\"]);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tvar timelineData = current.timelineData;\r\n\t\t\t\t\tvar firstFrame = current.timelinesRotation.length == 0;\r\n\t\t\t\t\tif (firstFrame)\r\n\t\t\t\t\t\tspine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n\t\t\t\t\tvar timelinesRotation = current.timelinesRotation;\r\n\t\t\t\t\tfor (var ii = 0; ii < timelineCount; ii++) {\r\n\t\t\t\t\t\tvar timeline = timelines[ii];\r\n\t\t\t\t\t\tvar pose = timelineData[ii] >= AnimationState.FIRST ? spine.MixPose.setup : currentPose;\r\n\t\t\t\t\t\tif (timeline instanceof spine.RotateTimeline) {\r\n\t\t\t\t\t\t\tthis.applyRotateTimeline(timeline, skeleton, animationTime, mix, pose, timelinesRotation, ii << 1, firstFrame);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tspine.Utils.webkit602BugfixHelper(mix, pose);\r\n\t\t\t\t\t\t\ttimeline.apply(skeleton, animationLast, animationTime, events, mix, pose, spine.MixDirection[\"in\"]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.queueEvents(current, animationTime);\r\n\t\t\t\tevents.length = 0;\r\n\t\t\t\tcurrent.nextAnimationLast = animationTime;\r\n\t\t\t\tcurrent.nextTrackLast = current.trackTime;\r\n\t\t\t}\r\n\t\t\tthis.queue.drain();\r\n\t\t\treturn applied;\r\n\t\t};\r\n\t\tAnimationState.prototype.applyMixingFrom = function (to, skeleton, currentPose) {\r\n\t\t\tvar from = to.mixingFrom;\r\n\t\t\tif (from.mixingFrom != null)\r\n\t\t\t\tthis.applyMixingFrom(from, skeleton, currentPose);\r\n\t\t\tvar mix = 0;\r\n\t\t\tif (to.mixDuration == 0) {\r\n\t\t\t\tmix = 1;\r\n\t\t\t\tcurrentPose = spine.MixPose.setup;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tmix = to.mixTime / to.mixDuration;\r\n\t\t\t\tif (mix > 1)\r\n\t\t\t\t\tmix = 1;\r\n\t\t\t}\r\n\t\t\tvar events = mix < from.eventThreshold ? this.events : null;\r\n\t\t\tvar attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n\t\t\tvar animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n\t\t\tvar timelineCount = from.animation.timelines.length;\r\n\t\t\tvar timelines = from.animation.timelines;\r\n\t\t\tvar timelineData = from.timelineData;\r\n\t\t\tvar timelineDipMix = from.timelineDipMix;\r\n\t\t\tvar firstFrame = from.timelinesRotation.length == 0;\r\n\t\t\tif (firstFrame)\r\n\t\t\t\tspine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n\t\t\tvar timelinesRotation = from.timelinesRotation;\r\n\t\t\tvar pose;\r\n\t\t\tvar alphaDip = from.alpha * to.interruptAlpha, alphaMix = alphaDip * (1 - mix), alpha = 0;\r\n\t\t\tfrom.totalAlpha = 0;\r\n\t\t\tfor (var i = 0; i < timelineCount; i++) {\r\n\t\t\t\tvar timeline = timelines[i];\r\n\t\t\t\tswitch (timelineData[i]) {\r\n\t\t\t\t\tcase AnimationState.SUBSEQUENT:\r\n\t\t\t\t\t\tif (!attachments && timeline instanceof spine.AttachmentTimeline)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tif (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tpose = currentPose;\r\n\t\t\t\t\t\talpha = alphaMix;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase AnimationState.FIRST:\r\n\t\t\t\t\t\tpose = spine.MixPose.setup;\r\n\t\t\t\t\t\talpha = alphaMix;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase AnimationState.DIP:\r\n\t\t\t\t\t\tpose = spine.MixPose.setup;\r\n\t\t\t\t\t\talpha = alphaDip;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tpose = spine.MixPose.setup;\r\n\t\t\t\t\t\talpha = alphaDip;\r\n\t\t\t\t\t\tvar dipMix = timelineDipMix[i];\r\n\t\t\t\t\t\talpha *= Math.max(0, 1 - dipMix.mixTime / dipMix.mixDuration);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tfrom.totalAlpha += alpha;\r\n\t\t\t\tif (timeline instanceof spine.RotateTimeline)\r\n\t\t\t\t\tthis.applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i << 1, firstFrame);\r\n\t\t\t\telse {\r\n\t\t\t\t\tspine.Utils.webkit602BugfixHelper(alpha, pose);\r\n\t\t\t\t\ttimeline.apply(skeleton, animationLast, animationTime, events, alpha, pose, spine.MixDirection.out);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (to.mixDuration > 0)\r\n\t\t\t\tthis.queueEvents(from, animationTime);\r\n\t\t\tthis.events.length = 0;\r\n\t\t\tfrom.nextAnimationLast = animationTime;\r\n\t\t\tfrom.nextTrackLast = from.trackTime;\r\n\t\t\treturn mix;\r\n\t\t};\r\n\t\tAnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, pose, timelinesRotation, i, firstFrame) {\r\n\t\t\tif (firstFrame)\r\n\t\t\t\ttimelinesRotation[i] = 0;\r\n\t\t\tif (alpha == 1) {\r\n\t\t\t\ttimeline.apply(skeleton, 0, time, null, 1, pose, spine.MixDirection[\"in\"]);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar rotateTimeline = timeline;\r\n\t\t\tvar frames = rotateTimeline.frames;\r\n\t\t\tvar bone = skeleton.bones[rotateTimeline.boneIndex];\r\n\t\t\tif (time < frames[0]) {\r\n\t\t\t\tif (pose == spine.MixPose.setup)\r\n\t\t\t\t\tbone.rotation = bone.data.rotation;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar r2 = 0;\r\n\t\t\tif (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n\t\t\t\tr2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n\t\t\telse {\r\n\t\t\t\tvar frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n\t\t\t\tvar prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n\t\t\t\tvar frameTime = frames[frame];\r\n\t\t\t\tvar percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n\t\t\t\tr2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n\t\t\t\tr2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n\t\t\t\tr2 = prevRotation + r2 * percent + bone.data.rotation;\r\n\t\t\t\tr2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n\t\t\t}\r\n\t\t\tvar r1 = pose == spine.MixPose.setup ? bone.data.rotation : bone.rotation;\r\n\t\t\tvar total = 0, diff = r2 - r1;\r\n\t\t\tif (diff == 0) {\r\n\t\t\t\ttotal = timelinesRotation[i];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tdiff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n\t\t\t\tvar lastTotal = 0, lastDiff = 0;\r\n\t\t\t\tif (firstFrame) {\r\n\t\t\t\t\tlastTotal = 0;\r\n\t\t\t\t\tlastDiff = diff;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlastTotal = timelinesRotation[i];\r\n\t\t\t\t\tlastDiff = timelinesRotation[i + 1];\r\n\t\t\t\t}\r\n\t\t\t\tvar current = diff > 0, dir = lastTotal >= 0;\r\n\t\t\t\tif (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n\t\t\t\t\tif (Math.abs(lastTotal) > 180)\r\n\t\t\t\t\t\tlastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n\t\t\t\t\tdir = current;\r\n\t\t\t\t}\r\n\t\t\t\ttotal = diff + lastTotal - lastTotal % 360;\r\n\t\t\t\tif (dir != current)\r\n\t\t\t\t\ttotal += 360 * spine.MathUtils.signum(lastTotal);\r\n\t\t\t\ttimelinesRotation[i] = total;\r\n\t\t\t}\r\n\t\t\ttimelinesRotation[i + 1] = diff;\r\n\t\t\tr1 += total * alpha;\r\n\t\t\tbone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n\t\t};\r\n\t\tAnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n\t\t\tvar animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n\t\t\tvar duration = animationEnd - animationStart;\r\n\t\t\tvar trackLastWrapped = entry.trackLast % duration;\r\n\t\t\tvar events = this.events;\r\n\t\t\tvar i = 0, n = events.length;\r\n\t\t\tfor (; i < n; i++) {\r\n\t\t\t\tvar event_1 = events[i];\r\n\t\t\t\tif (event_1.time < trackLastWrapped)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif (event_1.time > animationEnd)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tthis.queue.event(entry, event_1);\r\n\t\t\t}\r\n\t\t\tvar complete = false;\r\n\t\t\tif (entry.loop)\r\n\t\t\t\tcomplete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n\t\t\telse\r\n\t\t\t\tcomplete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n\t\t\tif (complete)\r\n\t\t\t\tthis.queue.complete(entry);\r\n\t\t\tfor (; i < n; i++) {\r\n\t\t\t\tvar event_2 = events[i];\r\n\t\t\t\tif (event_2.time < animationStart)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tthis.queue.event(entry, events[i]);\r\n\t\t\t}\r\n\t\t};\r\n\t\tAnimationState.prototype.clearTracks = function () {\r\n\t\t\tvar oldDrainDisabled = this.queue.drainDisabled;\r\n\t\t\tthis.queue.drainDisabled = true;\r\n\t\t\tfor (var i = 0, n = this.tracks.length; i < n; i++)\r\n\t\t\t\tthis.clearTrack(i);\r\n\t\t\tthis.tracks.length = 0;\r\n\t\t\tthis.queue.drainDisabled = oldDrainDisabled;\r\n\t\t\tthis.queue.drain();\r\n\t\t};\r\n\t\tAnimationState.prototype.clearTrack = function (trackIndex) {\r\n\t\t\tif (trackIndex >= this.tracks.length)\r\n\t\t\t\treturn;\r\n\t\t\tvar current = this.tracks[trackIndex];\r\n\t\t\tif (current == null)\r\n\t\t\t\treturn;\r\n\t\t\tthis.queue.end(current);\r\n\t\t\tthis.disposeNext(current);\r\n\t\t\tvar entry = current;\r\n\t\t\twhile (true) {\r\n\t\t\t\tvar from = entry.mixingFrom;\r\n\t\t\t\tif (from == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tthis.queue.end(from);\r\n\t\t\t\tentry.mixingFrom = null;\r\n\t\t\t\tentry = from;\r\n\t\t\t}\r\n\t\t\tthis.tracks[current.trackIndex] = null;\r\n\t\t\tthis.queue.drain();\r\n\t\t};\r\n\t\tAnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n\t\t\tvar from = this.expandToIndex(index);\r\n\t\t\tthis.tracks[index] = current;\r\n\t\t\tif (from != null) {\r\n\t\t\t\tif (interrupt)\r\n\t\t\t\t\tthis.queue.interrupt(from);\r\n\t\t\t\tcurrent.mixingFrom = from;\r\n\t\t\t\tcurrent.mixTime = 0;\r\n\t\t\t\tif (from.mixingFrom != null && from.mixDuration > 0)\r\n\t\t\t\t\tcurrent.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n\t\t\t\tfrom.timelinesRotation.length = 0;\r\n\t\t\t}\r\n\t\t\tthis.queue.start(current);\r\n\t\t};\r\n\t\tAnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n\t\t\tvar animation = this.data.skeletonData.findAnimation(animationName);\r\n\t\t\tif (animation == null)\r\n\t\t\t\tthrow new Error(\"Animation not found: \" + animationName);\r\n\t\t\treturn this.setAnimationWith(trackIndex, animation, loop);\r\n\t\t};\r\n\t\tAnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n\t\t\tif (animation == null)\r\n\t\t\t\tthrow new Error(\"animation cannot be null.\");\r\n\t\t\tvar interrupt = true;\r\n\t\t\tvar current = this.expandToIndex(trackIndex);\r\n\t\t\tif (current != null) {\r\n\t\t\t\tif (current.nextTrackLast == -1) {\r\n\t\t\t\t\tthis.tracks[trackIndex] = current.mixingFrom;\r\n\t\t\t\t\tthis.queue.interrupt(current);\r\n\t\t\t\t\tthis.queue.end(current);\r\n\t\t\t\t\tthis.disposeNext(current);\r\n\t\t\t\t\tcurrent = current.mixingFrom;\r\n\t\t\t\t\tinterrupt = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tthis.disposeNext(current);\r\n\t\t\t}\r\n\t\t\tvar entry = this.trackEntry(trackIndex, animation, loop, current);\r\n\t\t\tthis.setCurrent(trackIndex, entry, interrupt);\r\n\t\t\tthis.queue.drain();\r\n\t\t\treturn entry;\r\n\t\t};\r\n\t\tAnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n\t\t\tvar animation = this.data.skeletonData.findAnimation(animationName);\r\n\t\t\tif (animation == null)\r\n\t\t\t\tthrow new Error(\"Animation not found: \" + animationName);\r\n\t\t\treturn this.addAnimationWith(trackIndex, animation, loop, delay);\r\n\t\t};\r\n\t\tAnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n\t\t\tif (animation == null)\r\n\t\t\t\tthrow new Error(\"animation cannot be null.\");\r\n\t\t\tvar last = this.expandToIndex(trackIndex);\r\n\t\t\tif (last != null) {\r\n\t\t\t\twhile (last.next != null)\r\n\t\t\t\t\tlast = last.next;\r\n\t\t\t}\r\n\t\t\tvar entry = this.trackEntry(trackIndex, animation, loop, last);\r\n\t\t\tif (last == null) {\r\n\t\t\t\tthis.setCurrent(trackIndex, entry, true);\r\n\t\t\t\tthis.queue.drain();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlast.next = entry;\r\n\t\t\t\tif (delay <= 0) {\r\n\t\t\t\t\tvar duration = last.animationEnd - last.animationStart;\r\n\t\t\t\t\tif (duration != 0) {\r\n\t\t\t\t\t\tif (last.loop)\r\n\t\t\t\t\t\t\tdelay += duration * (1 + ((last.trackTime / duration) | 0));\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tdelay += duration;\r\n\t\t\t\t\t\tdelay -= this.data.getMix(last.animation, animation);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tdelay = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tentry.delay = delay;\r\n\t\t\treturn entry;\r\n\t\t};\r\n\t\tAnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n\t\t\tvar entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n\t\t\tentry.mixDuration = mixDuration;\r\n\t\t\tentry.trackEnd = mixDuration;\r\n\t\t\treturn entry;\r\n\t\t};\r\n\t\tAnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n\t\t\tif (delay <= 0)\r\n\t\t\t\tdelay -= mixDuration;\r\n\t\t\tvar entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n\t\t\tentry.mixDuration = mixDuration;\r\n\t\t\tentry.trackEnd = mixDuration;\r\n\t\t\treturn entry;\r\n\t\t};\r\n\t\tAnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n\t\t\tvar oldDrainDisabled = this.queue.drainDisabled;\r\n\t\t\tthis.queue.drainDisabled = true;\r\n\t\t\tfor (var i = 0, n = this.tracks.length; i < n; i++) {\r\n\t\t\t\tvar current = this.tracks[i];\r\n\t\t\t\tif (current != null)\r\n\t\t\t\t\tthis.setEmptyAnimation(current.trackIndex, mixDuration);\r\n\t\t\t}\r\n\t\t\tthis.queue.drainDisabled = oldDrainDisabled;\r\n\t\t\tthis.queue.drain();\r\n\t\t};\r\n\t\tAnimationState.prototype.expandToIndex = function (index) {\r\n\t\t\tif (index < this.tracks.length)\r\n\t\t\t\treturn this.tracks[index];\r\n\t\t\tspine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);\r\n\t\t\tthis.tracks.length = index + 1;\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tAnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n\t\t\tvar entry = this.trackEntryPool.obtain();\r\n\t\t\tentry.trackIndex = trackIndex;\r\n\t\t\tentry.animation = animation;\r\n\t\t\tentry.loop = loop;\r\n\t\t\tentry.eventThreshold = 0;\r\n\t\t\tentry.attachmentThreshold = 0;\r\n\t\t\tentry.drawOrderThreshold = 0;\r\n\t\t\tentry.animationStart = 0;\r\n\t\t\tentry.animationEnd = animation.duration;\r\n\t\t\tentry.animationLast = -1;\r\n\t\t\tentry.nextAnimationLast = -1;\r\n\t\t\tentry.delay = 0;\r\n\t\t\tentry.trackTime = 0;\r\n\t\t\tentry.trackLast = -1;\r\n\t\t\tentry.nextTrackLast = -1;\r\n\t\t\tentry.trackEnd = Number.MAX_VALUE;\r\n\t\t\tentry.timeScale = 1;\r\n\t\t\tentry.alpha = 1;\r\n\t\t\tentry.interruptAlpha = 1;\r\n\t\t\tentry.mixTime = 0;\r\n\t\t\tentry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n\t\t\treturn entry;\r\n\t\t};\r\n\t\tAnimationState.prototype.disposeNext = function (entry) {\r\n\t\t\tvar next = entry.next;\r\n\t\t\twhile (next != null) {\r\n\t\t\t\tthis.queue.dispose(next);\r\n\t\t\t\tnext = next.next;\r\n\t\t\t}\r\n\t\t\tentry.next = null;\r\n\t\t};\r\n\t\tAnimationState.prototype._animationsChanged = function () {\r\n\t\t\tthis.animationsChanged = false;\r\n\t\t\tvar propertyIDs = this.propertyIDs;\r\n\t\t\tpropertyIDs.clear();\r\n\t\t\tvar mixingTo = this.mixingTo;\r\n\t\t\tfor (var i = 0, n = this.tracks.length; i < n; i++) {\r\n\t\t\t\tvar entry = this.tracks[i];\r\n\t\t\t\tif (entry != null)\r\n\t\t\t\t\tentry.setTimelineData(null, mixingTo, propertyIDs);\r\n\t\t\t}\r\n\t\t};\r\n\t\tAnimationState.prototype.getCurrent = function (trackIndex) {\r\n\t\t\tif (trackIndex >= this.tracks.length)\r\n\t\t\t\treturn null;\r\n\t\t\treturn this.tracks[trackIndex];\r\n\t\t};\r\n\t\tAnimationState.prototype.addListener = function (listener) {\r\n\t\t\tif (listener == null)\r\n\t\t\t\tthrow new Error(\"listener cannot be null.\");\r\n\t\t\tthis.listeners.push(listener);\r\n\t\t};\r\n\t\tAnimationState.prototype.removeListener = function (listener) {\r\n\t\t\tvar index = this.listeners.indexOf(listener);\r\n\t\t\tif (index >= 0)\r\n\t\t\t\tthis.listeners.splice(index, 1);\r\n\t\t};\r\n\t\tAnimationState.prototype.clearListeners = function () {\r\n\t\t\tthis.listeners.length = 0;\r\n\t\t};\r\n\t\tAnimationState.prototype.clearListenerNotifications = function () {\r\n\t\t\tthis.queue.clear();\r\n\t\t};\r\n\t\tAnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n\t\tAnimationState.SUBSEQUENT = 0;\r\n\t\tAnimationState.FIRST = 1;\r\n\t\tAnimationState.DIP = 2;\r\n\t\tAnimationState.DIP_MIX = 3;\r\n\t\treturn AnimationState;\r\n\t}());\r\n\tspine.AnimationState = AnimationState;\r\n\tvar TrackEntry = (function () {\r\n\t\tfunction TrackEntry() {\r\n\t\t\tthis.timelineData = new Array();\r\n\t\t\tthis.timelineDipMix = new Array();\r\n\t\t\tthis.timelinesRotation = new Array();\r\n\t\t}\r\n\t\tTrackEntry.prototype.reset = function () {\r\n\t\t\tthis.next = null;\r\n\t\t\tthis.mixingFrom = null;\r\n\t\t\tthis.animation = null;\r\n\t\t\tthis.listener = null;\r\n\t\t\tthis.timelineData.length = 0;\r\n\t\t\tthis.timelineDipMix.length = 0;\r\n\t\t\tthis.timelinesRotation.length = 0;\r\n\t\t};\r\n\t\tTrackEntry.prototype.setTimelineData = function (to, mixingToArray, propertyIDs) {\r\n\t\t\tif (to != null)\r\n\t\t\t\tmixingToArray.push(to);\r\n\t\t\tvar lastEntry = this.mixingFrom != null ? this.mixingFrom.setTimelineData(this, mixingToArray, propertyIDs) : this;\r\n\t\t\tif (to != null)\r\n\t\t\t\tmixingToArray.pop();\r\n\t\t\tvar mixingTo = mixingToArray;\r\n\t\t\tvar mixingToLast = mixingToArray.length - 1;\r\n\t\t\tvar timelines = this.animation.timelines;\r\n\t\t\tvar timelinesCount = this.animation.timelines.length;\r\n\t\t\tvar timelineData = spine.Utils.setArraySize(this.timelineData, timelinesCount);\r\n\t\t\tthis.timelineDipMix.length = 0;\r\n\t\t\tvar timelineDipMix = spine.Utils.setArraySize(this.timelineDipMix, timelinesCount);\r\n\t\t\touter: for (var i = 0; i < timelinesCount; i++) {\r\n\t\t\t\tvar id = timelines[i].getPropertyId();\r\n\t\t\t\tif (!propertyIDs.add(id))\r\n\t\t\t\t\ttimelineData[i] = AnimationState.SUBSEQUENT;\r\n\t\t\t\telse if (to == null || !to.hasTimeline(id))\r\n\t\t\t\t\ttimelineData[i] = AnimationState.FIRST;\r\n\t\t\t\telse {\r\n\t\t\t\t\tfor (var ii = mixingToLast; ii >= 0; ii--) {\r\n\t\t\t\t\t\tvar entry = mixingTo[ii];\r\n\t\t\t\t\t\tif (!entry.hasTimeline(id)) {\r\n\t\t\t\t\t\t\tif (entry.mixDuration > 0) {\r\n\t\t\t\t\t\t\t\ttimelineData[i] = AnimationState.DIP_MIX;\r\n\t\t\t\t\t\t\t\ttimelineDipMix[i] = entry;\r\n\t\t\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttimelineData[i] = AnimationState.DIP;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn lastEntry;\r\n\t\t};\r\n\t\tTrackEntry.prototype.hasTimeline = function (id) {\r\n\t\t\tvar timelines = this.animation.timelines;\r\n\t\t\tfor (var i = 0, n = timelines.length; i < n; i++)\r\n\t\t\t\tif (timelines[i].getPropertyId() == id)\r\n\t\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t};\r\n\t\tTrackEntry.prototype.getAnimationTime = function () {\r\n\t\t\tif (this.loop) {\r\n\t\t\t\tvar duration = this.animationEnd - this.animationStart;\r\n\t\t\t\tif (duration == 0)\r\n\t\t\t\t\treturn this.animationStart;\r\n\t\t\t\treturn (this.trackTime % duration) + this.animationStart;\r\n\t\t\t}\r\n\t\t\treturn Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n\t\t};\r\n\t\tTrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n\t\t\tthis.animationLast = animationLast;\r\n\t\t\tthis.nextAnimationLast = animationLast;\r\n\t\t};\r\n\t\tTrackEntry.prototype.isComplete = function () {\r\n\t\t\treturn this.trackTime >= this.animationEnd - this.animationStart;\r\n\t\t};\r\n\t\tTrackEntry.prototype.resetRotationDirections = function () {\r\n\t\t\tthis.timelinesRotation.length = 0;\r\n\t\t};\r\n\t\treturn TrackEntry;\r\n\t}());\r\n\tspine.TrackEntry = TrackEntry;\r\n\tvar EventQueue = (function () {\r\n\t\tfunction EventQueue(animState) {\r\n\t\t\tthis.objects = [];\r\n\t\t\tthis.drainDisabled = false;\r\n\t\t\tthis.animState = animState;\r\n\t\t}\r\n\t\tEventQueue.prototype.start = function (entry) {\r\n\t\t\tthis.objects.push(EventType.start);\r\n\t\t\tthis.objects.push(entry);\r\n\t\t\tthis.animState.animationsChanged = true;\r\n\t\t};\r\n\t\tEventQueue.prototype.interrupt = function (entry) {\r\n\t\t\tthis.objects.push(EventType.interrupt);\r\n\t\t\tthis.objects.push(entry);\r\n\t\t};\r\n\t\tEventQueue.prototype.end = function (entry) {\r\n\t\t\tthis.objects.push(EventType.end);\r\n\t\t\tthis.objects.push(entry);\r\n\t\t\tthis.animState.animationsChanged = true;\r\n\t\t};\r\n\t\tEventQueue.prototype.dispose = function (entry) {\r\n\t\t\tthis.objects.push(EventType.dispose);\r\n\t\t\tthis.objects.push(entry);\r\n\t\t};\r\n\t\tEventQueue.prototype.complete = function (entry) {\r\n\t\t\tthis.objects.push(EventType.complete);\r\n\t\t\tthis.objects.push(entry);\r\n\t\t};\r\n\t\tEventQueue.prototype.event = function (entry, event) {\r\n\t\t\tthis.objects.push(EventType.event);\r\n\t\t\tthis.objects.push(entry);\r\n\t\t\tthis.objects.push(event);\r\n\t\t};\r\n\t\tEventQueue.prototype.drain = function () {\r\n\t\t\tif (this.drainDisabled)\r\n\t\t\t\treturn;\r\n\t\t\tthis.drainDisabled = true;\r\n\t\t\tvar objects = this.objects;\r\n\t\t\tvar listeners = this.animState.listeners;\r\n\t\t\tfor (var i = 0; i < objects.length; i += 2) {\r\n\t\t\t\tvar type = objects[i];\r\n\t\t\t\tvar entry = objects[i + 1];\r\n\t\t\t\tswitch (type) {\r\n\t\t\t\t\tcase EventType.start:\r\n\t\t\t\t\t\tif (entry.listener != null && entry.listener.start)\r\n\t\t\t\t\t\t\tentry.listener.start(entry);\r\n\t\t\t\t\t\tfor (var ii = 0; ii < listeners.length; ii++)\r\n\t\t\t\t\t\t\tif (listeners[ii].start)\r\n\t\t\t\t\t\t\t\tlisteners[ii].start(entry);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase EventType.interrupt:\r\n\t\t\t\t\t\tif (entry.listener != null && entry.listener.interrupt)\r\n\t\t\t\t\t\t\tentry.listener.interrupt(entry);\r\n\t\t\t\t\t\tfor (var ii = 0; ii < listeners.length; ii++)\r\n\t\t\t\t\t\t\tif (listeners[ii].interrupt)\r\n\t\t\t\t\t\t\t\tlisteners[ii].interrupt(entry);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase EventType.end:\r\n\t\t\t\t\t\tif (entry.listener != null && entry.listener.end)\r\n\t\t\t\t\t\t\tentry.listener.end(entry);\r\n\t\t\t\t\t\tfor (var ii = 0; ii < listeners.length; ii++)\r\n\t\t\t\t\t\t\tif (listeners[ii].end)\r\n\t\t\t\t\t\t\t\tlisteners[ii].end(entry);\r\n\t\t\t\t\tcase EventType.dispose:\r\n\t\t\t\t\t\tif (entry.listener != null && entry.listener.dispose)\r\n\t\t\t\t\t\t\tentry.listener.dispose(entry);\r\n\t\t\t\t\t\tfor (var ii = 0; ii < listeners.length; ii++)\r\n\t\t\t\t\t\t\tif (listeners[ii].dispose)\r\n\t\t\t\t\t\t\t\tlisteners[ii].dispose(entry);\r\n\t\t\t\t\t\tthis.animState.trackEntryPool.free(entry);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase EventType.complete:\r\n\t\t\t\t\t\tif (entry.listener != null && entry.listener.complete)\r\n\t\t\t\t\t\t\tentry.listener.complete(entry);\r\n\t\t\t\t\t\tfor (var ii = 0; ii < listeners.length; ii++)\r\n\t\t\t\t\t\t\tif (listeners[ii].complete)\r\n\t\t\t\t\t\t\t\tlisteners[ii].complete(entry);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase EventType.event:\r\n\t\t\t\t\t\tvar event_3 = objects[i++ + 2];\r\n\t\t\t\t\t\tif (entry.listener != null && entry.listener.event)\r\n\t\t\t\t\t\t\tentry.listener.event(entry, event_3);\r\n\t\t\t\t\t\tfor (var ii = 0; ii < listeners.length; ii++)\r\n\t\t\t\t\t\t\tif (listeners[ii].event)\r\n\t\t\t\t\t\t\t\tlisteners[ii].event(entry, event_3);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.clear();\r\n\t\t\tthis.drainDisabled = false;\r\n\t\t};\r\n\t\tEventQueue.prototype.clear = function () {\r\n\t\t\tthis.objects.length = 0;\r\n\t\t};\r\n\t\treturn EventQueue;\r\n\t}());\r\n\tspine.EventQueue = EventQueue;\r\n\tvar EventType;\r\n\t(function (EventType) {\r\n\t\tEventType[EventType[\"start\"] = 0] = \"start\";\r\n\t\tEventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n\t\tEventType[EventType[\"end\"] = 2] = \"end\";\r\n\t\tEventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n\t\tEventType[EventType[\"complete\"] = 4] = \"complete\";\r\n\t\tEventType[EventType[\"event\"] = 5] = \"event\";\r\n\t})(EventType = spine.EventType || (spine.EventType = {}));\r\n\tvar AnimationStateAdapter2 = (function () {\r\n\t\tfunction AnimationStateAdapter2() {\r\n\t\t}\r\n\t\tAnimationStateAdapter2.prototype.start = function (entry) {\r\n\t\t};\r\n\t\tAnimationStateAdapter2.prototype.interrupt = function (entry) {\r\n\t\t};\r\n\t\tAnimationStateAdapter2.prototype.end = function (entry) {\r\n\t\t};\r\n\t\tAnimationStateAdapter2.prototype.dispose = function (entry) {\r\n\t\t};\r\n\t\tAnimationStateAdapter2.prototype.complete = function (entry) {\r\n\t\t};\r\n\t\tAnimationStateAdapter2.prototype.event = function (entry, event) {\r\n\t\t};\r\n\t\treturn AnimationStateAdapter2;\r\n\t}());\r\n\tspine.AnimationStateAdapter2 = AnimationStateAdapter2;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar AnimationStateData = (function () {\r\n\t\tfunction AnimationStateData(skeletonData) {\r\n\t\t\tthis.animationToMixTime = {};\r\n\t\t\tthis.defaultMix = 0;\r\n\t\t\tif (skeletonData == null)\r\n\t\t\t\tthrow new Error(\"skeletonData cannot be null.\");\r\n\t\t\tthis.skeletonData = skeletonData;\r\n\t\t}\r\n\t\tAnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n\t\t\tvar from = this.skeletonData.findAnimation(fromName);\r\n\t\t\tif (from == null)\r\n\t\t\t\tthrow new Error(\"Animation not found: \" + fromName);\r\n\t\t\tvar to = this.skeletonData.findAnimation(toName);\r\n\t\t\tif (to == null)\r\n\t\t\t\tthrow new Error(\"Animation not found: \" + toName);\r\n\t\t\tthis.setMixWith(from, to, duration);\r\n\t\t};\r\n\t\tAnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n\t\t\tif (from == null)\r\n\t\t\t\tthrow new Error(\"from cannot be null.\");\r\n\t\t\tif (to == null)\r\n\t\t\t\tthrow new Error(\"to cannot be null.\");\r\n\t\t\tvar key = from.name + \".\" + to.name;\r\n\t\t\tthis.animationToMixTime[key] = duration;\r\n\t\t};\r\n\t\tAnimationStateData.prototype.getMix = function (from, to) {\r\n\t\t\tvar key = from.name + \".\" + to.name;\r\n\t\t\tvar value = this.animationToMixTime[key];\r\n\t\t\treturn value === undefined ? this.defaultMix : value;\r\n\t\t};\r\n\t\treturn AnimationStateData;\r\n\t}());\r\n\tspine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar AssetManager = (function () {\r\n\t\tfunction AssetManager(textureLoader, pathPrefix) {\r\n\t\t\tif (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n\t\t\tthis.assets = {};\r\n\t\t\tthis.errors = {};\r\n\t\t\tthis.toLoad = 0;\r\n\t\t\tthis.loaded = 0;\r\n\t\t\tthis.textureLoader = textureLoader;\r\n\t\t\tthis.pathPrefix = pathPrefix;\r\n\t\t}\r\n\t\tAssetManager.downloadText = function (url, success, error) {\r\n\t\t\tvar request = new XMLHttpRequest();\r\n\t\t\trequest.open(\"GET\", url, true);\r\n\t\t\trequest.onload = function () {\r\n\t\t\t\tif (request.status == 200) {\r\n\t\t\t\t\tsuccess(request.responseText);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\terror(request.status, request.responseText);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\trequest.onerror = function () {\r\n\t\t\t\terror(request.status, request.responseText);\r\n\t\t\t};\r\n\t\t\trequest.send();\r\n\t\t};\r\n\t\tAssetManager.downloadBinary = function (url, success, error) {\r\n\t\t\tvar request = new XMLHttpRequest();\r\n\t\t\trequest.open(\"GET\", url, true);\r\n\t\t\trequest.responseType = \"arraybuffer\";\r\n\t\t\trequest.onload = function () {\r\n\t\t\t\tif (request.status == 200) {\r\n\t\t\t\t\tsuccess(new Uint8Array(request.response));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\terror(request.status, request.responseText);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\trequest.onerror = function () {\r\n\t\t\t\terror(request.status, request.responseText);\r\n\t\t\t};\r\n\t\t\trequest.send();\r\n\t\t};\r\n\t\tAssetManager.prototype.loadText = function (path, success, error) {\r\n\t\t\tvar _this = this;\r\n\t\t\tif (success === void 0) { success = null; }\r\n\t\t\tif (error === void 0) { error = null; }\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tthis.toLoad++;\r\n\t\t\tAssetManager.downloadText(path, function (data) {\r\n\t\t\t\t_this.assets[path] = data;\r\n\t\t\t\tif (success)\r\n\t\t\t\t\tsuccess(path, data);\r\n\t\t\t\t_this.toLoad--;\r\n\t\t\t\t_this.loaded++;\r\n\t\t\t}, function (state, responseText) {\r\n\t\t\t\t_this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\r\n\t\t\t\tif (error)\r\n\t\t\t\t\terror(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\r\n\t\t\t\t_this.toLoad--;\r\n\t\t\t\t_this.loaded++;\r\n\t\t\t});\r\n\t\t};\r\n\t\tAssetManager.prototype.loadTexture = function (path, success, error) {\r\n\t\t\tvar _this = this;\r\n\t\t\tif (success === void 0) { success = null; }\r\n\t\t\tif (error === void 0) { error = null; }\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tthis.toLoad++;\r\n\t\t\tvar img = new Image();\r\n\t\t\timg.crossOrigin = \"anonymous\";\r\n\t\t\timg.onload = function (ev) {\r\n\t\t\t\tvar texture = _this.textureLoader(img);\r\n\t\t\t\t_this.assets[path] = texture;\r\n\t\t\t\t_this.toLoad--;\r\n\t\t\t\t_this.loaded++;\r\n\t\t\t\tif (success)\r\n\t\t\t\t\tsuccess(path, img);\r\n\t\t\t};\r\n\t\t\timg.onerror = function (ev) {\r\n\t\t\t\t_this.errors[path] = \"Couldn't load image \" + path;\r\n\t\t\t\t_this.toLoad--;\r\n\t\t\t\t_this.loaded++;\r\n\t\t\t\tif (error)\r\n\t\t\t\t\terror(path, \"Couldn't load image \" + path);\r\n\t\t\t};\r\n\t\t\timg.src = path;\r\n\t\t};\r\n\t\tAssetManager.prototype.loadTextureData = function (path, data, success, error) {\r\n\t\t\tvar _this = this;\r\n\t\t\tif (success === void 0) { success = null; }\r\n\t\t\tif (error === void 0) { error = null; }\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tthis.toLoad++;\r\n\t\t\tvar img = new Image();\r\n\t\t\timg.onload = function (ev) {\r\n\t\t\t\tvar texture = _this.textureLoader(img);\r\n\t\t\t\t_this.assets[path] = texture;\r\n\t\t\t\t_this.toLoad--;\r\n\t\t\t\t_this.loaded++;\r\n\t\t\t\tif (success)\r\n\t\t\t\t\tsuccess(path, img);\r\n\t\t\t};\r\n\t\t\timg.onerror = function (ev) {\r\n\t\t\t\t_this.errors[path] = \"Couldn't load image \" + path;\r\n\t\t\t\t_this.toLoad--;\r\n\t\t\t\t_this.loaded++;\r\n\t\t\t\tif (error)\r\n\t\t\t\t\terror(path, \"Couldn't load image \" + path);\r\n\t\t\t};\r\n\t\t\timg.src = data;\r\n\t\t};\r\n\t\tAssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n\t\t\tvar _this = this;\r\n\t\t\tif (success === void 0) { success = null; }\r\n\t\t\tif (error === void 0) { error = null; }\r\n\t\t\tvar parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tthis.toLoad++;\r\n\t\t\tAssetManager.downloadText(path, function (atlasData) {\r\n\t\t\t\tvar pagesLoaded = { count: 0 };\r\n\t\t\t\tvar atlasPages = new Array();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvar atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n\t\t\t\t\t\tatlasPages.push(parent + \"/\" + path);\r\n\t\t\t\t\t\tvar image = document.createElement(\"img\");\r\n\t\t\t\t\t\timage.width = 16;\r\n\t\t\t\t\t\timage.height = 16;\r\n\t\t\t\t\t\treturn new spine.FakeTexture(image);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tcatch (e) {\r\n\t\t\t\t\tvar ex = e;\r\n\t\t\t\t\t_this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n\t\t\t\t\tif (error)\r\n\t\t\t\t\t\terror(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n\t\t\t\t\t_this.toLoad--;\r\n\t\t\t\t\t_this.loaded++;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar _loop_1 = function (atlasPage) {\r\n\t\t\t\t\tvar pageLoadError = false;\r\n\t\t\t\t\t_this.loadTexture(atlasPage, function (imagePath, image) {\r\n\t\t\t\t\t\tpagesLoaded.count++;\r\n\t\t\t\t\t\tif (pagesLoaded.count == atlasPages.length) {\r\n\t\t\t\t\t\t\tif (!pageLoadError) {\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tvar atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n\t\t\t\t\t\t\t\t\t\treturn _this.get(parent + \"/\" + path);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t_this.assets[path] = atlas;\r\n\t\t\t\t\t\t\t\t\tif (success)\r\n\t\t\t\t\t\t\t\t\t\tsuccess(path, atlas);\r\n\t\t\t\t\t\t\t\t\t_this.toLoad--;\r\n\t\t\t\t\t\t\t\t\t_this.loaded++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcatch (e) {\r\n\t\t\t\t\t\t\t\t\tvar ex = e;\r\n\t\t\t\t\t\t\t\t\t_this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n\t\t\t\t\t\t\t\t\tif (error)\r\n\t\t\t\t\t\t\t\t\t\terror(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n\t\t\t\t\t\t\t\t\t_this.toLoad--;\r\n\t\t\t\t\t\t\t\t\t_this.loaded++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t_this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n\t\t\t\t\t\t\t\tif (error)\r\n\t\t\t\t\t\t\t\t\terror(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n\t\t\t\t\t\t\t\t_this.toLoad--;\r\n\t\t\t\t\t\t\t\t_this.loaded++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, function (imagePath, errorMessage) {\r\n\t\t\t\t\t\tpageLoadError = true;\r\n\t\t\t\t\t\tpagesLoaded.count++;\r\n\t\t\t\t\t\tif (pagesLoaded.count == atlasPages.length) {\r\n\t\t\t\t\t\t\t_this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n\t\t\t\t\t\t\tif (error)\r\n\t\t\t\t\t\t\t\terror(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n\t\t\t\t\t\t\t_this.toLoad--;\r\n\t\t\t\t\t\t\t_this.loaded++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t};\r\n\t\t\t\tfor (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n\t\t\t\t\tvar atlasPage = atlasPages_1[_i];\r\n\t\t\t\t\t_loop_1(atlasPage);\r\n\t\t\t\t}\r\n\t\t\t}, function (state, responseText) {\r\n\t\t\t\t_this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\r\n\t\t\t\tif (error)\r\n\t\t\t\t\terror(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\r\n\t\t\t\t_this.toLoad--;\r\n\t\t\t\t_this.loaded++;\r\n\t\t\t});\r\n\t\t};\r\n\t\tAssetManager.prototype.get = function (path) {\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\treturn this.assets[path];\r\n\t\t};\r\n\t\tAssetManager.prototype.remove = function (path) {\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tvar asset = this.assets[path];\r\n\t\t\tif (asset.dispose)\r\n\t\t\t\tasset.dispose();\r\n\t\t\tthis.assets[path] = null;\r\n\t\t};\r\n\t\tAssetManager.prototype.removeAll = function () {\r\n\t\t\tfor (var key in this.assets) {\r\n\t\t\t\tvar asset = this.assets[key];\r\n\t\t\t\tif (asset.dispose)\r\n\t\t\t\t\tasset.dispose();\r\n\t\t\t}\r\n\t\t\tthis.assets = {};\r\n\t\t};\r\n\t\tAssetManager.prototype.isLoadingComplete = function () {\r\n\t\t\treturn this.toLoad == 0;\r\n\t\t};\r\n\t\tAssetManager.prototype.getToLoad = function () {\r\n\t\t\treturn this.toLoad;\r\n\t\t};\r\n\t\tAssetManager.prototype.getLoaded = function () {\r\n\t\t\treturn this.loaded;\r\n\t\t};\r\n\t\tAssetManager.prototype.dispose = function () {\r\n\t\t\tthis.removeAll();\r\n\t\t};\r\n\t\tAssetManager.prototype.hasErrors = function () {\r\n\t\t\treturn Object.keys(this.errors).length > 0;\r\n\t\t};\r\n\t\tAssetManager.prototype.getErrors = function () {\r\n\t\t\treturn this.errors;\r\n\t\t};\r\n\t\treturn AssetManager;\r\n\t}());\r\n\tspine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar AtlasAttachmentLoader = (function () {\r\n\t\tfunction AtlasAttachmentLoader(atlas) {\r\n\t\t\tthis.atlas = atlas;\r\n\t\t}\r\n\t\tAtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n\t\t\tvar region = this.atlas.findRegion(path);\r\n\t\t\tif (region == null)\r\n\t\t\t\tthrow new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n\t\t\tregion.renderObject = region;\r\n\t\t\tvar attachment = new spine.RegionAttachment(name);\r\n\t\t\tattachment.setRegion(region);\r\n\t\t\treturn attachment;\r\n\t\t};\r\n\t\tAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n\t\t\tvar region = this.atlas.findRegion(path);\r\n\t\t\tif (region == null)\r\n\t\t\t\tthrow new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n\t\t\tregion.renderObject = region;\r\n\t\t\tvar attachment = new spine.MeshAttachment(name);\r\n\t\t\tattachment.region = region;\r\n\t\t\treturn attachment;\r\n\t\t};\r\n\t\tAtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n\t\t\treturn new spine.BoundingBoxAttachment(name);\r\n\t\t};\r\n\t\tAtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n\t\t\treturn new spine.PathAttachment(name);\r\n\t\t};\r\n\t\tAtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n\t\t\treturn new spine.PointAttachment(name);\r\n\t\t};\r\n\t\tAtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n\t\t\treturn new spine.ClippingAttachment(name);\r\n\t\t};\r\n\t\treturn AtlasAttachmentLoader;\r\n\t}());\r\n\tspine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar BlendMode;\r\n\t(function (BlendMode) {\r\n\t\tBlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n\t\tBlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n\t\tBlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n\t\tBlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n\t})(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Bone = (function () {\r\n\t\tfunction Bone(data, skeleton, parent) {\r\n\t\t\tthis.children = new Array();\r\n\t\t\tthis.x = 0;\r\n\t\t\tthis.y = 0;\r\n\t\t\tthis.rotation = 0;\r\n\t\t\tthis.scaleX = 0;\r\n\t\t\tthis.scaleY = 0;\r\n\t\t\tthis.shearX = 0;\r\n\t\t\tthis.shearY = 0;\r\n\t\t\tthis.ax = 0;\r\n\t\t\tthis.ay = 0;\r\n\t\t\tthis.arotation = 0;\r\n\t\t\tthis.ascaleX = 0;\r\n\t\t\tthis.ascaleY = 0;\r\n\t\t\tthis.ashearX = 0;\r\n\t\t\tthis.ashearY = 0;\r\n\t\t\tthis.appliedValid = false;\r\n\t\t\tthis.a = 0;\r\n\t\t\tthis.b = 0;\r\n\t\t\tthis.worldX = 0;\r\n\t\t\tthis.c = 0;\r\n\t\t\tthis.d = 0;\r\n\t\t\tthis.worldY = 0;\r\n\t\t\tthis.sorted = false;\r\n\t\t\tif (data == null)\r\n\t\t\t\tthrow new Error(\"data cannot be null.\");\r\n\t\t\tif (skeleton == null)\r\n\t\t\t\tthrow new Error(\"skeleton cannot be null.\");\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.skeleton = skeleton;\r\n\t\t\tthis.parent = parent;\r\n\t\t\tthis.setToSetupPose();\r\n\t\t}\r\n\t\tBone.prototype.update = function () {\r\n\t\t\tthis.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n\t\t};\r\n\t\tBone.prototype.updateWorldTransform = function () {\r\n\t\t\tthis.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n\t\t};\r\n\t\tBone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n\t\t\tthis.ax = x;\r\n\t\t\tthis.ay = y;\r\n\t\t\tthis.arotation = rotation;\r\n\t\t\tthis.ascaleX = scaleX;\r\n\t\t\tthis.ascaleY = scaleY;\r\n\t\t\tthis.ashearX = shearX;\r\n\t\t\tthis.ashearY = shearY;\r\n\t\t\tthis.appliedValid = true;\r\n\t\t\tvar parent = this.parent;\r\n\t\t\tif (parent == null) {\r\n\t\t\t\tvar rotationY = rotation + 90 + shearY;\r\n\t\t\t\tvar la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n\t\t\t\tvar lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n\t\t\t\tvar lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n\t\t\t\tvar ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n\t\t\t\tvar skeleton = this.skeleton;\r\n\t\t\t\tif (skeleton.flipX) {\r\n\t\t\t\t\tx = -x;\r\n\t\t\t\t\tla = -la;\r\n\t\t\t\t\tlb = -lb;\r\n\t\t\t\t}\r\n\t\t\t\tif (skeleton.flipY) {\r\n\t\t\t\t\ty = -y;\r\n\t\t\t\t\tlc = -lc;\r\n\t\t\t\t\tld = -ld;\r\n\t\t\t\t}\r\n\t\t\t\tthis.a = la;\r\n\t\t\t\tthis.b = lb;\r\n\t\t\t\tthis.c = lc;\r\n\t\t\t\tthis.d = ld;\r\n\t\t\t\tthis.worldX = x + skeleton.x;\r\n\t\t\t\tthis.worldY = y + skeleton.y;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n\t\t\tthis.worldX = pa * x + pb * y + parent.worldX;\r\n\t\t\tthis.worldY = pc * x + pd * y + parent.worldY;\r\n\t\t\tswitch (this.data.transformMode) {\r\n\t\t\t\tcase spine.TransformMode.Normal: {\r\n\t\t\t\t\tvar rotationY = rotation + 90 + shearY;\r\n\t\t\t\t\tvar la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n\t\t\t\t\tvar lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n\t\t\t\t\tvar lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n\t\t\t\t\tvar ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n\t\t\t\t\tthis.a = pa * la + pb * lc;\r\n\t\t\t\t\tthis.b = pa * lb + pb * ld;\r\n\t\t\t\t\tthis.c = pc * la + pd * lc;\r\n\t\t\t\t\tthis.d = pc * lb + pd * ld;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcase spine.TransformMode.OnlyTranslation: {\r\n\t\t\t\t\tvar rotationY = rotation + 90 + shearY;\r\n\t\t\t\t\tthis.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n\t\t\t\t\tthis.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n\t\t\t\t\tthis.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n\t\t\t\t\tthis.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase spine.TransformMode.NoRotationOrReflection: {\r\n\t\t\t\t\tvar s = pa * pa + pc * pc;\r\n\t\t\t\t\tvar prx = 0;\r\n\t\t\t\t\tif (s > 0.0001) {\r\n\t\t\t\t\t\ts = Math.abs(pa * pd - pb * pc) / s;\r\n\t\t\t\t\t\tpb = pc * s;\r\n\t\t\t\t\t\tpd = pa * s;\r\n\t\t\t\t\t\tprx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpa = 0;\r\n\t\t\t\t\t\tpc = 0;\r\n\t\t\t\t\t\tprx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar rx = rotation + shearX - prx;\r\n\t\t\t\t\tvar ry = rotation + shearY - prx + 90;\r\n\t\t\t\t\tvar la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n\t\t\t\t\tvar lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n\t\t\t\t\tvar lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n\t\t\t\t\tvar ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n\t\t\t\t\tthis.a = pa * la - pb * lc;\r\n\t\t\t\t\tthis.b = pa * lb - pb * ld;\r\n\t\t\t\t\tthis.c = pc * la + pd * lc;\r\n\t\t\t\t\tthis.d = pc * lb + pd * ld;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase spine.TransformMode.NoScale:\r\n\t\t\t\tcase spine.TransformMode.NoScaleOrReflection: {\r\n\t\t\t\t\tvar cos = spine.MathUtils.cosDeg(rotation);\r\n\t\t\t\t\tvar sin = spine.MathUtils.sinDeg(rotation);\r\n\t\t\t\t\tvar za = pa * cos + pb * sin;\r\n\t\t\t\t\tvar zc = pc * cos + pd * sin;\r\n\t\t\t\t\tvar s = Math.sqrt(za * za + zc * zc);\r\n\t\t\t\t\tif (s > 0.00001)\r\n\t\t\t\t\t\ts = 1 / s;\r\n\t\t\t\t\tza *= s;\r\n\t\t\t\t\tzc *= s;\r\n\t\t\t\t\ts = Math.sqrt(za * za + zc * zc);\r\n\t\t\t\t\tvar r = Math.PI / 2 + Math.atan2(zc, za);\r\n\t\t\t\t\tvar zb = Math.cos(r) * s;\r\n\t\t\t\t\tvar zd = Math.sin(r) * s;\r\n\t\t\t\t\tvar la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n\t\t\t\t\tvar lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n\t\t\t\t\tvar lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n\t\t\t\t\tvar ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n\t\t\t\t\tif (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {\r\n\t\t\t\t\t\tzb = -zb;\r\n\t\t\t\t\t\tzd = -zd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.a = za * la + zb * lc;\r\n\t\t\t\t\tthis.b = za * lb + zb * ld;\r\n\t\t\t\t\tthis.c = zc * la + zd * lc;\r\n\t\t\t\t\tthis.d = zc * lb + zd * ld;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this.skeleton.flipX) {\r\n\t\t\t\tthis.a = -this.a;\r\n\t\t\t\tthis.b = -this.b;\r\n\t\t\t}\r\n\t\t\tif (this.skeleton.flipY) {\r\n\t\t\t\tthis.c = -this.c;\r\n\t\t\t\tthis.d = -this.d;\r\n\t\t\t}\r\n\t\t};\r\n\t\tBone.prototype.setToSetupPose = function () {\r\n\t\t\tvar data = this.data;\r\n\t\t\tthis.x = data.x;\r\n\t\t\tthis.y = data.y;\r\n\t\t\tthis.rotation = data.rotation;\r\n\t\t\tthis.scaleX = data.scaleX;\r\n\t\t\tthis.scaleY = data.scaleY;\r\n\t\t\tthis.shearX = data.shearX;\r\n\t\t\tthis.shearY = data.shearY;\r\n\t\t};\r\n\t\tBone.prototype.getWorldRotationX = function () {\r\n\t\t\treturn Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n\t\t};\r\n\t\tBone.prototype.getWorldRotationY = function () {\r\n\t\t\treturn Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n\t\t};\r\n\t\tBone.prototype.getWorldScaleX = function () {\r\n\t\t\treturn Math.sqrt(this.a * this.a + this.c * this.c);\r\n\t\t};\r\n\t\tBone.prototype.getWorldScaleY = function () {\r\n\t\t\treturn Math.sqrt(this.b * this.b + this.d * this.d);\r\n\t\t};\r\n\t\tBone.prototype.updateAppliedTransform = function () {\r\n\t\t\tthis.appliedValid = true;\r\n\t\t\tvar parent = this.parent;\r\n\t\t\tif (parent == null) {\r\n\t\t\t\tthis.ax = this.worldX;\r\n\t\t\t\tthis.ay = this.worldY;\r\n\t\t\t\tthis.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n\t\t\t\tthis.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n\t\t\t\tthis.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n\t\t\t\tthis.ashearX = 0;\r\n\t\t\t\tthis.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n\t\t\tvar pid = 1 / (pa * pd - pb * pc);\r\n\t\t\tvar dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n\t\t\tthis.ax = (dx * pd * pid - dy * pb * pid);\r\n\t\t\tthis.ay = (dy * pa * pid - dx * pc * pid);\r\n\t\t\tvar ia = pid * pd;\r\n\t\t\tvar id = pid * pa;\r\n\t\t\tvar ib = pid * pb;\r\n\t\t\tvar ic = pid * pc;\r\n\t\t\tvar ra = ia * this.a - ib * this.c;\r\n\t\t\tvar rb = ia * this.b - ib * this.d;\r\n\t\t\tvar rc = id * this.c - ic * this.a;\r\n\t\t\tvar rd = id * this.d - ic * this.b;\r\n\t\t\tthis.ashearX = 0;\r\n\t\t\tthis.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n\t\t\tif (this.ascaleX > 0.0001) {\r\n\t\t\t\tvar det = ra * rd - rb * rc;\r\n\t\t\t\tthis.ascaleY = det / this.ascaleX;\r\n\t\t\t\tthis.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n\t\t\t\tthis.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.ascaleX = 0;\r\n\t\t\t\tthis.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n\t\t\t\tthis.ashearY = 0;\r\n\t\t\t\tthis.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n\t\t\t}\r\n\t\t};\r\n\t\tBone.prototype.worldToLocal = function (world) {\r\n\t\t\tvar a = this.a, b = this.b, c = this.c, d = this.d;\r\n\t\t\tvar invDet = 1 / (a * d - b * c);\r\n\t\t\tvar x = world.x - this.worldX, y = world.y - this.worldY;\r\n\t\t\tworld.x = (x * d * invDet - y * b * invDet);\r\n\t\t\tworld.y = (y * a * invDet - x * c * invDet);\r\n\t\t\treturn world;\r\n\t\t};\r\n\t\tBone.prototype.localToWorld = function (local) {\r\n\t\t\tvar x = local.x, y = local.y;\r\n\t\t\tlocal.x = x * this.a + y * this.b + this.worldX;\r\n\t\t\tlocal.y = x * this.c + y * this.d + this.worldY;\r\n\t\t\treturn local;\r\n\t\t};\r\n\t\tBone.prototype.worldToLocalRotation = function (worldRotation) {\r\n\t\t\tvar sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n\t\t\treturn Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg;\r\n\t\t};\r\n\t\tBone.prototype.localToWorldRotation = function (localRotation) {\r\n\t\t\tvar sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n\t\t\treturn Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n\t\t};\r\n\t\tBone.prototype.rotateWorld = function (degrees) {\r\n\t\t\tvar a = this.a, b = this.b, c = this.c, d = this.d;\r\n\t\t\tvar cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n\t\t\tthis.a = cos * a - sin * c;\r\n\t\t\tthis.b = cos * b - sin * d;\r\n\t\t\tthis.c = sin * a + cos * c;\r\n\t\t\tthis.d = sin * b + cos * d;\r\n\t\t\tthis.appliedValid = false;\r\n\t\t};\r\n\t\treturn Bone;\r\n\t}());\r\n\tspine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar BoneData = (function () {\r\n\t\tfunction BoneData(index, name, parent) {\r\n\t\t\tthis.x = 0;\r\n\t\t\tthis.y = 0;\r\n\t\t\tthis.rotation = 0;\r\n\t\t\tthis.scaleX = 1;\r\n\t\t\tthis.scaleY = 1;\r\n\t\t\tthis.shearX = 0;\r\n\t\t\tthis.shearY = 0;\r\n\t\t\tthis.transformMode = TransformMode.Normal;\r\n\t\t\tif (index < 0)\r\n\t\t\t\tthrow new Error(\"index must be >= 0.\");\r\n\t\t\tif (name == null)\r\n\t\t\t\tthrow new Error(\"name cannot be null.\");\r\n\t\t\tthis.index = index;\r\n\t\t\tthis.name = name;\r\n\t\t\tthis.parent = parent;\r\n\t\t}\r\n\t\treturn BoneData;\r\n\t}());\r\n\tspine.BoneData = BoneData;\r\n\tvar TransformMode;\r\n\t(function (TransformMode) {\r\n\t\tTransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n\t\tTransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n\t\tTransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n\t\tTransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n\t\tTransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n\t})(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Event = (function () {\r\n\t\tfunction Event(time, data) {\r\n\t\t\tif (data == null)\r\n\t\t\t\tthrow new Error(\"data cannot be null.\");\r\n\t\t\tthis.time = time;\r\n\t\t\tthis.data = data;\r\n\t\t}\r\n\t\treturn Event;\r\n\t}());\r\n\tspine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar EventData = (function () {\r\n\t\tfunction EventData(name) {\r\n\t\t\tthis.name = name;\r\n\t\t}\r\n\t\treturn EventData;\r\n\t}());\r\n\tspine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar IkConstraint = (function () {\r\n\t\tfunction IkConstraint(data, skeleton) {\r\n\t\t\tthis.mix = 1;\r\n\t\t\tthis.bendDirection = 0;\r\n\t\t\tif (data == null)\r\n\t\t\t\tthrow new Error(\"data cannot be null.\");\r\n\t\t\tif (skeleton == null)\r\n\t\t\t\tthrow new Error(\"skeleton cannot be null.\");\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.mix = data.mix;\r\n\t\t\tthis.bendDirection = data.bendDirection;\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tfor (var i = 0; i < data.bones.length; i++)\r\n\t\t\t\tthis.bones.push(skeleton.findBone(data.bones[i].name));\r\n\t\t\tthis.target = skeleton.findBone(data.target.name);\r\n\t\t}\r\n\t\tIkConstraint.prototype.getOrder = function () {\r\n\t\t\treturn this.data.order;\r\n\t\t};\r\n\t\tIkConstraint.prototype.apply = function () {\r\n\t\t\tthis.update();\r\n\t\t};\r\n\t\tIkConstraint.prototype.update = function () {\r\n\t\t\tvar target = this.target;\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tswitch (bones.length) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tthis.apply1(bones[0], target.worldX, target.worldY, this.mix);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tthis.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.mix);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t};\r\n\t\tIkConstraint.prototype.apply1 = function (bone, targetX, targetY, alpha) {\r\n\t\t\tif (!bone.appliedValid)\r\n\t\t\t\tbone.updateAppliedTransform();\r\n\t\t\tvar p = bone.parent;\r\n\t\t\tvar id = 1 / (p.a * p.d - p.b * p.c);\r\n\t\t\tvar x = targetX - p.worldX, y = targetY - p.worldY;\r\n\t\t\tvar tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay;\r\n\t\t\tvar rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation;\r\n\t\t\tif (bone.ascaleX < 0)\r\n\t\t\t\trotationIK += 180;\r\n\t\t\tif (rotationIK > 180)\r\n\t\t\t\trotationIK -= 360;\r\n\t\t\telse if (rotationIK < -180)\r\n\t\t\t\trotationIK += 360;\r\n\t\t\tbone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, bone.ascaleX, bone.ascaleY, bone.ashearX, bone.ashearY);\r\n\t\t};\r\n\t\tIkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, alpha) {\r\n\t\t\tif (alpha == 0) {\r\n\t\t\t\tchild.updateWorldTransform();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!parent.appliedValid)\r\n\t\t\t\tparent.updateAppliedTransform();\r\n\t\t\tif (!child.appliedValid)\r\n\t\t\t\tchild.updateAppliedTransform();\r\n\t\t\tvar px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, csx = child.ascaleX;\r\n\t\t\tvar os1 = 0, os2 = 0, s2 = 0;\r\n\t\t\tif (psx < 0) {\r\n\t\t\t\tpsx = -psx;\r\n\t\t\t\tos1 = 180;\r\n\t\t\t\ts2 = -1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tos1 = 0;\r\n\t\t\t\ts2 = 1;\r\n\t\t\t}\r\n\t\t\tif (psy < 0) {\r\n\t\t\t\tpsy = -psy;\r\n\t\t\t\ts2 = -s2;\r\n\t\t\t}\r\n\t\t\tif (csx < 0) {\r\n\t\t\t\tcsx = -csx;\r\n\t\t\t\tos2 = 180;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tos2 = 0;\r\n\t\t\tvar cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n\t\t\tvar u = Math.abs(psx - psy) <= 0.0001;\r\n\t\t\tif (!u) {\r\n\t\t\t\tcy = 0;\r\n\t\t\t\tcwx = a * cx + parent.worldX;\r\n\t\t\t\tcwy = c * cx + parent.worldY;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tcy = child.ay;\r\n\t\t\t\tcwx = a * cx + b * cy + parent.worldX;\r\n\t\t\t\tcwy = c * cx + d * cy + parent.worldY;\r\n\t\t\t}\r\n\t\t\tvar pp = parent.parent;\r\n\t\t\ta = pp.a;\r\n\t\t\tb = pp.b;\r\n\t\t\tc = pp.c;\r\n\t\t\td = pp.d;\r\n\t\t\tvar id = 1 / (a * d - b * c), x = targetX - pp.worldX, y = targetY - pp.worldY;\r\n\t\t\tvar tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n\t\t\tx = cwx - pp.worldX;\r\n\t\t\ty = cwy - pp.worldY;\r\n\t\t\tvar dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n\t\t\tvar l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1 = 0, a2 = 0;\r\n\t\t\touter: if (u) {\r\n\t\t\t\tl2 *= psx;\r\n\t\t\t\tvar cos = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n\t\t\t\tif (cos < -1)\r\n\t\t\t\t\tcos = -1;\r\n\t\t\t\telse if (cos > 1)\r\n\t\t\t\t\tcos = 1;\r\n\t\t\t\ta2 = Math.acos(cos) * bendDir;\r\n\t\t\t\ta = l1 + l2 * cos;\r\n\t\t\t\tb = l2 * Math.sin(a2);\r\n\t\t\t\ta1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ta = psx * l2;\r\n\t\t\t\tb = psy * l2;\r\n\t\t\t\tvar aa = a * a, bb = b * b, dd = tx * tx + ty * ty, ta = Math.atan2(ty, tx);\r\n\t\t\t\tc = bb * l1 * l1 + aa * dd - aa * bb;\r\n\t\t\t\tvar c1 = -2 * bb * l1, c2 = bb - aa;\r\n\t\t\t\td = c1 * c1 - 4 * c2 * c;\r\n\t\t\t\tif (d >= 0) {\r\n\t\t\t\t\tvar q = Math.sqrt(d);\r\n\t\t\t\t\tif (c1 < 0)\r\n\t\t\t\t\t\tq = -q;\r\n\t\t\t\t\tq = -(c1 + q) / 2;\r\n\t\t\t\t\tvar r0 = q / c2, r1 = c / q;\r\n\t\t\t\t\tvar r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n\t\t\t\t\tif (r * r <= dd) {\r\n\t\t\t\t\t\ty = Math.sqrt(dd - r * r) * bendDir;\r\n\t\t\t\t\t\ta1 = ta - Math.atan2(y, r);\r\n\t\t\t\t\t\ta2 = Math.atan2(y / psy, (r - l1) / psx);\r\n\t\t\t\t\t\tbreak outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n\t\t\t\tvar maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n\t\t\t\tc = -a * l1 / (aa - bb);\r\n\t\t\t\tif (c >= -1 && c <= 1) {\r\n\t\t\t\t\tc = Math.acos(c);\r\n\t\t\t\t\tx = a * Math.cos(c) + l1;\r\n\t\t\t\t\ty = b * Math.sin(c);\r\n\t\t\t\t\td = x * x + y * y;\r\n\t\t\t\t\tif (d < minDist) {\r\n\t\t\t\t\t\tminAngle = c;\r\n\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\tminX = x;\r\n\t\t\t\t\t\tminY = y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (d > maxDist) {\r\n\t\t\t\t\t\tmaxAngle = c;\r\n\t\t\t\t\t\tmaxDist = d;\r\n\t\t\t\t\t\tmaxX = x;\r\n\t\t\t\t\t\tmaxY = y;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (dd <= (minDist + maxDist) / 2) {\r\n\t\t\t\t\ta1 = ta - Math.atan2(minY * bendDir, minX);\r\n\t\t\t\t\ta2 = minAngle * bendDir;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\ta1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n\t\t\t\t\ta2 = maxAngle * bendDir;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar os = Math.atan2(cy, cx) * s2;\r\n\t\t\tvar rotation = parent.arotation;\r\n\t\t\ta1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n\t\t\tif (a1 > 180)\r\n\t\t\t\ta1 -= 360;\r\n\t\t\telse if (a1 < -180)\r\n\t\t\t\ta1 += 360;\r\n\t\t\tparent.updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.ascaleX, parent.ascaleY, 0, 0);\r\n\t\t\trotation = child.arotation;\r\n\t\t\ta2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n\t\t\tif (a2 > 180)\r\n\t\t\t\ta2 -= 360;\r\n\t\t\telse if (a2 < -180)\r\n\t\t\t\ta2 += 360;\r\n\t\t\tchild.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n\t\t};\r\n\t\treturn IkConstraint;\r\n\t}());\r\n\tspine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar IkConstraintData = (function () {\r\n\t\tfunction IkConstraintData(name) {\r\n\t\t\tthis.order = 0;\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tthis.bendDirection = 1;\r\n\t\t\tthis.mix = 1;\r\n\t\t\tthis.name = name;\r\n\t\t}\r\n\t\treturn IkConstraintData;\r\n\t}());\r\n\tspine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar PathConstraint = (function () {\r\n\t\tfunction PathConstraint(data, skeleton) {\r\n\t\t\tthis.position = 0;\r\n\t\t\tthis.spacing = 0;\r\n\t\t\tthis.rotateMix = 0;\r\n\t\t\tthis.translateMix = 0;\r\n\t\t\tthis.spaces = new Array();\r\n\t\t\tthis.positions = new Array();\r\n\t\t\tthis.world = new Array();\r\n\t\t\tthis.curves = new Array();\r\n\t\t\tthis.lengths = new Array();\r\n\t\t\tthis.segments = new Array();\r\n\t\t\tif (data == null)\r\n\t\t\t\tthrow new Error(\"data cannot be null.\");\r\n\t\t\tif (skeleton == null)\r\n\t\t\t\tthrow new Error(\"skeleton cannot be null.\");\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tfor (var i = 0, n = data.bones.length; i < n; i++)\r\n\t\t\t\tthis.bones.push(skeleton.findBone(data.bones[i].name));\r\n\t\t\tthis.target = skeleton.findSlot(data.target.name);\r\n\t\t\tthis.position = data.position;\r\n\t\t\tthis.spacing = data.spacing;\r\n\t\t\tthis.rotateMix = data.rotateMix;\r\n\t\t\tthis.translateMix = data.translateMix;\r\n\t\t}\r\n\t\tPathConstraint.prototype.apply = function () {\r\n\t\t\tthis.update();\r\n\t\t};\r\n\t\tPathConstraint.prototype.update = function () {\r\n\t\t\tvar attachment = this.target.getAttachment();\r\n\t\t\tif (!(attachment instanceof spine.PathAttachment))\r\n\t\t\t\treturn;\r\n\t\t\tvar rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n\t\t\tvar translate = translateMix > 0, rotate = rotateMix > 0;\r\n\t\t\tif (!translate && !rotate)\r\n\t\t\t\treturn;\r\n\t\t\tvar data = this.data;\r\n\t\t\tvar spacingMode = data.spacingMode;\r\n\t\t\tvar lengthSpacing = spacingMode == spine.SpacingMode.Length;\r\n\t\t\tvar rotateMode = data.rotateMode;\r\n\t\t\tvar tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n\t\t\tvar boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tvar spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n\t\t\tvar spacing = this.spacing;\r\n\t\t\tif (scale || lengthSpacing) {\r\n\t\t\t\tif (scale)\r\n\t\t\t\t\tlengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n\t\t\t\tfor (var i = 0, n = spacesCount - 1; i < n;) {\r\n\t\t\t\t\tvar bone = bones[i];\r\n\t\t\t\t\tvar setupLength = bone.data.length;\r\n\t\t\t\t\tif (setupLength < PathConstraint.epsilon) {\r\n\t\t\t\t\t\tif (scale)\r\n\t\t\t\t\t\t\tlengths[i] = 0;\r\n\t\t\t\t\t\tspaces[++i] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tvar x = setupLength * bone.a, y = setupLength * bone.c;\r\n\t\t\t\t\t\tvar length_1 = Math.sqrt(x * x + y * y);\r\n\t\t\t\t\t\tif (scale)\r\n\t\t\t\t\t\t\tlengths[i] = length_1;\r\n\t\t\t\t\t\tspaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_1 / setupLength;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfor (var i = 1; i < spacesCount; i++)\r\n\t\t\t\t\tspaces[i] = spacing;\r\n\t\t\t}\r\n\t\t\tvar positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, spacingMode == spine.SpacingMode.Percent);\r\n\t\t\tvar boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n\t\t\tvar tip = false;\r\n\t\t\tif (offsetRotation == 0)\r\n\t\t\t\ttip = rotateMode == spine.RotateMode.Chain;\r\n\t\t\telse {\r\n\t\t\t\ttip = false;\r\n\t\t\t\tvar p = this.target.bone;\r\n\t\t\t\toffsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n\t\t\t}\r\n\t\t\tfor (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tbone.worldX += (boneX - bone.worldX) * translateMix;\r\n\t\t\t\tbone.worldY += (boneY - bone.worldY) * translateMix;\r\n\t\t\t\tvar x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n\t\t\t\tif (scale) {\r\n\t\t\t\t\tvar length_2 = lengths[i];\r\n\t\t\t\t\tif (length_2 != 0) {\r\n\t\t\t\t\t\tvar s = (Math.sqrt(dx * dx + dy * dy) / length_2 - 1) * rotateMix + 1;\r\n\t\t\t\t\t\tbone.a *= s;\r\n\t\t\t\t\t\tbone.c *= s;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tboneX = x;\r\n\t\t\t\tboneY = y;\r\n\t\t\t\tif (rotate) {\r\n\t\t\t\t\tvar a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n\t\t\t\t\tif (tangents)\r\n\t\t\t\t\t\tr = positions[p - 1];\r\n\t\t\t\t\telse if (spaces[i + 1] == 0)\r\n\t\t\t\t\t\tr = positions[p + 2];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tr = Math.atan2(dy, dx);\r\n\t\t\t\t\tr -= Math.atan2(c, a);\r\n\t\t\t\t\tif (tip) {\r\n\t\t\t\t\t\tcos = Math.cos(r);\r\n\t\t\t\t\t\tsin = Math.sin(r);\r\n\t\t\t\t\t\tvar length_3 = bone.data.length;\r\n\t\t\t\t\t\tboneX += (length_3 * (cos * a - sin * c) - dx) * rotateMix;\r\n\t\t\t\t\t\tboneY += (length_3 * (sin * a + cos * c) - dy) * rotateMix;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tr += offsetRotation;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (r > spine.MathUtils.PI)\r\n\t\t\t\t\t\tr -= spine.MathUtils.PI2;\r\n\t\t\t\t\telse if (r < -spine.MathUtils.PI)\r\n\t\t\t\t\t\tr += spine.MathUtils.PI2;\r\n\t\t\t\t\tr *= rotateMix;\r\n\t\t\t\t\tcos = Math.cos(r);\r\n\t\t\t\t\tsin = Math.sin(r);\r\n\t\t\t\t\tbone.a = cos * a - sin * c;\r\n\t\t\t\t\tbone.b = cos * b - sin * d;\r\n\t\t\t\t\tbone.c = sin * a + cos * c;\r\n\t\t\t\t\tbone.d = sin * b + cos * d;\r\n\t\t\t\t}\r\n\t\t\t\tbone.appliedValid = false;\r\n\t\t\t}\r\n\t\t};\r\n\t\tPathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n\t\t\tvar target = this.target;\r\n\t\t\tvar position = this.position;\r\n\t\t\tvar spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n\t\t\tvar closed = path.closed;\r\n\t\t\tvar verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n\t\t\tif (!path.constantSpeed) {\r\n\t\t\t\tvar lengths = path.lengths;\r\n\t\t\t\tcurveCount -= closed ? 1 : 2;\r\n\t\t\t\tvar pathLength_1 = lengths[curveCount];\r\n\t\t\t\tif (percentPosition)\r\n\t\t\t\t\tposition *= pathLength_1;\r\n\t\t\t\tif (percentSpacing) {\r\n\t\t\t\t\tfor (var i = 0; i < spacesCount; i++)\r\n\t\t\t\t\t\tspaces[i] *= pathLength_1;\r\n\t\t\t\t}\r\n\t\t\t\tworld = spine.Utils.setArraySize(this.world, 8);\r\n\t\t\t\tfor (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n\t\t\t\t\tvar space = spaces[i];\r\n\t\t\t\t\tposition += space;\r\n\t\t\t\t\tvar p = position;\r\n\t\t\t\t\tif (closed) {\r\n\t\t\t\t\t\tp %= pathLength_1;\r\n\t\t\t\t\t\tif (p < 0)\r\n\t\t\t\t\t\t\tp += pathLength_1;\r\n\t\t\t\t\t\tcurve = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (p < 0) {\r\n\t\t\t\t\t\tif (prevCurve != PathConstraint.BEFORE) {\r\n\t\t\t\t\t\t\tprevCurve = PathConstraint.BEFORE;\r\n\t\t\t\t\t\t\tpath.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.addBeforePosition(p, world, 0, out, o);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (p > pathLength_1) {\r\n\t\t\t\t\t\tif (prevCurve != PathConstraint.AFTER) {\r\n\t\t\t\t\t\t\tprevCurve = PathConstraint.AFTER;\r\n\t\t\t\t\t\t\tpath.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (;; curve++) {\r\n\t\t\t\t\t\tvar length_4 = lengths[curve];\r\n\t\t\t\t\t\tif (p > length_4)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tif (curve == 0)\r\n\t\t\t\t\t\t\tp /= length_4;\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tvar prev = lengths[curve - 1];\r\n\t\t\t\t\t\t\tp = (p - prev) / (length_4 - prev);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (curve != prevCurve) {\r\n\t\t\t\t\t\tprevCurve = curve;\r\n\t\t\t\t\t\tif (closed && curve == curveCount) {\r\n\t\t\t\t\t\t\tpath.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n\t\t\t\t\t\t\tpath.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tpath.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n\t\t\t\t}\r\n\t\t\t\treturn out;\r\n\t\t\t}\r\n\t\t\tif (closed) {\r\n\t\t\t\tverticesLength += 2;\r\n\t\t\t\tworld = spine.Utils.setArraySize(this.world, verticesLength);\r\n\t\t\t\tpath.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n\t\t\t\tpath.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n\t\t\t\tworld[verticesLength - 2] = world[0];\r\n\t\t\t\tworld[verticesLength - 1] = world[1];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tcurveCount--;\r\n\t\t\t\tverticesLength -= 4;\r\n\t\t\t\tworld = spine.Utils.setArraySize(this.world, verticesLength);\r\n\t\t\t\tpath.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n\t\t\t}\r\n\t\t\tvar curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n\t\t\tvar pathLength = 0;\r\n\t\t\tvar x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n\t\t\tvar tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n\t\t\tfor (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n\t\t\t\tcx1 = world[w];\r\n\t\t\t\tcy1 = world[w + 1];\r\n\t\t\t\tcx2 = world[w + 2];\r\n\t\t\t\tcy2 = world[w + 3];\r\n\t\t\t\tx2 = world[w + 4];\r\n\t\t\t\ty2 = world[w + 5];\r\n\t\t\t\ttmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n\t\t\t\ttmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n\t\t\t\tdddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n\t\t\t\tdddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n\t\t\t\tddfx = tmpx * 2 + dddfx;\r\n\t\t\t\tddfy = tmpy * 2 + dddfy;\r\n\t\t\t\tdfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n\t\t\t\tdfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n\t\t\t\tpathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\tdfx += ddfx;\r\n\t\t\t\tdfy += ddfy;\r\n\t\t\t\tddfx += dddfx;\r\n\t\t\t\tddfy += dddfy;\r\n\t\t\t\tpathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\tdfx += ddfx;\r\n\t\t\t\tdfy += ddfy;\r\n\t\t\t\tpathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\tdfx += ddfx + dddfx;\r\n\t\t\t\tdfy += ddfy + dddfy;\r\n\t\t\t\tpathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\tcurves[i] = pathLength;\r\n\t\t\t\tx1 = x2;\r\n\t\t\t\ty1 = y2;\r\n\t\t\t}\r\n\t\t\tif (percentPosition)\r\n\t\t\t\tposition *= pathLength;\r\n\t\t\tif (percentSpacing) {\r\n\t\t\t\tfor (var i = 0; i < spacesCount; i++)\r\n\t\t\t\t\tspaces[i] *= pathLength;\r\n\t\t\t}\r\n\t\t\tvar segments = this.segments;\r\n\t\t\tvar curveLength = 0;\r\n\t\t\tfor (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n\t\t\t\tvar space = spaces[i];\r\n\t\t\t\tposition += space;\r\n\t\t\t\tvar p = position;\r\n\t\t\t\tif (closed) {\r\n\t\t\t\t\tp %= pathLength;\r\n\t\t\t\t\tif (p < 0)\r\n\t\t\t\t\t\tp += pathLength;\r\n\t\t\t\t\tcurve = 0;\r\n\t\t\t\t}\r\n\t\t\t\telse if (p < 0) {\r\n\t\t\t\t\tthis.addBeforePosition(p, world, 0, out, o);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\telse if (p > pathLength) {\r\n\t\t\t\t\tthis.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfor (;; curve++) {\r\n\t\t\t\t\tvar length_5 = curves[curve];\r\n\t\t\t\t\tif (p > length_5)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (curve == 0)\r\n\t\t\t\t\t\tp /= length_5;\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tvar prev = curves[curve - 1];\r\n\t\t\t\t\t\tp = (p - prev) / (length_5 - prev);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (curve != prevCurve) {\r\n\t\t\t\t\tprevCurve = curve;\r\n\t\t\t\t\tvar ii = curve * 6;\r\n\t\t\t\t\tx1 = world[ii];\r\n\t\t\t\t\ty1 = world[ii + 1];\r\n\t\t\t\t\tcx1 = world[ii + 2];\r\n\t\t\t\t\tcy1 = world[ii + 3];\r\n\t\t\t\t\tcx2 = world[ii + 4];\r\n\t\t\t\t\tcy2 = world[ii + 5];\r\n\t\t\t\t\tx2 = world[ii + 6];\r\n\t\t\t\t\ty2 = world[ii + 7];\r\n\t\t\t\t\ttmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n\t\t\t\t\ttmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n\t\t\t\t\tdddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n\t\t\t\t\tdddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n\t\t\t\t\tddfx = tmpx * 2 + dddfx;\r\n\t\t\t\t\tddfy = tmpy * 2 + dddfy;\r\n\t\t\t\t\tdfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n\t\t\t\t\tdfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n\t\t\t\t\tcurveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\t\tsegments[0] = curveLength;\r\n\t\t\t\t\tfor (ii = 1; ii < 8; ii++) {\r\n\t\t\t\t\t\tdfx += ddfx;\r\n\t\t\t\t\t\tdfy += ddfy;\r\n\t\t\t\t\t\tddfx += dddfx;\r\n\t\t\t\t\t\tddfy += dddfy;\r\n\t\t\t\t\t\tcurveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\t\t\tsegments[ii] = curveLength;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdfx += ddfx;\r\n\t\t\t\t\tdfy += ddfy;\r\n\t\t\t\t\tcurveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\t\tsegments[8] = curveLength;\r\n\t\t\t\t\tdfx += ddfx + dddfx;\r\n\t\t\t\t\tdfy += ddfy + dddfy;\r\n\t\t\t\t\tcurveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n\t\t\t\t\tsegments[9] = curveLength;\r\n\t\t\t\t\tsegment = 0;\r\n\t\t\t\t}\r\n\t\t\t\tp *= curveLength;\r\n\t\t\t\tfor (;; segment++) {\r\n\t\t\t\t\tvar length_6 = segments[segment];\r\n\t\t\t\t\tif (p > length_6)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (segment == 0)\r\n\t\t\t\t\t\tp /= length_6;\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tvar prev = segments[segment - 1];\r\n\t\t\t\t\t\tp = segment + (p - prev) / (length_6 - prev);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tthis.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n\t\t\t}\r\n\t\t\treturn out;\r\n\t\t};\r\n\t\tPathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n\t\t\tvar x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n\t\t\tout[o] = x1 + p * Math.cos(r);\r\n\t\t\tout[o + 1] = y1 + p * Math.sin(r);\r\n\t\t\tout[o + 2] = r;\r\n\t\t};\r\n\t\tPathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n\t\t\tvar x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n\t\t\tout[o] = x1 + p * Math.cos(r);\r\n\t\t\tout[o + 1] = y1 + p * Math.sin(r);\r\n\t\t\tout[o + 2] = r;\r\n\t\t};\r\n\t\tPathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n\t\t\tif (p == 0 || isNaN(p))\r\n\t\t\t\tp = 0.0001;\r\n\t\t\tvar tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n\t\t\tvar ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n\t\t\tvar x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n\t\t\tout[o] = x;\r\n\t\t\tout[o + 1] = y;\r\n\t\t\tif (tangents)\r\n\t\t\t\tout[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n\t\t};\r\n\t\tPathConstraint.prototype.getOrder = function () {\r\n\t\t\treturn this.data.order;\r\n\t\t};\r\n\t\tPathConstraint.NONE = -1;\r\n\t\tPathConstraint.BEFORE = -2;\r\n\t\tPathConstraint.AFTER = -3;\r\n\t\tPathConstraint.epsilon = 0.00001;\r\n\t\treturn PathConstraint;\r\n\t}());\r\n\tspine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar PathConstraintData = (function () {\r\n\t\tfunction PathConstraintData(name) {\r\n\t\t\tthis.order = 0;\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tthis.name = name;\r\n\t\t}\r\n\t\treturn PathConstraintData;\r\n\t}());\r\n\tspine.PathConstraintData = PathConstraintData;\r\n\tvar PositionMode;\r\n\t(function (PositionMode) {\r\n\t\tPositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n\t\tPositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n\t})(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n\tvar SpacingMode;\r\n\t(function (SpacingMode) {\r\n\t\tSpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n\t\tSpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n\t\tSpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n\t})(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n\tvar RotateMode;\r\n\t(function (RotateMode) {\r\n\t\tRotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n\t\tRotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n\t\tRotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n\t})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Assets = (function () {\r\n\t\tfunction Assets(clientId) {\r\n\t\t\tthis.toLoad = new Array();\r\n\t\t\tthis.assets = {};\r\n\t\t\tthis.clientId = clientId;\r\n\t\t}\r\n\t\tAssets.prototype.loaded = function () {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor (var v in this.assets)\r\n\t\t\t\ti++;\r\n\t\t\treturn i;\r\n\t\t};\r\n\t\treturn Assets;\r\n\t}());\r\n\tvar SharedAssetManager = (function () {\r\n\t\tfunction SharedAssetManager(pathPrefix) {\r\n\t\t\tif (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n\t\t\tthis.clientAssets = {};\r\n\t\t\tthis.queuedAssets = {};\r\n\t\t\tthis.rawAssets = {};\r\n\t\t\tthis.errors = {};\r\n\t\t\tthis.pathPrefix = pathPrefix;\r\n\t\t}\r\n\t\tSharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n\t\t\tvar clientAssets = this.clientAssets[clientId];\r\n\t\t\tif (clientAssets === null || clientAssets === undefined) {\r\n\t\t\t\tclientAssets = new Assets(clientId);\r\n\t\t\t\tthis.clientAssets[clientId] = clientAssets;\r\n\t\t\t}\r\n\t\t\tif (textureLoader !== null)\r\n\t\t\t\tclientAssets.textureLoader = textureLoader;\r\n\t\t\tclientAssets.toLoad.push(path);\r\n\t\t\tif (this.queuedAssets[path] === path) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.queuedAssets[path] = path;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.loadText = function (clientId, path) {\r\n\t\t\tvar _this = this;\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tif (!this.queueAsset(clientId, null, path))\r\n\t\t\t\treturn;\r\n\t\t\tvar request = new XMLHttpRequest();\r\n\t\t\trequest.onreadystatechange = function () {\r\n\t\t\t\tif (request.readyState == XMLHttpRequest.DONE) {\r\n\t\t\t\t\tif (request.status >= 200 && request.status < 300) {\r\n\t\t\t\t\t\t_this.rawAssets[path] = request.responseText;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t_this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\trequest.open(\"GET\", path, true);\r\n\t\t\trequest.send();\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n\t\t\tvar _this = this;\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tif (!this.queueAsset(clientId, null, path))\r\n\t\t\t\treturn;\r\n\t\t\tvar request = new XMLHttpRequest();\r\n\t\t\trequest.onreadystatechange = function () {\r\n\t\t\t\tif (request.readyState == XMLHttpRequest.DONE) {\r\n\t\t\t\t\tif (request.status >= 200 && request.status < 300) {\r\n\t\t\t\t\t\t_this.rawAssets[path] = JSON.parse(request.responseText);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t_this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\trequest.open(\"GET\", path, true);\r\n\t\t\trequest.send();\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n\t\t\tvar _this = this;\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tif (!this.queueAsset(clientId, textureLoader, path))\r\n\t\t\t\treturn;\r\n\t\t\tvar img = new Image();\r\n\t\t\timg.src = path;\r\n\t\t\timg.crossOrigin = \"anonymous\";\r\n\t\t\timg.onload = function (ev) {\r\n\t\t\t\t_this.rawAssets[path] = img;\r\n\t\t\t};\r\n\t\t\timg.onerror = function (ev) {\r\n\t\t\t\t_this.errors[path] = \"Couldn't load image \" + path;\r\n\t\t\t};\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.get = function (clientId, path) {\r\n\t\t\tpath = this.pathPrefix + path;\r\n\t\t\tvar clientAssets = this.clientAssets[clientId];\r\n\t\t\tif (clientAssets === null || clientAssets === undefined)\r\n\t\t\t\treturn true;\r\n\t\t\treturn clientAssets.assets[path];\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n\t\t\tfor (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n\t\t\t\tvar path = clientAssets.toLoad[i];\r\n\t\t\t\tvar asset = clientAssets.assets[path];\r\n\t\t\t\tif (asset === null || asset === undefined) {\r\n\t\t\t\t\tvar rawAsset = this.rawAssets[path];\r\n\t\t\t\t\tif (rawAsset === null || rawAsset === undefined)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (rawAsset instanceof HTMLImageElement) {\r\n\t\t\t\t\t\tclientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tclientAssets.assets[path] = rawAsset;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n\t\t\tvar clientAssets = this.clientAssets[clientId];\r\n\t\t\tif (clientAssets === null || clientAssets === undefined)\r\n\t\t\t\treturn true;\r\n\t\t\tthis.updateClientAssets(clientAssets);\r\n\t\t\treturn clientAssets.toLoad.length == clientAssets.loaded();\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.dispose = function () {\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.hasErrors = function () {\r\n\t\t\treturn Object.keys(this.errors).length > 0;\r\n\t\t};\r\n\t\tSharedAssetManager.prototype.getErrors = function () {\r\n\t\t\treturn this.errors;\r\n\t\t};\r\n\t\treturn SharedAssetManager;\r\n\t}());\r\n\tspine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Skeleton = (function () {\r\n\t\tfunction Skeleton(data) {\r\n\t\t\tthis._updateCache = new Array();\r\n\t\t\tthis.updateCacheReset = new Array();\r\n\t\t\tthis.time = 0;\r\n\t\t\tthis.flipX = false;\r\n\t\t\tthis.flipY = false;\r\n\t\t\tthis.x = 0;\r\n\t\t\tthis.y = 0;\r\n\t\t\tif (data == null)\r\n\t\t\t\tthrow new Error(\"data cannot be null.\");\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tfor (var i = 0; i < data.bones.length; i++) {\r\n\t\t\t\tvar boneData = data.bones[i];\r\n\t\t\t\tvar bone = void 0;\r\n\t\t\t\tif (boneData.parent == null)\r\n\t\t\t\t\tbone = new spine.Bone(boneData, this, null);\r\n\t\t\t\telse {\r\n\t\t\t\t\tvar parent_1 = this.bones[boneData.parent.index];\r\n\t\t\t\t\tbone = new spine.Bone(boneData, this, parent_1);\r\n\t\t\t\t\tparent_1.children.push(bone);\r\n\t\t\t\t}\r\n\t\t\t\tthis.bones.push(bone);\r\n\t\t\t}\r\n\t\t\tthis.slots = new Array();\r\n\t\t\tthis.drawOrder = new Array();\r\n\t\t\tfor (var i = 0; i < data.slots.length; i++) {\r\n\t\t\t\tvar slotData = data.slots[i];\r\n\t\t\t\tvar bone = this.bones[slotData.boneData.index];\r\n\t\t\t\tvar slot = new spine.Slot(slotData, bone);\r\n\t\t\t\tthis.slots.push(slot);\r\n\t\t\t\tthis.drawOrder.push(slot);\r\n\t\t\t}\r\n\t\t\tthis.ikConstraints = new Array();\r\n\t\t\tfor (var i = 0; i < data.ikConstraints.length; i++) {\r\n\t\t\t\tvar ikConstraintData = data.ikConstraints[i];\r\n\t\t\t\tthis.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n\t\t\t}\r\n\t\t\tthis.transformConstraints = new Array();\r\n\t\t\tfor (var i = 0; i < data.transformConstraints.length; i++) {\r\n\t\t\t\tvar transformConstraintData = data.transformConstraints[i];\r\n\t\t\t\tthis.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n\t\t\t}\r\n\t\t\tthis.pathConstraints = new Array();\r\n\t\t\tfor (var i = 0; i < data.pathConstraints.length; i++) {\r\n\t\t\t\tvar pathConstraintData = data.pathConstraints[i];\r\n\t\t\t\tthis.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n\t\t\t}\r\n\t\t\tthis.color = new spine.Color(1, 1, 1, 1);\r\n\t\t\tthis.updateCache();\r\n\t\t}\r\n\t\tSkeleton.prototype.updateCache = function () {\r\n\t\t\tvar updateCache = this._updateCache;\r\n\t\t\tupdateCache.length = 0;\r\n\t\t\tthis.updateCacheReset.length = 0;\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++)\r\n\t\t\t\tbones[i].sorted = false;\r\n\t\t\tvar ikConstraints = this.ikConstraints;\r\n\t\t\tvar transformConstraints = this.transformConstraints;\r\n\t\t\tvar pathConstraints = this.pathConstraints;\r\n\t\t\tvar ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n\t\t\tvar constraintCount = ikCount + transformCount + pathCount;\r\n\t\t\touter: for (var i = 0; i < constraintCount; i++) {\r\n\t\t\t\tfor (var ii = 0; ii < ikCount; ii++) {\r\n\t\t\t\t\tvar constraint = ikConstraints[ii];\r\n\t\t\t\t\tif (constraint.data.order == i) {\r\n\t\t\t\t\t\tthis.sortIkConstraint(constraint);\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor (var ii = 0; ii < transformCount; ii++) {\r\n\t\t\t\t\tvar constraint = transformConstraints[ii];\r\n\t\t\t\t\tif (constraint.data.order == i) {\r\n\t\t\t\t\t\tthis.sortTransformConstraint(constraint);\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor (var ii = 0; ii < pathCount; ii++) {\r\n\t\t\t\t\tvar constraint = pathConstraints[ii];\r\n\t\t\t\t\tif (constraint.data.order == i) {\r\n\t\t\t\t\t\tthis.sortPathConstraint(constraint);\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++)\r\n\t\t\t\tthis.sortBone(bones[i]);\r\n\t\t};\r\n\t\tSkeleton.prototype.sortIkConstraint = function (constraint) {\r\n\t\t\tvar target = constraint.target;\r\n\t\t\tthis.sortBone(target);\r\n\t\t\tvar constrained = constraint.bones;\r\n\t\t\tvar parent = constrained[0];\r\n\t\t\tthis.sortBone(parent);\r\n\t\t\tif (constrained.length > 1) {\r\n\t\t\t\tvar child = constrained[constrained.length - 1];\r\n\t\t\t\tif (!(this._updateCache.indexOf(child) > -1))\r\n\t\t\t\t\tthis.updateCacheReset.push(child);\r\n\t\t\t}\r\n\t\t\tthis._updateCache.push(constraint);\r\n\t\t\tthis.sortReset(parent.children);\r\n\t\t\tconstrained[constrained.length - 1].sorted = true;\r\n\t\t};\r\n\t\tSkeleton.prototype.sortPathConstraint = function (constraint) {\r\n\t\t\tvar slot = constraint.target;\r\n\t\t\tvar slotIndex = slot.data.index;\r\n\t\t\tvar slotBone = slot.bone;\r\n\t\t\tif (this.skin != null)\r\n\t\t\t\tthis.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n\t\t\tif (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n\t\t\t\tthis.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n\t\t\tfor (var i = 0, n = this.data.skins.length; i < n; i++)\r\n\t\t\t\tthis.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n\t\t\tvar attachment = slot.getAttachment();\r\n\t\t\tif (attachment instanceof spine.PathAttachment)\r\n\t\t\t\tthis.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n\t\t\tvar constrained = constraint.bones;\r\n\t\t\tvar boneCount = constrained.length;\r\n\t\t\tfor (var i = 0; i < boneCount; i++)\r\n\t\t\t\tthis.sortBone(constrained[i]);\r\n\t\t\tthis._updateCache.push(constraint);\r\n\t\t\tfor (var i = 0; i < boneCount; i++)\r\n\t\t\t\tthis.sortReset(constrained[i].children);\r\n\t\t\tfor (var i = 0; i < boneCount; i++)\r\n\t\t\t\tconstrained[i].sorted = true;\r\n\t\t};\r\n\t\tSkeleton.prototype.sortTransformConstraint = function (constraint) {\r\n\t\t\tthis.sortBone(constraint.target);\r\n\t\t\tvar constrained = constraint.bones;\r\n\t\t\tvar boneCount = constrained.length;\r\n\t\t\tif (constraint.data.local) {\r\n\t\t\t\tfor (var i = 0; i < boneCount; i++) {\r\n\t\t\t\t\tvar child = constrained[i];\r\n\t\t\t\t\tthis.sortBone(child.parent);\r\n\t\t\t\t\tif (!(this._updateCache.indexOf(child) > -1))\r\n\t\t\t\t\t\tthis.updateCacheReset.push(child);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfor (var i = 0; i < boneCount; i++) {\r\n\t\t\t\t\tthis.sortBone(constrained[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis._updateCache.push(constraint);\r\n\t\t\tfor (var ii = 0; ii < boneCount; ii++)\r\n\t\t\t\tthis.sortReset(constrained[ii].children);\r\n\t\t\tfor (var ii = 0; ii < boneCount; ii++)\r\n\t\t\t\tconstrained[ii].sorted = true;\r\n\t\t};\r\n\t\tSkeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n\t\t\tvar attachments = skin.attachments[slotIndex];\r\n\t\t\tif (!attachments)\r\n\t\t\t\treturn;\r\n\t\t\tfor (var key in attachments) {\r\n\t\t\t\tthis.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n\t\t\t}\r\n\t\t};\r\n\t\tSkeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n\t\t\tif (!(attachment instanceof spine.PathAttachment))\r\n\t\t\t\treturn;\r\n\t\t\tvar pathBones = attachment.bones;\r\n\t\t\tif (pathBones == null)\r\n\t\t\t\tthis.sortBone(slotBone);\r\n\t\t\telse {\r\n\t\t\t\tvar bones = this.bones;\r\n\t\t\t\tvar i = 0;\r\n\t\t\t\twhile (i < pathBones.length) {\r\n\t\t\t\t\tvar boneCount = pathBones[i++];\r\n\t\t\t\t\tfor (var n = i + boneCount; i < n; i++) {\r\n\t\t\t\t\t\tvar boneIndex = pathBones[i];\r\n\t\t\t\t\t\tthis.sortBone(bones[boneIndex]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tSkeleton.prototype.sortBone = function (bone) {\r\n\t\t\tif (bone.sorted)\r\n\t\t\t\treturn;\r\n\t\t\tvar parent = bone.parent;\r\n\t\t\tif (parent != null)\r\n\t\t\t\tthis.sortBone(parent);\r\n\t\t\tbone.sorted = true;\r\n\t\t\tthis._updateCache.push(bone);\r\n\t\t};\r\n\t\tSkeleton.prototype.sortReset = function (bones) {\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tif (bone.sorted)\r\n\t\t\t\t\tthis.sortReset(bone.children);\r\n\t\t\t\tbone.sorted = false;\r\n\t\t\t}\r\n\t\t};\r\n\t\tSkeleton.prototype.updateWorldTransform = function () {\r\n\t\t\tvar updateCacheReset = this.updateCacheReset;\r\n\t\t\tfor (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n\t\t\t\tvar bone = updateCacheReset[i];\r\n\t\t\t\tbone.ax = bone.x;\r\n\t\t\t\tbone.ay = bone.y;\r\n\t\t\t\tbone.arotation = bone.rotation;\r\n\t\t\t\tbone.ascaleX = bone.scaleX;\r\n\t\t\t\tbone.ascaleY = bone.scaleY;\r\n\t\t\t\tbone.ashearX = bone.shearX;\r\n\t\t\t\tbone.ashearY = bone.shearY;\r\n\t\t\t\tbone.appliedValid = true;\r\n\t\t\t}\r\n\t\t\tvar updateCache = this._updateCache;\r\n\t\t\tfor (var i = 0, n = updateCache.length; i < n; i++)\r\n\t\t\t\tupdateCache[i].update();\r\n\t\t};\r\n\t\tSkeleton.prototype.setToSetupPose = function () {\r\n\t\t\tthis.setBonesToSetupPose();\r\n\t\t\tthis.setSlotsToSetupPose();\r\n\t\t};\r\n\t\tSkeleton.prototype.setBonesToSetupPose = function () {\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++)\r\n\t\t\t\tbones[i].setToSetupPose();\r\n\t\t\tvar ikConstraints = this.ikConstraints;\r\n\t\t\tfor (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = ikConstraints[i];\r\n\t\t\t\tconstraint.bendDirection = constraint.data.bendDirection;\r\n\t\t\t\tconstraint.mix = constraint.data.mix;\r\n\t\t\t}\r\n\t\t\tvar transformConstraints = this.transformConstraints;\r\n\t\t\tfor (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = transformConstraints[i];\r\n\t\t\t\tvar data = constraint.data;\r\n\t\t\t\tconstraint.rotateMix = data.rotateMix;\r\n\t\t\t\tconstraint.translateMix = data.translateMix;\r\n\t\t\t\tconstraint.scaleMix = data.scaleMix;\r\n\t\t\t\tconstraint.shearMix = data.shearMix;\r\n\t\t\t}\r\n\t\t\tvar pathConstraints = this.pathConstraints;\r\n\t\t\tfor (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = pathConstraints[i];\r\n\t\t\t\tvar data = constraint.data;\r\n\t\t\t\tconstraint.position = data.position;\r\n\t\t\t\tconstraint.spacing = data.spacing;\r\n\t\t\t\tconstraint.rotateMix = data.rotateMix;\r\n\t\t\t\tconstraint.translateMix = data.translateMix;\r\n\t\t\t}\r\n\t\t};\r\n\t\tSkeleton.prototype.setSlotsToSetupPose = function () {\r\n\t\t\tvar slots = this.slots;\r\n\t\t\tspine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n\t\t\tfor (var i = 0, n = slots.length; i < n; i++)\r\n\t\t\t\tslots[i].setToSetupPose();\r\n\t\t};\r\n\t\tSkeleton.prototype.getRootBone = function () {\r\n\t\t\tif (this.bones.length == 0)\r\n\t\t\t\treturn null;\r\n\t\t\treturn this.bones[0];\r\n\t\t};\r\n\t\tSkeleton.prototype.findBone = function (boneName) {\r\n\t\t\tif (boneName == null)\r\n\t\t\t\tthrow new Error(\"boneName cannot be null.\");\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tif (bone.data.name == boneName)\r\n\t\t\t\t\treturn bone;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeleton.prototype.findBoneIndex = function (boneName) {\r\n\t\t\tif (boneName == null)\r\n\t\t\t\tthrow new Error(\"boneName cannot be null.\");\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++)\r\n\t\t\t\tif (bones[i].data.name == boneName)\r\n\t\t\t\t\treturn i;\r\n\t\t\treturn -1;\r\n\t\t};\r\n\t\tSkeleton.prototype.findSlot = function (slotName) {\r\n\t\t\tif (slotName == null)\r\n\t\t\t\tthrow new Error(\"slotName cannot be null.\");\r\n\t\t\tvar slots = this.slots;\r\n\t\t\tfor (var i = 0, n = slots.length; i < n; i++) {\r\n\t\t\t\tvar slot = slots[i];\r\n\t\t\t\tif (slot.data.name == slotName)\r\n\t\t\t\t\treturn slot;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeleton.prototype.findSlotIndex = function (slotName) {\r\n\t\t\tif (slotName == null)\r\n\t\t\t\tthrow new Error(\"slotName cannot be null.\");\r\n\t\t\tvar slots = this.slots;\r\n\t\t\tfor (var i = 0, n = slots.length; i < n; i++)\r\n\t\t\t\tif (slots[i].data.name == slotName)\r\n\t\t\t\t\treturn i;\r\n\t\t\treturn -1;\r\n\t\t};\r\n\t\tSkeleton.prototype.setSkinByName = function (skinName) {\r\n\t\t\tvar skin = this.data.findSkin(skinName);\r\n\t\t\tif (skin == null)\r\n\t\t\t\tthrow new Error(\"Skin not found: \" + skinName);\r\n\t\t\tthis.setSkin(skin);\r\n\t\t};\r\n\t\tSkeleton.prototype.setSkin = function (newSkin) {\r\n\t\t\tif (newSkin != null) {\r\n\t\t\t\tif (this.skin != null)\r\n\t\t\t\t\tnewSkin.attachAll(this, this.skin);\r\n\t\t\t\telse {\r\n\t\t\t\t\tvar slots = this.slots;\r\n\t\t\t\t\tfor (var i = 0, n = slots.length; i < n; i++) {\r\n\t\t\t\t\t\tvar slot = slots[i];\r\n\t\t\t\t\t\tvar name_1 = slot.data.attachmentName;\r\n\t\t\t\t\t\tif (name_1 != null) {\r\n\t\t\t\t\t\t\tvar attachment = newSkin.getAttachment(i, name_1);\r\n\t\t\t\t\t\t\tif (attachment != null)\r\n\t\t\t\t\t\t\t\tslot.setAttachment(attachment);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.skin = newSkin;\r\n\t\t};\r\n\t\tSkeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n\t\t\treturn this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n\t\t};\r\n\t\tSkeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n\t\t\tif (attachmentName == null)\r\n\t\t\t\tthrow new Error(\"attachmentName cannot be null.\");\r\n\t\t\tif (this.skin != null) {\r\n\t\t\t\tvar attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n\t\t\t\tif (attachment != null)\r\n\t\t\t\t\treturn attachment;\r\n\t\t\t}\r\n\t\t\tif (this.data.defaultSkin != null)\r\n\t\t\t\treturn this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n\t\t\tif (slotName == null)\r\n\t\t\t\tthrow new Error(\"slotName cannot be null.\");\r\n\t\t\tvar slots = this.slots;\r\n\t\t\tfor (var i = 0, n = slots.length; i < n; i++) {\r\n\t\t\t\tvar slot = slots[i];\r\n\t\t\t\tif (slot.data.name == slotName) {\r\n\t\t\t\t\tvar attachment = null;\r\n\t\t\t\t\tif (attachmentName != null) {\r\n\t\t\t\t\t\tattachment = this.getAttachment(i, attachmentName);\r\n\t\t\t\t\t\tif (attachment == null)\r\n\t\t\t\t\t\t\tthrow new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tslot.setAttachment(attachment);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthrow new Error(\"Slot not found: \" + slotName);\r\n\t\t};\r\n\t\tSkeleton.prototype.findIkConstraint = function (constraintName) {\r\n\t\t\tif (constraintName == null)\r\n\t\t\t\tthrow new Error(\"constraintName cannot be null.\");\r\n\t\t\tvar ikConstraints = this.ikConstraints;\r\n\t\t\tfor (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n\t\t\t\tvar ikConstraint = ikConstraints[i];\r\n\t\t\t\tif (ikConstraint.data.name == constraintName)\r\n\t\t\t\t\treturn ikConstraint;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeleton.prototype.findTransformConstraint = function (constraintName) {\r\n\t\t\tif (constraintName == null)\r\n\t\t\t\tthrow new Error(\"constraintName cannot be null.\");\r\n\t\t\tvar transformConstraints = this.transformConstraints;\r\n\t\t\tfor (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = transformConstraints[i];\r\n\t\t\t\tif (constraint.data.name == constraintName)\r\n\t\t\t\t\treturn constraint;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeleton.prototype.findPathConstraint = function (constraintName) {\r\n\t\t\tif (constraintName == null)\r\n\t\t\t\tthrow new Error(\"constraintName cannot be null.\");\r\n\t\t\tvar pathConstraints = this.pathConstraints;\r\n\t\t\tfor (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = pathConstraints[i];\r\n\t\t\t\tif (constraint.data.name == constraintName)\r\n\t\t\t\t\treturn constraint;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeleton.prototype.getBounds = function (offset, size, temp) {\r\n\t\t\tif (offset == null)\r\n\t\t\t\tthrow new Error(\"offset cannot be null.\");\r\n\t\t\tif (size == null)\r\n\t\t\t\tthrow new Error(\"size cannot be null.\");\r\n\t\t\tvar drawOrder = this.drawOrder;\r\n\t\t\tvar minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n\t\t\tfor (var i = 0, n = drawOrder.length; i < n; i++) {\r\n\t\t\t\tvar slot = drawOrder[i];\r\n\t\t\t\tvar verticesLength = 0;\r\n\t\t\t\tvar vertices = null;\r\n\t\t\t\tvar attachment = slot.getAttachment();\r\n\t\t\t\tif (attachment instanceof spine.RegionAttachment) {\r\n\t\t\t\t\tverticesLength = 8;\r\n\t\t\t\t\tvertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n\t\t\t\t\tattachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n\t\t\t\t}\r\n\t\t\t\telse if (attachment instanceof spine.MeshAttachment) {\r\n\t\t\t\t\tvar mesh = attachment;\r\n\t\t\t\t\tverticesLength = mesh.worldVerticesLength;\r\n\t\t\t\t\tvertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n\t\t\t\t\tmesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n\t\t\t\t}\r\n\t\t\t\tif (vertices != null) {\r\n\t\t\t\t\tfor (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n\t\t\t\t\t\tvar x = vertices[ii], y = vertices[ii + 1];\r\n\t\t\t\t\t\tminX = Math.min(minX, x);\r\n\t\t\t\t\t\tminY = Math.min(minY, y);\r\n\t\t\t\t\t\tmaxX = Math.max(maxX, x);\r\n\t\t\t\t\t\tmaxY = Math.max(maxY, y);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\toffset.set(minX, minY);\r\n\t\t\tsize.set(maxX - minX, maxY - minY);\r\n\t\t};\r\n\t\tSkeleton.prototype.update = function (delta) {\r\n\t\t\tthis.time += delta;\r\n\t\t};\r\n\t\treturn Skeleton;\r\n\t}());\r\n\tspine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar SkeletonBounds = (function () {\r\n\t\tfunction SkeletonBounds() {\r\n\t\t\tthis.minX = 0;\r\n\t\t\tthis.minY = 0;\r\n\t\t\tthis.maxX = 0;\r\n\t\t\tthis.maxY = 0;\r\n\t\t\tthis.boundingBoxes = new Array();\r\n\t\t\tthis.polygons = new Array();\r\n\t\t\tthis.polygonPool = new spine.Pool(function () {\r\n\t\t\t\treturn spine.Utils.newFloatArray(16);\r\n\t\t\t});\r\n\t\t}\r\n\t\tSkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n\t\t\tif (skeleton == null)\r\n\t\t\t\tthrow new Error(\"skeleton cannot be null.\");\r\n\t\t\tvar boundingBoxes = this.boundingBoxes;\r\n\t\t\tvar polygons = this.polygons;\r\n\t\t\tvar polygonPool = this.polygonPool;\r\n\t\t\tvar slots = skeleton.slots;\r\n\t\t\tvar slotCount = slots.length;\r\n\t\t\tboundingBoxes.length = 0;\r\n\t\t\tpolygonPool.freeAll(polygons);\r\n\t\t\tpolygons.length = 0;\r\n\t\t\tfor (var i = 0; i < slotCount; i++) {\r\n\t\t\t\tvar slot = slots[i];\r\n\t\t\t\tvar attachment = slot.getAttachment();\r\n\t\t\t\tif (attachment instanceof spine.BoundingBoxAttachment) {\r\n\t\t\t\t\tvar boundingBox = attachment;\r\n\t\t\t\t\tboundingBoxes.push(boundingBox);\r\n\t\t\t\t\tvar polygon = polygonPool.obtain();\r\n\t\t\t\t\tif (polygon.length != boundingBox.worldVerticesLength) {\r\n\t\t\t\t\t\tpolygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpolygons.push(polygon);\r\n\t\t\t\t\tboundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (updateAabb) {\r\n\t\t\t\tthis.aabbCompute();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.minX = Number.POSITIVE_INFINITY;\r\n\t\t\t\tthis.minY = Number.POSITIVE_INFINITY;\r\n\t\t\t\tthis.maxX = Number.NEGATIVE_INFINITY;\r\n\t\t\t\tthis.maxY = Number.NEGATIVE_INFINITY;\r\n\t\t\t}\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.aabbCompute = function () {\r\n\t\t\tvar minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n\t\t\tvar polygons = this.polygons;\r\n\t\t\tfor (var i = 0, n = polygons.length; i < n; i++) {\r\n\t\t\t\tvar polygon = polygons[i];\r\n\t\t\t\tvar vertices = polygon;\r\n\t\t\t\tfor (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n\t\t\t\t\tvar x = vertices[ii];\r\n\t\t\t\t\tvar y = vertices[ii + 1];\r\n\t\t\t\t\tminX = Math.min(minX, x);\r\n\t\t\t\t\tminY = Math.min(minY, y);\r\n\t\t\t\t\tmaxX = Math.max(maxX, x);\r\n\t\t\t\t\tmaxY = Math.max(maxY, y);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.minX = minX;\r\n\t\t\tthis.minY = minY;\r\n\t\t\tthis.maxX = maxX;\r\n\t\t\tthis.maxY = maxY;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n\t\t\treturn x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n\t\t\tvar minX = this.minX;\r\n\t\t\tvar minY = this.minY;\r\n\t\t\tvar maxX = this.maxX;\r\n\t\t\tvar maxY = this.maxY;\r\n\t\t\tif ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n\t\t\t\treturn false;\r\n\t\t\tvar m = (y2 - y1) / (x2 - x1);\r\n\t\t\tvar y = m * (minX - x1) + y1;\r\n\t\t\tif (y > minY && y < maxY)\r\n\t\t\t\treturn true;\r\n\t\t\ty = m * (maxX - x1) + y1;\r\n\t\t\tif (y > minY && y < maxY)\r\n\t\t\t\treturn true;\r\n\t\t\tvar x = (minY - y1) / m + x1;\r\n\t\t\tif (x > minX && x < maxX)\r\n\t\t\t\treturn true;\r\n\t\t\tx = (maxY - y1) / m + x1;\r\n\t\t\tif (x > minX && x < maxX)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n\t\t\treturn this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.containsPoint = function (x, y) {\r\n\t\t\tvar polygons = this.polygons;\r\n\t\t\tfor (var i = 0, n = polygons.length; i < n; i++)\r\n\t\t\t\tif (this.containsPointPolygon(polygons[i], x, y))\r\n\t\t\t\t\treturn this.boundingBoxes[i];\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n\t\t\tvar vertices = polygon;\r\n\t\t\tvar nn = polygon.length;\r\n\t\t\tvar prevIndex = nn - 2;\r\n\t\t\tvar inside = false;\r\n\t\t\tfor (var ii = 0; ii < nn; ii += 2) {\r\n\t\t\t\tvar vertexY = vertices[ii + 1];\r\n\t\t\t\tvar prevY = vertices[prevIndex + 1];\r\n\t\t\t\tif ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n\t\t\t\t\tvar vertexX = vertices[ii];\r\n\t\t\t\t\tif (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n\t\t\t\t\t\tinside = !inside;\r\n\t\t\t\t}\r\n\t\t\t\tprevIndex = ii;\r\n\t\t\t}\r\n\t\t\treturn inside;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n\t\t\tvar polygons = this.polygons;\r\n\t\t\tfor (var i = 0, n = polygons.length; i < n; i++)\r\n\t\t\t\tif (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n\t\t\t\t\treturn this.boundingBoxes[i];\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n\t\t\tvar vertices = polygon;\r\n\t\t\tvar nn = polygon.length;\r\n\t\t\tvar width12 = x1 - x2, height12 = y1 - y2;\r\n\t\t\tvar det1 = x1 * y2 - y1 * x2;\r\n\t\t\tvar x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n\t\t\tfor (var ii = 0; ii < nn; ii += 2) {\r\n\t\t\t\tvar x4 = vertices[ii], y4 = vertices[ii + 1];\r\n\t\t\t\tvar det2 = x3 * y4 - y3 * x4;\r\n\t\t\t\tvar width34 = x3 - x4, height34 = y3 - y4;\r\n\t\t\t\tvar det3 = width12 * height34 - height12 * width34;\r\n\t\t\t\tvar x = (det1 * width34 - width12 * det2) / det3;\r\n\t\t\t\tif (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n\t\t\t\t\tvar y = (det1 * height34 - height12 * det2) / det3;\r\n\t\t\t\t\tif (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tx3 = x4;\r\n\t\t\t\ty3 = y4;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n\t\t\tif (boundingBox == null)\r\n\t\t\t\tthrow new Error(\"boundingBox cannot be null.\");\r\n\t\t\tvar index = this.boundingBoxes.indexOf(boundingBox);\r\n\t\t\treturn index == -1 ? null : this.polygons[index];\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.getWidth = function () {\r\n\t\t\treturn this.maxX - this.minX;\r\n\t\t};\r\n\t\tSkeletonBounds.prototype.getHeight = function () {\r\n\t\t\treturn this.maxY - this.minY;\r\n\t\t};\r\n\t\treturn SkeletonBounds;\r\n\t}());\r\n\tspine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar SkeletonClipping = (function () {\r\n\t\tfunction SkeletonClipping() {\r\n\t\t\tthis.triangulator = new spine.Triangulator();\r\n\t\t\tthis.clippingPolygon = new Array();\r\n\t\t\tthis.clipOutput = new Array();\r\n\t\t\tthis.clippedVertices = new Array();\r\n\t\t\tthis.clippedTriangles = new Array();\r\n\t\t\tthis.scratch = new Array();\r\n\t\t}\r\n\t\tSkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n\t\t\tif (this.clipAttachment != null)\r\n\t\t\t\treturn 0;\r\n\t\t\tthis.clipAttachment = clip;\r\n\t\t\tvar n = clip.worldVerticesLength;\r\n\t\t\tvar vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n\t\t\tclip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n\t\t\tvar clippingPolygon = this.clippingPolygon;\r\n\t\t\tSkeletonClipping.makeClockwise(clippingPolygon);\r\n\t\t\tvar clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n\t\t\tfor (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) {\r\n\t\t\t\tvar polygon = clippingPolygons[i];\r\n\t\t\t\tSkeletonClipping.makeClockwise(polygon);\r\n\t\t\t\tpolygon.push(polygon[0]);\r\n\t\t\t\tpolygon.push(polygon[1]);\r\n\t\t\t}\r\n\t\t\treturn clippingPolygons.length;\r\n\t\t};\r\n\t\tSkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n\t\t\tif (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n\t\t\t\tthis.clipEnd();\r\n\t\t};\r\n\t\tSkeletonClipping.prototype.clipEnd = function () {\r\n\t\t\tif (this.clipAttachment == null)\r\n\t\t\t\treturn;\r\n\t\t\tthis.clipAttachment = null;\r\n\t\t\tthis.clippingPolygons = null;\r\n\t\t\tthis.clippedVertices.length = 0;\r\n\t\t\tthis.clippedTriangles.length = 0;\r\n\t\t\tthis.clippingPolygon.length = 0;\r\n\t\t};\r\n\t\tSkeletonClipping.prototype.isClipping = function () {\r\n\t\t\treturn this.clipAttachment != null;\r\n\t\t};\r\n\t\tSkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n\t\t\tvar clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n\t\t\tvar clippedTriangles = this.clippedTriangles;\r\n\t\t\tvar polygons = this.clippingPolygons;\r\n\t\t\tvar polygonsCount = this.clippingPolygons.length;\r\n\t\t\tvar vertexSize = twoColor ? 12 : 8;\r\n\t\t\tvar index = 0;\r\n\t\t\tclippedVertices.length = 0;\r\n\t\t\tclippedTriangles.length = 0;\r\n\t\t\touter: for (var i = 0; i < trianglesLength; i += 3) {\r\n\t\t\t\tvar vertexOffset = triangles[i] << 1;\r\n\t\t\t\tvar x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n\t\t\t\tvar u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n\t\t\t\tvertexOffset = triangles[i + 1] << 1;\r\n\t\t\t\tvar x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n\t\t\t\tvar u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n\t\t\t\tvertexOffset = triangles[i + 2] << 1;\r\n\t\t\t\tvar x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n\t\t\t\tvar u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n\t\t\t\tfor (var p = 0; p < polygonsCount; p++) {\r\n\t\t\t\t\tvar s = clippedVertices.length;\r\n\t\t\t\t\tif (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n\t\t\t\t\t\tvar clipOutputLength = clipOutput.length;\r\n\t\t\t\t\t\tif (clipOutputLength == 0)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tvar d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n\t\t\t\t\t\tvar d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n\t\t\t\t\t\tvar clipOutputCount = clipOutputLength >> 1;\r\n\t\t\t\t\t\tvar clipOutputItems = this.clipOutput;\r\n\t\t\t\t\t\tvar clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n\t\t\t\t\t\tfor (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n\t\t\t\t\t\t\tvar x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n\t\t\t\t\t\t\tclippedVerticesItems[s] = x;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 1] = y;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\t\tvar c0 = x - x3, c1 = y - y3;\r\n\t\t\t\t\t\t\tvar a = (d0 * c0 + d1 * c1) * d;\r\n\t\t\t\t\t\t\tvar b = (d4 * c0 + d2 * c1) * d;\r\n\t\t\t\t\t\t\tvar c = 1 - a - b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n\t\t\t\t\t\t\tif (twoColor) {\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ts += vertexSize;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tvar clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n\t\t\t\t\t\tclipOutputCount--;\r\n\t\t\t\t\t\tfor (var ii = 1; ii < clipOutputCount; ii++) {\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + ii);\r\n\t\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + ii + 1);\r\n\t\t\t\t\t\t\ts += 3;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tindex += clipOutputCount + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tvar clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n\t\t\t\t\t\tclippedVerticesItems[s] = x1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 1] = y1;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 2] = light.r;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 3] = light.g;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 4] = light.b;\r\n\t\t\t\t\t\tclippedVerticesItems[s + 5] = light.a;\r\n\t\t\t\t\t\tif (!twoColor) {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = v2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = v3;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 6] = u1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 7] = v1;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 8] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 9] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 10] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 11] = dark.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 12] = x2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 13] = y2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 14] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 15] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 16] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 17] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 18] = u2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 19] = v2;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 20] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 21] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 22] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 23] = dark.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 24] = x3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 25] = y3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 26] = light.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 27] = light.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 28] = light.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 29] = light.a;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 30] = u3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 31] = v3;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 32] = dark.r;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 33] = dark.g;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 34] = dark.b;\r\n\t\t\t\t\t\t\tclippedVerticesItems[s + 35] = dark.a;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ts = clippedTriangles.length;\r\n\t\t\t\t\t\tvar clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n\t\t\t\t\t\tclippedTrianglesItems[s] = index;\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 1] = (index + 1);\r\n\t\t\t\t\t\tclippedTrianglesItems[s + 2] = (index + 2);\r\n\t\t\t\t\t\tindex += 3;\r\n\t\t\t\t\t\tcontinue outer;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tSkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n\t\t\tvar originalOutput = output;\r\n\t\t\tvar clipped = false;\r\n\t\t\tvar input = null;\r\n\t\t\tif (clippingArea.length % 4 >= 2) {\r\n\t\t\t\tinput = output;\r\n\t\t\t\toutput = this.scratch;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tinput = this.scratch;\r\n\t\t\tinput.length = 0;\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\tinput.push(x2);\r\n\t\t\tinput.push(y2);\r\n\t\t\tinput.push(x3);\r\n\t\t\tinput.push(y3);\r\n\t\t\tinput.push(x1);\r\n\t\t\tinput.push(y1);\r\n\t\t\toutput.length = 0;\r\n\t\t\tvar clippingVertices = clippingArea;\r\n\t\t\tvar clippingVerticesLast = clippingArea.length - 4;\r\n\t\t\tfor (var i = 0;; i += 2) {\r\n\t\t\t\tvar edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n\t\t\t\tvar edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n\t\t\t\tvar deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n\t\t\t\tvar inputVertices = input;\r\n\t\t\t\tvar inputVerticesLength = input.length - 2, outputStart = output.length;\r\n\t\t\t\tfor (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n\t\t\t\t\tvar inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n\t\t\t\t\tvar inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n\t\t\t\t\tvar side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n\t\t\t\t\tif (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n\t\t\t\t\t\tif (side2) {\r\n\t\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tvar ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (side2) {\r\n\t\t\t\t\t\tvar c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n\t\t\t\t\t\tvar ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY));\r\n\t\t\t\t\t\toutput.push(edgeX + (edgeX2 - edgeX) * ua);\r\n\t\t\t\t\t\toutput.push(edgeY + (edgeY2 - edgeY) * ua);\r\n\t\t\t\t\t\toutput.push(inputX2);\r\n\t\t\t\t\t\toutput.push(inputY2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclipped = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (outputStart == output.length) {\r\n\t\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\toutput.push(output[0]);\r\n\t\t\t\toutput.push(output[1]);\r\n\t\t\t\tif (i == clippingVerticesLast)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tvar temp = output;\r\n\t\t\t\toutput = input;\r\n\t\t\t\toutput.length = 0;\r\n\t\t\t\tinput = temp;\r\n\t\t\t}\r\n\t\t\tif (originalOutput != output) {\r\n\t\t\t\toriginalOutput.length = 0;\r\n\t\t\t\tfor (var i = 0, n = output.length - 2; i < n; i++)\r\n\t\t\t\t\toriginalOutput[i] = output[i];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\toriginalOutput.length = originalOutput.length - 2;\r\n\t\t\treturn clipped;\r\n\t\t};\r\n\t\tSkeletonClipping.makeClockwise = function (polygon) {\r\n\t\t\tvar vertices = polygon;\r\n\t\t\tvar verticeslength = polygon.length;\r\n\t\t\tvar area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n\t\t\tfor (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n\t\t\t\tp1x = vertices[i];\r\n\t\t\t\tp1y = vertices[i + 1];\r\n\t\t\t\tp2x = vertices[i + 2];\r\n\t\t\t\tp2y = vertices[i + 3];\r\n\t\t\t\tarea += p1x * p2y - p2x * p1y;\r\n\t\t\t}\r\n\t\t\tif (area < 0)\r\n\t\t\t\treturn;\r\n\t\t\tfor (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n\t\t\t\tvar x = vertices[i], y = vertices[i + 1];\r\n\t\t\t\tvar other = lastX - i;\r\n\t\t\t\tvertices[i] = vertices[other];\r\n\t\t\t\tvertices[i + 1] = vertices[other + 1];\r\n\t\t\t\tvertices[other] = x;\r\n\t\t\t\tvertices[other + 1] = y;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn SkeletonClipping;\r\n\t}());\r\n\tspine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar SkeletonData = (function () {\r\n\t\tfunction SkeletonData() {\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tthis.slots = new Array();\r\n\t\t\tthis.skins = new Array();\r\n\t\t\tthis.events = new Array();\r\n\t\t\tthis.animations = new Array();\r\n\t\t\tthis.ikConstraints = new Array();\r\n\t\t\tthis.transformConstraints = new Array();\r\n\t\t\tthis.pathConstraints = new Array();\r\n\t\t\tthis.fps = 0;\r\n\t\t}\r\n\t\tSkeletonData.prototype.findBone = function (boneName) {\r\n\t\t\tif (boneName == null)\r\n\t\t\t\tthrow new Error(\"boneName cannot be null.\");\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tif (bone.name == boneName)\r\n\t\t\t\t\treturn bone;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findBoneIndex = function (boneName) {\r\n\t\t\tif (boneName == null)\r\n\t\t\t\tthrow new Error(\"boneName cannot be null.\");\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++)\r\n\t\t\t\tif (bones[i].name == boneName)\r\n\t\t\t\t\treturn i;\r\n\t\t\treturn -1;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findSlot = function (slotName) {\r\n\t\t\tif (slotName == null)\r\n\t\t\t\tthrow new Error(\"slotName cannot be null.\");\r\n\t\t\tvar slots = this.slots;\r\n\t\t\tfor (var i = 0, n = slots.length; i < n; i++) {\r\n\t\t\t\tvar slot = slots[i];\r\n\t\t\t\tif (slot.name == slotName)\r\n\t\t\t\t\treturn slot;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findSlotIndex = function (slotName) {\r\n\t\t\tif (slotName == null)\r\n\t\t\t\tthrow new Error(\"slotName cannot be null.\");\r\n\t\t\tvar slots = this.slots;\r\n\t\t\tfor (var i = 0, n = slots.length; i < n; i++)\r\n\t\t\t\tif (slots[i].name == slotName)\r\n\t\t\t\t\treturn i;\r\n\t\t\treturn -1;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findSkin = function (skinName) {\r\n\t\t\tif (skinName == null)\r\n\t\t\t\tthrow new Error(\"skinName cannot be null.\");\r\n\t\t\tvar skins = this.skins;\r\n\t\t\tfor (var i = 0, n = skins.length; i < n; i++) {\r\n\t\t\t\tvar skin = skins[i];\r\n\t\t\t\tif (skin.name == skinName)\r\n\t\t\t\t\treturn skin;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findEvent = function (eventDataName) {\r\n\t\t\tif (eventDataName == null)\r\n\t\t\t\tthrow new Error(\"eventDataName cannot be null.\");\r\n\t\t\tvar events = this.events;\r\n\t\t\tfor (var i = 0, n = events.length; i < n; i++) {\r\n\t\t\t\tvar event_4 = events[i];\r\n\t\t\t\tif (event_4.name == eventDataName)\r\n\t\t\t\t\treturn event_4;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findAnimation = function (animationName) {\r\n\t\t\tif (animationName == null)\r\n\t\t\t\tthrow new Error(\"animationName cannot be null.\");\r\n\t\t\tvar animations = this.animations;\r\n\t\t\tfor (var i = 0, n = animations.length; i < n; i++) {\r\n\t\t\t\tvar animation = animations[i];\r\n\t\t\t\tif (animation.name == animationName)\r\n\t\t\t\t\treturn animation;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n\t\t\tif (constraintName == null)\r\n\t\t\t\tthrow new Error(\"constraintName cannot be null.\");\r\n\t\t\tvar ikConstraints = this.ikConstraints;\r\n\t\t\tfor (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = ikConstraints[i];\r\n\t\t\t\tif (constraint.name == constraintName)\r\n\t\t\t\t\treturn constraint;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n\t\t\tif (constraintName == null)\r\n\t\t\t\tthrow new Error(\"constraintName cannot be null.\");\r\n\t\t\tvar transformConstraints = this.transformConstraints;\r\n\t\t\tfor (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = transformConstraints[i];\r\n\t\t\t\tif (constraint.name == constraintName)\r\n\t\t\t\t\treturn constraint;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n\t\t\tif (constraintName == null)\r\n\t\t\t\tthrow new Error(\"constraintName cannot be null.\");\r\n\t\t\tvar pathConstraints = this.pathConstraints;\r\n\t\t\tfor (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n\t\t\t\tvar constraint = pathConstraints[i];\r\n\t\t\t\tif (constraint.name == constraintName)\r\n\t\t\t\t\treturn constraint;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n\t\t\tif (pathConstraintName == null)\r\n\t\t\t\tthrow new Error(\"pathConstraintName cannot be null.\");\r\n\t\t\tvar pathConstraints = this.pathConstraints;\r\n\t\t\tfor (var i = 0, n = pathConstraints.length; i < n; i++)\r\n\t\t\t\tif (pathConstraints[i].name == pathConstraintName)\r\n\t\t\t\t\treturn i;\r\n\t\t\treturn -1;\r\n\t\t};\r\n\t\treturn SkeletonData;\r\n\t}());\r\n\tspine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar SkeletonJson = (function () {\r\n\t\tfunction SkeletonJson(attachmentLoader) {\r\n\t\t\tthis.scale = 1;\r\n\t\t\tthis.linkedMeshes = new Array();\r\n\t\t\tthis.attachmentLoader = attachmentLoader;\r\n\t\t}\r\n\t\tSkeletonJson.prototype.readSkeletonData = function (json) {\r\n\t\t\tvar scale = this.scale;\r\n\t\t\tvar skeletonData = new spine.SkeletonData();\r\n\t\t\tvar root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n\t\t\tvar skeletonMap = root.skeleton;\r\n\t\t\tif (skeletonMap != null) {\r\n\t\t\t\tskeletonData.hash = skeletonMap.hash;\r\n\t\t\t\tskeletonData.version = skeletonMap.spine;\r\n\t\t\t\tskeletonData.width = skeletonMap.width;\r\n\t\t\t\tskeletonData.height = skeletonMap.height;\r\n\t\t\t\tskeletonData.fps = skeletonMap.fps;\r\n\t\t\t\tskeletonData.imagesPath = skeletonMap.images;\r\n\t\t\t}\r\n\t\t\tif (root.bones) {\r\n\t\t\t\tfor (var i = 0; i < root.bones.length; i++) {\r\n\t\t\t\t\tvar boneMap = root.bones[i];\r\n\t\t\t\t\tvar parent_2 = null;\r\n\t\t\t\t\tvar parentName = this.getValue(boneMap, \"parent\", null);\r\n\t\t\t\t\tif (parentName != null) {\r\n\t\t\t\t\t\tparent_2 = skeletonData.findBone(parentName);\r\n\t\t\t\t\t\tif (parent_2 == null)\r\n\t\t\t\t\t\t\tthrow new Error(\"Parent bone not found: \" + parentName);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_2);\r\n\t\t\t\t\tdata.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n\t\t\t\t\tdata.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n\t\t\t\t\tdata.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n\t\t\t\t\tdata.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n\t\t\t\t\tdata.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n\t\t\t\t\tdata.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n\t\t\t\t\tdata.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n\t\t\t\t\tdata.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n\t\t\t\t\tdata.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n\t\t\t\t\tskeletonData.bones.push(data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (root.slots) {\r\n\t\t\t\tfor (var i = 0; i < root.slots.length; i++) {\r\n\t\t\t\t\tvar slotMap = root.slots[i];\r\n\t\t\t\t\tvar slotName = slotMap.name;\r\n\t\t\t\t\tvar boneName = slotMap.bone;\r\n\t\t\t\t\tvar boneData = skeletonData.findBone(boneName);\r\n\t\t\t\t\tif (boneData == null)\r\n\t\t\t\t\t\tthrow new Error(\"Slot bone not found: \" + boneName);\r\n\t\t\t\t\tvar data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n\t\t\t\t\tvar color = this.getValue(slotMap, \"color\", null);\r\n\t\t\t\t\tif (color != null)\r\n\t\t\t\t\t\tdata.color.setFromString(color);\r\n\t\t\t\t\tvar dark = this.getValue(slotMap, \"dark\", null);\r\n\t\t\t\t\tif (dark != null) {\r\n\t\t\t\t\t\tdata.darkColor = new spine.Color(1, 1, 1, 1);\r\n\t\t\t\t\t\tdata.darkColor.setFromString(dark);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n\t\t\t\t\tdata.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n\t\t\t\t\tskeletonData.slots.push(data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (root.ik) {\r\n\t\t\t\tfor (var i = 0; i < root.ik.length; i++) {\r\n\t\t\t\t\tvar constraintMap = root.ik[i];\r\n\t\t\t\t\tvar data = new spine.IkConstraintData(constraintMap.name);\r\n\t\t\t\t\tdata.order = this.getValue(constraintMap, \"order\", 0);\r\n\t\t\t\t\tfor (var j = 0; j < constraintMap.bones.length; j++) {\r\n\t\t\t\t\t\tvar boneName = constraintMap.bones[j];\r\n\t\t\t\t\t\tvar bone = skeletonData.findBone(boneName);\r\n\t\t\t\t\t\tif (bone == null)\r\n\t\t\t\t\t\t\tthrow new Error(\"IK bone not found: \" + boneName);\r\n\t\t\t\t\t\tdata.bones.push(bone);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar targetName = constraintMap.target;\r\n\t\t\t\t\tdata.target = skeletonData.findBone(targetName);\r\n\t\t\t\t\tif (data.target == null)\r\n\t\t\t\t\t\tthrow new Error(\"IK target bone not found: \" + targetName);\r\n\t\t\t\t\tdata.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n\t\t\t\t\tdata.mix = this.getValue(constraintMap, \"mix\", 1);\r\n\t\t\t\t\tskeletonData.ikConstraints.push(data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (root.transform) {\r\n\t\t\t\tfor (var i = 0; i < root.transform.length; i++) {\r\n\t\t\t\t\tvar constraintMap = root.transform[i];\r\n\t\t\t\t\tvar data = new spine.TransformConstraintData(constraintMap.name);\r\n\t\t\t\t\tdata.order = this.getValue(constraintMap, \"order\", 0);\r\n\t\t\t\t\tfor (var j = 0; j < constraintMap.bones.length; j++) {\r\n\t\t\t\t\t\tvar boneName = constraintMap.bones[j];\r\n\t\t\t\t\t\tvar bone = skeletonData.findBone(boneName);\r\n\t\t\t\t\t\tif (bone == null)\r\n\t\t\t\t\t\t\tthrow new Error(\"Transform constraint bone not found: \" + boneName);\r\n\t\t\t\t\t\tdata.bones.push(bone);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar targetName = constraintMap.target;\r\n\t\t\t\t\tdata.target = skeletonData.findBone(targetName);\r\n\t\t\t\t\tif (data.target == null)\r\n\t\t\t\t\t\tthrow new Error(\"Transform constraint target bone not found: \" + targetName);\r\n\t\t\t\t\tdata.local = this.getValue(constraintMap, \"local\", false);\r\n\t\t\t\t\tdata.relative = this.getValue(constraintMap, \"relative\", false);\r\n\t\t\t\t\tdata.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n\t\t\t\t\tdata.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n\t\t\t\t\tdata.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n\t\t\t\t\tdata.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n\t\t\t\t\tdata.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n\t\t\t\t\tdata.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n\t\t\t\t\tdata.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n\t\t\t\t\tdata.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n\t\t\t\t\tdata.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n\t\t\t\t\tdata.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n\t\t\t\t\tskeletonData.transformConstraints.push(data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (root.path) {\r\n\t\t\t\tfor (var i = 0; i < root.path.length; i++) {\r\n\t\t\t\t\tvar constraintMap = root.path[i];\r\n\t\t\t\t\tvar data = new spine.PathConstraintData(constraintMap.name);\r\n\t\t\t\t\tdata.order = this.getValue(constraintMap, \"order\", 0);\r\n\t\t\t\t\tfor (var j = 0; j < constraintMap.bones.length; j++) {\r\n\t\t\t\t\t\tvar boneName = constraintMap.bones[j];\r\n\t\t\t\t\t\tvar bone = skeletonData.findBone(boneName);\r\n\t\t\t\t\t\tif (bone == null)\r\n\t\t\t\t\t\t\tthrow new Error(\"Transform constraint bone not found: \" + boneName);\r\n\t\t\t\t\t\tdata.bones.push(bone);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar targetName = constraintMap.target;\r\n\t\t\t\t\tdata.target = skeletonData.findSlot(targetName);\r\n\t\t\t\t\tif (data.target == null)\r\n\t\t\t\t\t\tthrow new Error(\"Path target slot not found: \" + targetName);\r\n\t\t\t\t\tdata.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n\t\t\t\t\tdata.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n\t\t\t\t\tdata.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n\t\t\t\t\tdata.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n\t\t\t\t\tdata.position = this.getValue(constraintMap, \"position\", 0);\r\n\t\t\t\t\tif (data.positionMode == spine.PositionMode.Fixed)\r\n\t\t\t\t\t\tdata.position *= scale;\r\n\t\t\t\t\tdata.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n\t\t\t\t\tif (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n\t\t\t\t\t\tdata.spacing *= scale;\r\n\t\t\t\t\tdata.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n\t\t\t\t\tdata.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n\t\t\t\t\tskeletonData.pathConstraints.push(data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (root.skins) {\r\n\t\t\t\tfor (var skinName in root.skins) {\r\n\t\t\t\t\tvar skinMap = root.skins[skinName];\r\n\t\t\t\t\tvar skin = new spine.Skin(skinName);\r\n\t\t\t\t\tfor (var slotName in skinMap) {\r\n\t\t\t\t\t\tvar slotIndex = skeletonData.findSlotIndex(slotName);\r\n\t\t\t\t\t\tif (slotIndex == -1)\r\n\t\t\t\t\t\t\tthrow new Error(\"Slot not found: \" + slotName);\r\n\t\t\t\t\t\tvar slotMap = skinMap[slotName];\r\n\t\t\t\t\t\tfor (var entryName in slotMap) {\r\n\t\t\t\t\t\t\tvar attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName, skeletonData);\r\n\t\t\t\t\t\t\tif (attachment != null)\r\n\t\t\t\t\t\t\t\tskin.addAttachment(slotIndex, entryName, attachment);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tskeletonData.skins.push(skin);\r\n\t\t\t\t\tif (skin.name == \"default\")\r\n\t\t\t\t\t\tskeletonData.defaultSkin = skin;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n\t\t\t\tvar linkedMesh = this.linkedMeshes[i];\r\n\t\t\t\tvar skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n\t\t\t\tif (skin == null)\r\n\t\t\t\t\tthrow new Error(\"Skin not found: \" + linkedMesh.skin);\r\n\t\t\t\tvar parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n\t\t\t\tif (parent_3 == null)\r\n\t\t\t\t\tthrow new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n\t\t\t\tlinkedMesh.mesh.setParentMesh(parent_3);\r\n\t\t\t\tlinkedMesh.mesh.updateUVs();\r\n\t\t\t}\r\n\t\t\tthis.linkedMeshes.length = 0;\r\n\t\t\tif (root.events) {\r\n\t\t\t\tfor (var eventName in root.events) {\r\n\t\t\t\t\tvar eventMap = root.events[eventName];\r\n\t\t\t\t\tvar data = new spine.EventData(eventName);\r\n\t\t\t\t\tdata.intValue = this.getValue(eventMap, \"int\", 0);\r\n\t\t\t\t\tdata.floatValue = this.getValue(eventMap, \"float\", 0);\r\n\t\t\t\t\tdata.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n\t\t\t\t\tskeletonData.events.push(data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (root.animations) {\r\n\t\t\t\tfor (var animationName in root.animations) {\r\n\t\t\t\t\tvar animationMap = root.animations[animationName];\r\n\t\t\t\t\tthis.readAnimation(animationMap, animationName, skeletonData);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn skeletonData;\r\n\t\t};\r\n\t\tSkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n\t\t\tvar scale = this.scale;\r\n\t\t\tname = this.getValue(map, \"name\", name);\r\n\t\t\tvar type = this.getValue(map, \"type\", \"region\");\r\n\t\t\tswitch (type) {\r\n\t\t\t\tcase \"region\": {\r\n\t\t\t\t\tvar path = this.getValue(map, \"path\", name);\r\n\t\t\t\t\tvar region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n\t\t\t\t\tif (region == null)\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\tregion.path = path;\r\n\t\t\t\t\tregion.x = this.getValue(map, \"x\", 0) * scale;\r\n\t\t\t\t\tregion.y = this.getValue(map, \"y\", 0) * scale;\r\n\t\t\t\t\tregion.scaleX = this.getValue(map, \"scaleX\", 1);\r\n\t\t\t\t\tregion.scaleY = this.getValue(map, \"scaleY\", 1);\r\n\t\t\t\t\tregion.rotation = this.getValue(map, \"rotation\", 0);\r\n\t\t\t\t\tregion.width = map.width * scale;\r\n\t\t\t\t\tregion.height = map.height * scale;\r\n\t\t\t\t\tvar color = this.getValue(map, \"color\", null);\r\n\t\t\t\t\tif (color != null)\r\n\t\t\t\t\t\tregion.color.setFromString(color);\r\n\t\t\t\t\tregion.updateOffset();\r\n\t\t\t\t\treturn region;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"boundingbox\": {\r\n\t\t\t\t\tvar box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n\t\t\t\t\tif (box == null)\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\tthis.readVertices(map, box, map.vertexCount << 1);\r\n\t\t\t\t\tvar color = this.getValue(map, \"color\", null);\r\n\t\t\t\t\tif (color != null)\r\n\t\t\t\t\t\tbox.color.setFromString(color);\r\n\t\t\t\t\treturn box;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"mesh\":\r\n\t\t\t\tcase \"linkedmesh\": {\r\n\t\t\t\t\tvar path = this.getValue(map, \"path\", name);\r\n\t\t\t\t\tvar mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n\t\t\t\t\tif (mesh == null)\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\tmesh.path = path;\r\n\t\t\t\t\tvar color = this.getValue(map, \"color\", null);\r\n\t\t\t\t\tif (color != null)\r\n\t\t\t\t\t\tmesh.color.setFromString(color);\r\n\t\t\t\t\tvar parent_4 = this.getValue(map, \"parent\", null);\r\n\t\t\t\t\tif (parent_4 != null) {\r\n\t\t\t\t\t\tmesh.inheritDeform = this.getValue(map, \"deform\", true);\r\n\t\t\t\t\t\tthis.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_4));\r\n\t\t\t\t\t\treturn mesh;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar uvs = map.uvs;\r\n\t\t\t\t\tthis.readVertices(map, mesh, uvs.length);\r\n\t\t\t\t\tmesh.triangles = map.triangles;\r\n\t\t\t\t\tmesh.regionUVs = uvs;\r\n\t\t\t\t\tmesh.updateUVs();\r\n\t\t\t\t\tmesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n\t\t\t\t\treturn mesh;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"path\": {\r\n\t\t\t\t\tvar path = this.attachmentLoader.newPathAttachment(skin, name);\r\n\t\t\t\t\tif (path == null)\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\tpath.closed = this.getValue(map, \"closed\", false);\r\n\t\t\t\t\tpath.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n\t\t\t\t\tvar vertexCount = map.vertexCount;\r\n\t\t\t\t\tthis.readVertices(map, path, vertexCount << 1);\r\n\t\t\t\t\tvar lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n\t\t\t\t\tfor (var i = 0; i < map.lengths.length; i++)\r\n\t\t\t\t\t\tlengths[i] = map.lengths[i] * scale;\r\n\t\t\t\t\tpath.lengths = lengths;\r\n\t\t\t\t\tvar color = this.getValue(map, \"color\", null);\r\n\t\t\t\t\tif (color != null)\r\n\t\t\t\t\t\tpath.color.setFromString(color);\r\n\t\t\t\t\treturn path;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"point\": {\r\n\t\t\t\t\tvar point = this.attachmentLoader.newPointAttachment(skin, name);\r\n\t\t\t\t\tif (point == null)\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\tpoint.x = this.getValue(map, \"x\", 0) * scale;\r\n\t\t\t\t\tpoint.y = this.getValue(map, \"y\", 0) * scale;\r\n\t\t\t\t\tpoint.rotation = this.getValue(map, \"rotation\", 0);\r\n\t\t\t\t\tvar color = this.getValue(map, \"color\", null);\r\n\t\t\t\t\tif (color != null)\r\n\t\t\t\t\t\tpoint.color.setFromString(color);\r\n\t\t\t\t\treturn point;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"clipping\": {\r\n\t\t\t\t\tvar clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n\t\t\t\t\tif (clip == null)\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\tvar end = this.getValue(map, \"end\", null);\r\n\t\t\t\t\tif (end != null) {\r\n\t\t\t\t\t\tvar slot = skeletonData.findSlot(end);\r\n\t\t\t\t\t\tif (slot == null)\r\n\t\t\t\t\t\t\tthrow new Error(\"Clipping end slot not found: \" + end);\r\n\t\t\t\t\t\tclip.endSlot = slot;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar vertexCount = map.vertexCount;\r\n\t\t\t\t\tthis.readVertices(map, clip, vertexCount << 1);\r\n\t\t\t\t\tvar color = this.getValue(map, \"color\", null);\r\n\t\t\t\t\tif (color != null)\r\n\t\t\t\t\t\tclip.color.setFromString(color);\r\n\t\t\t\t\treturn clip;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tSkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n\t\t\tvar scale = this.scale;\r\n\t\t\tattachment.worldVerticesLength = verticesLength;\r\n\t\t\tvar vertices = map.vertices;\r\n\t\t\tif (verticesLength == vertices.length) {\r\n\t\t\t\tvar scaledVertices = spine.Utils.toFloatArray(vertices);\r\n\t\t\t\tif (scale != 1) {\r\n\t\t\t\t\tfor (var i = 0, n = vertices.length; i < n; i++)\r\n\t\t\t\t\t\tscaledVertices[i] *= scale;\r\n\t\t\t\t}\r\n\t\t\t\tattachment.vertices = scaledVertices;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar weights = new Array();\r\n\t\t\tvar bones = new Array();\r\n\t\t\tfor (var i = 0, n = vertices.length; i < n;) {\r\n\t\t\t\tvar boneCount = vertices[i++];\r\n\t\t\t\tbones.push(boneCount);\r\n\t\t\t\tfor (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n\t\t\t\t\tbones.push(vertices[i]);\r\n\t\t\t\t\tweights.push(vertices[i + 1] * scale);\r\n\t\t\t\t\tweights.push(vertices[i + 2] * scale);\r\n\t\t\t\t\tweights.push(vertices[i + 3]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattachment.bones = bones;\r\n\t\t\tattachment.vertices = spine.Utils.toFloatArray(weights);\r\n\t\t};\r\n\t\tSkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n\t\t\tvar scale = this.scale;\r\n\t\t\tvar timelines = new Array();\r\n\t\t\tvar duration = 0;\r\n\t\t\tif (map.slots) {\r\n\t\t\t\tfor (var slotName in map.slots) {\r\n\t\t\t\t\tvar slotMap = map.slots[slotName];\r\n\t\t\t\t\tvar slotIndex = skeletonData.findSlotIndex(slotName);\r\n\t\t\t\t\tif (slotIndex == -1)\r\n\t\t\t\t\t\tthrow new Error(\"Slot not found: \" + slotName);\r\n\t\t\t\t\tfor (var timelineName in slotMap) {\r\n\t\t\t\t\t\tvar timelineMap = slotMap[timelineName];\r\n\t\t\t\t\t\tif (timelineName == \"attachment\") {\r\n\t\t\t\t\t\t\tvar timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < timelineMap.length; i++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[i];\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex++, valueMap.time, valueMap.name);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (timelineName == \"color\") {\r\n\t\t\t\t\t\t\tvar timeline = new spine.ColorTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < timelineMap.length; i++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[i];\r\n\t\t\t\t\t\t\t\tvar color = new spine.Color();\r\n\t\t\t\t\t\t\t\tcolor.setFromString(valueMap.color);\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, color.r, color.g, color.b, color.a);\r\n\t\t\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (timelineName == \"twoColor\") {\r\n\t\t\t\t\t\t\tvar timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < timelineMap.length; i++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[i];\r\n\t\t\t\t\t\t\t\tvar light = new spine.Color();\r\n\t\t\t\t\t\t\t\tvar dark = new spine.Color();\r\n\t\t\t\t\t\t\t\tlight.setFromString(valueMap.light);\r\n\t\t\t\t\t\t\t\tdark.setFromString(valueMap.dark);\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n\t\t\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tthrow new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (map.bones) {\r\n\t\t\t\tfor (var boneName in map.bones) {\r\n\t\t\t\t\tvar boneMap = map.bones[boneName];\r\n\t\t\t\t\tvar boneIndex = skeletonData.findBoneIndex(boneName);\r\n\t\t\t\t\tif (boneIndex == -1)\r\n\t\t\t\t\t\tthrow new Error(\"Bone not found: \" + boneName);\r\n\t\t\t\t\tfor (var timelineName in boneMap) {\r\n\t\t\t\t\t\tvar timelineMap = boneMap[timelineName];\r\n\t\t\t\t\t\tif (timelineName === \"rotate\") {\r\n\t\t\t\t\t\t\tvar timeline = new spine.RotateTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < timelineMap.length; i++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[i];\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, valueMap.angle);\r\n\t\t\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n\t\t\t\t\t\t\tvar timeline = null;\r\n\t\t\t\t\t\t\tvar timelineScale = 1;\r\n\t\t\t\t\t\t\tif (timelineName === \"scale\")\r\n\t\t\t\t\t\t\t\ttimeline = new spine.ScaleTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\telse if (timelineName === \"shear\")\r\n\t\t\t\t\t\t\t\ttimeline = new spine.ShearTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\ttimeline = new spine.TranslateTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\t\ttimelineScale = scale;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimeline.boneIndex = boneIndex;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < timelineMap.length; i++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[i];\r\n\t\t\t\t\t\t\t\tvar x = this.getValue(valueMap, \"x\", 0), y = this.getValue(valueMap, \"y\", 0);\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale);\r\n\t\t\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tthrow new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (map.ik) {\r\n\t\t\t\tfor (var constraintName in map.ik) {\r\n\t\t\t\t\tvar constraintMap = map.ik[constraintName];\r\n\t\t\t\t\tvar constraint = skeletonData.findIkConstraint(constraintName);\r\n\t\t\t\t\tvar timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n\t\t\t\t\ttimeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\tfor (var i = 0; i < constraintMap.length; i++) {\r\n\t\t\t\t\t\tvar valueMap = constraintMap[i];\r\n\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1);\r\n\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (map.transform) {\r\n\t\t\t\tfor (var constraintName in map.transform) {\r\n\t\t\t\t\tvar constraintMap = map.transform[constraintName];\r\n\t\t\t\t\tvar constraint = skeletonData.findTransformConstraint(constraintName);\r\n\t\t\t\t\tvar timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n\t\t\t\t\ttimeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\tfor (var i = 0; i < constraintMap.length; i++) {\r\n\t\t\t\t\t\tvar valueMap = constraintMap[i];\r\n\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (map.paths) {\r\n\t\t\t\tfor (var constraintName in map.paths) {\r\n\t\t\t\t\tvar constraintMap = map.paths[constraintName];\r\n\t\t\t\t\tvar index = skeletonData.findPathConstraintIndex(constraintName);\r\n\t\t\t\t\tif (index == -1)\r\n\t\t\t\t\t\tthrow new Error(\"Path constraint not found: \" + constraintName);\r\n\t\t\t\t\tvar data = skeletonData.pathConstraints[index];\r\n\t\t\t\t\tfor (var timelineName in constraintMap) {\r\n\t\t\t\t\t\tvar timelineMap = constraintMap[timelineName];\r\n\t\t\t\t\t\tif (timelineName === \"position\" || timelineName === \"spacing\") {\r\n\t\t\t\t\t\t\tvar timeline = null;\r\n\t\t\t\t\t\t\tvar timelineScale = 1;\r\n\t\t\t\t\t\t\tif (timelineName === \"spacing\") {\r\n\t\t\t\t\t\t\t\ttimeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\t\tif (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n\t\t\t\t\t\t\t\t\ttimelineScale = scale;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\ttimeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\t\tif (data.positionMode == spine.PositionMode.Fixed)\r\n\t\t\t\t\t\t\t\t\ttimelineScale = scale;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < timelineMap.length; i++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[i];\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n\t\t\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (timelineName === \"mix\") {\r\n\t\t\t\t\t\t\tvar timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\ttimeline.pathConstraintIndex = index;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var i = 0; i < timelineMap.length; i++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[i];\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n\t\t\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (map.deform) {\r\n\t\t\t\tfor (var deformName in map.deform) {\r\n\t\t\t\t\tvar deformMap = map.deform[deformName];\r\n\t\t\t\t\tvar skin = skeletonData.findSkin(deformName);\r\n\t\t\t\t\tif (skin == null)\r\n\t\t\t\t\t\tthrow new Error(\"Skin not found: \" + deformName);\r\n\t\t\t\t\tfor (var slotName in deformMap) {\r\n\t\t\t\t\t\tvar slotMap = deformMap[slotName];\r\n\t\t\t\t\t\tvar slotIndex = skeletonData.findSlotIndex(slotName);\r\n\t\t\t\t\t\tif (slotIndex == -1)\r\n\t\t\t\t\t\t\tthrow new Error(\"Slot not found: \" + slotMap.name);\r\n\t\t\t\t\t\tfor (var timelineName in slotMap) {\r\n\t\t\t\t\t\t\tvar timelineMap = slotMap[timelineName];\r\n\t\t\t\t\t\t\tvar attachment = skin.getAttachment(slotIndex, timelineName);\r\n\t\t\t\t\t\t\tif (attachment == null)\r\n\t\t\t\t\t\t\t\tthrow new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n\t\t\t\t\t\t\tvar weighted = attachment.bones != null;\r\n\t\t\t\t\t\t\tvar vertices = attachment.vertices;\r\n\t\t\t\t\t\t\tvar deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n\t\t\t\t\t\t\tvar timeline = new spine.DeformTimeline(timelineMap.length);\r\n\t\t\t\t\t\t\ttimeline.slotIndex = slotIndex;\r\n\t\t\t\t\t\t\ttimeline.attachment = attachment;\r\n\t\t\t\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\t\t\t\tfor (var j = 0; j < timelineMap.length; j++) {\r\n\t\t\t\t\t\t\t\tvar valueMap = timelineMap[j];\r\n\t\t\t\t\t\t\t\tvar deform = void 0;\r\n\t\t\t\t\t\t\t\tvar verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n\t\t\t\t\t\t\t\tif (verticesValue == null)\r\n\t\t\t\t\t\t\t\t\tdeform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tdeform = spine.Utils.newFloatArray(deformLength);\r\n\t\t\t\t\t\t\t\t\tvar start = this.getValue(valueMap, \"offset\", 0);\r\n\t\t\t\t\t\t\t\t\tspine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n\t\t\t\t\t\t\t\t\tif (scale != 1) {\r\n\t\t\t\t\t\t\t\t\t\tfor (var i = start, n = i + verticesValue.length; i < n; i++)\r\n\t\t\t\t\t\t\t\t\t\t\tdeform[i] *= scale;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (!weighted) {\r\n\t\t\t\t\t\t\t\t\t\tfor (var i = 0; i < deformLength; i++)\r\n\t\t\t\t\t\t\t\t\t\t\tdeform[i] += vertices[i];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\ttimeline.setFrame(frameIndex, valueMap.time, deform);\r\n\t\t\t\t\t\t\t\tthis.readCurve(valueMap, timeline, frameIndex);\r\n\t\t\t\t\t\t\t\tframeIndex++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\t\t\t\tduration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar drawOrderNode = map.drawOrder;\r\n\t\t\tif (drawOrderNode == null)\r\n\t\t\t\tdrawOrderNode = map.draworder;\r\n\t\t\tif (drawOrderNode != null) {\r\n\t\t\t\tvar timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n\t\t\t\tvar slotCount = skeletonData.slots.length;\r\n\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\tfor (var j = 0; j < drawOrderNode.length; j++) {\r\n\t\t\t\t\tvar drawOrderMap = drawOrderNode[j];\r\n\t\t\t\t\tvar drawOrder = null;\r\n\t\t\t\t\tvar offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n\t\t\t\t\tif (offsets != null) {\r\n\t\t\t\t\t\tdrawOrder = spine.Utils.newArray(slotCount, -1);\r\n\t\t\t\t\t\tvar unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n\t\t\t\t\t\tvar originalIndex = 0, unchangedIndex = 0;\r\n\t\t\t\t\t\tfor (var i = 0; i < offsets.length; i++) {\r\n\t\t\t\t\t\t\tvar offsetMap = offsets[i];\r\n\t\t\t\t\t\t\tvar slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n\t\t\t\t\t\t\tif (slotIndex == -1)\r\n\t\t\t\t\t\t\t\tthrow new Error(\"Slot not found: \" + offsetMap.slot);\r\n\t\t\t\t\t\t\twhile (originalIndex != slotIndex)\r\n\t\t\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\r\n\t\t\t\t\t\t\tdrawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\twhile (originalIndex < slotCount)\r\n\t\t\t\t\t\t\tunchanged[unchangedIndex++] = originalIndex++;\r\n\t\t\t\t\t\tfor (var i = slotCount - 1; i >= 0; i--)\r\n\t\t\t\t\t\t\tif (drawOrder[i] == -1)\r\n\t\t\t\t\t\t\t\tdrawOrder[i] = unchanged[--unchangedIndex];\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttimeline.setFrame(frameIndex++, drawOrderMap.time, drawOrder);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n\t\t\t}\r\n\t\t\tif (map.events) {\r\n\t\t\t\tvar timeline = new spine.EventTimeline(map.events.length);\r\n\t\t\t\tvar frameIndex = 0;\r\n\t\t\t\tfor (var i = 0; i < map.events.length; i++) {\r\n\t\t\t\t\tvar eventMap = map.events[i];\r\n\t\t\t\t\tvar eventData = skeletonData.findEvent(eventMap.name);\r\n\t\t\t\t\tif (eventData == null)\r\n\t\t\t\t\t\tthrow new Error(\"Event not found: \" + eventMap.name);\r\n\t\t\t\t\tvar event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData);\r\n\t\t\t\t\tevent_5.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n\t\t\t\t\tevent_5.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n\t\t\t\t\tevent_5.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n\t\t\t\t\ttimeline.setFrame(frameIndex++, event_5);\r\n\t\t\t\t}\r\n\t\t\t\ttimelines.push(timeline);\r\n\t\t\t\tduration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n\t\t\t}\r\n\t\t\tif (isNaN(duration)) {\r\n\t\t\t\tthrow new Error(\"Error while parsing animation, duration is NaN\");\r\n\t\t\t}\r\n\t\t\tskeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n\t\t};\r\n\t\tSkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n\t\t\tif (!map.curve)\r\n\t\t\t\treturn;\r\n\t\t\tif (map.curve === \"stepped\")\r\n\t\t\t\ttimeline.setStepped(frameIndex);\r\n\t\t\telse if (Object.prototype.toString.call(map.curve) === '[object Array]') {\r\n\t\t\t\tvar curve = map.curve;\r\n\t\t\t\ttimeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);\r\n\t\t\t}\r\n\t\t};\r\n\t\tSkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n\t\t\treturn map[prop] !== undefined ? map[prop] : defaultValue;\r\n\t\t};\r\n\t\tSkeletonJson.blendModeFromString = function (str) {\r\n\t\t\tstr = str.toLowerCase();\r\n\t\t\tif (str == \"normal\")\r\n\t\t\t\treturn spine.BlendMode.Normal;\r\n\t\t\tif (str == \"additive\")\r\n\t\t\t\treturn spine.BlendMode.Additive;\r\n\t\t\tif (str == \"multiply\")\r\n\t\t\t\treturn spine.BlendMode.Multiply;\r\n\t\t\tif (str == \"screen\")\r\n\t\t\t\treturn spine.BlendMode.Screen;\r\n\t\t\tthrow new Error(\"Unknown blend mode: \" + str);\r\n\t\t};\r\n\t\tSkeletonJson.positionModeFromString = function (str) {\r\n\t\t\tstr = str.toLowerCase();\r\n\t\t\tif (str == \"fixed\")\r\n\t\t\t\treturn spine.PositionMode.Fixed;\r\n\t\t\tif (str == \"percent\")\r\n\t\t\t\treturn spine.PositionMode.Percent;\r\n\t\t\tthrow new Error(\"Unknown position mode: \" + str);\r\n\t\t};\r\n\t\tSkeletonJson.spacingModeFromString = function (str) {\r\n\t\t\tstr = str.toLowerCase();\r\n\t\t\tif (str == \"length\")\r\n\t\t\t\treturn spine.SpacingMode.Length;\r\n\t\t\tif (str == \"fixed\")\r\n\t\t\t\treturn spine.SpacingMode.Fixed;\r\n\t\t\tif (str == \"percent\")\r\n\t\t\t\treturn spine.SpacingMode.Percent;\r\n\t\t\tthrow new Error(\"Unknown position mode: \" + str);\r\n\t\t};\r\n\t\tSkeletonJson.rotateModeFromString = function (str) {\r\n\t\t\tstr = str.toLowerCase();\r\n\t\t\tif (str == \"tangent\")\r\n\t\t\t\treturn spine.RotateMode.Tangent;\r\n\t\t\tif (str == \"chain\")\r\n\t\t\t\treturn spine.RotateMode.Chain;\r\n\t\t\tif (str == \"chainscale\")\r\n\t\t\t\treturn spine.RotateMode.ChainScale;\r\n\t\t\tthrow new Error(\"Unknown rotate mode: \" + str);\r\n\t\t};\r\n\t\tSkeletonJson.transformModeFromString = function (str) {\r\n\t\t\tstr = str.toLowerCase();\r\n\t\t\tif (str == \"normal\")\r\n\t\t\t\treturn spine.TransformMode.Normal;\r\n\t\t\tif (str == \"onlytranslation\")\r\n\t\t\t\treturn spine.TransformMode.OnlyTranslation;\r\n\t\t\tif (str == \"norotationorreflection\")\r\n\t\t\t\treturn spine.TransformMode.NoRotationOrReflection;\r\n\t\t\tif (str == \"noscale\")\r\n\t\t\t\treturn spine.TransformMode.NoScale;\r\n\t\t\tif (str == \"noscaleorreflection\")\r\n\t\t\t\treturn spine.TransformMode.NoScaleOrReflection;\r\n\t\t\tthrow new Error(\"Unknown transform mode: \" + str);\r\n\t\t};\r\n\t\treturn SkeletonJson;\r\n\t}());\r\n\tspine.SkeletonJson = SkeletonJson;\r\n\tvar LinkedMesh = (function () {\r\n\t\tfunction LinkedMesh(mesh, skin, slotIndex, parent) {\r\n\t\t\tthis.mesh = mesh;\r\n\t\t\tthis.skin = skin;\r\n\t\t\tthis.slotIndex = slotIndex;\r\n\t\t\tthis.parent = parent;\r\n\t\t}\r\n\t\treturn LinkedMesh;\r\n\t}());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Skin = (function () {\r\n\t\tfunction Skin(name) {\r\n\t\t\tthis.attachments = new Array();\r\n\t\t\tif (name == null)\r\n\t\t\t\tthrow new Error(\"name cannot be null.\");\r\n\t\t\tthis.name = name;\r\n\t\t}\r\n\t\tSkin.prototype.addAttachment = function (slotIndex, name, attachment) {\r\n\t\t\tif (attachment == null)\r\n\t\t\t\tthrow new Error(\"attachment cannot be null.\");\r\n\t\t\tvar attachments = this.attachments;\r\n\t\t\tif (slotIndex >= attachments.length)\r\n\t\t\t\tattachments.length = slotIndex + 1;\r\n\t\t\tif (!attachments[slotIndex])\r\n\t\t\t\tattachments[slotIndex] = {};\r\n\t\t\tattachments[slotIndex][name] = attachment;\r\n\t\t};\r\n\t\tSkin.prototype.getAttachment = function (slotIndex, name) {\r\n\t\t\tvar dictionary = this.attachments[slotIndex];\r\n\t\t\treturn dictionary ? dictionary[name] : null;\r\n\t\t};\r\n\t\tSkin.prototype.attachAll = function (skeleton, oldSkin) {\r\n\t\t\tvar slotIndex = 0;\r\n\t\t\tfor (var i = 0; i < skeleton.slots.length; i++) {\r\n\t\t\t\tvar slot = skeleton.slots[i];\r\n\t\t\t\tvar slotAttachment = slot.getAttachment();\r\n\t\t\t\tif (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n\t\t\t\t\tvar dictionary = oldSkin.attachments[slotIndex];\r\n\t\t\t\t\tfor (var key in dictionary) {\r\n\t\t\t\t\t\tvar skinAttachment = dictionary[key];\r\n\t\t\t\t\t\tif (slotAttachment == skinAttachment) {\r\n\t\t\t\t\t\t\tvar attachment = this.getAttachment(slotIndex, key);\r\n\t\t\t\t\t\t\tif (attachment != null)\r\n\t\t\t\t\t\t\t\tslot.setAttachment(attachment);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tslotIndex++;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn Skin;\r\n\t}());\r\n\tspine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Slot = (function () {\r\n\t\tfunction Slot(data, bone) {\r\n\t\t\tthis.attachmentVertices = new Array();\r\n\t\t\tif (data == null)\r\n\t\t\t\tthrow new Error(\"data cannot be null.\");\r\n\t\t\tif (bone == null)\r\n\t\t\t\tthrow new Error(\"bone cannot be null.\");\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.bone = bone;\r\n\t\t\tthis.color = new spine.Color();\r\n\t\t\tthis.darkColor = data.darkColor == null ? null : new spine.Color();\r\n\t\t\tthis.setToSetupPose();\r\n\t\t}\r\n\t\tSlot.prototype.getAttachment = function () {\r\n\t\t\treturn this.attachment;\r\n\t\t};\r\n\t\tSlot.prototype.setAttachment = function (attachment) {\r\n\t\t\tif (this.attachment == attachment)\r\n\t\t\t\treturn;\r\n\t\t\tthis.attachment = attachment;\r\n\t\t\tthis.attachmentTime = this.bone.skeleton.time;\r\n\t\t\tthis.attachmentVertices.length = 0;\r\n\t\t};\r\n\t\tSlot.prototype.setAttachmentTime = function (time) {\r\n\t\t\tthis.attachmentTime = this.bone.skeleton.time - time;\r\n\t\t};\r\n\t\tSlot.prototype.getAttachmentTime = function () {\r\n\t\t\treturn this.bone.skeleton.time - this.attachmentTime;\r\n\t\t};\r\n\t\tSlot.prototype.setToSetupPose = function () {\r\n\t\t\tthis.color.setFromColor(this.data.color);\r\n\t\t\tif (this.darkColor != null)\r\n\t\t\t\tthis.darkColor.setFromColor(this.data.darkColor);\r\n\t\t\tif (this.data.attachmentName == null)\r\n\t\t\t\tthis.attachment = null;\r\n\t\t\telse {\r\n\t\t\t\tthis.attachment = null;\r\n\t\t\t\tthis.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn Slot;\r\n\t}());\r\n\tspine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar SlotData = (function () {\r\n\t\tfunction SlotData(index, name, boneData) {\r\n\t\t\tthis.color = new spine.Color(1, 1, 1, 1);\r\n\t\t\tif (index < 0)\r\n\t\t\t\tthrow new Error(\"index must be >= 0.\");\r\n\t\t\tif (name == null)\r\n\t\t\t\tthrow new Error(\"name cannot be null.\");\r\n\t\t\tif (boneData == null)\r\n\t\t\t\tthrow new Error(\"boneData cannot be null.\");\r\n\t\t\tthis.index = index;\r\n\t\t\tthis.name = name;\r\n\t\t\tthis.boneData = boneData;\r\n\t\t}\r\n\t\treturn SlotData;\r\n\t}());\r\n\tspine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Texture = (function () {\r\n\t\tfunction Texture(image) {\r\n\t\t\tthis._image = image;\r\n\t\t}\r\n\t\tTexture.prototype.getImage = function () {\r\n\t\t\treturn this._image;\r\n\t\t};\r\n\t\tTexture.filterFromString = function (text) {\r\n\t\t\tswitch (text.toLowerCase()) {\r\n\t\t\t\tcase \"nearest\": return TextureFilter.Nearest;\r\n\t\t\t\tcase \"linear\": return TextureFilter.Linear;\r\n\t\t\t\tcase \"mipmap\": return TextureFilter.MipMap;\r\n\t\t\t\tcase \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n\t\t\t\tcase \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n\t\t\t\tcase \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n\t\t\t\tcase \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n\t\t\t\tdefault: throw new Error(\"Unknown texture filter \" + text);\r\n\t\t\t}\r\n\t\t};\r\n\t\tTexture.wrapFromString = function (text) {\r\n\t\t\tswitch (text.toLowerCase()) {\r\n\t\t\t\tcase \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n\t\t\t\tcase \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n\t\t\t\tcase \"repeat\": return TextureWrap.Repeat;\r\n\t\t\t\tdefault: throw new Error(\"Unknown texture wrap \" + text);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn Texture;\r\n\t}());\r\n\tspine.Texture = Texture;\r\n\tvar TextureFilter;\r\n\t(function (TextureFilter) {\r\n\t\tTextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n\t\tTextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n\t\tTextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n\t\tTextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n\t\tTextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n\t\tTextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n\t\tTextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n\t})(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n\tvar TextureWrap;\r\n\t(function (TextureWrap) {\r\n\t\tTextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n\t\tTextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n\t\tTextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n\t})(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n\tvar TextureRegion = (function () {\r\n\t\tfunction TextureRegion() {\r\n\t\t\tthis.u = 0;\r\n\t\t\tthis.v = 0;\r\n\t\t\tthis.u2 = 0;\r\n\t\t\tthis.v2 = 0;\r\n\t\t\tthis.width = 0;\r\n\t\t\tthis.height = 0;\r\n\t\t\tthis.rotate = false;\r\n\t\t\tthis.offsetX = 0;\r\n\t\t\tthis.offsetY = 0;\r\n\t\t\tthis.originalWidth = 0;\r\n\t\t\tthis.originalHeight = 0;\r\n\t\t}\r\n\t\treturn TextureRegion;\r\n\t}());\r\n\tspine.TextureRegion = TextureRegion;\r\n\tvar FakeTexture = (function (_super) {\r\n\t\t__extends(FakeTexture, _super);\r\n\t\tfunction FakeTexture() {\r\n\t\t\treturn _super !== null && _super.apply(this, arguments) || this;\r\n\t\t}\r\n\t\tFakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n\t\tFakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n\t\tFakeTexture.prototype.dispose = function () { };\r\n\t\treturn FakeTexture;\r\n\t}(spine.Texture));\r\n\tspine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar TextureAtlas = (function () {\r\n\t\tfunction TextureAtlas(atlasText, textureLoader) {\r\n\t\t\tthis.pages = new Array();\r\n\t\t\tthis.regions = new Array();\r\n\t\t\tthis.load(atlasText, textureLoader);\r\n\t\t}\r\n\t\tTextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n\t\t\tif (textureLoader == null)\r\n\t\t\t\tthrow new Error(\"textureLoader cannot be null.\");\r\n\t\t\tvar reader = new TextureAtlasReader(atlasText);\r\n\t\t\tvar tuple = new Array(4);\r\n\t\t\tvar page = null;\r\n\t\t\twhile (true) {\r\n\t\t\t\tvar line = reader.readLine();\r\n\t\t\t\tif (line == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tline = line.trim();\r\n\t\t\t\tif (line.length == 0)\r\n\t\t\t\t\tpage = null;\r\n\t\t\t\telse if (!page) {\r\n\t\t\t\t\tpage = new TextureAtlasPage();\r\n\t\t\t\t\tpage.name = line;\r\n\t\t\t\t\tif (reader.readTuple(tuple) == 2) {\r\n\t\t\t\t\t\tpage.width = parseInt(tuple[0]);\r\n\t\t\t\t\t\tpage.height = parseInt(tuple[1]);\r\n\t\t\t\t\t\treader.readTuple(tuple);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treader.readTuple(tuple);\r\n\t\t\t\t\tpage.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n\t\t\t\t\tpage.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n\t\t\t\t\tvar direction = reader.readValue();\r\n\t\t\t\t\tpage.uWrap = spine.TextureWrap.ClampToEdge;\r\n\t\t\t\t\tpage.vWrap = spine.TextureWrap.ClampToEdge;\r\n\t\t\t\t\tif (direction == \"x\")\r\n\t\t\t\t\t\tpage.uWrap = spine.TextureWrap.Repeat;\r\n\t\t\t\t\telse if (direction == \"y\")\r\n\t\t\t\t\t\tpage.vWrap = spine.TextureWrap.Repeat;\r\n\t\t\t\t\telse if (direction == \"xy\")\r\n\t\t\t\t\t\tpage.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n\t\t\t\t\tpage.texture = textureLoader(line);\r\n\t\t\t\t\tpage.texture.setFilters(page.minFilter, page.magFilter);\r\n\t\t\t\t\tpage.texture.setWraps(page.uWrap, page.vWrap);\r\n\t\t\t\t\tpage.width = page.texture.getImage().width;\r\n\t\t\t\t\tpage.height = page.texture.getImage().height;\r\n\t\t\t\t\tthis.pages.push(page);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tvar region = new TextureAtlasRegion();\r\n\t\t\t\t\tregion.name = line;\r\n\t\t\t\t\tregion.page = page;\r\n\t\t\t\t\tregion.rotate = reader.readValue() == \"true\";\r\n\t\t\t\t\treader.readTuple(tuple);\r\n\t\t\t\t\tvar x = parseInt(tuple[0]);\r\n\t\t\t\t\tvar y = parseInt(tuple[1]);\r\n\t\t\t\t\treader.readTuple(tuple);\r\n\t\t\t\t\tvar width = parseInt(tuple[0]);\r\n\t\t\t\t\tvar height = parseInt(tuple[1]);\r\n\t\t\t\t\tregion.u = x / page.width;\r\n\t\t\t\t\tregion.v = y / page.height;\r\n\t\t\t\t\tif (region.rotate) {\r\n\t\t\t\t\t\tregion.u2 = (x + height) / page.width;\r\n\t\t\t\t\t\tregion.v2 = (y + width) / page.height;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tregion.u2 = (x + width) / page.width;\r\n\t\t\t\t\t\tregion.v2 = (y + height) / page.height;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tregion.x = x;\r\n\t\t\t\t\tregion.y = y;\r\n\t\t\t\t\tregion.width = Math.abs(width);\r\n\t\t\t\t\tregion.height = Math.abs(height);\r\n\t\t\t\t\tif (reader.readTuple(tuple) == 4) {\r\n\t\t\t\t\t\tif (reader.readTuple(tuple) == 4) {\r\n\t\t\t\t\t\t\treader.readTuple(tuple);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tregion.originalWidth = parseInt(tuple[0]);\r\n\t\t\t\t\tregion.originalHeight = parseInt(tuple[1]);\r\n\t\t\t\t\treader.readTuple(tuple);\r\n\t\t\t\t\tregion.offsetX = parseInt(tuple[0]);\r\n\t\t\t\t\tregion.offsetY = parseInt(tuple[1]);\r\n\t\t\t\t\tregion.index = parseInt(reader.readValue());\r\n\t\t\t\t\tregion.texture = page.texture;\r\n\t\t\t\t\tthis.regions.push(region);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tTextureAtlas.prototype.findRegion = function (name) {\r\n\t\t\tfor (var i = 0; i < this.regions.length; i++) {\r\n\t\t\t\tif (this.regions[i].name == name) {\r\n\t\t\t\t\treturn this.regions[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t};\r\n\t\tTextureAtlas.prototype.dispose = function () {\r\n\t\t\tfor (var i = 0; i < this.pages.length; i++) {\r\n\t\t\t\tthis.pages[i].texture.dispose();\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn TextureAtlas;\r\n\t}());\r\n\tspine.TextureAtlas = TextureAtlas;\r\n\tvar TextureAtlasReader = (function () {\r\n\t\tfunction TextureAtlasReader(text) {\r\n\t\t\tthis.index = 0;\r\n\t\t\tthis.lines = text.split(/\\r\\n|\\r|\\n/);\r\n\t\t}\r\n\t\tTextureAtlasReader.prototype.readLine = function () {\r\n\t\t\tif (this.index >= this.lines.length)\r\n\t\t\t\treturn null;\r\n\t\t\treturn this.lines[this.index++];\r\n\t\t};\r\n\t\tTextureAtlasReader.prototype.readValue = function () {\r\n\t\t\tvar line = this.readLine();\r\n\t\t\tvar colon = line.indexOf(\":\");\r\n\t\t\tif (colon == -1)\r\n\t\t\t\tthrow new Error(\"Invalid line: \" + line);\r\n\t\t\treturn line.substring(colon + 1).trim();\r\n\t\t};\r\n\t\tTextureAtlasReader.prototype.readTuple = function (tuple) {\r\n\t\t\tvar line = this.readLine();\r\n\t\t\tvar colon = line.indexOf(\":\");\r\n\t\t\tif (colon == -1)\r\n\t\t\t\tthrow new Error(\"Invalid line: \" + line);\r\n\t\t\tvar i = 0, lastMatch = colon + 1;\r\n\t\t\tfor (; i < 3; i++) {\r\n\t\t\t\tvar comma = line.indexOf(\",\", lastMatch);\r\n\t\t\t\tif (comma == -1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\ttuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n\t\t\t\tlastMatch = comma + 1;\r\n\t\t\t}\r\n\t\t\ttuple[i] = line.substring(lastMatch).trim();\r\n\t\t\treturn i + 1;\r\n\t\t};\r\n\t\treturn TextureAtlasReader;\r\n\t}());\r\n\tvar TextureAtlasPage = (function () {\r\n\t\tfunction TextureAtlasPage() {\r\n\t\t}\r\n\t\treturn TextureAtlasPage;\r\n\t}());\r\n\tspine.TextureAtlasPage = TextureAtlasPage;\r\n\tvar TextureAtlasRegion = (function (_super) {\r\n\t\t__extends(TextureAtlasRegion, _super);\r\n\t\tfunction TextureAtlasRegion() {\r\n\t\t\treturn _super !== null && _super.apply(this, arguments) || this;\r\n\t\t}\r\n\t\treturn TextureAtlasRegion;\r\n\t}(spine.TextureRegion));\r\n\tspine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar TransformConstraint = (function () {\r\n\t\tfunction TransformConstraint(data, skeleton) {\r\n\t\t\tthis.rotateMix = 0;\r\n\t\t\tthis.translateMix = 0;\r\n\t\t\tthis.scaleMix = 0;\r\n\t\t\tthis.shearMix = 0;\r\n\t\t\tthis.temp = new spine.Vector2();\r\n\t\t\tif (data == null)\r\n\t\t\t\tthrow new Error(\"data cannot be null.\");\r\n\t\t\tif (skeleton == null)\r\n\t\t\t\tthrow new Error(\"skeleton cannot be null.\");\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.rotateMix = data.rotateMix;\r\n\t\t\tthis.translateMix = data.translateMix;\r\n\t\t\tthis.scaleMix = data.scaleMix;\r\n\t\t\tthis.shearMix = data.shearMix;\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tfor (var i = 0; i < data.bones.length; i++)\r\n\t\t\t\tthis.bones.push(skeleton.findBone(data.bones[i].name));\r\n\t\t\tthis.target = skeleton.findBone(data.target.name);\r\n\t\t}\r\n\t\tTransformConstraint.prototype.apply = function () {\r\n\t\t\tthis.update();\r\n\t\t};\r\n\t\tTransformConstraint.prototype.update = function () {\r\n\t\t\tif (this.data.local) {\r\n\t\t\t\tif (this.data.relative)\r\n\t\t\t\t\tthis.applyRelativeLocal();\r\n\t\t\t\telse\r\n\t\t\t\t\tthis.applyAbsoluteLocal();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (this.data.relative)\r\n\t\t\t\t\tthis.applyRelativeWorld();\r\n\t\t\t\telse\r\n\t\t\t\t\tthis.applyAbsoluteWorld();\r\n\t\t\t}\r\n\t\t};\r\n\t\tTransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n\t\t\tvar rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n\t\t\tvar target = this.target;\r\n\t\t\tvar ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n\t\t\tvar degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n\t\t\tvar offsetRotation = this.data.offsetRotation * degRadReflect;\r\n\t\t\tvar offsetShearY = this.data.offsetShearY * degRadReflect;\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tvar modified = false;\r\n\t\t\t\tif (rotateMix != 0) {\r\n\t\t\t\t\tvar a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n\t\t\t\t\tvar r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n\t\t\t\t\tif (r > spine.MathUtils.PI)\r\n\t\t\t\t\t\tr -= spine.MathUtils.PI2;\r\n\t\t\t\t\telse if (r < -spine.MathUtils.PI)\r\n\t\t\t\t\t\tr += spine.MathUtils.PI2;\r\n\t\t\t\t\tr *= rotateMix;\r\n\t\t\t\t\tvar cos = Math.cos(r), sin = Math.sin(r);\r\n\t\t\t\t\tbone.a = cos * a - sin * c;\r\n\t\t\t\t\tbone.b = cos * b - sin * d;\r\n\t\t\t\t\tbone.c = sin * a + cos * c;\r\n\t\t\t\t\tbone.d = sin * b + cos * d;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (translateMix != 0) {\r\n\t\t\t\t\tvar temp = this.temp;\r\n\t\t\t\t\ttarget.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n\t\t\t\t\tbone.worldX += (temp.x - bone.worldX) * translateMix;\r\n\t\t\t\t\tbone.worldY += (temp.y - bone.worldY) * translateMix;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (scaleMix > 0) {\r\n\t\t\t\t\tvar s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n\t\t\t\t\tvar ts = Math.sqrt(ta * ta + tc * tc);\r\n\t\t\t\t\tif (s > 0.00001)\r\n\t\t\t\t\t\ts = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n\t\t\t\t\tbone.a *= s;\r\n\t\t\t\t\tbone.c *= s;\r\n\t\t\t\t\ts = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n\t\t\t\t\tts = Math.sqrt(tb * tb + td * td);\r\n\t\t\t\t\tif (s > 0.00001)\r\n\t\t\t\t\t\ts = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n\t\t\t\t\tbone.b *= s;\r\n\t\t\t\t\tbone.d *= s;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (shearMix > 0) {\r\n\t\t\t\t\tvar b = bone.b, d = bone.d;\r\n\t\t\t\t\tvar by = Math.atan2(d, b);\r\n\t\t\t\t\tvar r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n\t\t\t\t\tif (r > spine.MathUtils.PI)\r\n\t\t\t\t\t\tr -= spine.MathUtils.PI2;\r\n\t\t\t\t\telse if (r < -spine.MathUtils.PI)\r\n\t\t\t\t\t\tr += spine.MathUtils.PI2;\r\n\t\t\t\t\tr = by + (r + offsetShearY) * shearMix;\r\n\t\t\t\t\tvar s = Math.sqrt(b * b + d * d);\r\n\t\t\t\t\tbone.b = Math.cos(r) * s;\r\n\t\t\t\t\tbone.d = Math.sin(r) * s;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (modified)\r\n\t\t\t\t\tbone.appliedValid = false;\r\n\t\t\t}\r\n\t\t};\r\n\t\tTransformConstraint.prototype.applyRelativeWorld = function () {\r\n\t\t\tvar rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n\t\t\tvar target = this.target;\r\n\t\t\tvar ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n\t\t\tvar degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n\t\t\tvar offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tvar modified = false;\r\n\t\t\t\tif (rotateMix != 0) {\r\n\t\t\t\t\tvar a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n\t\t\t\t\tvar r = Math.atan2(tc, ta) + offsetRotation;\r\n\t\t\t\t\tif (r > spine.MathUtils.PI)\r\n\t\t\t\t\t\tr -= spine.MathUtils.PI2;\r\n\t\t\t\t\telse if (r < -spine.MathUtils.PI)\r\n\t\t\t\t\t\tr += spine.MathUtils.PI2;\r\n\t\t\t\t\tr *= rotateMix;\r\n\t\t\t\t\tvar cos = Math.cos(r), sin = Math.sin(r);\r\n\t\t\t\t\tbone.a = cos * a - sin * c;\r\n\t\t\t\t\tbone.b = cos * b - sin * d;\r\n\t\t\t\t\tbone.c = sin * a + cos * c;\r\n\t\t\t\t\tbone.d = sin * b + cos * d;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (translateMix != 0) {\r\n\t\t\t\t\tvar temp = this.temp;\r\n\t\t\t\t\ttarget.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n\t\t\t\t\tbone.worldX += temp.x * translateMix;\r\n\t\t\t\t\tbone.worldY += temp.y * translateMix;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (scaleMix > 0) {\r\n\t\t\t\t\tvar s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n\t\t\t\t\tbone.a *= s;\r\n\t\t\t\t\tbone.c *= s;\r\n\t\t\t\t\ts = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n\t\t\t\t\tbone.b *= s;\r\n\t\t\t\t\tbone.d *= s;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (shearMix > 0) {\r\n\t\t\t\t\tvar r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n\t\t\t\t\tif (r > spine.MathUtils.PI)\r\n\t\t\t\t\t\tr -= spine.MathUtils.PI2;\r\n\t\t\t\t\telse if (r < -spine.MathUtils.PI)\r\n\t\t\t\t\t\tr += spine.MathUtils.PI2;\r\n\t\t\t\t\tvar b = bone.b, d = bone.d;\r\n\t\t\t\t\tr = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n\t\t\t\t\tvar s = Math.sqrt(b * b + d * d);\r\n\t\t\t\t\tbone.b = Math.cos(r) * s;\r\n\t\t\t\t\tbone.d = Math.sin(r) * s;\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (modified)\r\n\t\t\t\t\tbone.appliedValid = false;\r\n\t\t\t}\r\n\t\t};\r\n\t\tTransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n\t\t\tvar rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n\t\t\tvar target = this.target;\r\n\t\t\tif (!target.appliedValid)\r\n\t\t\t\ttarget.updateAppliedTransform();\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tif (!bone.appliedValid)\r\n\t\t\t\t\tbone.updateAppliedTransform();\r\n\t\t\t\tvar rotation = bone.arotation;\r\n\t\t\t\tif (rotateMix != 0) {\r\n\t\t\t\t\tvar r = target.arotation - rotation + this.data.offsetRotation;\r\n\t\t\t\t\tr -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n\t\t\t\t\trotation += r * rotateMix;\r\n\t\t\t\t}\r\n\t\t\t\tvar x = bone.ax, y = bone.ay;\r\n\t\t\t\tif (translateMix != 0) {\r\n\t\t\t\t\tx += (target.ax - x + this.data.offsetX) * translateMix;\r\n\t\t\t\t\ty += (target.ay - y + this.data.offsetY) * translateMix;\r\n\t\t\t\t}\r\n\t\t\t\tvar scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n\t\t\t\tif (scaleMix > 0) {\r\n\t\t\t\t\tif (scaleX > 0.00001)\r\n\t\t\t\t\t\tscaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n\t\t\t\t\tif (scaleY > 0.00001)\r\n\t\t\t\t\t\tscaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n\t\t\t\t}\r\n\t\t\t\tvar shearY = bone.ashearY;\r\n\t\t\t\tif (shearMix > 0) {\r\n\t\t\t\t\tvar r = target.ashearY - shearY + this.data.offsetShearY;\r\n\t\t\t\t\tr -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n\t\t\t\t\tbone.shearY += r * shearMix;\r\n\t\t\t\t}\r\n\t\t\t\tbone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n\t\t\t}\r\n\t\t};\r\n\t\tTransformConstraint.prototype.applyRelativeLocal = function () {\r\n\t\t\tvar rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n\t\t\tvar target = this.target;\r\n\t\t\tif (!target.appliedValid)\r\n\t\t\t\ttarget.updateAppliedTransform();\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tfor (var i = 0, n = bones.length; i < n; i++) {\r\n\t\t\t\tvar bone = bones[i];\r\n\t\t\t\tif (!bone.appliedValid)\r\n\t\t\t\t\tbone.updateAppliedTransform();\r\n\t\t\t\tvar rotation = bone.arotation;\r\n\t\t\t\tif (rotateMix != 0)\r\n\t\t\t\t\trotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n\t\t\t\tvar x = bone.ax, y = bone.ay;\r\n\t\t\t\tif (translateMix != 0) {\r\n\t\t\t\t\tx += (target.ax + this.data.offsetX) * translateMix;\r\n\t\t\t\t\ty += (target.ay + this.data.offsetY) * translateMix;\r\n\t\t\t\t}\r\n\t\t\t\tvar scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n\t\t\t\tif (scaleMix > 0) {\r\n\t\t\t\t\tif (scaleX > 0.00001)\r\n\t\t\t\t\t\tscaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n\t\t\t\t\tif (scaleY > 0.00001)\r\n\t\t\t\t\t\tscaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n\t\t\t\t}\r\n\t\t\t\tvar shearY = bone.ashearY;\r\n\t\t\t\tif (shearMix > 0)\r\n\t\t\t\t\tshearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n\t\t\t\tbone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n\t\t\t}\r\n\t\t};\r\n\t\tTransformConstraint.prototype.getOrder = function () {\r\n\t\t\treturn this.data.order;\r\n\t\t};\r\n\t\treturn TransformConstraint;\r\n\t}());\r\n\tspine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar TransformConstraintData = (function () {\r\n\t\tfunction TransformConstraintData(name) {\r\n\t\t\tthis.order = 0;\r\n\t\t\tthis.bones = new Array();\r\n\t\t\tthis.rotateMix = 0;\r\n\t\t\tthis.translateMix = 0;\r\n\t\t\tthis.scaleMix = 0;\r\n\t\t\tthis.shearMix = 0;\r\n\t\t\tthis.offsetRotation = 0;\r\n\t\t\tthis.offsetX = 0;\r\n\t\t\tthis.offsetY = 0;\r\n\t\t\tthis.offsetScaleX = 0;\r\n\t\t\tthis.offsetScaleY = 0;\r\n\t\t\tthis.offsetShearY = 0;\r\n\t\t\tthis.relative = false;\r\n\t\t\tthis.local = false;\r\n\t\t\tif (name == null)\r\n\t\t\t\tthrow new Error(\"name cannot be null.\");\r\n\t\t\tthis.name = name;\r\n\t\t}\r\n\t\treturn TransformConstraintData;\r\n\t}());\r\n\tspine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar Triangulator = (function () {\r\n\t\tfunction Triangulator() {\r\n\t\t\tthis.convexPolygons = new Array();\r\n\t\t\tthis.convexPolygonsIndices = new Array();\r\n\t\t\tthis.indicesArray = new Array();\r\n\t\t\tthis.isConcaveArray = new Array();\r\n\t\t\tthis.triangles = new Array();\r\n\t\t\tthis.polygonPool = new spine.Pool(function () {\r\n\t\t\t\treturn new Array();\r\n\t\t\t});\r\n\t\t\tthis.polygonIndicesPool = new spine.Pool(function () {\r\n\t\t\t\treturn new Array();\r\n\t\t\t});\r\n\t\t}\r\n\t\tTriangulator.prototype.triangulate = function (verticesArray) {\r\n\t\t\tvar vertices = verticesArray;\r\n\t\t\tvar vertexCount = verticesArray.length >> 1;\r\n\t\t\tvar indices = this.indicesArray;\r\n\t\t\tindices.length = 0;\r\n\t\t\tfor (var i = 0; i < vertexCount; i++)\r\n\t\t\t\tindices[i] = i;\r\n\t\t\tvar isConcave = this.isConcaveArray;\r\n\t\t\tisConcave.length = 0;\r\n\t\t\tfor (var i = 0, n = vertexCount; i < n; ++i)\r\n\t\t\t\tisConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n\t\t\tvar triangles = this.triangles;\r\n\t\t\ttriangles.length = 0;\r\n\t\t\twhile (vertexCount > 3) {\r\n\t\t\t\tvar previous = vertexCount - 1, i = 0, next = 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\touter: if (!isConcave[i]) {\r\n\t\t\t\t\t\tvar p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n\t\t\t\t\t\tvar p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n\t\t\t\t\t\tvar p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n\t\t\t\t\t\tvar p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n\t\t\t\t\t\tfor (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n\t\t\t\t\t\t\tif (!isConcave[ii])\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tvar v = indices[ii] << 1;\r\n\t\t\t\t\t\t\tvar vx = vertices[v], vy = vertices[v + 1];\r\n\t\t\t\t\t\t\tif (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n\t\t\t\t\t\t\t\t\tif (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n\t\t\t\t\t\t\t\t\t\tbreak outer;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (next == 0) {\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\tif (!isConcave[i])\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\ti--;\r\n\t\t\t\t\t\t} while (i > 0);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprevious = i;\r\n\t\t\t\t\ti = next;\r\n\t\t\t\t\tnext = (next + 1) % vertexCount;\r\n\t\t\t\t}\r\n\t\t\t\ttriangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n\t\t\t\ttriangles.push(indices[i]);\r\n\t\t\t\ttriangles.push(indices[(i + 1) % vertexCount]);\r\n\t\t\t\tindices.splice(i, 1);\r\n\t\t\t\tisConcave.splice(i, 1);\r\n\t\t\t\tvertexCount--;\r\n\t\t\t\tvar previousIndex = (vertexCount + i - 1) % vertexCount;\r\n\t\t\t\tvar nextIndex = i == vertexCount ? 0 : i;\r\n\t\t\t\tisConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n\t\t\t\tisConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n\t\t\t}\r\n\t\t\tif (vertexCount == 3) {\r\n\t\t\t\ttriangles.push(indices[2]);\r\n\t\t\t\ttriangles.push(indices[0]);\r\n\t\t\t\ttriangles.push(indices[1]);\r\n\t\t\t}\r\n\t\t\treturn triangles;\r\n\t\t};\r\n\t\tTriangulator.prototype.decompose = function (verticesArray, triangles) {\r\n\t\t\tvar vertices = verticesArray;\r\n\t\t\tvar convexPolygons = this.convexPolygons;\r\n\t\t\tthis.polygonPool.freeAll(convexPolygons);\r\n\t\t\tconvexPolygons.length = 0;\r\n\t\t\tvar convexPolygonsIndices = this.convexPolygonsIndices;\r\n\t\t\tthis.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n\t\t\tconvexPolygonsIndices.length = 0;\r\n\t\t\tvar polygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\tpolygonIndices.length = 0;\r\n\t\t\tvar polygon = this.polygonPool.obtain();\r\n\t\t\tpolygon.length = 0;\r\n\t\t\tvar fanBaseIndex = -1, lastWinding = 0;\r\n\t\t\tfor (var i = 0, n = triangles.length; i < n; i += 3) {\r\n\t\t\t\tvar t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n\t\t\t\tvar x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n\t\t\t\tvar x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n\t\t\t\tvar x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n\t\t\t\tvar merged = false;\r\n\t\t\t\tif (fanBaseIndex == t1) {\r\n\t\t\t\t\tvar o = polygon.length - 4;\r\n\t\t\t\t\tvar winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n\t\t\t\t\tvar winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n\t\t\t\t\tif (winding1 == lastWinding && winding2 == lastWinding) {\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\t\tmerged = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!merged) {\r\n\t\t\t\t\tif (polygon.length > 0) {\r\n\t\t\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.polygonPool.free(polygon);\r\n\t\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpolygon = this.polygonPool.obtain();\r\n\t\t\t\t\tpolygon.length = 0;\r\n\t\t\t\t\tpolygon.push(x1);\r\n\t\t\t\t\tpolygon.push(y1);\r\n\t\t\t\t\tpolygon.push(x2);\r\n\t\t\t\t\tpolygon.push(y2);\r\n\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\tpolygonIndices = this.polygonIndicesPool.obtain();\r\n\t\t\t\t\tpolygonIndices.length = 0;\r\n\t\t\t\t\tpolygonIndices.push(t1);\r\n\t\t\t\t\tpolygonIndices.push(t2);\r\n\t\t\t\t\tpolygonIndices.push(t3);\r\n\t\t\t\t\tlastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n\t\t\t\t\tfanBaseIndex = t1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (polygon.length > 0) {\r\n\t\t\t\tconvexPolygons.push(polygon);\r\n\t\t\t\tconvexPolygonsIndices.push(polygonIndices);\r\n\t\t\t}\r\n\t\t\tfor (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n\t\t\t\tpolygonIndices = convexPolygonsIndices[i];\r\n\t\t\t\tif (polygonIndices.length == 0)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tvar firstIndex = polygonIndices[0];\r\n\t\t\t\tvar lastIndex = polygonIndices[polygonIndices.length - 1];\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tvar o = polygon.length - 4;\r\n\t\t\t\tvar prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n\t\t\t\tvar prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n\t\t\t\tvar firstX = polygon[0], firstY = polygon[1];\r\n\t\t\t\tvar secondX = polygon[2], secondY = polygon[3];\r\n\t\t\t\tvar winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n\t\t\t\tfor (var ii = 0; ii < n; ii++) {\r\n\t\t\t\t\tif (ii == i)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tvar otherIndices = convexPolygonsIndices[ii];\r\n\t\t\t\t\tif (otherIndices.length != 3)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tvar otherFirstIndex = otherIndices[0];\r\n\t\t\t\t\tvar otherSecondIndex = otherIndices[1];\r\n\t\t\t\t\tvar otherLastIndex = otherIndices[2];\r\n\t\t\t\t\tvar otherPoly = convexPolygons[ii];\r\n\t\t\t\t\tvar x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n\t\t\t\t\tif (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tvar winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n\t\t\t\t\tvar winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n\t\t\t\t\tif (winding1 == winding && winding2 == winding) {\r\n\t\t\t\t\t\totherPoly.length = 0;\r\n\t\t\t\t\t\totherIndices.length = 0;\r\n\t\t\t\t\t\tpolygon.push(x3);\r\n\t\t\t\t\t\tpolygon.push(y3);\r\n\t\t\t\t\t\tpolygonIndices.push(otherLastIndex);\r\n\t\t\t\t\t\tprevPrevX = prevX;\r\n\t\t\t\t\t\tprevPrevY = prevY;\r\n\t\t\t\t\t\tprevX = x3;\r\n\t\t\t\t\t\tprevY = y3;\r\n\t\t\t\t\t\tii = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n\t\t\t\tpolygon = convexPolygons[i];\r\n\t\t\t\tif (polygon.length == 0) {\r\n\t\t\t\t\tconvexPolygons.splice(i, 1);\r\n\t\t\t\t\tthis.polygonPool.free(polygon);\r\n\t\t\t\t\tpolygonIndices = convexPolygonsIndices[i];\r\n\t\t\t\t\tconvexPolygonsIndices.splice(i, 1);\r\n\t\t\t\t\tthis.polygonIndicesPool.free(polygonIndices);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn convexPolygons;\r\n\t\t};\r\n\t\tTriangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n\t\t\tvar previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n\t\t\tvar current = indices[index] << 1;\r\n\t\t\tvar next = indices[(index + 1) % vertexCount] << 1;\r\n\t\t\treturn !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n\t\t};\r\n\t\tTriangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n\t\t\treturn p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n\t\t};\r\n\t\tTriangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n\t\t\tvar px = p2x - p1x, py = p2y - p1y;\r\n\t\t\treturn p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n\t\t};\r\n\t\treturn Triangulator;\r\n\t}());\r\n\tspine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar IntSet = (function () {\r\n\t\tfunction IntSet() {\r\n\t\t\tthis.array = new Array();\r\n\t\t}\r\n\t\tIntSet.prototype.add = function (value) {\r\n\t\t\tvar contains = this.contains(value);\r\n\t\t\tthis.array[value | 0] = value | 0;\r\n\t\t\treturn !contains;\r\n\t\t};\r\n\t\tIntSet.prototype.contains = function (value) {\r\n\t\t\treturn this.array[value | 0] != undefined;\r\n\t\t};\r\n\t\tIntSet.prototype.remove = function (value) {\r\n\t\t\tthis.array[value | 0] = undefined;\r\n\t\t};\r\n\t\tIntSet.prototype.clear = function () {\r\n\t\t\tthis.array.length = 0;\r\n\t\t};\r\n\t\treturn IntSet;\r\n\t}());\r\n\tspine.IntSet = IntSet;\r\n\tvar Color = (function () {\r\n\t\tfunction Color(r, g, b, a) {\r\n\t\t\tif (r === void 0) { r = 0; }\r\n\t\t\tif (g === void 0) { g = 0; }\r\n\t\t\tif (b === void 0) { b = 0; }\r\n\t\t\tif (a === void 0) { a = 0; }\r\n\t\t\tthis.r = r;\r\n\t\t\tthis.g = g;\r\n\t\t\tthis.b = b;\r\n\t\t\tthis.a = a;\r\n\t\t}\r\n\t\tColor.prototype.set = function (r, g, b, a) {\r\n\t\t\tthis.r = r;\r\n\t\t\tthis.g = g;\r\n\t\t\tthis.b = b;\r\n\t\t\tthis.a = a;\r\n\t\t\tthis.clamp();\r\n\t\t\treturn this;\r\n\t\t};\r\n\t\tColor.prototype.setFromColor = function (c) {\r\n\t\t\tthis.r = c.r;\r\n\t\t\tthis.g = c.g;\r\n\t\t\tthis.b = c.b;\r\n\t\t\tthis.a = c.a;\r\n\t\t\treturn this;\r\n\t\t};\r\n\t\tColor.prototype.setFromString = function (hex) {\r\n\t\t\thex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n\t\t\tthis.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n\t\t\tthis.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n\t\t\tthis.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n\t\t\tthis.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n\t\t\treturn this;\r\n\t\t};\r\n\t\tColor.prototype.add = function (r, g, b, a) {\r\n\t\t\tthis.r += r;\r\n\t\t\tthis.g += g;\r\n\t\t\tthis.b += b;\r\n\t\t\tthis.a += a;\r\n\t\t\tthis.clamp();\r\n\t\t\treturn this;\r\n\t\t};\r\n\t\tColor.prototype.clamp = function () {\r\n\t\t\tif (this.r < 0)\r\n\t\t\t\tthis.r = 0;\r\n\t\t\telse if (this.r > 1)\r\n\t\t\t\tthis.r = 1;\r\n\t\t\tif (this.g < 0)\r\n\t\t\t\tthis.g = 0;\r\n\t\t\telse if (this.g > 1)\r\n\t\t\t\tthis.g = 1;\r\n\t\t\tif (this.b < 0)\r\n\t\t\t\tthis.b = 0;\r\n\t\t\telse if (this.b > 1)\r\n\t\t\t\tthis.b = 1;\r\n\t\t\tif (this.a < 0)\r\n\t\t\t\tthis.a = 0;\r\n\t\t\telse if (this.a > 1)\r\n\t\t\t\tthis.a = 1;\r\n\t\t\treturn this;\r\n\t\t};\r\n\t\tColor.WHITE = new Color(1, 1, 1, 1);\r\n\t\tColor.RED = new Color(1, 0, 0, 1);\r\n\t\tColor.GREEN = new Color(0, 1, 0, 1);\r\n\t\tColor.BLUE = new Color(0, 0, 1, 1);\r\n\t\tColor.MAGENTA = new Color(1, 0, 1, 1);\r\n\t\treturn Color;\r\n\t}());\r\n\tspine.Color = Color;\r\n\tvar MathUtils = (function () {\r\n\t\tfunction MathUtils() {\r\n\t\t}\r\n\t\tMathUtils.clamp = function (value, min, max) {\r\n\t\t\tif (value < min)\r\n\t\t\t\treturn min;\r\n\t\t\tif (value > max)\r\n\t\t\t\treturn max;\r\n\t\t\treturn value;\r\n\t\t};\r\n\t\tMathUtils.cosDeg = function (degrees) {\r\n\t\t\treturn Math.cos(degrees * MathUtils.degRad);\r\n\t\t};\r\n\t\tMathUtils.sinDeg = function (degrees) {\r\n\t\t\treturn Math.sin(degrees * MathUtils.degRad);\r\n\t\t};\r\n\t\tMathUtils.signum = function (value) {\r\n\t\t\treturn value > 0 ? 1 : value < 0 ? -1 : 0;\r\n\t\t};\r\n\t\tMathUtils.toInt = function (x) {\r\n\t\t\treturn x > 0 ? Math.floor(x) : Math.ceil(x);\r\n\t\t};\r\n\t\tMathUtils.cbrt = function (x) {\r\n\t\t\tvar y = Math.pow(Math.abs(x), 1 / 3);\r\n\t\t\treturn x < 0 ? -y : y;\r\n\t\t};\r\n\t\tMathUtils.randomTriangular = function (min, max) {\r\n\t\t\treturn MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n\t\t};\r\n\t\tMathUtils.randomTriangularWith = function (min, max, mode) {\r\n\t\t\tvar u = Math.random();\r\n\t\t\tvar d = max - min;\r\n\t\t\tif (u <= (mode - min) / d)\r\n\t\t\t\treturn min + Math.sqrt(u * d * (mode - min));\r\n\t\t\treturn max - Math.sqrt((1 - u) * d * (max - mode));\r\n\t\t};\r\n\t\tMathUtils.PI = 3.1415927;\r\n\t\tMathUtils.PI2 = MathUtils.PI * 2;\r\n\t\tMathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n\t\tMathUtils.radDeg = MathUtils.radiansToDegrees;\r\n\t\tMathUtils.degreesToRadians = MathUtils.PI / 180;\r\n\t\tMathUtils.degRad = MathUtils.degreesToRadians;\r\n\t\treturn MathUtils;\r\n\t}());\r\n\tspine.MathUtils = MathUtils;\r\n\tvar Interpolation = (function () {\r\n\t\tfunction Interpolation() {\r\n\t\t}\r\n\t\tInterpolation.prototype.apply = function (start, end, a) {\r\n\t\t\treturn start + (end - start) * this.applyInternal(a);\r\n\t\t};\r\n\t\treturn Interpolation;\r\n\t}());\r\n\tspine.Interpolation = Interpolation;\r\n\tvar Pow = (function (_super) {\r\n\t\t__extends(Pow, _super);\r\n\t\tfunction Pow(power) {\r\n\t\t\tvar _this = _super.call(this) || this;\r\n\t\t\t_this.power = 2;\r\n\t\t\t_this.power = power;\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tPow.prototype.applyInternal = function (a) {\r\n\t\t\tif (a <= 0.5)\r\n\t\t\t\treturn Math.pow(a * 2, this.power) / 2;\r\n\t\t\treturn Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n\t\t};\r\n\t\treturn Pow;\r\n\t}(Interpolation));\r\n\tspine.Pow = Pow;\r\n\tvar PowOut = (function (_super) {\r\n\t\t__extends(PowOut, _super);\r\n\t\tfunction PowOut(power) {\r\n\t\t\treturn _super.call(this, power) || this;\r\n\t\t}\r\n\t\tPowOut.prototype.applyInternal = function (a) {\r\n\t\t\treturn Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n\t\t};\r\n\t\treturn PowOut;\r\n\t}(Pow));\r\n\tspine.PowOut = PowOut;\r\n\tvar Utils = (function () {\r\n\t\tfunction Utils() {\r\n\t\t}\r\n\t\tUtils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n\t\t\tfor (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n\t\t\t\tdest[j] = source[i];\r\n\t\t\t}\r\n\t\t};\r\n\t\tUtils.setArraySize = function (array, size, value) {\r\n\t\t\tif (value === void 0) { value = 0; }\r\n\t\t\tvar oldSize = array.length;\r\n\t\t\tif (oldSize == size)\r\n\t\t\t\treturn array;\r\n\t\t\tarray.length = size;\r\n\t\t\tif (oldSize < size) {\r\n\t\t\t\tfor (var i = oldSize; i < size; i++)\r\n\t\t\t\t\tarray[i] = value;\r\n\t\t\t}\r\n\t\t\treturn array;\r\n\t\t};\r\n\t\tUtils.ensureArrayCapacity = function (array, size, value) {\r\n\t\t\tif (value === void 0) { value = 0; }\r\n\t\t\tif (array.length >= size)\r\n\t\t\t\treturn array;\r\n\t\t\treturn Utils.setArraySize(array, size, value);\r\n\t\t};\r\n\t\tUtils.newArray = function (size, defaultValue) {\r\n\t\t\tvar array = new Array(size);\r\n\t\t\tfor (var i = 0; i < size; i++)\r\n\t\t\t\tarray[i] = defaultValue;\r\n\t\t\treturn array;\r\n\t\t};\r\n\t\tUtils.newFloatArray = function (size) {\r\n\t\t\tif (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n\t\t\t\treturn new Float32Array(size);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar array = new Array(size);\r\n\t\t\t\tfor (var i = 0; i < array.length; i++)\r\n\t\t\t\t\tarray[i] = 0;\r\n\t\t\t\treturn array;\r\n\t\t\t}\r\n\t\t};\r\n\t\tUtils.newShortArray = function (size) {\r\n\t\t\tif (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n\t\t\t\treturn new Int16Array(size);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar array = new Array(size);\r\n\t\t\t\tfor (var i = 0; i < array.length; i++)\r\n\t\t\t\t\tarray[i] = 0;\r\n\t\t\t\treturn array;\r\n\t\t\t}\r\n\t\t};\r\n\t\tUtils.toFloatArray = function (array) {\r\n\t\t\treturn Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n\t\t};\r\n\t\tUtils.toSinglePrecision = function (value) {\r\n\t\t\treturn Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n\t\t};\r\n\t\tUtils.webkit602BugfixHelper = function (alpha, pose) {\r\n\t\t};\r\n\t\tUtils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n\t\treturn Utils;\r\n\t}());\r\n\tspine.Utils = Utils;\r\n\tvar DebugUtils = (function () {\r\n\t\tfunction DebugUtils() {\r\n\t\t}\r\n\t\tDebugUtils.logBones = function (skeleton) {\r\n\t\t\tfor (var i = 0; i < skeleton.bones.length; i++) {\r\n\t\t\t\tvar bone = skeleton.bones[i];\r\n\t\t\t\tconsole.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn DebugUtils;\r\n\t}());\r\n\tspine.DebugUtils = DebugUtils;\r\n\tvar Pool = (function () {\r\n\t\tfunction Pool(instantiator) {\r\n\t\t\tthis.items = new Array();\r\n\t\t\tthis.instantiator = instantiator;\r\n\t\t}\r\n\t\tPool.prototype.obtain = function () {\r\n\t\t\treturn this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n\t\t};\r\n\t\tPool.prototype.free = function (item) {\r\n\t\t\tif (item.reset)\r\n\t\t\t\titem.reset();\r\n\t\t\tthis.items.push(item);\r\n\t\t};\r\n\t\tPool.prototype.freeAll = function (items) {\r\n\t\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\t\tif (items[i].reset)\r\n\t\t\t\t\titems[i].reset();\r\n\t\t\t\tthis.items[i] = items[i];\r\n\t\t\t}\r\n\t\t};\r\n\t\tPool.prototype.clear = function () {\r\n\t\t\tthis.items.length = 0;\r\n\t\t};\r\n\t\treturn Pool;\r\n\t}());\r\n\tspine.Pool = Pool;\r\n\tvar Vector2 = (function () {\r\n\t\tfunction Vector2(x, y) {\r\n\t\t\tif (x === void 0) { x = 0; }\r\n\t\t\tif (y === void 0) { y = 0; }\r\n\t\t\tthis.x = x;\r\n\t\t\tthis.y = y;\r\n\t\t}\r\n\t\tVector2.prototype.set = function (x, y) {\r\n\t\t\tthis.x = x;\r\n\t\t\tthis.y = y;\r\n\t\t\treturn this;\r\n\t\t};\r\n\t\tVector2.prototype.length = function () {\r\n\t\t\tvar x = this.x;\r\n\t\t\tvar y = this.y;\r\n\t\t\treturn Math.sqrt(x * x + y * y);\r\n\t\t};\r\n\t\tVector2.prototype.normalize = function () {\r\n\t\t\tvar len = this.length();\r\n\t\t\tif (len != 0) {\r\n\t\t\t\tthis.x /= len;\r\n\t\t\t\tthis.y /= len;\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t};\r\n\t\treturn Vector2;\r\n\t}());\r\n\tspine.Vector2 = Vector2;\r\n\tvar TimeKeeper = (function () {\r\n\t\tfunction TimeKeeper() {\r\n\t\t\tthis.maxDelta = 0.064;\r\n\t\t\tthis.framesPerSecond = 0;\r\n\t\t\tthis.delta = 0;\r\n\t\t\tthis.totalTime = 0;\r\n\t\t\tthis.lastTime = Date.now() / 1000;\r\n\t\t\tthis.frameCount = 0;\r\n\t\t\tthis.frameTime = 0;\r\n\t\t}\r\n\t\tTimeKeeper.prototype.update = function () {\r\n\t\t\tvar now = Date.now() / 1000;\r\n\t\t\tthis.delta = now - this.lastTime;\r\n\t\t\tthis.frameTime += this.delta;\r\n\t\t\tthis.totalTime += this.delta;\r\n\t\t\tif (this.delta > this.maxDelta)\r\n\t\t\t\tthis.delta = this.maxDelta;\r\n\t\t\tthis.lastTime = now;\r\n\t\t\tthis.frameCount++;\r\n\t\t\tif (this.frameTime > 1) {\r\n\t\t\t\tthis.framesPerSecond = this.frameCount / this.frameTime;\r\n\t\t\t\tthis.frameTime = 0;\r\n\t\t\t\tthis.frameCount = 0;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn TimeKeeper;\r\n\t}());\r\n\tspine.TimeKeeper = TimeKeeper;\r\n\tvar WindowedMean = (function () {\r\n\t\tfunction WindowedMean(windowSize) {\r\n\t\t\tif (windowSize === void 0) { windowSize = 32; }\r\n\t\t\tthis.addedValues = 0;\r\n\t\t\tthis.lastValue = 0;\r\n\t\t\tthis.mean = 0;\r\n\t\t\tthis.dirty = true;\r\n\t\t\tthis.values = new Array(windowSize);\r\n\t\t}\r\n\t\tWindowedMean.prototype.hasEnoughData = function () {\r\n\t\t\treturn this.addedValues >= this.values.length;\r\n\t\t};\r\n\t\tWindowedMean.prototype.addValue = function (value) {\r\n\t\t\tif (this.addedValues < this.values.length)\r\n\t\t\t\tthis.addedValues++;\r\n\t\t\tthis.values[this.lastValue++] = value;\r\n\t\t\tif (this.lastValue > this.values.length - 1)\r\n\t\t\t\tthis.lastValue = 0;\r\n\t\t\tthis.dirty = true;\r\n\t\t};\r\n\t\tWindowedMean.prototype.getMean = function () {\r\n\t\t\tif (this.hasEnoughData()) {\r\n\t\t\t\tif (this.dirty) {\r\n\t\t\t\t\tvar mean = 0;\r\n\t\t\t\t\tfor (var i = 0; i < this.values.length; i++) {\r\n\t\t\t\t\t\tmean += this.values[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.mean = mean / this.values.length;\r\n\t\t\t\t\tthis.dirty = false;\r\n\t\t\t\t}\r\n\t\t\t\treturn this.mean;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn WindowedMean;\r\n\t}());\r\n\tspine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n\tif (!Math.fround) {\r\n\t\tMath.fround = (function (array) {\r\n\t\t\treturn function (x) {\r\n\t\t\t\treturn array[0] = x, array[0];\r\n\t\t\t};\r\n\t\t})(new Float32Array(1));\r\n\t}\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n\tvar Attachment = (function () {\r\n\t\tfunction Attachment(name) {\r\n\t\t\tif (name == null)\r\n\t\t\t\tthrow new Error(\"name cannot be null.\");\r\n\t\t\tthis.name = name;\r\n\t\t}\r\n\t\treturn Attachment;\r\n\t}());\r\n\tspine.Attachment = Attachment;\r\n\tvar VertexAttachment = (function (_super) {\r\n\t\t__extends(VertexAttachment, _super);\r\n\t\tfunction VertexAttachment(name) {\r\n\t\t\tvar _this = _super.call(this, name) || this;\r\n\t\t\t_this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n\t\t\t_this.worldVerticesLength = 0;\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tVertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n\t\t\tcount = offset + (count >> 1) * stride;\r\n\t\t\tvar skeleton = slot.bone.skeleton;\r\n\t\t\tvar deformArray = slot.attachmentVertices;\r\n\t\t\tvar vertices = this.vertices;\r\n\t\t\tvar bones = this.bones;\r\n\t\t\tif (bones == null) {\r\n\t\t\t\tif (deformArray.length > 0)\r\n\t\t\t\t\tvertices = deformArray;\r\n\t\t\t\tvar bone = slot.bone;\r\n\t\t\t\tvar x = bone.worldX;\r\n\t\t\t\tvar y = bone.worldY;\r\n\t\t\t\tvar a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n\t\t\t\tfor (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n\t\t\t\t\tvar vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n\t\t\t\t\tworldVertices[w] = vx * a + vy * b + x;\r\n\t\t\t\t\tworldVertices[w + 1] = vx * c + vy * d + y;\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar v = 0, skip = 0;\r\n\t\t\tfor (var i = 0; i < start; i += 2) {\r\n\t\t\t\tvar n = bones[v];\r\n\t\t\t\tv += n + 1;\r\n\t\t\t\tskip += n;\r\n\t\t\t}\r\n\t\t\tvar skeletonBones = skeleton.bones;\r\n\t\t\tif (deformArray.length == 0) {\r\n\t\t\t\tfor (var w = offset, b = skip * 3; w < count; w += stride) {\r\n\t\t\t\t\tvar wx = 0, wy = 0;\r\n\t\t\t\t\tvar n = bones[v++];\r\n\t\t\t\t\tn += v;\r\n\t\t\t\t\tfor (; v < n; v++, b += 3) {\r\n\t\t\t\t\t\tvar bone = skeletonBones[bones[v]];\r\n\t\t\t\t\t\tvar vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n\t\t\t\t\t\twx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n\t\t\t\t\t\twy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tworldVertices[w] = wx;\r\n\t\t\t\t\tworldVertices[w + 1] = wy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvar deform = deformArray;\r\n\t\t\t\tfor (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n\t\t\t\t\tvar wx = 0, wy = 0;\r\n\t\t\t\t\tvar n = bones[v++];\r\n\t\t\t\t\tn += v;\r\n\t\t\t\t\tfor (; v < n; v++, b += 3, f += 2) {\r\n\t\t\t\t\t\tvar bone = skeletonBones[bones[v]];\r\n\t\t\t\t\t\tvar vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n\t\t\t\t\t\twx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n\t\t\t\t\t\twy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tworldVertices[w] = wx;\r\n\t\t\t\t\tworldVertices[w + 1] = wy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tVertexAttachment.prototype.applyDeform = function (sourceAttachment) {\r\n\t\t\treturn this == sourceAttachment;\r\n\t\t};\r\n\t\tVertexAttachment.nextID = 0;\r\n\t\treturn VertexAttachment;\r\n\t}(Attachment));\r\n\tspine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar AttachmentType;\r\n\t(function (AttachmentType) {\r\n\t\tAttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n\t\tAttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n\t\tAttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n\t\tAttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n\t\tAttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n\t\tAttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n\t})(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar BoundingBoxAttachment = (function (_super) {\r\n\t\t__extends(BoundingBoxAttachment, _super);\r\n\t\tfunction BoundingBoxAttachment(name) {\r\n\t\t\tvar _this = _super.call(this, name) || this;\r\n\t\t\t_this.color = new spine.Color(1, 1, 1, 1);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\treturn BoundingBoxAttachment;\r\n\t}(spine.VertexAttachment));\r\n\tspine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar ClippingAttachment = (function (_super) {\r\n\t\t__extends(ClippingAttachment, _super);\r\n\t\tfunction ClippingAttachment(name) {\r\n\t\t\tvar _this = _super.call(this, name) || this;\r\n\t\t\t_this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\treturn ClippingAttachment;\r\n\t}(spine.VertexAttachment));\r\n\tspine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar MeshAttachment = (function (_super) {\r\n\t\t__extends(MeshAttachment, _super);\r\n\t\tfunction MeshAttachment(name) {\r\n\t\t\tvar _this = _super.call(this, name) || this;\r\n\t\t\t_this.color = new spine.Color(1, 1, 1, 1);\r\n\t\t\t_this.inheritDeform = false;\r\n\t\t\t_this.tempColor = new spine.Color(0, 0, 0, 0);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tMeshAttachment.prototype.updateUVs = function () {\r\n\t\t\tvar u = 0, v = 0, width = 0, height = 0;\r\n\t\t\tif (this.region == null) {\r\n\t\t\t\tu = v = 0;\r\n\t\t\t\twidth = height = 1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tu = this.region.u;\r\n\t\t\t\tv = this.region.v;\r\n\t\t\t\twidth = this.region.u2 - u;\r\n\t\t\t\theight = this.region.v2 - v;\r\n\t\t\t}\r\n\t\t\tvar regionUVs = this.regionUVs;\r\n\t\t\tif (this.uvs == null || this.uvs.length != regionUVs.length)\r\n\t\t\t\tthis.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n\t\t\tvar uvs = this.uvs;\r\n\t\t\tif (this.region.rotate) {\r\n\t\t\t\tfor (var i = 0, n = uvs.length; i < n; i += 2) {\r\n\t\t\t\t\tuvs[i] = u + regionUVs[i + 1] * width;\r\n\t\t\t\t\tuvs[i + 1] = v + height - regionUVs[i] * height;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfor (var i = 0, n = uvs.length; i < n; i += 2) {\r\n\t\t\t\t\tuvs[i] = u + regionUVs[i] * width;\r\n\t\t\t\t\tuvs[i + 1] = v + regionUVs[i + 1] * height;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tMeshAttachment.prototype.applyDeform = function (sourceAttachment) {\r\n\t\t\treturn this == sourceAttachment || (this.inheritDeform && this.parentMesh == sourceAttachment);\r\n\t\t};\r\n\t\tMeshAttachment.prototype.getParentMesh = function () {\r\n\t\t\treturn this.parentMesh;\r\n\t\t};\r\n\t\tMeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n\t\t\tthis.parentMesh = parentMesh;\r\n\t\t\tif (parentMesh != null) {\r\n\t\t\t\tthis.bones = parentMesh.bones;\r\n\t\t\t\tthis.vertices = parentMesh.vertices;\r\n\t\t\t\tthis.worldVerticesLength = parentMesh.worldVerticesLength;\r\n\t\t\t\tthis.regionUVs = parentMesh.regionUVs;\r\n\t\t\t\tthis.triangles = parentMesh.triangles;\r\n\t\t\t\tthis.hullLength = parentMesh.hullLength;\r\n\t\t\t\tthis.worldVerticesLength = parentMesh.worldVerticesLength;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn MeshAttachment;\r\n\t}(spine.VertexAttachment));\r\n\tspine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar PathAttachment = (function (_super) {\r\n\t\t__extends(PathAttachment, _super);\r\n\t\tfunction PathAttachment(name) {\r\n\t\t\tvar _this = _super.call(this, name) || this;\r\n\t\t\t_this.closed = false;\r\n\t\t\t_this.constantSpeed = false;\r\n\t\t\t_this.color = new spine.Color(1, 1, 1, 1);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\treturn PathAttachment;\r\n\t}(spine.VertexAttachment));\r\n\tspine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar PointAttachment = (function (_super) {\r\n\t\t__extends(PointAttachment, _super);\r\n\t\tfunction PointAttachment(name) {\r\n\t\t\tvar _this = _super.call(this, name) || this;\r\n\t\t\t_this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tPointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n\t\t\tpoint.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n\t\t\tpoint.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n\t\t\treturn point;\r\n\t\t};\r\n\t\tPointAttachment.prototype.computeWorldRotation = function (bone) {\r\n\t\t\tvar cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n\t\t\tvar x = cos * bone.a + sin * bone.b;\r\n\t\t\tvar y = cos * bone.c + sin * bone.d;\r\n\t\t\treturn Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n\t\t};\r\n\t\treturn PointAttachment;\r\n\t}(spine.VertexAttachment));\r\n\tspine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar RegionAttachment = (function (_super) {\r\n\t\t__extends(RegionAttachment, _super);\r\n\t\tfunction RegionAttachment(name) {\r\n\t\t\tvar _this = _super.call(this, name) || this;\r\n\t\t\t_this.x = 0;\r\n\t\t\t_this.y = 0;\r\n\t\t\t_this.scaleX = 1;\r\n\t\t\t_this.scaleY = 1;\r\n\t\t\t_this.rotation = 0;\r\n\t\t\t_this.width = 0;\r\n\t\t\t_this.height = 0;\r\n\t\t\t_this.color = new spine.Color(1, 1, 1, 1);\r\n\t\t\t_this.offset = spine.Utils.newFloatArray(8);\r\n\t\t\t_this.uvs = spine.Utils.newFloatArray(8);\r\n\t\t\t_this.tempColor = new spine.Color(1, 1, 1, 1);\r\n\t\t\treturn _this;\r\n\t\t}\r\n\t\tRegionAttachment.prototype.updateOffset = function () {\r\n\t\t\tvar regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n\t\t\tvar regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n\t\t\tvar localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n\t\t\tvar localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n\t\t\tvar localX2 = localX + this.region.width * regionScaleX;\r\n\t\t\tvar localY2 = localY + this.region.height * regionScaleY;\r\n\t\t\tvar radians = this.rotation * Math.PI / 180;\r\n\t\t\tvar cos = Math.cos(radians);\r\n\t\t\tvar sin = Math.sin(radians);\r\n\t\t\tvar localXCos = localX * cos + this.x;\r\n\t\t\tvar localXSin = localX * sin;\r\n\t\t\tvar localYCos = localY * cos + this.y;\r\n\t\t\tvar localYSin = localY * sin;\r\n\t\t\tvar localX2Cos = localX2 * cos + this.x;\r\n\t\t\tvar localX2Sin = localX2 * sin;\r\n\t\t\tvar localY2Cos = localY2 * cos + this.y;\r\n\t\t\tvar localY2Sin = localY2 * sin;\r\n\t\t\tvar offset = this.offset;\r\n\t\t\toffset[RegionAttachment.OX1] = localXCos - localYSin;\r\n\t\t\toffset[RegionAttachment.OY1] = localYCos + localXSin;\r\n\t\t\toffset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n\t\t\toffset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n\t\t\toffset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n\t\t\toffset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n\t\t\toffset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n\t\t\toffset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n\t\t};\r\n\t\tRegionAttachment.prototype.setRegion = function (region) {\r\n\t\t\tthis.region = region;\r\n\t\t\tvar uvs = this.uvs;\r\n\t\t\tif (region.rotate) {\r\n\t\t\t\tuvs[2] = region.u;\r\n\t\t\t\tuvs[3] = region.v2;\r\n\t\t\t\tuvs[4] = region.u;\r\n\t\t\t\tuvs[5] = region.v;\r\n\t\t\t\tuvs[6] = region.u2;\r\n\t\t\t\tuvs[7] = region.v;\r\n\t\t\t\tuvs[0] = region.u2;\r\n\t\t\t\tuvs[1] = region.v2;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tuvs[0] = region.u;\r\n\t\t\t\tuvs[1] = region.v2;\r\n\t\t\t\tuvs[2] = region.u;\r\n\t\t\t\tuvs[3] = region.v;\r\n\t\t\t\tuvs[4] = region.u2;\r\n\t\t\t\tuvs[5] = region.v;\r\n\t\t\t\tuvs[6] = region.u2;\r\n\t\t\t\tuvs[7] = region.v2;\r\n\t\t\t}\r\n\t\t};\r\n\t\tRegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n\t\t\tvar vertexOffset = this.offset;\r\n\t\t\tvar x = bone.worldX, y = bone.worldY;\r\n\t\t\tvar a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n\t\t\tvar offsetX = 0, offsetY = 0;\r\n\t\t\toffsetX = vertexOffset[RegionAttachment.OX1];\r\n\t\t\toffsetY = vertexOffset[RegionAttachment.OY1];\r\n\t\t\tworldVertices[offset] = offsetX * a + offsetY * b + x;\r\n\t\t\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n\t\t\toffset += stride;\r\n\t\t\toffsetX = vertexOffset[RegionAttachment.OX2];\r\n\t\t\toffsetY = vertexOffset[RegionAttachment.OY2];\r\n\t\t\tworldVertices[offset] = offsetX * a + offsetY * b + x;\r\n\t\t\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n\t\t\toffset += stride;\r\n\t\t\toffsetX = vertexOffset[RegionAttachment.OX3];\r\n\t\t\toffsetY = vertexOffset[RegionAttachment.OY3];\r\n\t\t\tworldVertices[offset] = offsetX * a + offsetY * b + x;\r\n\t\t\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n\t\t\toffset += stride;\r\n\t\t\toffsetX = vertexOffset[RegionAttachment.OX4];\r\n\t\t\toffsetY = vertexOffset[RegionAttachment.OY4];\r\n\t\t\tworldVertices[offset] = offsetX * a + offsetY * b + x;\r\n\t\t\tworldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n\t\t};\r\n\t\tRegionAttachment.OX1 = 0;\r\n\t\tRegionAttachment.OY1 = 1;\r\n\t\tRegionAttachment.OX2 = 2;\r\n\t\tRegionAttachment.OY2 = 3;\r\n\t\tRegionAttachment.OX3 = 4;\r\n\t\tRegionAttachment.OY3 = 5;\r\n\t\tRegionAttachment.OX4 = 6;\r\n\t\tRegionAttachment.OY4 = 7;\r\n\t\tRegionAttachment.X1 = 0;\r\n\t\tRegionAttachment.Y1 = 1;\r\n\t\tRegionAttachment.C1R = 2;\r\n\t\tRegionAttachment.C1G = 3;\r\n\t\tRegionAttachment.C1B = 4;\r\n\t\tRegionAttachment.C1A = 5;\r\n\t\tRegionAttachment.U1 = 6;\r\n\t\tRegionAttachment.V1 = 7;\r\n\t\tRegionAttachment.X2 = 8;\r\n\t\tRegionAttachment.Y2 = 9;\r\n\t\tRegionAttachment.C2R = 10;\r\n\t\tRegionAttachment.C2G = 11;\r\n\t\tRegionAttachment.C2B = 12;\r\n\t\tRegionAttachment.C2A = 13;\r\n\t\tRegionAttachment.U2 = 14;\r\n\t\tRegionAttachment.V2 = 15;\r\n\t\tRegionAttachment.X3 = 16;\r\n\t\tRegionAttachment.Y3 = 17;\r\n\t\tRegionAttachment.C3R = 18;\r\n\t\tRegionAttachment.C3G = 19;\r\n\t\tRegionAttachment.C3B = 20;\r\n\t\tRegionAttachment.C3A = 21;\r\n\t\tRegionAttachment.U3 = 22;\r\n\t\tRegionAttachment.V3 = 23;\r\n\t\tRegionAttachment.X4 = 24;\r\n\t\tRegionAttachment.Y4 = 25;\r\n\t\tRegionAttachment.C4R = 26;\r\n\t\tRegionAttachment.C4G = 27;\r\n\t\tRegionAttachment.C4B = 28;\r\n\t\tRegionAttachment.C4A = 29;\r\n\t\tRegionAttachment.U4 = 30;\r\n\t\tRegionAttachment.V4 = 31;\r\n\t\treturn RegionAttachment;\r\n\t}(spine.Attachment));\r\n\tspine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar JitterEffect = (function () {\r\n\t\tfunction JitterEffect(jitterX, jitterY) {\r\n\t\t\tthis.jitterX = 0;\r\n\t\t\tthis.jitterY = 0;\r\n\t\t\tthis.jitterX = jitterX;\r\n\t\t\tthis.jitterY = jitterY;\r\n\t\t}\r\n\t\tJitterEffect.prototype.begin = function (skeleton) {\r\n\t\t};\r\n\t\tJitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n\t\t\tposition.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t\tposition.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n\t\t};\r\n\t\tJitterEffect.prototype.end = function () {\r\n\t\t};\r\n\t\treturn JitterEffect;\r\n\t}());\r\n\tspine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar SwirlEffect = (function () {\r\n\t\tfunction SwirlEffect(radius) {\r\n\t\t\tthis.centerX = 0;\r\n\t\t\tthis.centerY = 0;\r\n\t\t\tthis.radius = 0;\r\n\t\t\tthis.angle = 0;\r\n\t\t\tthis.worldX = 0;\r\n\t\t\tthis.worldY = 0;\r\n\t\t\tthis.radius = radius;\r\n\t\t}\r\n\t\tSwirlEffect.prototype.begin = function (skeleton) {\r\n\t\t\tthis.worldX = skeleton.x + this.centerX;\r\n\t\t\tthis.worldY = skeleton.y + this.centerY;\r\n\t\t};\r\n\t\tSwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n\t\t\tvar radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n\t\t\tvar x = position.x - this.worldX;\r\n\t\t\tvar y = position.y - this.worldY;\r\n\t\t\tvar dist = Math.sqrt(x * x + y * y);\r\n\t\t\tif (dist < this.radius) {\r\n\t\t\t\tvar theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n\t\t\t\tvar cos = Math.cos(theta);\r\n\t\t\t\tvar sin = Math.sin(theta);\r\n\t\t\t\tposition.x = cos * x - sin * y + this.worldX;\r\n\t\t\t\tposition.y = sin * x + cos * y + this.worldY;\r\n\t\t\t}\r\n\t\t};\r\n\t\tSwirlEffect.prototype.end = function () {\r\n\t\t};\r\n\t\tSwirlEffect.interpolation = new spine.PowOut(2);\r\n\t\treturn SwirlEffect;\r\n\t}());\r\n\tspine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar canvas;\r\n\t(function (canvas) {\r\n\t\tvar AssetManager = (function (_super) {\r\n\t\t\t__extends(AssetManager, _super);\r\n\t\t\tfunction AssetManager(pathPrefix) {\r\n\t\t\t\tif (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n\t\t\t\treturn _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n\t\t\t}\r\n\t\t\treturn AssetManager;\r\n\t\t}(spine.AssetManager));\r\n\t\tcanvas.AssetManager = AssetManager;\r\n\t})(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar canvas;\r\n\t(function (canvas) {\r\n\t\tvar CanvasTexture = (function (_super) {\r\n\t\t\t__extends(CanvasTexture, _super);\r\n\t\t\tfunction CanvasTexture(image) {\r\n\t\t\t\treturn _super.call(this, image) || this;\r\n\t\t\t}\r\n\t\t\tCanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n\t\t\tCanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n\t\t\tCanvasTexture.prototype.dispose = function () { };\r\n\t\t\treturn CanvasTexture;\r\n\t\t}(spine.Texture));\r\n\t\tcanvas.CanvasTexture = CanvasTexture;\r\n\t})(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n\tvar canvas;\r\n\t(function (canvas) {\r\n\t\tvar SkeletonRenderer = (function () {\r\n\t\t\tfunction SkeletonRenderer(context) {\r\n\t\t\t\tthis.triangleRendering = false;\r\n\t\t\t\tthis.debugRendering = false;\r\n\t\t\t\tthis.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n\t\t\t\tthis.tempColor = new spine.Color();\r\n\t\t\t\tthis.ctx = context;\r\n\t\t\t}\r\n\t\t\tSkeletonRenderer.prototype.draw = function (skeleton) {\r\n\t\t\t\tif (this.triangleRendering)\r\n\t\t\t\t\tthis.drawTriangles(skeleton);\r\n\t\t\t\telse\r\n\t\t\t\t\tthis.drawImages(skeleton);\r\n\t\t\t};\r\n\t\t\tSkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n\t\t\t\tvar ctx = this.ctx;\r\n\t\t\t\tvar drawOrder = skeleton.drawOrder;\r\n\t\t\t\tif (this.debugRendering)\r\n\t\t\t\t\tctx.strokeStyle = \"green\";\r\n\t\t\t\tctx.save();\r\n\t\t\t\tfor (var i = 0, n = drawOrder.length; i < n; i++) {\r\n\t\t\t\t\tvar slot = drawOrder[i];\r\n\t\t\t\t\tvar attachment = slot.getAttachment();\r\n\t\t\t\t\tvar regionAttachment = null;\r\n\t\t\t\t\tvar region = null;\r\n\t\t\t\t\tvar image = null;\r\n\t\t\t\t\tif (attachment instanceof spine.RegionAttachment) {\r\n\t\t\t\t\t\tregionAttachment = attachment;\r\n\t\t\t\t\t\tregion = regionAttachment.region;\r\n\t\t\t\t\t\timage = region.texture.getImage();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tvar skeleton_1 = slot.bone.skeleton;\r\n\t\t\t\t\tvar skeletonColor = skeleton_1.color;\r\n\t\t\t\t\tvar slotColor = slot.color;\r\n\t\t\t\t\tvar regionColor = regionAttachment.color;\r\n\t\t\t\t\tvar alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n\t\t\t\t\tvar color = this.tempColor;\r\n\t\t\t\t\tcolor.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n\t\t\t\t\tvar att = attachment;\r\n\t\t\t\t\tvar bone = slot.bone;\r\n\t\t\t\t\tvar w = region.width;\r\n\t\t\t\t\tvar h = region.height;\r\n\t\t\t\t\tctx.save();\r\n\t\t\t\t\tctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n\t\t\t\t\tctx.translate(attachment.offset[0], attachment.offset[1]);\r\n\t\t\t\t\tctx.rotate(attachment.rotation * Math.PI / 180);\r\n\t\t\t\t\tvar atlasScale = att.width / w;\r\n\t\t\t\t\tctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n\t\t\t\t\tctx.translate(w / 2, h / 2);\r\n\t\t\t\t\tif (attachment.region.rotate) {\r\n\t\t\t\t\t\tvar t = w;\r\n\t\t\t\t\t\tw = h;\r\n\t\t\t\t\t\th = t;\r\n\t\t\t\t\t\tctx.rotate(-Math.PI / 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tctx.scale(1, -1);\r\n\t\t\t\t\tctx.translate(-w / 2, -h / 2);\r\n\t\t\t\t\tif (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n\t\t\t\t\t\tctx.globalAlpha = color.a;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n\t\t\t\t\tif (this.debugRendering)\r\n\t\t\t\t\t\tctx.strokeRect(0, 0, w, h);\r\n\t\t\t\t\tctx.restore();\r\n\t\t\t\t}\r\n\t\t\t\tctx.restore();\r\n\t\t\t};\r\n\t\t\tSkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n\t\t\t\tvar blendMode = null;\r\n\t\t\t\tvar vertices = this.vertices;\r\n\t\t\t\tvar triangles = null;\r\n\t\t\t\tvar drawOrder = skeleton.drawOrder;\r\n\t\t\t\tfor (var i = 0, n = drawOrder.length; i < n; i++) {\r\n\t\t\t\t\tvar slot = drawOrder[i];\r\n\t\t\t\t\tvar attachment = slot.getAttachment();\r\n\t\t\t\t\tvar texture = null;\r\n\t\t\t\t\tvar region = null;\r\n\t\t\t\t\tif (attachment instanceof spine.RegionAttachment) {\r\n\t\t\t\t\t\tvar regionAttachment = attachment;\r\n\t\t\t\t\t\tvertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n\t\t\t\t\t\ttriangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n\t\t\t\t\t\tregion = regionAttachment.region;\r\n\t\t\t\t\t\ttexture = region.texture.getImage();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (attachment instanceof spine.MeshAttachment) {\r\n\t\t\t\t\t\tvar mesh = attachment;\r\n\t\t\t\t\t\tvertices = this.computeMeshVertices(slot, mesh, false);\r\n\t\t\t\t\t\ttriangles = mesh.triangles;\r\n\t\t\t\t\t\ttexture = mesh.region.renderObject.texture.getImage();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (texture != null) {\r\n\t\t\t\t\t\tvar slotBlendMode = slot.data.blendMode;\r\n\t\t\t\t\t\tif (slotBlendMode != blendMode) {\r\n\t\t\t\t\t\t\tblendMode = slotBlendMode;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar skeleton_2 = slot.bone.skeleton;\r\n\t\t\t\t\t\tvar skeletonColor = skeleton_2.color;\r\n\t\t\t\t\t\tvar slotColor = slot.color;\r\n\t\t\t\t\t\tvar attachmentColor = attachment.color;\r\n\t\t\t\t\t\tvar alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n\t\t\t\t\t\tvar color = this.tempColor;\r\n\t\t\t\t\t\tcolor.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n\t\t\t\t\t\tvar ctx = this.ctx;\r\n\t\t\t\t\t\tif (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n\t\t\t\t\t\t\tctx.globalAlpha = color.a;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (var j = 0; j < triangles.length; j += 3) {\r\n\t\t\t\t\t\t\tvar t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n\t\t\t\t\t\t\tvar x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n\t\t\t\t\t\t\tvar x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n\t\t\t\t\t\t\tvar x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n\t\t\t\t\t\t\tthis.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n\t\t\t\t\t\t\tif (this.debugRendering) {\r\n\t\t\t\t\t\t\t\tctx.strokeStyle = \"green\";\r\n\t\t\t\t\t\t\t\tctx.beginPath();\r\n\t\t\t\t\t\t\t\tctx.moveTo(x0, y0);\r\n\t\t\t\t\t\t\t\tctx.lineTo(x1, y1);\r\n\t\t\t\t\t\t\t\tctx.lineTo(x2, y2);\r\n\t\t\t\t\t\t\t\tctx.lineTo(x0, y0);\r\n\t\t\t\t\t\t\t\tctx.stroke();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.ctx.globalAlpha = 1;\r\n\t\t\t};\r\n\t\t\tSkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n\t\t\t\tvar ctx = this.ctx;\r\n\t\t\t\tu0 *= img.width;\r\n\t\t\t\tv0 *= img.height;\r\n\t\t\t\tu1 *= img.width;\r\n\t\t\t\tv1 *= img.height;\r\n\t\t\t\tu2 *= img.width;\r\n\t\t\t\tv2 *= img.height;\r\n\t\t\t\tctx.beginPath();\r\n\t\t\t\tctx.moveTo(x0, y0);\r\n\t\t\t\tctx.lineTo(x1, y1);\r\n\t\t\t\tctx.lineTo(x2, y2);\r\n\t\t\t\tctx.closePath();\r\n\t\t\t\tx1 -= x0;\r\n\t\t\t\ty1 -= y0;\r\n\t\t\t\tx2 -= x0;\r\n\t\t\t\ty2 -= y0;\r\n\t\t\t\tu1 -= u0;\r\n\t\t\t\tv1 -= v0;\r\n\t\t\t\tu2 -= u0;\r\n\t\t\t\tv2 -= v0;\r\n\t\t\t\tvar det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.transform(a, b, c, d, e, f);\r\n\t\t\t\tctx.clip();\r\n\t\t\t\tctx.drawImage(img, 0, 0);\r\n\t\t\t\tctx.restore();\r\n\t\t\t};\r\n\t\t\tSkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n\t\t\t\tvar skeleton = slot.bone.skeleton;\r\n\t\t\t\tvar skeletonColor = skeleton.color;\r\n\t\t\t\tvar slotColor = slot.color;\r\n\t\t\t\tvar regionColor = region.color;\r\n\t\t\t\tvar alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n\t\t\t\tvar multiplier = pma ? alpha : 1;\r\n\t\t\t\tvar color = this.tempColor;\r\n\t\t\t\tcolor.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n\t\t\t\tregion.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n\t\t\t\tvar vertices = this.vertices;\r\n\t\t\t\tvar uvs = region.uvs;\r\n\t\t\t\tvertices[spine.RegionAttachment.C1R] = color.r;\r\n\t\t\t\tvertices[spine.RegionAttachment.C1G] = color.g;\r\n\t\t\t\tvertices[spine.RegionAttachment.C1B] = color.b;\r\n\t\t\t\tvertices[spine.RegionAttachment.C1A] = color.a;\r\n\t\t\t\tvertices[spine.RegionAttachment.U1] = uvs[0];\r\n\t\t\t\tvertices[spine.RegionAttachment.V1] = uvs[1];\r\n\t\t\t\tvertices[spine.RegionAttachment.C2R] = color.r;\r\n\t\t\t\tvertices[spine.RegionAttachment.C2G] = color.g;\r\n\t\t\t\tvertices[spine.RegionAttachment.C2B] = color.b;\r\n\t\t\t\tvertices[spine.RegionAttachment.C2A] = color.a;\r\n\t\t\t\tvertices[spine.RegionAttachment.U2] = uvs[2];\r\n\t\t\t\tvertices[spine.RegionAttachment.V2] = uvs[3];\r\n\t\t\t\tvertices[spine.RegionAttachment.C3R] = color.r;\r\n\t\t\t\tvertices[spine.RegionAttachment.C3G] = color.g;\r\n\t\t\t\tvertices[spine.RegionAttachment.C3B] = color.b;\r\n\t\t\t\tvertices[spine.RegionAttachment.C3A] = color.a;\r\n\t\t\t\tvertices[spine.RegionAttachment.U3] = uvs[4];\r\n\t\t\t\tvertices[spine.RegionAttachment.V3] = uvs[5];\r\n\t\t\t\tvertices[spine.RegionAttachment.C4R] = color.r;\r\n\t\t\t\tvertices[spine.RegionAttachment.C4G] = color.g;\r\n\t\t\t\tvertices[spine.RegionAttachment.C4B] = color.b;\r\n\t\t\t\tvertices[spine.RegionAttachment.C4A] = color.a;\r\n\t\t\t\tvertices[spine.RegionAttachment.U4] = uvs[6];\r\n\t\t\t\tvertices[spine.RegionAttachment.V4] = uvs[7];\r\n\t\t\t\treturn vertices;\r\n\t\t\t};\r\n\t\t\tSkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n\t\t\t\tvar skeleton = slot.bone.skeleton;\r\n\t\t\t\tvar skeletonColor = skeleton.color;\r\n\t\t\t\tvar slotColor = slot.color;\r\n\t\t\t\tvar regionColor = mesh.color;\r\n\t\t\t\tvar alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n\t\t\t\tvar multiplier = pma ? alpha : 1;\r\n\t\t\t\tvar color = this.tempColor;\r\n\t\t\t\tcolor.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n\t\t\t\tvar numVertices = mesh.worldVerticesLength / 2;\r\n\t\t\t\tif (this.vertices.length < mesh.worldVerticesLength) {\r\n\t\t\t\t\tthis.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n\t\t\t\t}\r\n\t\t\t\tvar vertices = this.vertices;\r\n\t\t\t\tmesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n\t\t\t\tvar uvs = mesh.uvs;\r\n\t\t\t\tfor (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n\t\t\t\t\tvertices[v++] = color.r;\r\n\t\t\t\t\tvertices[v++] = color.g;\r\n\t\t\t\t\tvertices[v++] = color.b;\r\n\t\t\t\t\tvertices[v++] = color.a;\r\n\t\t\t\t\tvertices[v++] = uvs[u++];\r\n\t\t\t\t\tvertices[v++] = uvs[u++];\r\n\t\t\t\t\tv += 2;\r\n\t\t\t\t}\r\n\t\t\t\treturn vertices;\r\n\t\t\t};\r\n\t\t\tSkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n\t\t\tSkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n\t\t\treturn SkeletonRenderer;\r\n\t\t}());\r\n\t\tcanvas.SkeletonRenderer = SkeletonRenderer;\r\n\t})(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-canvas.js.map\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n}.call(window));"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index 6131449e7..dc8e6c855 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -6,7 +6,9 @@ var Class = require('../../../src/utils/Class'); var BasePlugin = require('../../../src/plugins/BasePlugin'); -var Spine = require('./spine-canvas'); +var SpineCanvas = require('SpineCanvas'); + +// var SpineGL = require('SpineGL'); /** * @classdesc @@ -26,14 +28,20 @@ var SpinePlugin = new Class({ function SpinePlugin (pluginManager) { - // console.log('SpinePlugin enabled'); + console.log('SpinePlugin enabled'); BasePlugin.call(this, pluginManager); - // this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.game.context); + // console.log(SpineCanvas.canvas); + // console.log(SpineGL.webgl); + + this.skeletonRenderer = new SpineCanvas.canvas.SkeletonRenderer(this.game.context); + + this.textureManager = this.game.textures; + this.textCache = this.game.cache.text; + this.jsonCache = this.game.cache.json; // console.log(this.skeletonRenderer); - // pluginManager.registerGameObject('sprite3D', this.sprite3DFactory, this.sprite3DCreator); }, @@ -61,6 +69,48 @@ var SpinePlugin = new Class({ // return sprite; }, + createSkeleton: function (textureKey, atlasKey, jsonKey) + { + var canvasTexture = new SpineCanvas.canvas.CanvasTexture(this.textureManager.get(textureKey).getSourceImage()); + + var atlas = new SpineCanvas.TextureAtlas(this.textCache.get(atlasKey), function () { return canvasTexture; }); + + var atlasLoader = new SpineCanvas.AtlasAttachmentLoader(atlas); + + var skeletonJson = new SpineCanvas.SkeletonJson(atlasLoader); + + var skeletonData = skeletonJson.readSkeletonData(this.jsonCache.get(jsonKey)); + + var skeleton = new SpineCanvas.Skeleton(skeletonData); + + skeleton.flipY = true; + skeleton.setToSetupPose(); + skeleton.updateWorldTransform(); + + skeleton.setSkinByName('default'); + + return skeleton; + }, + + getBounds: function (skeleton) + { + var offset = new SpineCanvas.Vector2(); + var size = new SpineCanvas.Vector2(); + + skeleton.getBounds(offset, size, []); + + return { offset: offset, size: size }; + }, + + createAnimationState: function (skeleton, animationName) + { + var state = new SpineCanvas.AnimationState(new SpineCanvas.AnimationStateData(skeleton.data)); + + state.setAnimation(0, animationName, true); + + return state; + }, + /** * The Scene that owns this plugin is shutting down. * We need to kill and reset all internal properties as well as stop listening to Scene events. diff --git a/plugins/spine/webpack.config.js b/plugins/spine/webpack.config.js index 02d063766..6b4deff18 100644 --- a/plugins/spine/webpack.config.js +++ b/plugins/spine/webpack.config.js @@ -1,47 +1,72 @@ 'use strict'; const webpack = require('webpack'); -const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); +const exec = require('child_process').exec; module.exports = { - mode: 'production', + mode: 'development', context: `${__dirname}/src/`, entry: { - spine: './SpinePlugin.js', - 'spine.min': './SpinePlugin.js' + 'SpinePlugin': './SpinePlugin.js' }, output: { path: `${__dirname}/dist/`, filename: '[name].js', library: 'SpinePlugin', - libraryTarget: 'var' + libraryTarget: 'umd', + sourceMapFilename: '[file].map', + devtoolModuleFilenameTemplate: 'webpack:///[resource-path]', // string + devtoolFallbackModuleFilenameTemplate: 'webpack:///[resource-path]?[hash]', // string + umdNamedDefine: true }, performance: { hints: false }, - optimization: { - minimizer: [ - new UglifyJSPlugin({ - include: /\.min\.js$/, - parallel: true, - sourceMap: false, - uglifyOptions: { - compress: true, - ie8: false, - ecma: 5, - output: {comments: false}, - warnings: false - }, - warningsFilter: () => false - }) + module: { + rules: [ + { + test: require.resolve('./src/spine-canvas.js'), + use: 'imports-loader?this=>window' + }, + { + test: require.resolve('./src/spine-canvas.js'), + use: 'exports-loader?spine' + }, + { + test: require.resolve('./src/spine-webgl.js'), + use: 'imports-loader?this=>window' + }, + { + test: require.resolve('./src/spine-webgl.js'), + use: 'exports-loader?spine' + } ] }, + resolve: { + alias: { + 'SpineCanvas': './spine-canvas.js', + 'SpineGL': './spine-webgl.js' + }, + }, + plugins: [ - new CleanWebpackPlugin([ 'dist' ]) - ] + new CleanWebpackPlugin([ 'dist' ]), + { + apply: (compiler) => { + compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => { + exec('node plugins/spine/copy-to-examples.js', (err, stdout, stderr) => { + if (stdout) process.stdout.write(stdout); + if (stderr) process.stderr.write(stderr); + }); + }); + } + } + ], + + devtool: 'source-map' }; diff --git a/plugins/spine/webpack.dist.config.js b/plugins/spine/webpack.dist.config.js new file mode 100644 index 000000000..c1e385f04 --- /dev/null +++ b/plugins/spine/webpack.dist.config.js @@ -0,0 +1,90 @@ +'use strict'; + +const webpack = require('webpack'); +const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); +const CleanWebpackPlugin = require('clean-webpack-plugin'); +const exec = require('child_process').exec; + +module.exports = { + mode: 'production', + + context: `${__dirname}/src/`, + + entry: { + 'SpinePlugin': './SpinePlugin.js', + 'SpinePlugin.min': './SpinePlugin.js' + }, + + output: { + path: `${__dirname}/dist/`, + filename: '[name].js', + library: 'SpinePlugin', + libraryTarget: 'umd', + sourceMapFilename: '[file].map', + devtoolModuleFilenameTemplate: 'webpack:///[resource-path]', // string + devtoolFallbackModuleFilenameTemplate: 'webpack:///[resource-path]?[hash]', // string + umdNamedDefine: true + }, + + performance: { hints: false }, + + module: { + rules: [ + { + test: require.resolve('./src/spine-canvas.js'), + use: 'imports-loader?this=>window' + }, + { + test: require.resolve('./src/spine-canvas.js'), + use: 'exports-loader?spine' + }, + { + test: require.resolve('./src/spine-webgl.js'), + use: 'imports-loader?this=>window' + }, + { + test: require.resolve('./src/spine-webgl.js'), + use: 'exports-loader?spine' + } + ] + }, + + resolve: { + alias: { + 'SpineCanvas': './spine-canvas.js', + 'SpineGL': './spine-webgl.js' + }, + }, + + optimization: { + minimizer: [ + new UglifyJSPlugin({ + include: /\.min\.js$/, + parallel: true, + sourceMap: false, + uglifyOptions: { + compress: true, + ie8: false, + ecma: 5, + output: {comments: false}, + warnings: false + }, + warningsFilter: () => false + }) + ] + }, + + plugins: [ + new CleanWebpackPlugin([ 'dist' ]), + { + apply: (compiler) => { + compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => { + exec('node plugins/spine/copy-to-examples.js', (err, stdout, stderr) => { + if (stdout) process.stdout.write(stdout); + if (stderr) process.stderr.write(stderr); + }); + }); + } + } + ] +};