From 8998667d95b3cbfeb4c8217bd02a80c55f5b9999 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 08:57:58 +0000 Subject: [PATCH 1/2] [Dependencies]: Bump the dependencies-dev group with 4 updates Bumps the dependencies-dev group with 4 updates: [globals](https://github.com/sindresorhus/globals), [rollup](https://github.com/rollup/rollup), [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) and [webpack-cli](https://github.com/webpack/webpack-cli). Updates `globals` from 15.13.0 to 15.14.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.13.0...v15.14.0) Updates `rollup` from 4.28.1 to 4.29.1 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.28.1...v4.29.1) Updates `typescript-eslint` from 8.18.0 to 8.18.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.18.1/packages/typescript-eslint) Updates `webpack-cli` from 5.1.4 to 6.0.1 - [Release notes](https://github.com/webpack/webpack-cli/releases) - [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.1.4...webpack-cli@6.0.1) --- updated-dependencies: - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dependencies-dev - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dependencies-dev - dependency-name: typescript-eslint dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dependencies-dev - dependency-name: webpack-cli dependency-type: direct:development update-type: version-update:semver-major dependency-group: dependencies-dev ... Signed-off-by: dependabot[bot] --- package.json | 8 +- pnpm-lock.yaml | 514 +++++++++++++++++++++++++------------------------ 2 files changed, 263 insertions(+), 259 deletions(-) diff --git a/package.json b/package.json index af4aa27..0b08d59 100644 --- a/package.json +++ b/package.json @@ -80,14 +80,14 @@ "copy-webpack-plugin": "^12.0.2", "css-loader": "^7.1.2", "eslint": "^9.17.0", - "globals": "^15.13.0", + "globals": "^15.14.0", "google-code-prettify": "^1.0.5", "html-webpack-plugin": "^5.6.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "mini-css-extract-plugin": "^2.9.2", "rimraf": "^6.0.1", - "rollup": "^4.28.1", + "rollup": "^4.29.1", "rollup-plugin-ts": "^3.4.5", "sass": "^1.83.0", "sass-loader": "^16.0.4", @@ -96,9 +96,9 @@ "ts-loader": "^9.5.1", "tslib": "^2.8.1", "typescript": "^5.7.2", - "typescript-eslint": "^8.18.0", + "typescript-eslint": "^8.18.1", "webpack": "^5.97.1", - "webpack-cli": "^5.1.4", + "webpack-cli": "^6.0.1", "webpack-dev-server": "^5.2.0" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 145e590..32e8e58 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ importers: devDependencies: '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.28.1) + version: 0.4.4(rollup@4.29.1) '@types/jest': specifier: ^29.5.14 version: 29.5.14 @@ -34,8 +34,8 @@ importers: specifier: ^9.17.0 version: 9.17.0 globals: - specifier: ^15.13.0 - version: 15.13.0 + specifier: ^15.14.0 + version: 15.14.0 google-code-prettify: specifier: ^1.0.5 version: 1.0.5 @@ -55,11 +55,11 @@ importers: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.28.1 - version: 4.28.1 + specifier: ^4.29.1 + version: 4.29.1 rollup-plugin-ts: specifier: ^3.4.5 - version: 3.4.5(@babel/core@7.18.2)(rollup@4.28.1)(typescript@5.7.2) + version: 3.4.5(@babel/core@7.18.2)(rollup@4.29.1)(typescript@5.7.2) sass: specifier: ^1.83.0 version: 1.83.0 @@ -82,17 +82,17 @@ importers: specifier: ^5.7.2 version: 5.7.2 typescript-eslint: - specifier: ^8.18.0 - version: 8.18.0(eslint@9.17.0)(typescript@5.7.2) + specifier: ^8.18.1 + version: 8.18.1(eslint@9.17.0)(typescript@5.7.2) webpack: specifier: ^5.97.1 - version: 5.97.1(webpack-cli@5.1.4) + version: 5.97.1(webpack-cli@6.0.1) webpack-cli: - specifier: ^5.1.4 - version: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) + specifier: ^6.0.1 + version: 6.0.1(webpack-dev-server@5.2.0)(webpack@5.97.1) webpack-dev-server: specifier: ^5.2.0 - version: 5.2.0(webpack-cli@5.1.4)(webpack@5.97.1) + version: 5.2.0(webpack-cli@6.0.1)(webpack@5.97.1) packages: @@ -267,9 +267,9 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@discoveryjs/json-ext@0.5.6': - resolution: {integrity: sha512-ws57AidsDvREKrZKYffXddNkyaF14iHNHm8VQnZH6t99E8gczjNN0GpvcGny0imC80yQ0tHz1xVUKk/KFQSUyA==} - engines: {node: '>=10.0.0'} + '@discoveryjs/json-ext@0.6.3': + resolution: {integrity: sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==} + engines: {node: '>=14.17.0'} '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} @@ -574,98 +574,98 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.28.1': - resolution: {integrity: sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==} + '@rollup/rollup-android-arm-eabi@4.29.1': + resolution: {integrity: sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.28.1': - resolution: {integrity: sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==} + '@rollup/rollup-android-arm64@4.29.1': + resolution: {integrity: sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.28.1': - resolution: {integrity: sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==} + '@rollup/rollup-darwin-arm64@4.29.1': + resolution: {integrity: sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.28.1': - resolution: {integrity: sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==} + '@rollup/rollup-darwin-x64@4.29.1': + resolution: {integrity: sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.28.1': - resolution: {integrity: sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==} + '@rollup/rollup-freebsd-arm64@4.29.1': + resolution: {integrity: sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.28.1': - resolution: {integrity: sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==} + '@rollup/rollup-freebsd-x64@4.29.1': + resolution: {integrity: sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.28.1': - resolution: {integrity: sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==} + '@rollup/rollup-linux-arm-gnueabihf@4.29.1': + resolution: {integrity: sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.28.1': - resolution: {integrity: sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==} + '@rollup/rollup-linux-arm-musleabihf@4.29.1': + resolution: {integrity: sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.28.1': - resolution: {integrity: sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==} + '@rollup/rollup-linux-arm64-gnu@4.29.1': + resolution: {integrity: sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.28.1': - resolution: {integrity: sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==} + '@rollup/rollup-linux-arm64-musl@4.29.1': + resolution: {integrity: sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.28.1': - resolution: {integrity: sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==} + '@rollup/rollup-linux-loongarch64-gnu@4.29.1': + resolution: {integrity: sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.28.1': - resolution: {integrity: sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==} + '@rollup/rollup-linux-powerpc64le-gnu@4.29.1': + resolution: {integrity: sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.28.1': - resolution: {integrity: sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==} + '@rollup/rollup-linux-riscv64-gnu@4.29.1': + resolution: {integrity: sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.28.1': - resolution: {integrity: sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==} + '@rollup/rollup-linux-s390x-gnu@4.29.1': + resolution: {integrity: sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.28.1': - resolution: {integrity: sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==} + '@rollup/rollup-linux-x64-gnu@4.29.1': + resolution: {integrity: sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.28.1': - resolution: {integrity: sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==} + '@rollup/rollup-linux-x64-musl@4.29.1': + resolution: {integrity: sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.28.1': - resolution: {integrity: sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==} + '@rollup/rollup-win32-arm64-msvc@4.29.1': + resolution: {integrity: sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.28.1': - resolution: {integrity: sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==} + '@rollup/rollup-win32-ia32-msvc@4.29.1': + resolution: {integrity: sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.28.1': - resolution: {integrity: sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==} + '@rollup/rollup-win32-x64-msvc@4.29.1': + resolution: {integrity: sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==} cpu: [x64] os: [win32] @@ -821,51 +821,51 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@typescript-eslint/eslint-plugin@8.18.0': - resolution: {integrity: sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==} + '@typescript-eslint/eslint-plugin@8.18.1': + resolution: {integrity: sha512-Ncvsq5CT3Gvh+uJG0Lwlho6suwDfUXH0HztslDf5I+F2wAFAZMRwYLEorumpKLzmO2suAXZ/td1tBg4NZIi9CQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/parser@8.18.0': - resolution: {integrity: sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==} + '@typescript-eslint/parser@8.18.1': + resolution: {integrity: sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/scope-manager@8.18.0': - resolution: {integrity: sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==} + '@typescript-eslint/scope-manager@8.18.1': + resolution: {integrity: sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.18.0': - resolution: {integrity: sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==} + '@typescript-eslint/type-utils@8.18.1': + resolution: {integrity: sha512-jAhTdK/Qx2NJPNOTxXpMwlOiSymtR2j283TtPqXkKBdH8OAMmhiUfP0kJjc/qSE51Xrq02Gj9NY7MwK+UxVwHQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/types@8.18.0': - resolution: {integrity: sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==} + '@typescript-eslint/types@8.18.1': + resolution: {integrity: sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.18.0': - resolution: {integrity: sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==} + '@typescript-eslint/typescript-estree@8.18.1': + resolution: {integrity: sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.18.0': - resolution: {integrity: sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==} + '@typescript-eslint/utils@8.18.1': + resolution: {integrity: sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/visitor-keys@8.18.0': - resolution: {integrity: sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==} + '@typescript-eslint/visitor-keys@8.18.1': + resolution: {integrity: sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@webassemblyjs/ast@1.14.1': @@ -913,26 +913,26 @@ packages: '@webassemblyjs/wast-printer@1.14.1': resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} - '@webpack-cli/configtest@2.1.1': - resolution: {integrity: sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==} - engines: {node: '>=14.15.0'} + '@webpack-cli/configtest@3.0.1': + resolution: {integrity: sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA==} + engines: {node: '>=18.12.0'} peerDependencies: - webpack: 5.x.x - webpack-cli: 5.x.x + webpack: ^5.82.0 + webpack-cli: 6.x.x - '@webpack-cli/info@2.0.2': - resolution: {integrity: sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==} - engines: {node: '>=14.15.0'} + '@webpack-cli/info@3.0.1': + resolution: {integrity: sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ==} + engines: {node: '>=18.12.0'} peerDependencies: - webpack: 5.x.x - webpack-cli: 5.x.x + webpack: ^5.82.0 + webpack-cli: 6.x.x - '@webpack-cli/serve@2.0.5': - resolution: {integrity: sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==} - engines: {node: '>=14.15.0'} + '@webpack-cli/serve@3.0.1': + resolution: {integrity: sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg==} + engines: {node: '>=18.12.0'} peerDependencies: - webpack: 5.x.x - webpack-cli: 5.x.x + webpack: ^5.82.0 + webpack-cli: 6.x.x webpack-dev-server: '*' peerDependenciesMeta: webpack-dev-server: @@ -1248,9 +1248,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - colorette@2.0.16: - resolution: {integrity: sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==} - colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -1258,9 +1255,9 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} - commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -1548,8 +1545,8 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} - envinfo@7.8.1: - resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==} + envinfo@7.14.0: + resolution: {integrity: sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==} engines: {node: '>=4'} hasBin: true @@ -1696,8 +1693,9 @@ packages: fast-uri@3.0.3: resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} - fastest-levenshtein@1.0.12: - resolution: {integrity: sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==} + fastest-levenshtein@1.0.16: + resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} + engines: {node: '>= 4.9.1'} fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} @@ -1736,6 +1734,10 @@ packages: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + flatted@3.3.2: resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} @@ -1823,8 +1825,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.13.0: - resolution: {integrity: sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==} + globals@15.14.0: + resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} engines: {node: '>=18'} globby@14.0.0: @@ -1862,10 +1864,6 @@ packages: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} - has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -1993,6 +1991,11 @@ packages: engines: {node: '>=8'} hasBin: true + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true + imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -2026,8 +2029,9 @@ packages: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} - is-core-module@2.8.1: - resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==} + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} is-docker@3.0.0: resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} @@ -2858,8 +2862,9 @@ packages: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} - resolve@1.21.0: - resolution: {integrity: sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==} + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} hasBin: true retry@0.13.1: @@ -2910,8 +2915,8 @@ packages: '@swc/helpers': optional: true - rollup@4.28.1: - resolution: {integrity: sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==} + rollup@4.29.1: + resolution: {integrity: sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3344,8 +3349,8 @@ packages: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} - typescript-eslint@8.18.0: - resolution: {integrity: sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ==} + typescript-eslint@8.18.1: + resolution: {integrity: sha512-Mlaw6yxuaDEPQvb/2Qwu3/TfgeBHy9iTJ3mTwe7OvpPmF6KPQjVOfGyEJpPv6Ez2C34OODChhXrzYw/9phI0MQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -3436,18 +3441,15 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} - webpack-cli@5.1.4: - resolution: {integrity: sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==} - engines: {node: '>=14.15.0'} + webpack-cli@6.0.1: + resolution: {integrity: sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw==} + engines: {node: '>=18.12.0'} hasBin: true peerDependencies: - '@webpack-cli/generators': '*' - webpack: 5.x.x + webpack: ^5.82.0 webpack-bundle-analyzer: '*' webpack-dev-server: '*' peerDependenciesMeta: - '@webpack-cli/generators': - optional: true webpack-bundle-analyzer: optional: true webpack-dev-server: @@ -3475,9 +3477,9 @@ packages: webpack-cli: optional: true - webpack-merge@5.8.0: - resolution: {integrity: sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==} - engines: {node: '>=10.0.0'} + webpack-merge@6.0.1: + resolution: {integrity: sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==} + engines: {node: '>=18.0.0'} webpack-sources@3.2.3: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} @@ -3530,8 +3532,8 @@ packages: engines: {node: '>= 8'} hasBin: true - wildcard@2.0.0: - resolution: {integrity: sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==} + wildcard@2.0.1: + resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} @@ -3801,7 +3803,7 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@discoveryjs/json-ext@0.5.6': {} + '@discoveryjs/json-ext@0.6.3': {} '@eslint-community/eslint-utils@4.4.1(eslint@9.17.0)': dependencies: @@ -4168,77 +4170,77 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/plugin-terser@0.4.4(rollup@4.28.1)': + '@rollup/plugin-terser@0.4.4(rollup@4.29.1)': dependencies: serialize-javascript: 6.0.2 smob: 1.4.1 terser: 5.27.0 optionalDependencies: - rollup: 4.28.1 + rollup: 4.29.1 - '@rollup/pluginutils@5.0.2(rollup@4.28.1)': + '@rollup/pluginutils@5.0.2(rollup@4.29.1)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.28.1 + rollup: 4.29.1 - '@rollup/rollup-android-arm-eabi@4.28.1': + '@rollup/rollup-android-arm-eabi@4.29.1': optional: true - '@rollup/rollup-android-arm64@4.28.1': + '@rollup/rollup-android-arm64@4.29.1': optional: true - '@rollup/rollup-darwin-arm64@4.28.1': + '@rollup/rollup-darwin-arm64@4.29.1': optional: true - '@rollup/rollup-darwin-x64@4.28.1': + '@rollup/rollup-darwin-x64@4.29.1': optional: true - '@rollup/rollup-freebsd-arm64@4.28.1': + '@rollup/rollup-freebsd-arm64@4.29.1': optional: true - '@rollup/rollup-freebsd-x64@4.28.1': + '@rollup/rollup-freebsd-x64@4.29.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.28.1': + '@rollup/rollup-linux-arm-gnueabihf@4.29.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.28.1': + '@rollup/rollup-linux-arm-musleabihf@4.29.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.28.1': + '@rollup/rollup-linux-arm64-gnu@4.29.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.28.1': + '@rollup/rollup-linux-arm64-musl@4.29.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.28.1': + '@rollup/rollup-linux-loongarch64-gnu@4.29.1': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.28.1': + '@rollup/rollup-linux-powerpc64le-gnu@4.29.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.28.1': + '@rollup/rollup-linux-riscv64-gnu@4.29.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.28.1': + '@rollup/rollup-linux-s390x-gnu@4.29.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.28.1': + '@rollup/rollup-linux-x64-gnu@4.29.1': optional: true - '@rollup/rollup-linux-x64-musl@4.28.1': + '@rollup/rollup-linux-x64-musl@4.29.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.28.1': + '@rollup/rollup-win32-arm64-msvc@4.29.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.28.1': + '@rollup/rollup-win32-ia32-msvc@4.29.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.28.1': + '@rollup/rollup-win32-x64-msvc@4.29.1': optional: true '@sinclair/typebox@0.27.8': {} @@ -4426,14 +4428,14 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.18.1(@typescript-eslint/parser@8.18.1(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.18.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.18.0 - '@typescript-eslint/type-utils': 8.18.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.18.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.18.0 + '@typescript-eslint/parser': 8.18.1(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.18.1 + '@typescript-eslint/type-utils': 8.18.1(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.18.1(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.18.1 eslint: 9.17.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -4443,27 +4445,27 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.18.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.18.1(eslint@9.17.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 8.18.0 - '@typescript-eslint/types': 8.18.0 - '@typescript-eslint/typescript-estree': 8.18.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.18.0 + '@typescript-eslint/scope-manager': 8.18.1 + '@typescript-eslint/types': 8.18.1 + '@typescript-eslint/typescript-estree': 8.18.1(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.18.1 debug: 4.4.0 eslint: 9.17.0 typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.18.0': + '@typescript-eslint/scope-manager@8.18.1': dependencies: - '@typescript-eslint/types': 8.18.0 - '@typescript-eslint/visitor-keys': 8.18.0 + '@typescript-eslint/types': 8.18.1 + '@typescript-eslint/visitor-keys': 8.18.1 - '@typescript-eslint/type-utils@8.18.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.18.1(eslint@9.17.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.18.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.18.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.18.1(typescript@5.7.2) + '@typescript-eslint/utils': 8.18.1(eslint@9.17.0)(typescript@5.7.2) debug: 4.4.0 eslint: 9.17.0 ts-api-utils: 1.4.3(typescript@5.7.2) @@ -4471,12 +4473,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.18.0': {} + '@typescript-eslint/types@8.18.1': {} - '@typescript-eslint/typescript-estree@8.18.0(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@8.18.1(typescript@5.7.2)': dependencies: - '@typescript-eslint/types': 8.18.0 - '@typescript-eslint/visitor-keys': 8.18.0 + '@typescript-eslint/types': 8.18.1 + '@typescript-eslint/visitor-keys': 8.18.1 debug: 4.4.0 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -4487,20 +4489,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.18.0(eslint@9.17.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.18.1(eslint@9.17.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) - '@typescript-eslint/scope-manager': 8.18.0 - '@typescript-eslint/types': 8.18.0 - '@typescript-eslint/typescript-estree': 8.18.0(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.18.1 + '@typescript-eslint/types': 8.18.1 + '@typescript-eslint/typescript-estree': 8.18.1(typescript@5.7.2) eslint: 9.17.0 typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.18.0': + '@typescript-eslint/visitor-keys@8.18.1': dependencies: - '@typescript-eslint/types': 8.18.0 + '@typescript-eslint/types': 8.18.1 eslint-visitor-keys: 4.2.0 '@webassemblyjs/ast@1.14.1': @@ -4579,22 +4581,22 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.97.1)': + '@webpack-cli/configtest@3.0.1(webpack-cli@6.0.1)(webpack@5.97.1)': dependencies: - webpack: 5.97.1(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) + webpack: 5.97.1(webpack-cli@6.0.1) + webpack-cli: 6.0.1(webpack-dev-server@5.2.0)(webpack@5.97.1) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.97.1)': + '@webpack-cli/info@3.0.1(webpack-cli@6.0.1)(webpack@5.97.1)': dependencies: - webpack: 5.97.1(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) + webpack: 5.97.1(webpack-cli@6.0.1) + webpack-cli: 6.0.1(webpack-dev-server@5.2.0)(webpack@5.97.1) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.2.0)(webpack@5.97.1)': + '@webpack-cli/serve@3.0.1(webpack-cli@6.0.1)(webpack-dev-server@5.2.0)(webpack@5.97.1)': dependencies: - webpack: 5.97.1(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) + webpack: 5.97.1(webpack-cli@6.0.1) + webpack-cli: 6.0.1(webpack-dev-server@5.2.0)(webpack@5.97.1) optionalDependencies: - webpack-dev-server: 5.2.0(webpack-cli@5.1.4)(webpack@5.97.1) + webpack-dev-server: 5.2.0(webpack-cli@6.0.1)(webpack@5.97.1) '@wessberg/stringutil@1.0.19': {} @@ -4912,7 +4914,7 @@ snapshots: clean-webpack-plugin@4.0.0(webpack@5.97.1): dependencies: del: 4.1.1 - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) cliui@7.0.4: dependencies: @@ -4936,15 +4938,13 @@ snapshots: color-name@1.1.4: {} - colorette@2.0.16: {} - colorette@2.0.20: {} combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 - commander@10.0.1: {} + commander@12.1.0: {} commander@2.20.3: {} @@ -4999,7 +4999,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) core-util-is@1.0.3: {} @@ -5039,7 +5039,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.2 optionalDependencies: - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) css-select@4.3.0: dependencies: @@ -5211,7 +5211,7 @@ snapshots: entities@4.5.0: {} - envinfo@7.8.1: {} + envinfo@7.14.0: {} error-ex@1.3.2: dependencies: @@ -5403,7 +5403,7 @@ snapshots: fast-uri@3.0.3: {} - fastest-levenshtein@1.0.12: {} + fastest-levenshtein@1.0.16: {} fastq@1.17.1: dependencies: @@ -5456,6 +5456,8 @@ snapshots: flatted: 3.3.2 keyv: 4.5.4 + flat@5.0.2: {} + flatted@3.3.2: {} follow-redirects@1.15.9: {} @@ -5535,7 +5537,7 @@ snapshots: globals@14.0.0: {} - globals@15.13.0: {} + globals@15.14.0: {} globby@14.0.0: dependencies: @@ -5572,10 +5574,6 @@ snapshots: has-symbols@1.1.0: {} - has@1.0.3: - dependencies: - function-bind: 1.1.2 - hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -5619,7 +5617,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) htmlparser2@6.1.0: dependencies: @@ -5726,6 +5724,11 @@ snapshots: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 + import-local@3.2.0: + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + imurmurhash@0.1.4: {} inflight@1.0.6: @@ -5749,9 +5752,9 @@ snapshots: dependencies: binary-extensions: 2.3.0 - is-core-module@2.8.1: + is-core-module@2.16.1: dependencies: - has: 1.0.3 + hasown: 2.0.2 is-docker@3.0.0: {} @@ -6052,7 +6055,7 @@ snapshots: jest-pnp-resolver: 1.2.2(jest-resolve@29.7.0) jest-util: 29.7.0 jest-validate: 29.7.0 - resolve: 1.21.0 + resolve: 1.22.10 resolve.exports: 2.0.2 slash: 3.0.0 @@ -6381,7 +6384,7 @@ snapshots: dependencies: schema-utils: 4.2.0 tapable: 2.2.1 - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) minimalistic-assert@1.0.1: {} @@ -6707,7 +6710,7 @@ snapshots: rechoir@0.8.0: dependencies: - resolve: 1.21.0 + resolve: 1.22.10 relateurl@0.2.7: {} @@ -6735,9 +6738,9 @@ snapshots: resolve.exports@2.0.2: {} - resolve@1.21.0: + resolve@1.22.10: dependencies: - is-core-module: 2.8.1 + is-core-module: 2.16.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -6754,9 +6757,9 @@ snapshots: glob: 11.0.0 package-json-from-dist: 1.0.0 - rollup-plugin-ts@3.4.5(@babel/core@7.18.2)(rollup@4.28.1)(typescript@5.7.2): + rollup-plugin-ts@3.4.5(@babel/core@7.18.2)(rollup@4.29.1)(typescript@5.7.2): dependencies: - '@rollup/pluginutils': 5.0.2(rollup@4.28.1) + '@rollup/pluginutils': 5.0.2(rollup@4.29.1) '@wessberg/stringutil': 1.0.19 ansi-colors: 4.1.3 browserslist: 4.21.10 @@ -6764,36 +6767,36 @@ snapshots: compatfactory: 3.0.0(typescript@5.7.2) crosspath: 2.0.0 magic-string: 0.30.2 - rollup: 4.28.1 + rollup: 4.29.1 ts-clone-node: 3.0.0(typescript@5.7.2) tslib: 2.8.1 typescript: 5.7.2 optionalDependencies: '@babel/core': 7.18.2 - rollup@4.28.1: + rollup@4.29.1: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.28.1 - '@rollup/rollup-android-arm64': 4.28.1 - '@rollup/rollup-darwin-arm64': 4.28.1 - '@rollup/rollup-darwin-x64': 4.28.1 - '@rollup/rollup-freebsd-arm64': 4.28.1 - '@rollup/rollup-freebsd-x64': 4.28.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.28.1 - '@rollup/rollup-linux-arm-musleabihf': 4.28.1 - '@rollup/rollup-linux-arm64-gnu': 4.28.1 - '@rollup/rollup-linux-arm64-musl': 4.28.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.28.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.28.1 - '@rollup/rollup-linux-riscv64-gnu': 4.28.1 - '@rollup/rollup-linux-s390x-gnu': 4.28.1 - '@rollup/rollup-linux-x64-gnu': 4.28.1 - '@rollup/rollup-linux-x64-musl': 4.28.1 - '@rollup/rollup-win32-arm64-msvc': 4.28.1 - '@rollup/rollup-win32-ia32-msvc': 4.28.1 - '@rollup/rollup-win32-x64-msvc': 4.28.1 + '@rollup/rollup-android-arm-eabi': 4.29.1 + '@rollup/rollup-android-arm64': 4.29.1 + '@rollup/rollup-darwin-arm64': 4.29.1 + '@rollup/rollup-darwin-x64': 4.29.1 + '@rollup/rollup-freebsd-arm64': 4.29.1 + '@rollup/rollup-freebsd-x64': 4.29.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.29.1 + '@rollup/rollup-linux-arm-musleabihf': 4.29.1 + '@rollup/rollup-linux-arm64-gnu': 4.29.1 + '@rollup/rollup-linux-arm64-musl': 4.29.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.29.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.29.1 + '@rollup/rollup-linux-riscv64-gnu': 4.29.1 + '@rollup/rollup-linux-s390x-gnu': 4.29.1 + '@rollup/rollup-linux-x64-gnu': 4.29.1 + '@rollup/rollup-linux-x64-musl': 4.29.1 + '@rollup/rollup-win32-arm64-msvc': 4.29.1 + '@rollup/rollup-win32-ia32-msvc': 4.29.1 + '@rollup/rollup-win32-x64-msvc': 4.29.1 fsevents: 2.3.3 rrweb-cssom@0.7.1: {} @@ -6815,7 +6818,7 @@ snapshots: neo-async: 2.6.2 optionalDependencies: sass: 1.83.0 - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) sass@1.83.0: dependencies: @@ -7070,7 +7073,7 @@ snapshots: style-loader@4.0.0(webpack@5.97.1): dependencies: - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) supports-color@7.2.0: dependencies: @@ -7093,7 +7096,7 @@ snapshots: schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.37.0 - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) terser@5.27.0: dependencies: @@ -7203,7 +7206,7 @@ snapshots: semver: 7.5.4 source-map: 0.7.4 typescript: 5.7.2 - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) tslib@2.8.1: {} @@ -7224,11 +7227,11 @@ snapshots: media-typer: 0.3.0 mime-types: 2.1.35 - typescript-eslint@8.18.0(eslint@9.17.0)(typescript@5.7.2): + typescript-eslint@8.18.1(eslint@9.17.0)(typescript@5.7.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/parser': 8.18.0(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.18.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/eslint-plugin': 8.18.1(@typescript-eslint/parser@8.18.1(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.18.1(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.18.1(eslint@9.17.0)(typescript@5.7.2) eslint: 9.17.0 typescript: 5.7.2 transitivePeerDependencies: @@ -7306,24 +7309,24 @@ snapshots: webidl-conversions@7.0.0: {} - webpack-cli@5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1): + webpack-cli@6.0.1(webpack-dev-server@5.2.0)(webpack@5.97.1): dependencies: - '@discoveryjs/json-ext': 0.5.6 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.97.1) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.97.1) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.2.0)(webpack@5.97.1) - colorette: 2.0.16 - commander: 10.0.1 + '@discoveryjs/json-ext': 0.6.3 + '@webpack-cli/configtest': 3.0.1(webpack-cli@6.0.1)(webpack@5.97.1) + '@webpack-cli/info': 3.0.1(webpack-cli@6.0.1)(webpack@5.97.1) + '@webpack-cli/serve': 3.0.1(webpack-cli@6.0.1)(webpack-dev-server@5.2.0)(webpack@5.97.1) + colorette: 2.0.20 + commander: 12.1.0 cross-spawn: 7.0.6 - envinfo: 7.8.1 - fastest-levenshtein: 1.0.12 - import-local: 3.1.0 + envinfo: 7.14.0 + fastest-levenshtein: 1.0.16 + import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.97.1(webpack-cli@5.1.4) - webpack-merge: 5.8.0 + webpack: 5.97.1(webpack-cli@6.0.1) + webpack-merge: 6.0.1 optionalDependencies: - webpack-dev-server: 5.2.0(webpack-cli@5.1.4)(webpack@5.97.1) + webpack-dev-server: 5.2.0(webpack-cli@6.0.1)(webpack@5.97.1) webpack-dev-middleware@7.4.2(webpack@5.97.1): dependencies: @@ -7334,9 +7337,9 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.3.0 optionalDependencies: - webpack: 5.97.1(webpack-cli@5.1.4) + webpack: 5.97.1(webpack-cli@6.0.1) - webpack-dev-server@5.2.0(webpack-cli@5.1.4)(webpack@5.97.1): + webpack-dev-server@5.2.0(webpack-cli@6.0.1)(webpack@5.97.1): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -7366,22 +7369,23 @@ snapshots: webpack-dev-middleware: 7.4.2(webpack@5.97.1) ws: 8.18.0 optionalDependencies: - webpack: 5.97.1(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) + webpack: 5.97.1(webpack-cli@6.0.1) + webpack-cli: 6.0.1(webpack-dev-server@5.2.0)(webpack@5.97.1) transitivePeerDependencies: - bufferutil - debug - supports-color - utf-8-validate - webpack-merge@5.8.0: + webpack-merge@6.0.1: dependencies: clone-deep: 4.0.1 - wildcard: 2.0.0 + flat: 5.0.2 + wildcard: 2.0.1 webpack-sources@3.2.3: {} - webpack@5.97.1(webpack-cli@5.1.4): + webpack@5.97.1(webpack-cli@6.0.1): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -7407,7 +7411,7 @@ snapshots: watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: - webpack-cli: 5.1.4(webpack-dev-server@5.2.0)(webpack@5.97.1) + webpack-cli: 6.0.1(webpack-dev-server@5.2.0)(webpack@5.97.1) transitivePeerDependencies: - '@swc/core' - esbuild @@ -7447,7 +7451,7 @@ snapshots: dependencies: isexe: 2.0.0 - wildcard@2.0.0: {} + wildcard@2.0.1: {} word-wrap@1.2.5: {} From 29b85f010645227c986303a5a59b833c516df8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Pereira=20Mu=C3=B1oz?= Date: Sun, 22 Dec 2024 16:01:23 +0100 Subject: [PATCH 2/2] Update bundles --- dist/web/isometric.js | 2 +- docs/scripts/bundle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/web/isometric.js b/dist/web/isometric.js index 9ab2f4f..2f19606 100644 --- a/dist/web/isometric.js +++ b/dist/web/isometric.js @@ -1 +1 @@ -var isometric=function(t){"use strict";var e,n,i="http://www.w3.org/2000/svg";!function(t){t.svg="svg",t.group="g",t.path="path",t.rect="rect",t.text="text",t.tspan="tspan",t.pattern="pattern",t.image="image",t.animate="animate",t.animateTransform="animateTransform"}(e||(e={})),function(t){t.viewBox="viewBox"}(n||(n={}));Math.sqrt(3).toFixed(6);var r,o,a,s,c,h,u,l,p,d=+(Math.sqrt(3)/2).toFixed(6),f="(-?\\d+(?:\\.\\d+)?|-?\\.\\d+)",m="\\s*",g="\\s+",y="".concat(f).concat(g).concat(f).concat(g).concat(f),v="".concat(y).concat(g).concat(y),b=new RegExp("(?:(M|L)".concat(m).concat(y).concat(m,"|(C)").concat(m).concat(v,")").concat(m),"g"),_=Math.sqrt(1.5),x=Math.PI/3,E=Math.PI/4,O=Math.atan(Math.SQRT2);!function(t){t.white="white",t.black="black"}(r||(r={})),t.LineCap=void 0,(o=t.LineCap||(t.LineCap={})).butt="butt",o.square="square",o.round="round",t.LineJoin=void 0,(a=t.LineJoin||(t.LineJoin={})).miter="miter",a.round="round",a.bevel="bevel",function(t){t.move="move",t.line="line",t.curve="curve"}(s||(s={})),t.PlaneView=void 0,(c=t.PlaneView||(t.PlaneView={})).FRONT="FRONT",c.SIDE="SIDE",c.TOP="TOP",t.Axis=void 0,(h=t.Axis||(t.Axis={})).RIGHT="RIGHT",h.LEFT="LEFT",h.TOP="TOP",function(t){t.UNDEFINED="undefined",t.NUMBER="number"}(u||(u={})),function(t){t.MOUSE_MOVE="mousemove",t.MOUSE_DOWN="mousedown",t.MOUSE_UP="mouseup",t.TOUCH_START="touchstart",t.TOUCH_MOVE="touchmove",t.TOUCH_END="touchend"}(l||(l={})),function(t){t.CENTER="center",t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(p||(p={}));var P=function(t,e){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},P(t,e)};function w(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var C=function(){return C=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0?0:1);return"A ".concat(d[0]," ").concat(d[1]," ").concat(d[2]," 0 ").concat(f," ").concat(u.x," ").concat(u.y)}}));if(o.length){var a=r?"z":"";return"".concat(o.join(" ").trim()).concat(a)}return""},Q=function(t){for(var e,n=[];null!==(e=b.exec(t));){switch(e[5]||e[1]){case"M":n.push({command:s.move,point:{r:+e[2],l:+e[3],t:+e[4]}});break;case"L":n.push({command:s.line,point:{r:+e[2],l:+e[3],t:+e[4]}});break;case"C":n.push({command:s.curve,control:{r:+e[6],l:+e[7],t:+e[8]},point:{r:+e[9],l:+e[10],t:+e[11]}})}}return n},K=function(t,e,n,i){t.forEach((function(t){t.point.r+=e,t.point.l+=n,t.point.t+=i,t.control&&(t.control.r+=e,t.control.l+=n,t.control.t+=i)}))},Z=function(t){return["fillColor","fillOpacity","strokeColor","strokeOpacity","strokeWidth"].includes(t)};function $(t,e,n,i,r){var o={fn:i,fnBind:i.bind(this)};e.push(o),t.addEventListener(n,o.fnBind,r)}var tt,et=function(e,n,i,r){var o=function(e,n){var i=[],r=n?Y(e,n):null;switch(r&&i.push(r),e){case t.PlaneView.TOP:return F.apply(void 0,T([z],i,!1));case t.PlaneView.FRONT:return F.apply(void 0,T([X],i,!1));case t.PlaneView.SIDE:return F.apply(void 0,T([H],i,!1))}return null}(n,r),a="translate(".concat(e.x," ").concat(e.y,")");if(o){var s=S(o[0][0],6),c=S(o[1][0],6),h=S(o[0][1],6),u=S(o[1][1],6);a+=" matrix(".concat(s,",").concat(c,",").concat(h,",").concat(u,",0,0)"),a+=" scale(".concat(S(_*(i||1),6),")")}else i&&(a+=" scale(".concat(S(i,6),")"));return a},nt=function(t){return!!t.parentNode&&("SVGSVGElement"===t.parentNode.constructor.name||nt(t.parentNode))},it=function(){function t(t,e,n){this.sizes={centerX:t/2,centerY:e/2,height:e,width:t,scale:n}}return Object.defineProperty(t.prototype,"width",{get:function(){return this.sizes.width},set:function(t){this.sizes.width=t,this.sizes.centerX=t/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.sizes.height},set:function(t){this.sizes.height=t,this.sizes.centerY=t/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.sizes.scale},set:function(t){this.sizes.scale=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.sizes.centerX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.sizes.centerY},enumerable:!1,configurable:!0}),t}(),rt=function(t){function e(e,n){var r=t.call(this)||this;return r._id=e,r.listeners=[],r.element=document.createElementNS(i,n),W(r.element,{id:r._id}),r}return w(e,t),e.prototype.setId=function(t){this._id=t,W(this.element,{id:this._id})},e.prototype.getElement=function(){return this.element},e.prototype.addEventListener=function(t,e,n){return void 0===n&&(n=!1),$.call(this,this.element,this.listeners,t,e,n),this},e.prototype.removeEventListener=function(t,e,n){return void 0===n&&(n=!1),function(t,e,n,i,r){var o;e.find((function(t,n){if(t.fn===i)return o=e.splice(n,1)[0],!0})),o&&t.removeEventListener(n,o.fnBind,r)}(this.element,this.listeners,t,e,n),this},e}(function(){function t(){}return Object.defineProperty(t.prototype,"data",{get:function(){return this.dataStore},set:function(t){this.dataStore=t},enumerable:!1,configurable:!0}),t}()),ot={fillColor:r.white,fillOpacity:1,strokeColor:r.black,strokeDashArray:[],strokeLinecap:t.LineCap.butt,strokeLinejoin:t.LineJoin.round,strokeOpacity:1,strokeWidth:1},at=function(n){function r(t,e){var i=n.call(this,t.id||R(),e)||this;i.props=C(C({},ot),t),i.animations=[],i.props.texture&&i.createTexture(i.props.texture);var r={fill:i.props.texture?"url(#".concat(i.patternId,") ").concat(i.fillColor):i.fillColor,"fill-opacity":"".concat(i.fillOpacity),stroke:i.strokeColor,"stroke-dasharray":i.strokeDashArray.join(" "),"stroke-linecap":i.strokeLinecap,"stroke-linejoin":i.strokeLinejoin,"stroke-opacity":"".concat(i.strokeOpacity),"stroke-width":"".concat(i.strokeWidth)};return i.props.className&&(r.class=i.props.className),W(i.element,r),i}return w(r,n),r.prototype.createTexture=function(t){this.patternId="".concat(this.id,"__texture"),this.pattern=document.createElementNS(i,e.pattern),W(this.pattern,{id:this.patternId,preserveAspectRatio:"none",patternUnits:"userSpaceOnUse"});var n=document.createElementNS(i,e.image);W(n,{href:t.url,x:"0",y:"0",preserveAspectRatio:"none"}),t.pixelated&&W(n,{style:"image-rendering: pixelated"}),this.pattern.appendChild(n)},r.prototype._updateTexture=function(){var t=this.pattern.firstChild;this.props.texture.url&&t.getAttribute("href")!==this.props.texture.url&&W(t,{href:this.props.texture.url}),this.props.texture.pixelated?W(t,{style:"image-rendering: pixelated"}):t.removeAttribute("style"),this.update()},r.prototype.addAnimationBasicProperties=function(t,e){W(e.element,{repeatCount:"".concat(e.repeat||"indefinite"),attributeName:t,dur:"".concat(e.duration||1,"s")})},r.prototype.updateAnimations=function(){var t=this;this.animations.forEach((function(n){if(Z(n.property)){var r=function(t){return{fillColor:"fill",fillOpacity:"fill-opacity",strokeColor:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width"}[t]}(n.property);n.element||(n.element=document.createElementNS(i,e.animate)),n.element.parentNode||t.element.appendChild(n.element),t.addAnimationBasicProperties(r,n),n.values?W(n.element,{values:Array.isArray(n.values)?n.values.map((function(t){return"".concat(t)})).join(";"):"".concat(n.values)}):W(n.element,{from:"".concat(n.from),to:"".concat(n.to)})}})),this.updateSubClassAnimations()},r.prototype.updatePatternTransform=function(t,e){var n,i,r;if(this.props.texture){var o=this.props.texture.height?"".concat(this.props.texture.height*this.data.scale):"100%",a=this.props.texture.width?"".concat(this.props.texture.width*this.data.scale):"100%",s=D(0,0,{r:(null===(n=this.props.texture.shift)||void 0===n?void 0:n.right)||0,l:(null===(i=this.props.texture.shift)||void 0===i?void 0:i.left)||0,t:(null===(r=this.props.texture.shift)||void 0===r?void 0:r.top)||0},this.data.scale),c=et({x:S(t.x+s.x,6),y:S(t.y+s.y,6)},this.props.texture.planeView||e,this.props.texture.scale,this.props.texture.rotation);W(this.pattern,{patternTransform:c,height:o,width:a}),W(this.pattern.firstChild,{height:o,width:a})}},Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(t){this.setId(t),this.pattern&&(this.patternId="".concat(this.id,"__texture"),W(this.pattern,{id:this.patternId}))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fillColor",{get:function(){return this.props.fillColor},set:function(t){this.props.fillColor=t,W(this.element,{fill:this.props.texture?"url(#".concat(this.patternId,") ").concat(this.fillColor):this.fillColor})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fillOpacity",{get:function(){return this.props.fillOpacity},set:function(t){this.props.fillOpacity=t,W(this.element,{"fill-opacity":"".concat(this.fillOpacity)})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texture",{get:function(){return this.props.texture},set:function(t){var e=!!this.props.texture;this.props.texture=t,e?this._updateTexture():(this.createTexture(this.props.texture),this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeColor",{get:function(){return this.props.strokeColor},set:function(t){this.props.strokeColor=t,W(this.element,{stroke:this.strokeColor})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeDashArray",{get:function(){return this.props.strokeDashArray},set:function(t){this.props.strokeDashArray=t,W(this.element,{"stroke-dasharray":this.strokeDashArray.join(" ")})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeLinecap",{get:function(){return this.props.strokeLinecap},set:function(e){this.props.strokeLinecap=t.LineCap[e],W(this.element,{"stroke-linecap":this.strokeLinecap})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeLinejoin",{get:function(){return this.props.strokeLinejoin},set:function(e){this.props.strokeLinejoin=t.LineJoin[e],W(this.element,{"stroke-linejoin":this.strokeLinejoin})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeOpacity",{get:function(){return this.props.strokeOpacity},set:function(t){this.props.strokeOpacity=t,W(this.element,{"stroke-opacity":"".concat(this.strokeOpacity)})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeWidth",{get:function(){return this.props.strokeWidth},set:function(t){this.props.strokeWidth=t,W(this.element,{"stroke-width":"".concat(this.strokeWidth)})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"className",{get:function(){return this.props.className},set:function(t){this.props.className=t,W(this.element,{class:this.props.className})},enumerable:!1,configurable:!0}),r.prototype.getPattern=function(){return this.pattern},r.prototype.updateTexture=function(t){var e=!!this.props.texture;if(e||t.url){var n=t.shift,i=t.rotation,r=A(t,["shift","rotation"]);this.props.texture=C(e?C({},this.props.texture):{},r),n&&(this.props.texture.shift=C(C({},this.props.texture.shift||{}),n)),i&&(this.props.texture.rotation=i),e?this._updateTexture():(this.createTexture(this.props.texture),this.update())}return this},r.prototype.addAnimation=function(t){return this.animations.push(C({},t)),this.update(),this},r.prototype.removeAnimationByIndex=function(t){if(t>=0&&t-1)return this._children.splice(e,1),this.removeSVGChild(t),this;this.throwChildError()},e.prototype.removeChildren=function(){for(var t=this,e=[],n=0;n=0&&t-1){e=Math.min(Math.max(0,e),this._children.length-1);var i=t.getElement(),r=this._children[e].getElement();return this._children[e]!==t&&(this._children.splice(n,1),this._children.splice(e,0,t),n>e?this.element.insertBefore(i,r):r.nextSibling?this.element.insertBefore(i,r.nextSibling):this.element.appendChild(i)),this}this.throwChildError()},e.prototype.bringChildToFront=function(t){if(this.getChildIndex(t)>-1)return this.setChildIndex(t,this._children.length-1),this;this.throwChildError()},e.prototype.bringChildForward=function(t){var e=this.getChildIndex(t);if(e>-1)return e-1)return this.setChildIndex(t,0),this;this.throwChildError()},e.prototype.sendChildBackward=function(t){var e=this.getChildIndex(t);if(e>-1)return e>0&&this.setChildIndex(t,e-1),this;this.throwChildError()},e}(rt),ct={container:"body",backgroundColor:r.white,scale:1,height:480,width:640},ht=function(t){function r(r){var o;void 0===r&&(r={});var a=t.call(this,r.id||R(),e.svg)||this;return a.props=C(C({},ct),r),a.isAnimated=!0,a.data=new it(a.props.width,a.props.height,a.props.scale),W(a.element,((o={})[n.viewBox]="0 0 ".concat(a.data.width," ").concat(a.data.height),o.width="".concat(a.data.width,"px"),o.height="".concat(a.data.height,"px"),o)),a.background=document.createElementNS(i,e.rect),W(a.background,{fill:a.backgroundColor,x:"0",y:"0",width:"".concat(a.data.width,"px"),height:"".concat(a.data.height,"px")}),a.element.appendChild(a.background),("string"==typeof a.props.container?document.querySelector(a.props.container):a.props.container).appendChild(a.element),a}return w(r,t),Object.defineProperty(r.prototype,"backgroundColor",{get:function(){return this.props.backgroundColor},set:function(t){this.props.backgroundColor=t,W(this.background,{fill:this.backgroundColor})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scale",{get:function(){return this.data.scale},set:function(t){this.data.scale=t,this.update()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.data.height},set:function(t){var e;this.data.height=t,W(this.element,((e={})[n.viewBox]="0 0 ".concat(this.data.width," ").concat(this.data.height),e.height="".concat(this.data.height,"px"),e)),W(this.background,{height:"".concat(this.data.height,"px")}),this.update()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this.data.width},set:function(t){var e;this.data.width=t,W(this.element,((e={})[n.viewBox]="0 0 ".concat(this.data.width," ").concat(this.data.height),e.width="".concat(this.data.width,"px"),e)),W(this.background,{width:"".concat(this.data.width,"px")}),this.update()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animated",{get:function(){return this.isAnimated},enumerable:!1,configurable:!0}),r.prototype.getSVGCode=function(){return this.element.outerHTML},r.prototype.pauseAnimations=function(){var t=this.element;return"function"==typeof t.pauseAnimations&&t.pauseAnimations(),this.isAnimated=!1,this},r.prototype.resumeAnimations=function(){var t=this.element;return"function"==typeof t.unpauseAnimations&&t.unpauseAnimations(),this.isAnimated=!0,this},r}(st),ut=function(t,e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))}))},lt=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];!function(t){t.DRAG_START="dragstart",t.DRAG="drag",t.DRAG_END="dragend"}(tt||(tt={}));var pt=typeof window!==u.UNDEFINED,dt=pt?window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame:null,ft={right:0,left:0,top:0,x:0,y:0},mt=function(t){return t instanceof Event?function(t){return"clientX"in t}(t)?{clientX:t.clientX,clientY:t.clientY}:{clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},gt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),n.prototype.setup=function(){this.startDrag=this.startDrag.bind(this),this.stopDrag=this.stopDrag.bind(this),this.moveElement=this.moveElement.bind(this),this.dropElement=this.dropElement.bind(this),this.animate=this.animate.bind(this),typeof this._bounds===u.UNDEFINED&&(this._bounds=!1),typeof this._dragStore===u.UNDEFINED&&(this._dragStore=ft),typeof this._coords===u.UNDEFINED&&(this._coords={})},n.prototype.betweenBounds=function(t,e){var n=T([],e,!0).sort();return S(Math.min(Math.max(t,n[0]),n[1]),6)},n.prototype.getBoundOrMaximum=function(t){var e;return this.bounds&&null!==(e=this.bounds[t])&&void 0!==e?e:T([],lt,!0)},n.prototype.getRight=function(t){var e=this.getBoundOrMaximum("right");return this.betweenBounds(this._dragStore.right+t/this.data.scale,e)},n.prototype.getLeft=function(t){var e=this.getBoundOrMaximum("left");return this.betweenBounds(this._dragStore.left+t/this.data.scale,e)},n.prototype.getTop=function(t){var e=this.getBoundOrMaximum("top");return this.betweenBounds(this._dragStore.top+t/this.data.scale,e)},n.prototype.getFixedCoordinates=function(t){var e=this;return Object.entries(t).reduce((function(t,n){var i=C({},t);switch(n[0]){case"right":i.right=e.getRight(n[1]);break;case"left":i.left=e.getLeft(n[1]);break;default:i.top=e.getTop(n[1])}return i}),{})},n.prototype.dispatchEvent=function(t){var e,n,i,r=new CustomEvent(t,{cancelable:t===tt.DRAG,detail:{right:null!==(e=this._coords.right)&&void 0!==e?e:this.right,left:null!==(n=this._coords.left)&&void 0!==n?n:this.left,top:null!==(i=this._coords.top)&&void 0!==i?i:this.top}});return this.element.dispatchEvent(r),r},n.prototype.animate=function(){this._update&&(this._prevented||(typeof this._coords.right===u.NUMBER&&(this.right=this._coords.right),typeof this._coords.left===u.NUMBER&&(this.left=this._coords.left),typeof this._coords.top===u.NUMBER&&(this.top=this._coords.top)),dt(this.animate))},n.prototype.startDrag=function(t){t.preventDefault();var e=mt(t),n=e.clientX,i=e.clientY;this._dragStore.x=n,this._dragStore.y=i,this._dragStore.right=this.right,this._dragStore.left=this.left,this._dragStore.top=this.top,this._update=!0,this.moveElement({clientX:n,clientY:i}),this.element.addEventListener(l.TOUCH_MOVE,this.moveElement,!0),this.element.addEventListener(l.TOUCH_END,this.dropElement,!0),document.addEventListener(l.MOUSE_MOVE,this.moveElement,!0),document.addEventListener(l.MOUSE_UP,this.dropElement,!0),dt(this.animate)},n.prototype.moveElement=function(e){var n,i,r,o=mt(e),a=o.clientX,s=o.clientY,c=a-this._dragStore.x,h=s-this._dragStore.y;this._drag===t.PlaneView.TOP?this._coords=this.getFixedCoordinates({right:i=(2*h+(n=c/d))/2,left:i-n}):this._drag===t.PlaneView.FRONT?this._coords=this.getFixedCoordinates(function(t,e){var n=-t/d;return{left:n,top:n/2-e}}(c,h)):this._coords=this.getFixedCoordinates(function(t,e){var n=t/d;return{right:n,top:n/2-e}}(c,h)),e instanceof Event&&(e.preventDefault(),this._dragging||this.dispatchEvent(tt.DRAG_START),this._dragging=!0,r=this.dispatchEvent(tt.DRAG)),this._prevented=!(!r||!r.defaultPrevented)},n.prototype.dropElement=function(){this._update=!1,this._dragging=!1,this.element.removeEventListener(l.TOUCH_MOVE,this.moveElement,!0),this.element.removeEventListener(l.TOUCH_END,this.dropElement,!0),document.removeEventListener(l.MOUSE_MOVE,this.moveElement,!0),document.removeEventListener(l.MOUSE_UP,this.dropElement,!0),this.dispatchEvent(tt.DRAG_END)},n.prototype.beginDrag=function(){this.element.addEventListener(l.TOUCH_START,this.startDrag,!0),this.element.addEventListener(l.MOUSE_DOWN,this.startDrag,!0)},n.prototype.stopDrag=function(){this.element.removeEventListener(l.TOUCH_START,this.startDrag,!0),this.element.removeEventListener(l.TOUCH_MOVE,this.moveElement,!0),this.element.removeEventListener(l.TOUCH_END,this.dropElement,!0),this.element.removeEventListener(l.MOUSE_DOWN,this.startDrag,!0),document.removeEventListener(l.MOUSE_MOVE,this.moveElement,!0),document.removeEventListener(l.MOUSE_UP,this.dropElement,!0)},Object.defineProperty(n.prototype,"right",{get:function(){return this.props.right},set:function(t){this.props.right!==t&&(this.props.right=t,this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this.props.left},set:function(t){this.props.left!==t&&(this.props.left=t,this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.props.top},set:function(t){this.props.top!==t&&(this.props.top=t,this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"drag",{get:function(){return this._drag||!1},set:function(t){typeof this._drag===u.UNDEFINED&&this.setup(),this._drag=t,pt&&(this.stopDrag(),this.beginDrag())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"bounds",{get:function(){return this._bounds||!1},set:function(t){this._bounds=t;var e=this.getBoundOrMaximum("right"),n=this.getBoundOrMaximum("left"),i=this.getBoundOrMaximum("top");this.right=this.betweenBounds(this.right,e),this.left=this.betweenBounds(this.left,n),this.top=this.betweenBounds(this.top,i)},enumerable:!1,configurable:!0}),n}(rt),yt={right:0,left:0,top:0},vt=function(t){function n(n){void 0===n&&(n={});var i=t.call(this,n.id||R(),e.group)||this;return i.props=C(C({},yt),n),i}return w(n,t),n.prototype.update=function(){if(nt(this.element)){var e=D(0,0,{r:this.props.right,l:this.props.left,t:this.props.top},this.data.scale);W(this.element,{transform:"translate(".concat(e.x,", ").concat(e.y,")")})}return t.prototype.update.call(this)},n}(st);ut(vt,gt);var bt=function(t){function e(e,n){return t.call(this,e,n)||this}return w(e,t),e.prototype.updateGraphic=function(t,e){if(void 0===e&&(e=!0),nt(this.element)){var n=this.getCommands(),i=function(t,e,n,i){var r={x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER};return q(t).forEach((function(t){var o=D(e,n,t.point,i);(o.x=0?0:1);return"A ".concat(d[0]," ").concat(d[1]," ").concat(d[2]," 0 ").concat(f," ").concat(u.x," ").concat(u.y)}}));if(o.length){var a=r?"z":"";return"".concat(o.join(" ").trim()).concat(a)}return""},Q=function(t){for(var e,n=[];null!==(e=b.exec(t));){switch(e[5]||e[1]){case"M":n.push({command:s.move,point:{r:+e[2],l:+e[3],t:+e[4]}});break;case"L":n.push({command:s.line,point:{r:+e[2],l:+e[3],t:+e[4]}});break;case"C":n.push({command:s.curve,control:{r:+e[6],l:+e[7],t:+e[8]},point:{r:+e[9],l:+e[10],t:+e[11]}})}}return n},K=function(t,e,n,i){t.forEach((function(t){t.point.r+=e,t.point.l+=n,t.point.t+=i,t.control&&(t.control.r+=e,t.control.l+=n,t.control.t+=i)}))},Z=function(t){return["fillColor","fillOpacity","strokeColor","strokeOpacity","strokeWidth"].includes(t)};function $(t,e,n,i,r){var o={fn:i,fnBind:i.bind(this)};e.push(o),t.addEventListener(n,o.fnBind,r)}var tt,et=function(e,n,i,r){var o=function(e,n){var i=[],r=n?Y(e,n):null;switch(r&&i.push(r),e){case t.PlaneView.TOP:return F.apply(void 0,T([z],i,!1));case t.PlaneView.FRONT:return F.apply(void 0,T([X],i,!1));case t.PlaneView.SIDE:return F.apply(void 0,T([H],i,!1))}return null}(n,r),a="translate(".concat(e.x," ").concat(e.y,")");if(o){var s=S(o[0][0],6),c=S(o[1][0],6),h=S(o[0][1],6),u=S(o[1][1],6);a+=" matrix(".concat(s,",").concat(c,",").concat(h,",").concat(u,",0,0)"),a+=" scale(".concat(S(_*(i||1),6),")")}else i&&(a+=" scale(".concat(S(i,6),")"));return a},nt=function(t){return!!t.parentNode&&("SVGSVGElement"===t.parentNode.constructor.name||nt(t.parentNode))},it=function(){function t(t,e,n){this.sizes={centerX:t/2,centerY:e/2,height:e,width:t,scale:n}}return Object.defineProperty(t.prototype,"width",{get:function(){return this.sizes.width},set:function(t){this.sizes.width=t,this.sizes.centerX=t/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.sizes.height},set:function(t){this.sizes.height=t,this.sizes.centerY=t/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.sizes.scale},set:function(t){this.sizes.scale=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.sizes.centerX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.sizes.centerY},enumerable:!1,configurable:!0}),t}(),rt=function(t){function e(e,n){var r=t.call(this)||this;return r._id=e,r.listeners=[],r.element=document.createElementNS(i,n),W(r.element,{id:r._id}),r}return w(e,t),e.prototype.setId=function(t){this._id=t,W(this.element,{id:this._id})},e.prototype.getElement=function(){return this.element},e.prototype.addEventListener=function(t,e,n){return void 0===n&&(n=!1),$.call(this,this.element,this.listeners,t,e,n),this},e.prototype.removeEventListener=function(t,e,n){return void 0===n&&(n=!1),function(t,e,n,i,r){var o;e.find((function(t,n){if(t.fn===i)return o=e.splice(n,1)[0],!0})),o&&t.removeEventListener(n,o.fnBind,r)}(this.element,this.listeners,t,e,n),this},e}(function(){function t(){}return Object.defineProperty(t.prototype,"data",{get:function(){return this.dataStore},set:function(t){this.dataStore=t},enumerable:!1,configurable:!0}),t}()),ot={fillColor:r.white,fillOpacity:1,strokeColor:r.black,strokeDashArray:[],strokeLinecap:t.LineCap.butt,strokeLinejoin:t.LineJoin.round,strokeOpacity:1,strokeWidth:1},at=function(n){function r(t,e){var i=n.call(this,t.id||R(),e)||this;return i.props=C(C({},ot),t),i.animations=[],i.props.texture&&i.createTexture(i.props.texture),W(i.element,C({fill:i.props.texture?"url(#".concat(i.patternId,") ").concat(i.fillColor):i.fillColor,"fill-opacity":"".concat(i.fillOpacity),stroke:i.strokeColor,"stroke-dasharray":i.strokeDashArray.join(" "),"stroke-linecap":i.strokeLinecap,"stroke-linejoin":i.strokeLinejoin,"stroke-opacity":"".concat(i.strokeOpacity),"stroke-width":"".concat(i.strokeWidth)},i.props.className&&{class:i.props.className})),i}return w(r,n),r.prototype.createTexture=function(t){this.patternId="".concat(this.id,"__texture"),this.pattern=document.createElementNS(i,e.pattern),W(this.pattern,{id:this.patternId,preserveAspectRatio:"none",patternUnits:"userSpaceOnUse"});var n=document.createElementNS(i,e.image);W(n,{href:t.url,x:"0",y:"0",preserveAspectRatio:"none"}),t.pixelated&&W(n,{style:"image-rendering: pixelated"}),this.pattern.appendChild(n)},r.prototype._updateTexture=function(){var t=this.pattern.firstChild;this.props.texture.url&&t.getAttribute("href")!==this.props.texture.url&&W(t,{href:this.props.texture.url}),this.props.texture.pixelated?W(t,{style:"image-rendering: pixelated"}):t.removeAttribute("style"),this.update()},r.prototype.addAnimationBasicProperties=function(t,e){W(e.element,{repeatCount:"".concat(e.repeat||"indefinite"),attributeName:t,dur:"".concat(e.duration||1,"s")})},r.prototype.updateAnimations=function(){var t=this;this.animations.forEach((function(n){if(Z(n.property)){var r=function(t){return{fillColor:"fill",fillOpacity:"fill-opacity",strokeColor:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width"}[t]}(n.property);n.element||(n.element=document.createElementNS(i,e.animate)),n.element.parentNode||t.element.appendChild(n.element),t.addAnimationBasicProperties(r,n),n.values?W(n.element,{values:Array.isArray(n.values)?n.values.map((function(t){return"".concat(t)})).join(";"):"".concat(n.values)}):W(n.element,{from:"".concat(n.from),to:"".concat(n.to)})}})),this.updateSubClassAnimations()},r.prototype.updatePatternTransform=function(t,e){var n,i,r;if(this.props.texture){var o=this.props.texture.height?"".concat(this.props.texture.height*this.data.scale):"100%",a=this.props.texture.width?"".concat(this.props.texture.width*this.data.scale):"100%",s=D(0,0,{r:(null===(n=this.props.texture.shift)||void 0===n?void 0:n.right)||0,l:(null===(i=this.props.texture.shift)||void 0===i?void 0:i.left)||0,t:(null===(r=this.props.texture.shift)||void 0===r?void 0:r.top)||0},this.data.scale),c=et({x:S(t.x+s.x,6),y:S(t.y+s.y,6)},this.props.texture.planeView||e,this.props.texture.scale,this.props.texture.rotation);W(this.pattern,{patternTransform:c,height:o,width:a}),W(this.pattern.firstChild,{height:o,width:a})}},Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(t){this.setId(t),this.pattern&&(this.patternId="".concat(this.id,"__texture"),W(this.pattern,{id:this.patternId}))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fillColor",{get:function(){return this.props.fillColor},set:function(t){this.props.fillColor=t,W(this.element,{fill:this.props.texture?"url(#".concat(this.patternId,") ").concat(this.fillColor):this.fillColor})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fillOpacity",{get:function(){return this.props.fillOpacity},set:function(t){this.props.fillOpacity=t,W(this.element,{"fill-opacity":"".concat(this.fillOpacity)})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texture",{get:function(){return this.props.texture},set:function(t){var e=!!this.props.texture;this.props.texture=t,e?this._updateTexture():(this.createTexture(this.props.texture),this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeColor",{get:function(){return this.props.strokeColor},set:function(t){this.props.strokeColor=t,W(this.element,{stroke:this.strokeColor})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeDashArray",{get:function(){return this.props.strokeDashArray},set:function(t){this.props.strokeDashArray=t,W(this.element,{"stroke-dasharray":this.strokeDashArray.join(" ")})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeLinecap",{get:function(){return this.props.strokeLinecap},set:function(e){this.props.strokeLinecap=t.LineCap[e],W(this.element,{"stroke-linecap":this.strokeLinecap})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeLinejoin",{get:function(){return this.props.strokeLinejoin},set:function(e){this.props.strokeLinejoin=t.LineJoin[e],W(this.element,{"stroke-linejoin":this.strokeLinejoin})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeOpacity",{get:function(){return this.props.strokeOpacity},set:function(t){this.props.strokeOpacity=t,W(this.element,{"stroke-opacity":"".concat(this.strokeOpacity)})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"strokeWidth",{get:function(){return this.props.strokeWidth},set:function(t){this.props.strokeWidth=t,W(this.element,{"stroke-width":"".concat(this.strokeWidth)})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"className",{get:function(){return this.props.className},set:function(t){this.props.className=t,W(this.element,{class:this.props.className})},enumerable:!1,configurable:!0}),r.prototype.getPattern=function(){return this.pattern},r.prototype.updateTexture=function(t){var e=!!this.props.texture;if(e||t.url){var n=t.shift,i=t.rotation,r=A(t,["shift","rotation"]);this.props.texture=C(e?C({},this.props.texture):{},r),n&&(this.props.texture.shift=C(C({},this.props.texture.shift||{}),n)),i&&(this.props.texture.rotation=i),e?this._updateTexture():(this.createTexture(this.props.texture),this.update())}return this},r.prototype.addAnimation=function(t){return this.animations.push(C({},t)),this.update(),this},r.prototype.removeAnimationByIndex=function(t){if(t>=0&&t-1)return this._children.splice(e,1),this.removeSVGChild(t),this;this.throwChildError()},e.prototype.removeChildren=function(){for(var t=this,e=[],n=0;n=0&&t-1){e=Math.min(Math.max(0,e),this._children.length-1);var i=t.getElement(),r=this._children[e].getElement();return this._children[e]!==t&&(this._children.splice(n,1),this._children.splice(e,0,t),n>e?this.element.insertBefore(i,r):r.nextSibling?this.element.insertBefore(i,r.nextSibling):this.element.appendChild(i)),this}this.throwChildError()},e.prototype.bringChildToFront=function(t){if(this.getChildIndex(t)>-1)return this.setChildIndex(t,this._children.length-1),this;this.throwChildError()},e.prototype.bringChildForward=function(t){var e=this.getChildIndex(t);if(e>-1)return e-1)return this.setChildIndex(t,0),this;this.throwChildError()},e.prototype.sendChildBackward=function(t){var e=this.getChildIndex(t);if(e>-1)return e>0&&this.setChildIndex(t,e-1),this;this.throwChildError()},e}(rt),ct={container:"body",backgroundColor:r.white,scale:1,height:480,width:640},ht=function(t){function r(r){var o;void 0===r&&(r={});var a=t.call(this,r.id||R(),e.svg)||this;return a.props=C(C({},ct),r),a.isAnimated=!0,a.data=new it(a.props.width,a.props.height,a.props.scale),W(a.element,((o={})[n.viewBox]="0 0 ".concat(a.data.width," ").concat(a.data.height),o.width="".concat(a.data.width,"px"),o.height="".concat(a.data.height,"px"),o)),a.background=document.createElementNS(i,e.rect),W(a.background,{fill:a.backgroundColor,x:"0",y:"0",width:"".concat(a.data.width,"px"),height:"".concat(a.data.height,"px")}),a.element.appendChild(a.background),("string"==typeof a.props.container?document.querySelector(a.props.container):a.props.container).appendChild(a.element),a}return w(r,t),Object.defineProperty(r.prototype,"backgroundColor",{get:function(){return this.props.backgroundColor},set:function(t){this.props.backgroundColor=t,W(this.background,{fill:this.backgroundColor})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scale",{get:function(){return this.data.scale},set:function(t){this.data.scale=t,this.update()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.data.height},set:function(t){var e;this.data.height=t,W(this.element,((e={})[n.viewBox]="0 0 ".concat(this.data.width," ").concat(this.data.height),e.height="".concat(this.data.height,"px"),e)),W(this.background,{height:"".concat(this.data.height,"px")}),this.update()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this.data.width},set:function(t){var e;this.data.width=t,W(this.element,((e={})[n.viewBox]="0 0 ".concat(this.data.width," ").concat(this.data.height),e.width="".concat(this.data.width,"px"),e)),W(this.background,{width:"".concat(this.data.width,"px")}),this.update()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animated",{get:function(){return this.isAnimated},enumerable:!1,configurable:!0}),r.prototype.getSVGCode=function(){return this.element.outerHTML},r.prototype.pauseAnimations=function(){var t=this.element;return"function"==typeof t.pauseAnimations&&t.pauseAnimations(),this.isAnimated=!1,this},r.prototype.resumeAnimations=function(){var t=this.element;return"function"==typeof t.unpauseAnimations&&t.unpauseAnimations(),this.isAnimated=!0,this},r}(st),ut=function(t,e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))}))},lt=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];!function(t){t.DRAG_START="dragstart",t.DRAG="drag",t.DRAG_END="dragend"}(tt||(tt={}));var pt=typeof window!==u.UNDEFINED,dt=pt?window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame:null,ft={right:0,left:0,top:0,x:0,y:0},mt=function(t){return t instanceof Event?function(t){return"clientX"in t}(t)?{clientX:t.clientX,clientY:t.clientY}:{clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},gt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),n.prototype.setup=function(){this.startDrag=this.startDrag.bind(this),this.stopDrag=this.stopDrag.bind(this),this.moveElement=this.moveElement.bind(this),this.dropElement=this.dropElement.bind(this),this.animate=this.animate.bind(this),typeof this._bounds===u.UNDEFINED&&(this._bounds=!1),typeof this._dragStore===u.UNDEFINED&&(this._dragStore=ft),typeof this._coords===u.UNDEFINED&&(this._coords={})},n.prototype.betweenBounds=function(t,e){var n=T([],e,!0).sort();return S(Math.min(Math.max(t,n[0]),n[1]),6)},n.prototype.getBoundOrMaximum=function(t){var e;return this.bounds&&null!==(e=this.bounds[t])&&void 0!==e?e:T([],lt,!0)},n.prototype.getRight=function(t){var e=this.getBoundOrMaximum("right");return this.betweenBounds(this._dragStore.right+t/this.data.scale,e)},n.prototype.getLeft=function(t){var e=this.getBoundOrMaximum("left");return this.betweenBounds(this._dragStore.left+t/this.data.scale,e)},n.prototype.getTop=function(t){var e=this.getBoundOrMaximum("top");return this.betweenBounds(this._dragStore.top+t/this.data.scale,e)},n.prototype.getFixedCoordinates=function(t){var e=this;return Object.entries(t).reduce((function(t,n){var i=C({},t);switch(n[0]){case"right":i.right=e.getRight(n[1]);break;case"left":i.left=e.getLeft(n[1]);break;default:i.top=e.getTop(n[1])}return i}),{})},n.prototype.dispatchEvent=function(t){var e,n,i,r=new CustomEvent(t,{cancelable:t===tt.DRAG,detail:{right:null!==(e=this._coords.right)&&void 0!==e?e:this.right,left:null!==(n=this._coords.left)&&void 0!==n?n:this.left,top:null!==(i=this._coords.top)&&void 0!==i?i:this.top}});return this.element.dispatchEvent(r),r},n.prototype.animate=function(){this._update&&(this._prevented||(typeof this._coords.right===u.NUMBER&&(this.right=this._coords.right),typeof this._coords.left===u.NUMBER&&(this.left=this._coords.left),typeof this._coords.top===u.NUMBER&&(this.top=this._coords.top)),dt(this.animate))},n.prototype.startDrag=function(t){t.preventDefault();var e=mt(t),n=e.clientX,i=e.clientY;this._dragStore.x=n,this._dragStore.y=i,this._dragStore.right=this.right,this._dragStore.left=this.left,this._dragStore.top=this.top,this._update=!0,this.moveElement({clientX:n,clientY:i}),this.element.addEventListener(l.TOUCH_MOVE,this.moveElement,!0),this.element.addEventListener(l.TOUCH_END,this.dropElement,!0),document.addEventListener(l.MOUSE_MOVE,this.moveElement,!0),document.addEventListener(l.MOUSE_UP,this.dropElement,!0),dt(this.animate)},n.prototype.moveElement=function(e){var n,i,r,o=mt(e),a=o.clientX,s=o.clientY,c=a-this._dragStore.x,h=s-this._dragStore.y;this._drag===t.PlaneView.TOP?this._coords=this.getFixedCoordinates({right:i=(2*h+(n=c/d))/2,left:i-n}):this._drag===t.PlaneView.FRONT?this._coords=this.getFixedCoordinates(function(t,e){var n=-t/d;return{left:n,top:n/2-e}}(c,h)):this._coords=this.getFixedCoordinates(function(t,e){var n=t/d;return{right:n,top:n/2-e}}(c,h)),e instanceof Event&&(e.preventDefault(),this._dragging||this.dispatchEvent(tt.DRAG_START),this._dragging=!0,r=this.dispatchEvent(tt.DRAG)),this._prevented=!(!r||!r.defaultPrevented)},n.prototype.dropElement=function(){this._update=!1,this._dragging=!1,this.element.removeEventListener(l.TOUCH_MOVE,this.moveElement,!0),this.element.removeEventListener(l.TOUCH_END,this.dropElement,!0),document.removeEventListener(l.MOUSE_MOVE,this.moveElement,!0),document.removeEventListener(l.MOUSE_UP,this.dropElement,!0),this.dispatchEvent(tt.DRAG_END)},n.prototype.beginDrag=function(){this.element.addEventListener(l.TOUCH_START,this.startDrag,!0),this.element.addEventListener(l.MOUSE_DOWN,this.startDrag,!0)},n.prototype.stopDrag=function(){this.element.removeEventListener(l.TOUCH_START,this.startDrag,!0),this.element.removeEventListener(l.TOUCH_MOVE,this.moveElement,!0),this.element.removeEventListener(l.TOUCH_END,this.dropElement,!0),this.element.removeEventListener(l.MOUSE_DOWN,this.startDrag,!0),document.removeEventListener(l.MOUSE_MOVE,this.moveElement,!0),document.removeEventListener(l.MOUSE_UP,this.dropElement,!0)},Object.defineProperty(n.prototype,"right",{get:function(){return this.props.right},set:function(t){this.props.right!==t&&(this.props.right=t,this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this.props.left},set:function(t){this.props.left!==t&&(this.props.left=t,this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.props.top},set:function(t){this.props.top!==t&&(this.props.top=t,this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"drag",{get:function(){return this._drag||!1},set:function(t){typeof this._drag===u.UNDEFINED&&this.setup(),this._drag=t,pt&&(this.stopDrag(),this.beginDrag())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"bounds",{get:function(){return this._bounds||!1},set:function(t){this._bounds=t;var e=this.getBoundOrMaximum("right"),n=this.getBoundOrMaximum("left"),i=this.getBoundOrMaximum("top");this.right=this.betweenBounds(this.right,e),this.left=this.betweenBounds(this.left,n),this.top=this.betweenBounds(this.top,i)},enumerable:!1,configurable:!0}),n}(rt),yt={right:0,left:0,top:0},vt=function(t){function n(n){void 0===n&&(n={});var i=t.call(this,n.id||R(),e.group)||this;return i.props=C(C({},yt),n),i}return w(n,t),n.prototype.update=function(){if(nt(this.element)){var e=D(0,0,{r:this.props.right,l:this.props.left,t:this.props.top},this.data.scale);W(this.element,{transform:"translate(".concat(e.x,", ").concat(e.y,")")})}return t.prototype.update.call(this)},n}(st);ut(vt,gt);var bt=function(t){function e(e,n){return t.call(this,e,n)||this}return w(e,t),e.prototype.updateGraphic=function(t,e){if(void 0===e&&(e=!0),nt(this.element)){var n=this.getCommands(),i=function(t,e,n,i){var r={x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER};return q(t).forEach((function(t){var o=D(e,n,t.point,i);(o.x{var __webpack_modules__={860:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";eval('\n// NAMESPACE OBJECT: ./src/index.ts\nvar src_namespaceObject = {};\n__webpack_require__.r(src_namespaceObject);\n__webpack_require__.d(src_namespaceObject, {\n Axis: () => (Axis),\n IsometricCanvas: () => (IsometricCanvas),\n IsometricCircle: () => (IsometricCircle),\n IsometricGroup: () => (IsometricGroup),\n IsometricPath: () => (IsometricPath),\n IsometricPentagram: () => (IsometricPentagram),\n IsometricRectangle: () => (IsometricRectangle),\n IsometricStarPolygon: () => (IsometricStarPolygon),\n IsometricText: () => (IsometricText),\n LineCap: () => (LineCap),\n LineJoin: () => (LineJoin),\n PlaneView: () => (PlaneView)\n});\n\n// EXTERNAL MODULE: ./node_modules/.pnpm/google-code-prettify@1.0.5/node_modules/google-code-prettify/bin/run_prettify.min.js\nvar run_prettify_min = __webpack_require__(966);\n;// ./src/@constants/index.ts\nvar SVG_NAMESPACE = \'http://www.w3.org/2000/svg\';\nvar SVG_ELEMENTS;\n(function (SVG_ELEMENTS) {\n SVG_ELEMENTS["svg"] = "svg";\n SVG_ELEMENTS["group"] = "g";\n SVG_ELEMENTS["path"] = "path";\n SVG_ELEMENTS["rect"] = "rect";\n SVG_ELEMENTS["text"] = "text";\n SVG_ELEMENTS["tspan"] = "tspan";\n SVG_ELEMENTS["pattern"] = "pattern";\n SVG_ELEMENTS["image"] = "image";\n SVG_ELEMENTS["animate"] = "animate";\n SVG_ELEMENTS["animateTransform"] = "animateTransform";\n})(SVG_ELEMENTS || (SVG_ELEMENTS = {}));\nvar SVG_PROPERTIES;\n(function (SVG_PROPERTIES) {\n SVG_PROPERTIES["viewBox"] = "viewBox";\n})(SVG_PROPERTIES || (SVG_PROPERTIES = {}));\nvar DECIMALS = 6;\nvar SQRT3 = +(Math.sqrt(3).toFixed(DECIMALS));\nvar HSQRT3 = +((Math.sqrt(3) / 2).toFixed(DECIMALS));\nvar DEFAULT_WIDTH = 640;\nvar DEFAULT_HEIGHT = 480;\nvar N = \'(-?\\\\d+(?:\\\\.\\\\d+)?|-?\\\\.\\\\d+)\';\nvar S = \'\\\\s*\';\nvar SS = \'\\\\s+\';\nvar POINT = "".concat(N).concat(SS).concat(N).concat(SS).concat(N);\nvar CURVE = "".concat(POINT).concat(SS).concat(POINT);\nvar COMMANDS_REGEXP = new RegExp("(?:(M|L)".concat(S).concat(POINT).concat(S, "|(C)").concat(S).concat(CURVE, ")").concat(S), \'g\');\nvar SCALE = Math.sqrt(3 / 2);\nvar ROT_60 = Math.PI / 3;\nvar ROT_45 = Math.PI / 4;\nvar ROT_CMA = Math.atan(Math.SQRT2);\nvar Colors;\n(function (Colors) {\n Colors["white"] = "white";\n Colors["black"] = "black";\n})(Colors || (Colors = {}));\nvar LineCap;\n(function (LineCap) {\n LineCap["butt"] = "butt";\n LineCap["square"] = "square";\n LineCap["round"] = "round";\n})(LineCap || (LineCap = {}));\nvar LineJoin;\n(function (LineJoin) {\n LineJoin["miter"] = "miter";\n LineJoin["round"] = "round";\n LineJoin["bevel"] = "bevel";\n})(LineJoin || (LineJoin = {}));\nvar Command;\n(function (Command) {\n Command["move"] = "move";\n Command["line"] = "line";\n Command["curve"] = "curve";\n})(Command || (Command = {}));\nvar PlaneView;\n(function (PlaneView) {\n PlaneView["FRONT"] = "FRONT";\n PlaneView["SIDE"] = "SIDE";\n PlaneView["TOP"] = "TOP";\n})(PlaneView || (PlaneView = {}));\nvar Axis;\n(function (Axis) {\n Axis["RIGHT"] = "RIGHT";\n Axis["LEFT"] = "LEFT";\n Axis["TOP"] = "TOP";\n})(Axis || (Axis = {}));\nvar Typeof;\n(function (Typeof) {\n Typeof["UNDEFINED"] = "undefined";\n Typeof["NUMBER"] = "number";\n})(Typeof || (Typeof = {}));\nvar EVENTS;\n(function (EVENTS) {\n EVENTS["MOUSE_MOVE"] = "mousemove";\n EVENTS["MOUSE_DOWN"] = "mousedown";\n EVENTS["MOUSE_UP"] = "mouseup";\n EVENTS["TOUCH_START"] = "touchstart";\n EVENTS["TOUCH_MOVE"] = "touchmove";\n EVENTS["TOUCH_END"] = "touchend";\n})(EVENTS || (EVENTS = {}));\nvar ORIGIN;\n(function (ORIGIN) {\n ORIGIN["CENTER"] = "center";\n ORIGIN["LEFT"] = "left";\n ORIGIN["RIGHT"] = "right";\n ORIGIN["TOP"] = "top";\n ORIGIN["BOTTOM"] = "bottom";\n})(ORIGIN || (ORIGIN = {}));\n\n;// ./src/@utils/math.ts\n\nvar round = function (n, d) {\n var exp = Math.pow(10, d);\n return Math.round(n * exp) / exp;\n};\nvar radian = function (a) { return a * Math.PI / 180; };\nvar sincos = function (r) { return ({\n sin: round(Math.sin(r), DECIMALS),\n cos: round(Math.cos(r), DECIMALS)\n}); };\nvar getPointsDiff = function (pointA, pointB) { return ({\n x: pointA.x - pointB.x,\n y: pointA.y - pointB.y\n}); };\nvar getPointsDistance = function (pointA, pointB) {\n var diff = getPointsDiff(pointA, pointB);\n return Math.sqrt(Math.pow(diff.x, 2) + Math.pow(diff.y, 2));\n};\nvar translatePoint = function (point, angle, distance) { return ({\n x: point.x + Math.cos(angle) * distance,\n y: point.y + Math.sin(angle) * distance\n}); };\nvar rotate = function (point, center, angle) {\n var diff = getPointsDiff(point, center);\n var x = diff.x * Math.cos(angle) - diff.y * Math.sin(angle);\n var y = diff.x * Math.sin(angle) + diff.y * Math.cos(angle);\n return {\n x: center.x + x,\n y: center.y + y\n };\n};\nvar getPointsAngle = function (pointA, pointB) {\n var diff = getPointsDiff(pointB, pointA);\n return Math.atan2(diff.y, diff.x);\n};\nvar getOrientation = function (p1, p2, p3) {\n var value = (p2.y - p1.y) * (p3.x - p2.x) - (p2.x - p1.x) * (p3.y - p2.y);\n return value >= 0 ? 0 : 1;\n};\nvar getPointFromIsometricPoint = function (centerX, centerY, point, scale) {\n return {\n x: round(centerX + (point.r - point.l) * scale * HSQRT3, DECIMALS),\n y: round(centerY + ((point.r + point.l) / 2 - point.t) * scale, DECIMALS)\n };\n};\nvar getTopPlanePointFromCoordinates = function (x, y) {\n var XHSQRT3 = x / HSQRT3;\n var right = (y * 2 + XHSQRT3) / 2;\n var left = right - XHSQRT3;\n return {\n right: right,\n left: left\n };\n};\nvar getFrontPlanePointFromCoordinates = function (x, y) {\n var left = -x / HSQRT3;\n var top = left / 2 - y;\n return {\n left: left,\n top: top\n };\n};\nvar getSidePlanePointFromCoordinates = function (x, y) {\n var right = x / HSQRT3;\n var top = right / 2 - y;\n return {\n right: right,\n top: top\n };\n};\nvar getEllipsisSpecs = function (pointA, pointB, control) {\n var diff = getPointsDiff(pointB, pointA);\n var center = { x: pointA.x + diff.x / 2, y: pointA.y + diff.y / 2 };\n var P = rotate(pointB, center, Math.PI / 2);\n var D = { x: P.x + (control.x - P.x) / 2, y: P.y + (control.y - P.y) / 2 };\n var radius = getPointsDistance(D, center);\n var U = translatePoint(D, getPointsAngle(D, P), radius);\n var V = translatePoint(D, getPointsAngle(D, control), radius);\n return [\n round(getPointsDistance(control, U), DECIMALS),\n round(getPointsDistance(control, V), DECIMALS),\n round(getPointsAngle(center, V) * 180 / Math.PI, DECIMALS)\n ];\n};\nvar randomId = function () { return Math.random().toString(16).slice(2); };\nvar uuid = function () { return Array.from(Array(3)).map(function () { return randomId(); }).join(\'-\'); };\n\n;// ./src/@utils/matrix.ts\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\nvar multiplyMatrix = function (m1, m2) { return (m1.map(function (row, i) { return (m2[0].map(function (_, j) {\n return row.reduce(function (acc, _, n) {\n return acc + m1[i][n] * m2[n][j];\n }, 0);\n})); })); };\nvar multiplyMatrices = function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var matrix = m[0];\n for (var i = 1; i < m.length; i++) {\n matrix = multiplyMatrix(matrix, m[i]);\n }\n return matrix;\n};\nvar rotateX = function (r) {\n var sc = sincos(r);\n return [\n [1, 0, 0],\n [0, sc.cos, -sc.sin],\n [0, sc.sin, sc.cos]\n ];\n};\nvar rotateY = function (r) {\n var sc = sincos(r);\n return [\n [sc.cos, 0, sc.sin],\n [0, 1, 0],\n [-sc.sin, 0, sc.cos]\n ];\n};\nvar rotateZ = function (r) {\n var sc = sincos(r);\n return [\n [sc.cos, -sc.sin, 0],\n [sc.sin, sc.cos, 0],\n [0, 0, 1]\n ];\n};\nvar topMatrix = multiplyMatrices(rotateX(ROT_CMA), rotateZ(-ROT_45));\nvar frontMatrix = multiplyMatrices(rotateZ(-ROT_60), rotateX(ROT_CMA), rotateZ(ROT_45));\nvar sideMatrix = multiplyMatrices(rotateZ(ROT_60), rotateX(ROT_CMA), rotateZ(-ROT_45));\nvar rotationToRotationMatrix = function (view, rotation) {\n var value = radian(rotation.value);\n switch (view) {\n case PlaneView.TOP: {\n switch (rotation.axis) {\n case Axis.TOP:\n return rotateZ(value);\n case Axis.LEFT:\n return rotateX(-value);\n case Axis.RIGHT:\n return rotateY(value);\n default:\n return null;\n }\n }\n case PlaneView.FRONT: {\n switch (rotation.axis) {\n case Axis.TOP:\n return rotateY(value);\n case Axis.LEFT:\n return rotateX(value);\n case Axis.RIGHT:\n return rotateZ(value);\n default:\n return null;\n }\n }\n case PlaneView.SIDE: {\n switch (rotation.axis) {\n case Axis.TOP:\n return rotateY(value);\n case Axis.LEFT:\n return rotateZ(value);\n case Axis.RIGHT:\n return rotateX(-value);\n default:\n return null;\n }\n }\n default:\n return null;\n }\n};\nvar getViewMatrix = function (planeView, rotation) {\n var rotationMatrices = [];\n var rotationMatrix = rotation\n ? rotationToRotationMatrix(planeView, rotation)\n : null;\n if (rotationMatrix)\n rotationMatrices.push(rotationMatrix);\n switch (planeView) {\n case PlaneView.TOP: {\n return multiplyMatrices.apply(void 0, __spreadArray([topMatrix], rotationMatrices, false));\n }\n case PlaneView.FRONT: {\n return multiplyMatrices.apply(void 0, __spreadArray([frontMatrix], rotationMatrices, false));\n }\n case PlaneView.SIDE: {\n return multiplyMatrices.apply(void 0, __spreadArray([sideMatrix], rotationMatrices, false));\n }\n }\n return null;\n};\n\n;// ./src/@utils/svg.ts\nvar svg_spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\nvar addSVGProperties = function (svg, props) {\n Object.keys(props).forEach(function (prop) {\n svg.setAttributeNS(null, prop, props[prop]);\n });\n};\nvar getCommandsWithStart = function (commands) {\n return commands.length === 0 || commands[0].command === Command.move\n ? svg_spreadArray([], commands, true) : svg_spreadArray([\n {\n command: Command.move,\n point: { r: 0, l: 0, t: 0 }\n }\n ], commands, true);\n};\nvar getSVGPath = function (commands, centerX, centerY, scale, autoclose) {\n var drawCommands = getCommandsWithStart(commands);\n var svgPaths = drawCommands.map(function (c, index) {\n var point = getPointFromIsometricPoint(centerX, centerY, c.point, scale);\n switch (c.command) {\n case Command.move:\n return "M".concat(point.x, " ").concat(point.y);\n case Command.line:\n return "L".concat(point.x, " ").concat(point.y);\n case Command.curve: {\n var start = getPointFromIsometricPoint(centerX, centerY, commands[index - 1].point, scale);\n var control = getPointFromIsometricPoint(centerX, centerY, c.control, scale);\n var ellipsisSpecs = getEllipsisSpecs(start, point, control);\n var sweepFlag = getOrientation(start, control, point);\n return "A ".concat(ellipsisSpecs[0], " ").concat(ellipsisSpecs[1], " ").concat(ellipsisSpecs[2], " 0 ").concat(sweepFlag, " ").concat(point.x, " ").concat(point.y);\n }\n }\n });\n if (svgPaths.length) {\n var pathEnd = autoclose ? \'z\' : \'\';\n return "".concat(svgPaths.join(\' \').trim()).concat(pathEnd);\n }\n return \'\';\n};\nvar parseDrawCommands = function (commands) {\n var commandsArray = [];\n var array;\n while ((array = COMMANDS_REGEXP.exec(commands)) !== null) {\n var command = array[5] || array[1];\n switch (command) {\n case \'M\':\n commandsArray.push({\n command: Command.move,\n point: { r: +array[2], l: +array[3], t: +array[4] }\n });\n break;\n case \'L\':\n commandsArray.push({\n command: Command.line,\n point: { r: +array[2], l: +array[3], t: +array[4] }\n });\n break;\n case \'C\':\n commandsArray.push({\n command: Command.curve,\n control: { r: +array[6], l: +array[7], t: +array[8] },\n point: { r: +array[9], l: +array[10], t: +array[11] }\n });\n }\n }\n return commandsArray;\n};\nvar translateCommandPoints = function (commands, right, left, top) {\n commands.forEach(function (command) {\n command.point.r += right;\n command.point.l += left;\n command.point.t += top;\n if (command.control) {\n command.control.r += right;\n command.control.l += left;\n command.control.t += top;\n }\n });\n};\nvar getTextureCorner = function (commands, centerX, centerY, scale) {\n var corner = {\n x: Number.MAX_SAFE_INTEGER,\n y: Number.MAX_SAFE_INTEGER\n };\n getCommandsWithStart(commands)\n .forEach(function (c) {\n var point = getPointFromIsometricPoint(centerX, centerY, c.point, scale);\n if (point.x < corner.x ||\n (point.x === corner.x &&\n point.y < corner.y)) {\n corner.x = point.x;\n corner.y = point.y;\n }\n });\n return corner;\n};\nvar isSVGProperty = function (property) {\n return [\n \'fillColor\',\n \'fillOpacity\',\n \'strokeColor\',\n \'strokeOpacity\',\n \'strokeWidth\'\n ].includes(property);\n};\nvar getSVGProperty = function (property) {\n return {\n fillColor: \'fill\',\n fillOpacity: \'fill-opacity\',\n strokeColor: \'stroke\',\n strokeOpacity: \'stroke-opacity\',\n strokeWidth: \'stroke-width\'\n }[property];\n};\nfunction addEventListenerToElement(element, listeners, event, callback, useCapture) {\n var listener = {\n fn: callback,\n fnBind: callback.bind(this)\n };\n listeners.push(listener);\n element.addEventListener(event, listener.fnBind, useCapture);\n}\nfunction removeEventListenerFromElement(element, listeners, event, callback, useCapture) {\n var listener;\n listeners.find(function (ln, index) {\n if (ln.fn === callback) {\n listener = listeners.splice(index, 1)[0];\n return true;\n }\n });\n if (listener) {\n element.removeEventListener(event, listener.fnBind, useCapture);\n }\n}\nvar getPatternTransform = function (corner, planeView, scale, rotation) {\n var matrix = getViewMatrix(planeView, rotation);\n var transform = "translate(".concat(corner.x, " ").concat(corner.y, ")");\n if (matrix) {\n var m1 = round(matrix[0][0], DECIMALS);\n var m2 = round(matrix[1][0], DECIMALS);\n var m3 = round(matrix[0][1], DECIMALS);\n var m4 = round(matrix[1][1], DECIMALS);\n transform += " matrix(".concat(m1, ",").concat(m2, ",").concat(m3, ",").concat(m4, ",0,0)");\n transform += " scale(".concat(round(SCALE * (scale || 1), DECIMALS), ")");\n }\n else if (scale) {\n transform += " scale(".concat(round(scale, DECIMALS), ")");\n }\n return transform;\n};\nvar elementHasSVGParent = function (element) {\n if (element.parentNode) {\n if (element.parentNode.constructor.name === \'SVGSVGElement\') {\n return true;\n }\n return elementHasSVGParent(element.parentNode);\n }\n return false;\n};\n\n;// ./src/@store/index.ts\nvar Store = (function () {\n function Store(width, height, scale) {\n this.sizes = {\n centerX: width / 2,\n centerY: height / 2,\n height: height,\n width: width,\n scale: scale\n };\n }\n Object.defineProperty(Store.prototype, "width", {\n get: function () {\n return this.sizes.width;\n },\n set: function (value) {\n this.sizes.width = value;\n this.sizes.centerX = value / 2;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "height", {\n get: function () {\n return this.sizes.height;\n },\n set: function (value) {\n this.sizes.height = value;\n this.sizes.centerY = value / 2;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "scale", {\n get: function () {\n return this.sizes.scale;\n },\n set: function (value) {\n this.sizes.scale = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "centerX", {\n get: function () {\n return this.sizes.centerX;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "centerY", {\n get: function () {\n return this.sizes.centerY;\n },\n enumerable: false,\n configurable: true\n });\n return Store;\n}());\n\n\n;// ./src/@classes/abstract/IsometricStore/IsometricStore.ts\nvar IsometricStore = (function () {\n function IsometricStore() {\n }\n Object.defineProperty(IsometricStore.prototype, "data", {\n get: function () {\n return this.dataStore;\n },\n set: function (store) {\n this.dataStore = store;\n },\n enumerable: false,\n configurable: true\n });\n return IsometricStore;\n}());\n\n\n;// ./src/@classes/abstract/IsometricStore/index.ts\n\n\n;// ./src/@classes/abstract/IsometricElementAbstract/IsometricElementAbstract.ts\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\nvar IsometricElementAbstract = (function (_super) {\n __extends(IsometricElementAbstract, _super);\n function IsometricElementAbstract(id, svgElement) {\n var _this = _super.call(this) || this;\n _this._id = id;\n _this.listeners = [];\n _this.element = document.createElementNS(SVG_NAMESPACE, svgElement);\n addSVGProperties(_this.element, {\n \'id\': _this._id\n });\n return _this;\n }\n IsometricElementAbstract.prototype.setId = function (value) {\n this._id = value;\n addSVGProperties(this.element, {\n \'id\': this._id\n });\n };\n IsometricElementAbstract.prototype.getElement = function () {\n return this.element;\n };\n IsometricElementAbstract.prototype.addEventListener = function (event, callback, useCapture) {\n if (useCapture === void 0) { useCapture = false; }\n addEventListenerToElement.call(this, this.element, this.listeners, event, callback, useCapture);\n return this;\n };\n IsometricElementAbstract.prototype.removeEventListener = function (event, callback, useCapture) {\n if (useCapture === void 0) { useCapture = false; }\n removeEventListenerFromElement(this.element, this.listeners, event, callback, useCapture);\n return this;\n };\n return IsometricElementAbstract;\n}(IsometricStore));\n\n\n;// ./src/@classes/abstract/IsometricElementAbstract/index.ts\n\n\n;// ./src/@classes/abstract/IsometricGraphicAbstract/IsometricGraphicAbstract.ts\nvar IsometricGraphicAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\nvar defaultObjectProps = {\n fillColor: Colors.white,\n fillOpacity: 1,\n strokeColor: Colors.black,\n strokeDashArray: [],\n strokeLinecap: LineCap.butt,\n strokeLinejoin: LineJoin.round,\n strokeOpacity: 1,\n strokeWidth: 1\n};\nvar IsometricGraphicAbstract = (function (_super) {\n IsometricGraphicAbstract_extends(IsometricGraphicAbstract, _super);\n function IsometricGraphicAbstract(props, svgElement) {\n var _this = _super.call(this, props.id || uuid(), svgElement) || this;\n _this.props = __assign(__assign({}, defaultObjectProps), props);\n _this.animations = [];\n if (_this.props.texture) {\n _this.createTexture(_this.props.texture);\n }\n addSVGProperties(_this.element, {\n \'fill\': _this.props.texture\n ? "url(#".concat(_this.patternId, ") ").concat(_this.fillColor)\n : _this.fillColor,\n \'fill-opacity\': "".concat(_this.fillOpacity),\n \'stroke\': _this.strokeColor,\n \'stroke-dasharray\': _this.strokeDashArray.join(\' \'),\n \'stroke-linecap\': _this.strokeLinecap,\n \'stroke-linejoin\': _this.strokeLinejoin,\n \'stroke-opacity\': "".concat(_this.strokeOpacity),\n \'stroke-width\': "".concat(_this.strokeWidth)\n });\n return _this;\n }\n IsometricGraphicAbstract.prototype.createTexture = function (texture) {\n this.patternId = "".concat(this.id, "__texture");\n this.pattern = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.pattern);\n addSVGProperties(this.pattern, {\n \'id\': this.patternId,\n \'preserveAspectRatio\': \'none\',\n \'patternUnits\': \'userSpaceOnUse\'\n });\n var image = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.image);\n addSVGProperties(image, {\n \'href\': texture.url,\n \'x\': \'0\',\n \'y\': \'0\',\n \'preserveAspectRatio\': \'none\'\n });\n if (texture.pixelated) {\n addSVGProperties(image, {\n \'style\': \'image-rendering: pixelated\'\n });\n }\n this.pattern.appendChild(image);\n };\n IsometricGraphicAbstract.prototype._updateTexture = function () {\n var image = this.pattern.firstChild;\n if (this.props.texture.url &&\n image.getAttribute(\'href\') !== this.props.texture.url) {\n addSVGProperties(image, {\n \'href\': this.props.texture.url\n });\n }\n if (this.props.texture.pixelated) {\n addSVGProperties(image, {\n \'style\': \'image-rendering: pixelated\'\n });\n }\n else {\n image.removeAttribute(\'style\');\n }\n this.update();\n };\n IsometricGraphicAbstract.prototype.addAnimationBasicProperties = function (attributeName, animation) {\n addSVGProperties(animation.element, {\n repeatCount: "".concat(animation.repeat || \'indefinite\'),\n attributeName: attributeName,\n dur: "".concat(animation.duration || 1, "s")\n });\n };\n IsometricGraphicAbstract.prototype.updateAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (isNativeSVGProperty) {\n var property = getSVGProperty(animation.property);\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(property, animation);\n if (animation.values) {\n addSVGProperties(animation.element, {\n values: Array.isArray(animation.values)\n ? animation.values.map(function (value) { return "".concat(value); }).join(\';\')\n : "".concat(animation.values)\n });\n }\n else {\n addSVGProperties(animation.element, {\n from: "".concat(animation.from),\n to: "".concat(animation.to)\n });\n }\n }\n });\n this.updateSubClassAnimations();\n };\n IsometricGraphicAbstract.prototype.updatePatternTransform = function (corner, planeView) {\n var _a, _b, _c;\n if (this.props.texture) {\n var height = this.props.texture.height\n ? "".concat(this.props.texture.height * this.data.scale)\n : \'100%\';\n var width = this.props.texture.width\n ? "".concat(this.props.texture.width * this.data.scale)\n : \'100%\';\n var shift = getPointFromIsometricPoint(0, 0, {\n r: ((_a = this.props.texture.shift) === null || _a === void 0 ? void 0 : _a.right) || 0,\n l: ((_b = this.props.texture.shift) === null || _b === void 0 ? void 0 : _b.left) || 0,\n t: ((_c = this.props.texture.shift) === null || _c === void 0 ? void 0 : _c.top) || 0\n }, this.data.scale);\n var transform = getPatternTransform({\n x: round(corner.x + shift.x, DECIMALS),\n y: round(corner.y + shift.y, DECIMALS)\n }, this.props.texture.planeView || planeView, this.props.texture.scale, this.props.texture.rotation);\n addSVGProperties(this.pattern, {\n \'patternTransform\': transform,\n \'height\': height,\n \'width\': width\n });\n addSVGProperties(this.pattern.firstChild, {\n \'height\': height,\n \'width\': width\n });\n }\n };\n Object.defineProperty(IsometricGraphicAbstract.prototype, "id", {\n get: function () {\n return this._id;\n },\n set: function (value) {\n this.setId(value);\n if (this.pattern) {\n this.patternId = "".concat(this.id, "__texture");\n addSVGProperties(this.pattern, {\n \'id\': this.patternId\n });\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "fillColor", {\n get: function () {\n return this.props.fillColor;\n },\n set: function (value) {\n this.props.fillColor = value;\n addSVGProperties(this.element, {\n \'fill\': this.props.texture\n ? "url(#".concat(this.patternId, ") ").concat(this.fillColor)\n : this.fillColor\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "fillOpacity", {\n get: function () {\n return this.props.fillOpacity;\n },\n set: function (value) {\n this.props.fillOpacity = value;\n addSVGProperties(this.element, { \'fill-opacity\': "".concat(this.fillOpacity) });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "texture", {\n get: function () {\n return this.props.texture;\n },\n set: function (value) {\n var hasTexture = !!this.props.texture;\n this.props.texture = value;\n if (hasTexture) {\n this._updateTexture();\n }\n else {\n this.createTexture(this.props.texture);\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeColor", {\n get: function () {\n return this.props.strokeColor;\n },\n set: function (value) {\n this.props.strokeColor = value;\n addSVGProperties(this.element, { \'stroke\': this.strokeColor });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeDashArray", {\n get: function () {\n return this.props.strokeDashArray;\n },\n set: function (value) {\n this.props.strokeDashArray = value;\n addSVGProperties(this.element, { \'stroke-dasharray\': this.strokeDashArray.join(\' \') });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeLinecap", {\n get: function () {\n return this.props.strokeLinecap;\n },\n set: function (value) {\n this.props.strokeLinecap = LineCap[value];\n addSVGProperties(this.element, { \'stroke-linecap\': this.strokeLinecap });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeLinejoin", {\n get: function () {\n return this.props.strokeLinejoin;\n },\n set: function (value) {\n this.props.strokeLinejoin = LineJoin[value];\n addSVGProperties(this.element, { \'stroke-linejoin\': this.strokeLinejoin });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeOpacity", {\n get: function () {\n return this.props.strokeOpacity;\n },\n set: function (value) {\n this.props.strokeOpacity = value;\n addSVGProperties(this.element, { \'stroke-opacity\': "".concat(this.strokeOpacity) });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeWidth", {\n get: function () {\n return this.props.strokeWidth;\n },\n set: function (value) {\n this.props.strokeWidth = value;\n addSVGProperties(this.element, { \'stroke-width\': "".concat(this.strokeWidth) });\n },\n enumerable: false,\n configurable: true\n });\n IsometricGraphicAbstract.prototype.getPattern = function () {\n return this.pattern;\n };\n IsometricGraphicAbstract.prototype.updateTexture = function (value) {\n var hasTexture = !!this.props.texture;\n if (hasTexture || value.url) {\n var shift = value.shift, rotation = value.rotation, newProps = __rest(value, ["shift", "rotation"]);\n this.props.texture = hasTexture\n ? __assign(__assign({}, this.props.texture), newProps) : __assign({}, newProps);\n if (shift) {\n this.props.texture.shift = __assign(__assign({}, (this.props.texture.shift || {})), shift);\n }\n if (rotation) {\n this.props.texture.rotation = rotation;\n }\n if (hasTexture) {\n this._updateTexture();\n }\n else {\n this.createTexture(this.props.texture);\n this.update();\n }\n }\n return this;\n };\n IsometricGraphicAbstract.prototype.addAnimation = function (animation) {\n this.animations.push(__assign({}, animation));\n this.update();\n return this;\n };\n IsometricGraphicAbstract.prototype.removeAnimationByIndex = function (index) {\n if (index >= 0 && index < this.animations.length) {\n var animation = this.animations.splice(index, 1)[0];\n if (animation.element && animation.element.parentNode) {\n animation.element.parentNode.removeChild(animation.element);\n }\n }\n return this;\n };\n IsometricGraphicAbstract.prototype.removeAnimations = function () {\n var animations = this.animations.splice(0);\n animations.forEach(function (animation) {\n if (animation.element && animation.element.parentNode) {\n animation.element.parentNode.removeChild(animation.element);\n }\n });\n return this;\n };\n return IsometricGraphicAbstract;\n}(IsometricElementAbstract));\n\n\n;// ./src/@classes/abstract/IsometricGraphicAbstract/index.ts\n\n\n;// ./src/@classes/abstract/IsometricContainerAbstract/IsometricContainerAbstract.ts\nvar IsometricContainerAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\nvar IsometricContainerAbstract = (function (_super) {\n IsometricContainerAbstract_extends(IsometricContainerAbstract, _super);\n function IsometricContainerAbstract(id, svgElement) {\n var _this = _super.call(this, id, svgElement) || this;\n _this._children = [];\n return _this;\n }\n IsometricContainerAbstract.prototype.getChildIndex = function (child) {\n return this._children.indexOf(child);\n };\n IsometricContainerAbstract.prototype.throwChildError = function () {\n throw new Error(\'You cannot provide a child that is not a children of the container\');\n };\n IsometricContainerAbstract.prototype.removeSVGChild = function (child) {\n var svgChild = child.getElement();\n if (child instanceof IsometricGraphicAbstract) {\n var svgPatternChild = child.getPattern();\n if (svgPatternChild && svgPatternChild.parentNode) {\n this.element.removeChild(svgPatternChild);\n }\n }\n if (svgChild.parentNode) {\n this.element.removeChild(svgChild);\n }\n };\n IsometricContainerAbstract.prototype.insertPattern = function (pattern) {\n if (pattern) {\n this.element.insertBefore(pattern, this.element.firstChild);\n }\n };\n Object.defineProperty(IsometricContainerAbstract.prototype, "id", {\n get: function () {\n return this._id;\n },\n set: function (value) {\n this.setId(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricContainerAbstract.prototype, "children", {\n get: function () {\n return this._children;\n },\n enumerable: false,\n configurable: true\n });\n IsometricContainerAbstract.prototype.update = function () {\n var _this = this;\n if (elementHasSVGParent(this.element)) {\n this._children.forEach(function (child) {\n child.data = _this.data;\n child.update();\n });\n }\n return this;\n };\n IsometricContainerAbstract.prototype.clear = function () {\n var _this = this;\n var children = this._children.splice(0);\n children.forEach(function (child) {\n _this.removeSVGChild(child);\n });\n return this;\n };\n IsometricContainerAbstract.prototype.addChild = function (child) {\n child.data = this.data;\n this._children.push(child);\n if (child instanceof IsometricGraphicAbstract) {\n this.insertPattern(child.getPattern());\n }\n this.element.appendChild(child.getElement());\n child.update();\n return this;\n };\n IsometricContainerAbstract.prototype.addChildren = function () {\n var _this = this;\n var children = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n children[_i] = arguments[_i];\n }\n children.forEach(function (child) { return _this.addChild(child); });\n return this;\n };\n IsometricContainerAbstract.prototype.getChildByIndex = function (index) {\n return this._children[index] || null;\n };\n IsometricContainerAbstract.prototype.getChildById = function (id) {\n var child = this._children.find(function (child) { return child.id === id; });\n return child || null;\n };\n IsometricContainerAbstract.prototype.removeChild = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n this._children.splice(childIndex, 1);\n this.removeSVGChild(child);\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.removeChildren = function () {\n var _this = this;\n var children = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n children[_i] = arguments[_i];\n }\n children.forEach(function (child) {\n var childIndex = _this.getChildIndex(child);\n if (childIndex === -1) {\n _this.throwChildError();\n }\n _this.removeChild(child);\n });\n return this;\n };\n IsometricContainerAbstract.prototype.removeChildByIndex = function (index) {\n if (index >= 0 && index < this._children.length) {\n var child = this._children.splice(index, 1)[0];\n this.removeSVGChild(child);\n }\n return this;\n };\n IsometricContainerAbstract.prototype.removeChildById = function (id) {\n var child = this.getChildById(id);\n if (child) {\n return this.removeChild(child);\n }\n };\n IsometricContainerAbstract.prototype.setChildIndex = function (child, index) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n index = Math.min(Math.max(0, index), this._children.length - 1);\n var movedElement = child.getElement();\n var replacedElement = this._children[index].getElement();\n if (this._children[index] !== child) {\n this._children.splice(childIndex, 1);\n this._children.splice(index, 0, child);\n if (childIndex > index) {\n this.element.insertBefore(movedElement, replacedElement);\n }\n else {\n if (replacedElement.nextSibling) {\n this.element.insertBefore(movedElement, replacedElement.nextSibling);\n }\n else {\n this.element.appendChild(movedElement);\n }\n }\n }\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.bringChildToFront = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n this.setChildIndex(child, this._children.length - 1);\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.bringChildForward = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n if (childIndex < this._children.length - 1) {\n this.setChildIndex(child, childIndex + 1);\n }\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.sendChildToBack = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n this.setChildIndex(child, 0);\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.sendChildBackward = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n if (childIndex > 0) {\n this.setChildIndex(child, childIndex - 1);\n }\n return this;\n }\n this.throwChildError();\n };\n return IsometricContainerAbstract;\n}(IsometricElementAbstract));\n\n\n;// ./src/@classes/abstract/IsometricContainerAbstract/index.ts\n\n\n;// ./src/@classes/public/IsometricCanvas/IsometricCanvas.ts\nvar IsometricCanvas_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricCanvas_assign = (undefined && undefined.__assign) || function () {\n IsometricCanvas_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricCanvas_assign.apply(this, arguments);\n};\n\n\n\n\n\nvar defaultProps = {\n container: \'body\',\n backgroundColor: Colors.white,\n scale: 1,\n height: DEFAULT_HEIGHT,\n width: DEFAULT_WIDTH\n};\nvar IsometricCanvas = (function (_super) {\n IsometricCanvas_extends(IsometricCanvas, _super);\n function IsometricCanvas(props) {\n var _a;\n if (props === void 0) { props = {}; }\n var _this = _super.call(this, props.id || uuid(), SVG_ELEMENTS.svg) || this;\n _this.props = IsometricCanvas_assign(IsometricCanvas_assign({}, defaultProps), props);\n _this.isAnimated = true;\n _this.data = new Store(_this.props.width, _this.props.height, _this.props.scale);\n addSVGProperties(_this.element, (_a = {},\n _a[SVG_PROPERTIES.viewBox] = "0 0 ".concat(_this.data.width, " ").concat(_this.data.height),\n _a.width = "".concat(_this.data.width, "px"),\n _a.height = "".concat(_this.data.height, "px"),\n _a));\n _this.background = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.rect);\n addSVGProperties(_this.background, {\n fill: _this.backgroundColor,\n x: \'0\',\n y: \'0\',\n width: "".concat(_this.data.width, "px"),\n height: "".concat(_this.data.height, "px")\n });\n _this.element.appendChild(_this.background);\n var containerElement = typeof _this.props.container === \'string\'\n ? document.querySelector(_this.props.container)\n : _this.props.container;\n containerElement.appendChild(_this.element);\n return _this;\n }\n Object.defineProperty(IsometricCanvas.prototype, "backgroundColor", {\n get: function () {\n return this.props.backgroundColor;\n },\n set: function (value) {\n this.props.backgroundColor = value;\n addSVGProperties(this.background, { fill: this.backgroundColor });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "scale", {\n get: function () {\n return this.data.scale;\n },\n set: function (value) {\n this.data.scale = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "height", {\n get: function () {\n return this.data.height;\n },\n set: function (value) {\n var _a;\n this.data.height = value;\n addSVGProperties(this.element, (_a = {},\n _a[SVG_PROPERTIES.viewBox] = "0 0 ".concat(this.data.width, " ").concat(this.data.height),\n _a.height = "".concat(this.data.height, "px"),\n _a));\n addSVGProperties(this.background, {\n height: "".concat(this.data.height, "px")\n });\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "width", {\n get: function () {\n return this.data.width;\n },\n set: function (value) {\n var _a;\n this.data.width = value;\n addSVGProperties(this.element, (_a = {},\n _a[SVG_PROPERTIES.viewBox] = "0 0 ".concat(this.data.width, " ").concat(this.data.height),\n _a.width = "".concat(this.data.width, "px"),\n _a));\n addSVGProperties(this.background, {\n width: "".concat(this.data.width, "px")\n });\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "animated", {\n get: function () {\n return this.isAnimated;\n },\n enumerable: false,\n configurable: true\n });\n IsometricCanvas.prototype.getSVGCode = function () {\n return this.element.outerHTML;\n };\n IsometricCanvas.prototype.pauseAnimations = function () {\n var svg = this.element;\n if (typeof svg.pauseAnimations === \'function\') {\n svg.pauseAnimations();\n }\n this.isAnimated = false;\n return this;\n };\n IsometricCanvas.prototype.resumeAnimations = function () {\n var svg = this.element;\n if (typeof svg.unpauseAnimations === \'function\') {\n svg.unpauseAnimations();\n }\n this.isAnimated = true;\n return this;\n };\n return IsometricCanvas;\n}(IsometricContainerAbstract));\n\n\n;// ./src/@classes/public/IsometricCanvas/index.ts\n\n\n\n;// ./src/@utils/other.ts\nvar applyMixins = function (BaseClass, constructor) {\n Object.getOwnPropertyNames(constructor.prototype).forEach(function (name) {\n Object.defineProperty(BaseClass.prototype, name, Object.getOwnPropertyDescriptor(constructor.prototype, name));\n });\n};\n\n;// ./src/@classes/abstract/IsometricDraggableAbstract/constants.ts\nvar NO_LIMITS = [\n Number.MIN_SAFE_INTEGER,\n Number.MAX_SAFE_INTEGER\n];\nvar DRAG_EVENT;\n(function (DRAG_EVENT) {\n DRAG_EVENT["DRAG_START"] = "dragstart";\n DRAG_EVENT["DRAG"] = "drag";\n DRAG_EVENT["DRAG_END"] = "dragend";\n})(DRAG_EVENT || (DRAG_EVENT = {}));\n\n;// ./src/@classes/abstract/IsometricDraggableAbstract/IsometricDraggableAbstract.ts\nvar IsometricDraggableAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricDraggableAbstract_assign = (undefined && undefined.__assign) || function () {\n IsometricDraggableAbstract_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricDraggableAbstract_assign.apply(this, arguments);\n};\nvar IsometricDraggableAbstract_spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\nvar _isBrowser = typeof window !== Typeof.UNDEFINED;\nvar _requestAnimationFrame = _isBrowser\n ? (window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.msRequestAnimationFrame)\n : null;\nvar _dragStoreDefault = {\n right: 0,\n left: 0,\n top: 0,\n x: 0,\n y: 0\n};\nvar isMouseEvent = function (event) { return \'clientX\' in event; };\nvar getClientCoords = function (event) {\n if (event instanceof Event) {\n if (isMouseEvent(event)) {\n return {\n clientX: event.clientX,\n clientY: event.clientY\n };\n }\n return {\n clientX: event.touches[0].clientX,\n clientY: event.touches[0].clientY\n };\n }\n return event;\n};\nvar IsometricDraggableAbstract = (function (_super) {\n IsometricDraggableAbstract_extends(IsometricDraggableAbstract, _super);\n function IsometricDraggableAbstract() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n IsometricDraggableAbstract.prototype.setup = function () {\n this.startDrag = this.startDrag.bind(this);\n this.stopDrag = this.stopDrag.bind(this);\n this.moveElement = this.moveElement.bind(this);\n this.dropElement = this.dropElement.bind(this);\n this.animate = this.animate.bind(this);\n if (typeof this._bounds === Typeof.UNDEFINED) {\n this._bounds = false;\n }\n if (typeof this._dragStore === Typeof.UNDEFINED) {\n this._dragStore = _dragStoreDefault;\n }\n if (typeof this._coords === Typeof.UNDEFINED) {\n this._coords = {};\n }\n };\n IsometricDraggableAbstract.prototype.betweenBounds = function (value, bounds) {\n var orderedBounds = IsometricDraggableAbstract_spreadArray([], bounds, true).sort();\n return round(Math.min(Math.max(value, orderedBounds[0]), orderedBounds[1]), DECIMALS);\n };\n IsometricDraggableAbstract.prototype.getRight = function (value) {\n var bounds = this._bounds && this._bounds.right || NO_LIMITS;\n return this.betweenBounds(this._dragStore.right + value / this.data.scale, bounds);\n };\n IsometricDraggableAbstract.prototype.getLeft = function (value) {\n var bounds = this._bounds && this._bounds.left || NO_LIMITS;\n return this.betweenBounds(this._dragStore.left + value / this.data.scale, bounds);\n };\n IsometricDraggableAbstract.prototype.getTop = function (value) {\n var bounds = this._bounds && this._bounds.top || NO_LIMITS;\n return this.betweenBounds(this._dragStore.top + value / this.data.scale, bounds);\n };\n IsometricDraggableAbstract.prototype.getFixedCoordinates = function (coords) {\n var _this = this;\n return Object.entries(coords).reduce(function (acc, entry) {\n var fixedCoords = IsometricDraggableAbstract_assign({}, acc);\n switch (entry[0]) {\n case \'right\':\n fixedCoords.right = _this.getRight(entry[1]);\n break;\n case \'left\':\n fixedCoords.left = _this.getLeft(entry[1]);\n break;\n default:\n fixedCoords.top = _this.getTop(entry[1]);\n }\n return fixedCoords;\n }, {});\n };\n IsometricDraggableAbstract.prototype.dispatchEvent = function (eventType) {\n var dragEvent = new CustomEvent(eventType, {\n cancelable: eventType === DRAG_EVENT.DRAG,\n detail: {\n right: this._coords.right || this.right,\n left: this._coords.left || this.left,\n top: this._coords.top || this.top\n }\n });\n this.element.dispatchEvent(dragEvent);\n return dragEvent;\n };\n IsometricDraggableAbstract.prototype.animate = function () {\n if (this._update) {\n if (!this._prevented) {\n if (typeof this._coords.right === Typeof.NUMBER) {\n this.right = this._coords.right;\n }\n if (typeof this._coords.left === Typeof.NUMBER) {\n this.left = this._coords.left;\n }\n if (typeof this._coords.top === Typeof.NUMBER) {\n this.top = this._coords.top;\n }\n }\n _requestAnimationFrame(this.animate);\n }\n };\n IsometricDraggableAbstract.prototype.startDrag = function (event) {\n event.preventDefault();\n var _a = getClientCoords(event), clientX = _a.clientX, clientY = _a.clientY;\n this._dragStore.x = clientX;\n this._dragStore.y = clientY;\n this._dragStore.right = this.right;\n this._dragStore.left = this.left;\n this._dragStore.top = this.top;\n this._update = true;\n this.moveElement({ clientX: clientX, clientY: clientY });\n this.element.addEventListener(EVENTS.TOUCH_MOVE, this.moveElement, true);\n this.element.addEventListener(EVENTS.TOUCH_END, this.dropElement, true);\n document.addEventListener(EVENTS.MOUSE_MOVE, this.moveElement, true);\n document.addEventListener(EVENTS.MOUSE_UP, this.dropElement, true);\n _requestAnimationFrame(this.animate);\n };\n IsometricDraggableAbstract.prototype.moveElement = function (event) {\n var _a = getClientCoords(event), clientX = _a.clientX, clientY = _a.clientY;\n var diffX = clientX - this._dragStore.x;\n var diffY = clientY - this._dragStore.y;\n if (this._drag === PlaneView.TOP) {\n this._coords = this.getFixedCoordinates(getTopPlanePointFromCoordinates(diffX, diffY));\n }\n else if (this._drag === PlaneView.FRONT) {\n this._coords = this.getFixedCoordinates(getFrontPlanePointFromCoordinates(diffX, diffY));\n }\n else {\n this._coords = this.getFixedCoordinates(getSidePlanePointFromCoordinates(diffX, diffY));\n }\n var dragEvent;\n if (event instanceof Event) {\n event.preventDefault();\n if (!this._dragging) {\n this.dispatchEvent(DRAG_EVENT.DRAG_START);\n }\n this._dragging = true;\n dragEvent = this.dispatchEvent(DRAG_EVENT.DRAG);\n }\n this._prevented = !!(dragEvent && dragEvent.defaultPrevented);\n };\n IsometricDraggableAbstract.prototype.dropElement = function () {\n this._update = false;\n this._dragging = false;\n this.element.removeEventListener(EVENTS.TOUCH_MOVE, this.moveElement, true);\n this.element.removeEventListener(EVENTS.TOUCH_END, this.dropElement, true);\n document.removeEventListener(EVENTS.MOUSE_MOVE, this.moveElement, true);\n document.removeEventListener(EVENTS.MOUSE_UP, this.dropElement, true);\n this.dispatchEvent(DRAG_EVENT.DRAG_END);\n };\n IsometricDraggableAbstract.prototype.beginDrag = function () {\n this.element.addEventListener(EVENTS.TOUCH_START, this.startDrag, true);\n this.element.addEventListener(EVENTS.MOUSE_DOWN, this.startDrag, true);\n };\n IsometricDraggableAbstract.prototype.stopDrag = function () {\n this.element.removeEventListener(EVENTS.TOUCH_START, this.startDrag, true);\n this.element.removeEventListener(EVENTS.TOUCH_MOVE, this.moveElement, true);\n this.element.removeEventListener(EVENTS.TOUCH_END, this.dropElement, true);\n this.element.removeEventListener(EVENTS.MOUSE_DOWN, this.startDrag, true);\n document.removeEventListener(EVENTS.MOUSE_MOVE, this.moveElement, true);\n document.removeEventListener(EVENTS.MOUSE_UP, this.dropElement, true);\n };\n Object.defineProperty(IsometricDraggableAbstract.prototype, "right", {\n get: function () {\n return this.props.right;\n },\n set: function (value) {\n if (this.props.right !== value) {\n this.props.right = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "left", {\n get: function () {\n return this.props.left;\n },\n set: function (value) {\n if (this.props.left !== value) {\n this.props.left = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "top", {\n get: function () {\n return this.props.top;\n },\n set: function (value) {\n if (this.props.top !== value) {\n this.props.top = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "drag", {\n get: function () {\n return this._drag || false;\n },\n set: function (value) {\n if (typeof this._drag === Typeof.UNDEFINED) {\n this.setup();\n }\n this._drag = value;\n if (_isBrowser) {\n this.stopDrag();\n this.beginDrag();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "bounds", {\n get: function () {\n return this._bounds || false;\n },\n set: function (value) {\n this._bounds = value;\n var boundsRight = this._bounds && this._bounds.right || NO_LIMITS;\n var boundsLeft = this._bounds && this._bounds.left || NO_LIMITS;\n var boundsTop = this._bounds && this._bounds.top || NO_LIMITS;\n this.right = this.betweenBounds(this.right, boundsRight);\n this.left = this.betweenBounds(this.left, boundsLeft);\n this.top = this.betweenBounds(this.top, boundsTop);\n },\n enumerable: false,\n configurable: true\n });\n return IsometricDraggableAbstract;\n}(IsometricElementAbstract));\n\n\n;// ./src/@classes/abstract/IsometricDraggableAbstract/index.ts\n\n\n;// ./src/@classes/public/IsometricGroup/IsometricGroup.ts\nvar IsometricGroup_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricGroup_assign = (undefined && undefined.__assign) || function () {\n IsometricGroup_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricGroup_assign.apply(this, arguments);\n};\n\n\n\n\n\n\nvar IsometricGroup_defaultProps = {\n right: 0,\n left: 0,\n top: 0,\n};\nvar IsometricGroup = (function (_super) {\n IsometricGroup_extends(IsometricGroup, _super);\n function IsometricGroup(props) {\n if (props === void 0) { props = {}; }\n var _this = _super.call(this, props.id || uuid(), SVG_ELEMENTS.group) || this;\n _this.props = IsometricGroup_assign(IsometricGroup_assign({}, IsometricGroup_defaultProps), props);\n return _this;\n }\n IsometricGroup.prototype.update = function () {\n if (elementHasSVGParent(this.element)) {\n var point = getPointFromIsometricPoint(0, 0, {\n r: this.props.right,\n l: this.props.left,\n t: this.props.top\n }, this.data.scale);\n addSVGProperties(this.element, {\n transform: "translate(".concat(point.x, ", ").concat(point.y, ")")\n });\n }\n return _super.prototype.update.call(this);\n };\n return IsometricGroup;\n}(IsometricContainerAbstract));\n\napplyMixins(IsometricGroup, IsometricDraggableAbstract);\n\n;// ./src/@classes/public/IsometricGroup/index.ts\n\n\n;// ./src/@classes/abstract/IsometricPathAbstract/IsometricPathAbstract.ts\nvar IsometricPathAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\nvar IsometricPathAbstract = (function (_super) {\n IsometricPathAbstract_extends(IsometricPathAbstract, _super);\n function IsometricPathAbstract(props, svgElement) {\n return _super.call(this, props, svgElement) || this;\n }\n IsometricPathAbstract.prototype.updateGraphic = function (planeView, autoclose) {\n if (autoclose === void 0) { autoclose = true; }\n if (elementHasSVGParent(this.element)) {\n var commands = this.getCommands();\n var corner = getTextureCorner(commands, this.data.centerX, this.data.centerY, this.data.scale);\n addSVGProperties(this.element, {\n d: getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, autoclose)\n });\n this.updatePatternTransform(corner, planeView);\n this.updateAnimations();\n }\n };\n return IsometricPathAbstract;\n}(IsometricGraphicAbstract));\n\n\n;// ./src/@classes/abstract/IsometricPathAbstract/index.ts\n\n\n;// ./src/@classes/abstract/IsometricShapeAbstract/IsometricShapeAbstract.ts\nvar IsometricShapeAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricShapeAbstract_assign = (undefined && undefined.__assign) || function () {\n IsometricShapeAbstract_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricShapeAbstract_assign.apply(this, arguments);\n};\n\n\n\n\n\nvar IsometricShapeAbstract_defaultProps = {\n right: 0,\n left: 0,\n top: 0,\n};\nvar IsometricShapeAbstract = (function (_super) {\n IsometricShapeAbstract_extends(IsometricShapeAbstract, _super);\n function IsometricShapeAbstract(props) {\n return _super.call(this, IsometricShapeAbstract_assign(IsometricShapeAbstract_assign({}, IsometricShapeAbstract_defaultProps), props), SVG_ELEMENTS.path) || this;\n }\n IsometricShapeAbstract.prototype.update = function () {\n this.updateGraphic(this.planeView);\n return this;\n };\n IsometricShapeAbstract.prototype.clear = function () {\n addSVGProperties(this.element, {\n d: \'\'\n });\n return this;\n };\n Object.defineProperty(IsometricShapeAbstract.prototype, "planeView", {\n get: function () {\n return this.props.planeView;\n },\n set: function (value) {\n this.props.planeView = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n return IsometricShapeAbstract;\n}(IsometricPathAbstract));\n\napplyMixins(IsometricShapeAbstract, IsometricDraggableAbstract);\n\n;// ./src/@classes/abstract/IsometricShapeAbstract/index.ts\n\n\n;// ./src/@classes/public/IsometricRectangle/IsometricRectangle.ts\nvar IsometricRectangle_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricRectangle_assign = (undefined && undefined.__assign) || function () {\n IsometricRectangle_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricRectangle_assign.apply(this, arguments);\n};\nvar IsometricRectangle_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\nvar IsometricRectangle = (function (_super) {\n IsometricRectangle_extends(IsometricRectangle, _super);\n function IsometricRectangle(props) {\n var _this = this;\n var height = props.height, width = props.width, rest = IsometricRectangle_rest(props, ["height", "width"]);\n _this = _super.call(this, rest) || this;\n _this._width = width;\n _this._height = height;\n return _this;\n }\n IsometricRectangle.prototype.getCommands = function (args) {\n var right = (args === null || args === void 0 ? void 0 : args.right) || this.right;\n var left = (args === null || args === void 0 ? void 0 : args.left) || this.left;\n var top = (args === null || args === void 0 ? void 0 : args.top) || this.top;\n var width = (args === null || args === void 0 ? void 0 : args.width) || this.width;\n var height = (args === null || args === void 0 ? void 0 : args.height) || this.height;\n var commands = [{ command: Command.move, point: { r: 0, l: 0, t: 0 } }];\n switch (this.planeView) {\n case PlaneView.FRONT:\n commands.push({ command: Command.line, point: { r: 0, l: width, t: 0 } }, { command: Command.line, point: { r: 0, l: width, t: height } }, { command: Command.line, point: { r: 0, l: 0, t: height } });\n break;\n case PlaneView.SIDE:\n commands.push({ command: Command.line, point: { r: width, l: 0, t: 0 } }, { command: Command.line, point: { r: width, l: 0, t: height } }, { command: Command.line, point: { r: 0, l: 0, t: height } });\n break;\n case PlaneView.TOP:\n commands.push({ command: Command.line, point: { r: width, l: 0, t: 0 } }, { command: Command.line, point: { r: width, l: height, t: 0 } }, { command: Command.line, point: { r: 0, l: height, t: 0 } });\n break;\n }\n translateCommandPoints(commands, right, left, top);\n return commands;\n };\n IsometricRectangle.prototype.getRectanglePath = function (args) {\n var commands = this.getCommands(args);\n return getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, true);\n };\n IsometricRectangle.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n var props_1 = {\n right: _this.right,\n left: _this.left,\n top: _this.top,\n width: _this.width,\n height: _this.height\n };\n if (Object.prototype.hasOwnProperty.call(props_1, animation.property)) {\n var property_1 = animation.property;\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = {\n values: animation.values.map(function (value) {\n var modifiedArgs = IsometricRectangle_assign({}, props_1);\n modifiedArgs[property_1] = +value;\n return _this.getRectanglePath(modifiedArgs);\n }).join(\';\')\n };\n }\n else {\n var modifiedArgs = IsometricRectangle_assign({}, props_1);\n modifiedArgs[property_1] = +animation.values;\n properties = {\n values: _this.getRectanglePath(modifiedArgs)\n };\n }\n }\n else {\n var fromArgs = IsometricRectangle_assign({}, props_1);\n var toArgs = IsometricRectangle_assign({}, props_1);\n fromArgs[property_1] = +animation.from;\n toArgs[property_1] = +animation.to;\n properties = {\n from: _this.getRectanglePath(fromArgs),\n to: _this.getRectanglePath(toArgs)\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n }\n });\n };\n Object.defineProperty(IsometricRectangle.prototype, "width", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n this._width = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricRectangle.prototype, "height", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n this._height = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricRectangle.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricRectangle;\n}(IsometricShapeAbstract));\n\n\n;// ./src/@classes/public/IsometricRectangle/index.ts\n\n\n;// ./src/@classes/public/IsometricCircle/IsometricCircle.ts\nvar IsometricCircle_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricCircle_assign = (undefined && undefined.__assign) || function () {\n IsometricCircle_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricCircle_assign.apply(this, arguments);\n};\nvar IsometricCircle_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\nvar IsometricCircle = (function (_super) {\n IsometricCircle_extends(IsometricCircle, _super);\n function IsometricCircle(props) {\n var _this = this;\n var radius = props.radius, rest = IsometricCircle_rest(props, ["radius"]);\n _this = _super.call(this, rest) || this;\n _this._radius = radius;\n return _this;\n }\n IsometricCircle.prototype.getCommands = function (args) {\n var right = (args === null || args === void 0 ? void 0 : args.right) || this.right;\n var left = (args === null || args === void 0 ? void 0 : args.left) || this.left;\n var top = (args === null || args === void 0 ? void 0 : args.top) || this.top;\n var radius = (args === null || args === void 0 ? void 0 : args.radius) || this.radius;\n var commands = [];\n switch (this.planeView) {\n case PlaneView.FRONT:\n commands.push({\n command: Command.move,\n point: { r: 0, l: radius, t: 0 }\n }, {\n command: Command.curve,\n point: { r: 0, l: -radius, t: 0 },\n control: { r: 0, l: 0, t: -radius }\n }, {\n command: Command.curve,\n point: { r: 0, l: radius, t: 0 },\n control: { r: 0, l: 0, t: radius }\n });\n break;\n case PlaneView.SIDE:\n commands.push({\n command: Command.move,\n point: { r: -radius, l: 0, t: 0 }\n }, {\n command: Command.curve,\n point: { r: radius, l: 0, t: 0 },\n control: { r: 0, l: 0, t: -radius }\n }, {\n command: Command.curve,\n point: { r: -radius, l: 0, t: 0 },\n control: { r: 0, l: 0, t: radius }\n });\n break;\n case PlaneView.TOP:\n commands.push({\n command: Command.move,\n point: { r: 0, l: radius, t: 0 }\n }, {\n command: Command.curve,\n point: { r: 0, l: -radius, t: 0 },\n control: { r: radius, l: 0, t: 0 }\n }, {\n command: Command.curve,\n point: { r: 0, l: radius, t: 0 },\n control: { r: -radius, l: 0, t: 0 }\n });\n break;\n }\n translateCommandPoints(commands, right, left, top);\n return commands;\n };\n IsometricCircle.prototype.getCirclePath = function (args) {\n var commands = this.getCommands(args);\n return getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, true);\n };\n IsometricCircle.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n var props_1 = {\n right: _this.right,\n left: _this.left,\n top: _this.top,\n radius: _this.radius\n };\n if (Object.prototype.hasOwnProperty.call(props_1, animation.property)) {\n var property_1 = animation.property;\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = {\n values: animation.values.map(function (value) {\n var modifiedArgs = IsometricCircle_assign({}, props_1);\n modifiedArgs[property_1] = +value;\n return _this.getCirclePath(modifiedArgs);\n }).join(\';\')\n };\n }\n else {\n var modifiedArgs = IsometricCircle_assign({}, props_1);\n modifiedArgs[property_1] = +animation.values;\n properties = {\n values: _this.getCirclePath(modifiedArgs)\n };\n }\n }\n else {\n var fromArgs = IsometricCircle_assign({}, props_1);\n var toArgs = IsometricCircle_assign({}, props_1);\n fromArgs[property_1] = +animation.from;\n toArgs[property_1] = +animation.to;\n properties = {\n from: _this.getCirclePath(fromArgs),\n to: _this.getCirclePath(toArgs)\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n }\n });\n };\n Object.defineProperty(IsometricCircle.prototype, "radius", {\n get: function () {\n return this._radius;\n },\n set: function (value) {\n this._radius = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricCircle.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricCircle;\n}(IsometricShapeAbstract));\n\n\n;// ./src/@classes/public/IsometricCircle/index.ts\n\n\n;// ./src/@classes/abstract/IsometricStarPolygonAbstract/IsometricStarPolygonAbstract.ts\nvar IsometricStarPolygonAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricStarPolygonAbstract_assign = (undefined && undefined.__assign) || function () {\n IsometricStarPolygonAbstract_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricStarPolygonAbstract_assign.apply(this, arguments);\n};\nvar IsometricStarPolygonAbstract_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar IsometricStarPolygonAbstract_spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\nvar IsometricStarPolygonAbstract = (function (_super) {\n IsometricStarPolygonAbstract_extends(IsometricStarPolygonAbstract, _super);\n function IsometricStarPolygonAbstract(props) {\n var _this = this;\n var radius = props.radius, points = props.points, density = props.density, _a = props.rotation, rotation = _a === void 0 ? 0 : _a, rest = IsometricStarPolygonAbstract_rest(props, ["radius", "points", "density", "rotation"]);\n _this = _super.call(this, rest) || this;\n _this._radius = radius;\n _this._points = points;\n _this._density = density;\n _this._rotation = rotation;\n _this._sector = 2 * Math.PI / _this._points;\n _this._halfSector = _this._sector / 2;\n return _this;\n }\n IsometricStarPolygonAbstract.prototype.getCommands = function (args) {\n var right = (args === null || args === void 0 ? void 0 : args.right) || this.right;\n var left = (args === null || args === void 0 ? void 0 : args.left) || this.left;\n var top = (args === null || args === void 0 ? void 0 : args.top) || this.top;\n var radius = (args === null || args === void 0 ? void 0 : args.radius) || this.radius;\n var points = (args === null || args === void 0 ? void 0 : args.points) || this._points;\n var density = (args === null || args === void 0 ? void 0 : args.density) || this._density;\n var rotation = (args === null || args === void 0 ? void 0 : args.rotation) || this.rotation;\n var coordinates = this.get2DCoordinates(radius, points, density, rotation);\n var commands = [];\n switch (this.planeView) {\n case PlaneView.FRONT:\n coordinates.forEach(function (point, index) {\n commands.push({\n command: index === 0\n ? Command.move\n : Command.line,\n point: {\n r: 0,\n l: point.x,\n t: point.y\n }\n });\n });\n break;\n case PlaneView.SIDE:\n coordinates.forEach(function (point, index) {\n commands.push({\n command: index === 0\n ? Command.move\n : Command.line,\n point: {\n r: point.x,\n l: 0,\n t: point.y\n }\n });\n });\n break;\n case PlaneView.TOP:\n coordinates.forEach(function (point, index) {\n commands.push({\n command: index === 0\n ? Command.move\n : Command.line,\n point: {\n r: -point.x,\n l: -point.y,\n t: 0\n }\n });\n });\n break;\n }\n translateCommandPoints(commands, right, left, top);\n return commands;\n };\n IsometricStarPolygonAbstract.prototype._getRadianAngle = function (angle) {\n return angle * Math.PI / 180;\n };\n IsometricStarPolygonAbstract.prototype._getInnerRadius = function (radius, points, density) {\n return radius * Math.cos(Math.PI * density / points) / Math.cos(Math.PI * (density - 1) / points);\n };\n IsometricStarPolygonAbstract.prototype.get2DCoordinates = function (radius, points, density, rotation) {\n var _this = this;\n var innerRadius = this._getInnerRadius(radius, points, density);\n return IsometricStarPolygonAbstract_spreadArray([], Array(this._points), true).reduce(function (points, _undefined, index) {\n var angle = index * _this._sector + 2 * Math.PI - _this._getRadianAngle(rotation);\n var innerAngle = angle + _this._halfSector;\n var oX = Math.sin(angle) * radius;\n var oY = Math.cos(angle) * radius;\n var iX = Math.sin(innerAngle) * innerRadius;\n var iY = Math.cos(innerAngle) * innerRadius;\n return IsometricStarPolygonAbstract_spreadArray(IsometricStarPolygonAbstract_spreadArray([], points, true), [\n { x: oX, y: oY },\n { x: iX, y: iY }\n ], false);\n }, []);\n };\n IsometricStarPolygonAbstract.prototype.getPentagramPath = function (args) {\n var commands = this.getCommands(args);\n return getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, true);\n };\n IsometricStarPolygonAbstract.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n var props_1 = {\n right: _this.right,\n left: _this.left,\n top: _this.top,\n radius: _this.radius,\n points: _this._points,\n density: _this._density,\n rotation: _this.rotation\n };\n if (Object.prototype.hasOwnProperty.call(props_1, animation.property)) {\n var property_1 = animation.property;\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = {\n values: animation.values.map(function (value) {\n var modifiedArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n modifiedArgs[property_1] = +value;\n return _this.getPentagramPath(modifiedArgs);\n }).join(\';\')\n };\n }\n else {\n var modifiedArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n modifiedArgs[property_1] = +animation.values;\n properties = {\n values: _this.getPentagramPath(modifiedArgs)\n };\n }\n }\n else {\n var fromArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n var toArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n fromArgs[property_1] = +animation.from;\n toArgs[property_1] = +animation.to;\n properties = {\n from: _this.getPentagramPath(fromArgs),\n to: _this.getPentagramPath(toArgs)\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n }\n });\n };\n Object.defineProperty(IsometricStarPolygonAbstract.prototype, "radius", {\n get: function () {\n return this._radius;\n },\n set: function (value) {\n this._radius = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricStarPolygonAbstract.prototype, "rotation", {\n get: function () {\n return this._rotation;\n },\n set: function (value) {\n this._rotation = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricStarPolygonAbstract.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricStarPolygonAbstract;\n}(IsometricShapeAbstract));\n\n\n;// ./src/@classes/abstract/IsometricStarPolygonAbstract/index.ts\n\n\n\n;// ./src/@classes/public/IsometricPentagram/IsometricPentagram.ts\nvar IsometricPentagram_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricPentagram_assign = (undefined && undefined.__assign) || function () {\n IsometricPentagram_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricPentagram_assign.apply(this, arguments);\n};\n\nvar IsometricPentagram = (function (_super) {\n IsometricPentagram_extends(IsometricPentagram, _super);\n function IsometricPentagram(props) {\n return _super.call(this, IsometricPentagram_assign(IsometricPentagram_assign({}, props), { points: 5, density: 2 })) || this;\n }\n return IsometricPentagram;\n}(IsometricStarPolygonAbstract));\n\n\n;// ./src/@classes/public/IsometricPentagram/index.ts\n\n\n;// ./src/@classes/public/IsometricStarPolygon/IsometricStarPolygon.ts\nvar IsometricStarPolygon_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\nvar IsometricStarPolygon = (function (_super) {\n IsometricStarPolygon_extends(IsometricStarPolygon, _super);\n function IsometricStarPolygon(props) {\n return _super.call(this, props) || this;\n }\n Object.defineProperty(IsometricStarPolygon.prototype, "points", {\n get: function () {\n return this._points;\n },\n set: function (value) {\n this._points = value;\n this._sector = 2 * Math.PI / this._points;\n this._halfSector = this._sector / 2;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricStarPolygon.prototype, "density", {\n get: function () {\n return this._density;\n },\n set: function (value) {\n this._density = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n return IsometricStarPolygon;\n}(IsometricStarPolygonAbstract));\n\n\n;// ./src/@classes/public/IsometricStarPolygon/index.ts\n\n\n;// ./src/@classes/public/IsometricPath/IsometricPath.ts\nvar IsometricPath_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\nvar IsometricPath = (function (_super) {\n IsometricPath_extends(IsometricPath, _super);\n function IsometricPath(props) {\n if (props === void 0) { props = {}; }\n var _this = _super.call(this, props, SVG_ELEMENTS.path) || this;\n _this.getPathFromCommands = function (commands) { return getSVGPath(parseDrawCommands(commands), _this.data.centerX, _this.data.centerY, _this.data.scale, _this._autoclose); };\n _this.commands = [];\n _this._autoclose = \'autoclose\' in props\n ? props.autoclose\n : true;\n return _this;\n }\n IsometricPath.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n if (animation.property === \'path\') {\n var properties = void 0;\n if (animation.values) {\n properties = {\n values: Array.isArray(animation.values)\n ? animation.values.map(function (value) {\n return _this.getPathFromCommands("".concat(value));\n }).join(\';\')\n : _this.getPathFromCommands("".concat(animation.values))\n };\n }\n else {\n properties = {\n from: _this.getPathFromCommands("".concat(animation.from)),\n to: _this.getPathFromCommands("".concat(animation.to))\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n });\n };\n IsometricPath.prototype.getCommands = function () {\n return this.commands;\n };\n Object.defineProperty(IsometricPath.prototype, "autoclose", {\n get: function () {\n return this._autoclose;\n },\n set: function (value) {\n this._autoclose = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricPath.prototype.update = function () {\n this.updateGraphic(undefined, this.autoclose);\n return this;\n };\n IsometricPath.prototype.clear = function () {\n this.commands.splice(0);\n addSVGProperties(this.element, {\n d: \'\'\n });\n return this;\n };\n IsometricPath.prototype.moveTo = function (right, left, top) {\n this.commands.push({\n command: Command.move,\n point: { r: right, l: left, t: top }\n });\n this.update();\n return this;\n };\n IsometricPath.prototype.lineTo = function (right, left, top) {\n this.commands.push({\n command: Command.line,\n point: { r: right, l: left, t: top }\n });\n this.update();\n return this;\n };\n IsometricPath.prototype.curveTo = function (controlRight, controlLeft, controlTop, right, left, top) {\n this.commands.push({\n command: Command.curve,\n control: { r: controlRight, l: controlLeft, t: controlTop },\n point: { r: right, l: left, t: top }\n });\n this.update();\n return this;\n };\n IsometricPath.prototype.mt = function (right, left, top) {\n return this.moveTo(right, left, top);\n };\n IsometricPath.prototype.lt = function (right, left, top) {\n return this.lineTo(right, left, top);\n };\n IsometricPath.prototype.ct = function (controlRight, controlLeft, controlTop, right, left, top) {\n return this.curveTo(controlRight, controlLeft, controlTop, right, left, top);\n };\n IsometricPath.prototype.draw = function (commands) {\n this.commands = parseDrawCommands(commands);\n this.update();\n return this;\n };\n IsometricPath.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricPath;\n}(IsometricPathAbstract));\n\n\n;// ./src/@classes/public/IsometricPath/index.ts\n\n\n;// ./src/@classes/public/IsometricText/IsometricText.ts\nvar IsometricText_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricText_assign = (undefined && undefined.__assign) || function () {\n IsometricText_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricText_assign.apply(this, arguments);\n};\nvar IsometricText_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\nvar IsometricText = (function (_super) {\n IsometricText_extends(IsometricText, _super);\n function IsometricText(props) {\n var _a;\n var _this = this;\n var planeView = props.planeView, _b = props.text, text = _b === void 0 ? \'\' : _b, _c = props.fontFamily, fontFamily = _c === void 0 ? \'Arial\' : _c, _d = props.fontSize, fontSize = _d === void 0 ? 12 : _d, _e = props.fontStyle, fontStyle = _e === void 0 ? \'normal\' : _e, _f = props.fontWeight, fontWeight = _f === void 0 ? \'normal\' : _f, _g = props.origin, origin = _g === void 0 ? [\'center\', \'center\'] : _g, _h = props.right, right = _h === void 0 ? 0 : _h, _j = props.left, left = _j === void 0 ? 0 : _j, _k = props.top, top = _k === void 0 ? 0 : _k, _l = props.rotation, rotation = _l === void 0 ? 0 : _l, _m = props.selectable, selectable = _m === void 0 ? true : _m, rest = IsometricText_rest(props, ["planeView", "text", "fontFamily", "fontSize", "fontStyle", "fontWeight", "origin", "right", "left", "top", "rotation", "selectable"]);\n _this = _super.call(this, rest, SVG_ELEMENTS.group) || this;\n _this._originHash = (_a = {},\n _a[ORIGIN.CENTER] = \'middle\',\n _a[ORIGIN.LEFT] = \'start\',\n _a[ORIGIN.RIGHT] = \'end\',\n _a[ORIGIN.TOP] = \'hanging\',\n _a[ORIGIN.BOTTOM] = \'baseline\',\n _a);\n _this.commonAnimationAttributes = {\n attributeName: \'transform\',\n attributeType: \'XML\',\n additive: \'sum\',\n fill: \'freeze\'\n };\n _this.getMatrixTransform = function (props) {\n var transformMatrix = getPatternTransform(_this.getPositionTransform(props), _this.planeView, 1);\n return "".concat(transformMatrix, " rotate(").concat(_this.rotation, ")");\n };\n _this._textElement = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.text);\n _this._tspan = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.tspan);\n _this._textElement.appendChild(_this._tspan);\n _this.element.appendChild(_this._textElement);\n _this.planeView = planeView;\n _this.fontFamily = fontFamily;\n _this.fontSize = fontSize;\n _this.fontStyle = fontStyle;\n _this.fontWeight = fontWeight;\n _this.selectable = selectable;\n _this.origin = origin;\n _this.right = right;\n _this.left = left;\n _this.top = top;\n _this.rotation = rotation;\n _this.text = text;\n return _this;\n }\n IsometricText.prototype.getPositionTransform = function (props, fromCenter) {\n if (fromCenter === void 0) { fromCenter = true; }\n return getPointFromIsometricPoint(fromCenter\n ? this.data.centerX\n : 0, fromCenter\n ? this.data.centerY\n : 0, {\n r: props.right,\n l: props.left,\n t: props.top\n }, this.data.scale);\n };\n IsometricText.prototype.updateSubClassAnimations = function () {\n var _this = this;\n var props = {\n right: 0,\n left: 0,\n top: 0,\n rotation: 0,\n };\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n if (Object.prototype.hasOwnProperty.call(props, animation.property)) {\n var property_1 = animation.property;\n var isRotation_1 = property_1 === \'rotation\';\n var commonProps = IsometricText_assign(IsometricText_assign({}, _this.commonAnimationAttributes), { type: isRotation_1\n ? \'rotate\'\n : \'translate\', begin: \'indefinite\' });\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = IsometricText_assign({ values: animation.values.map(function (value) {\n if (isRotation_1) {\n return "".concat(value);\n }\n else {\n var modifiedArgs = IsometricText_assign({}, props);\n modifiedArgs[property_1] = +value - _this[property_1];\n var coords = _this.getPositionTransform(modifiedArgs, false);\n return "".concat(coords.x, ",").concat(coords.y);\n }\n }).join(\';\') }, commonProps);\n }\n else {\n if (isRotation_1) {\n properties = IsometricText_assign({ values: "".concat(animation.values) }, commonProps);\n }\n else {\n var modifiedArgs = IsometricText_assign({}, props);\n modifiedArgs[property_1] = +animation.values - _this[property_1];\n var coords = _this.getPositionTransform(modifiedArgs, false);\n properties = IsometricText_assign({ values: "".concat(coords.x, ",").concat(coords.y) }, commonProps);\n }\n }\n }\n else {\n if (isRotation_1) {\n properties = IsometricText_assign({ from: "".concat(animation.from), to: "".concat(animation.to) }, commonProps);\n }\n else {\n var fromArgs = IsometricText_assign({}, props);\n var toArgs = IsometricText_assign({}, props);\n fromArgs[property_1] = +animation.from - _this[property_1];\n toArgs[property_1] = +animation.to - _this[property_1];\n var coordsFrom = _this.getPositionTransform(fromArgs, false);\n var coordsTo = _this.getPositionTransform(toArgs, false);\n properties = IsometricText_assign({ from: "".concat(coordsFrom.x, ",").concat(coordsFrom.y), to: "".concat(coordsTo.x, ",").concat(coordsTo.y) }, commonProps);\n }\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animateTransform);\n }\n _this.addAnimationBasicProperties(\'transform\', animation);\n addSVGProperties(animation.element, properties);\n if (!animation.element.parentNode) {\n if (isRotation_1) {\n _this._textElement.appendChild(animation.element);\n }\n else {\n _this.element.appendChild(animation.element);\n }\n }\n window.requestAnimationFrame(function () {\n animation.element.beginElement();\n });\n }\n }\n });\n };\n IsometricText.prototype.update = function () {\n if (elementHasSVGParent(this.element)) {\n var transform = this.getMatrixTransform({\n right: this.right,\n left: this.left,\n top: this.top\n });\n addSVGProperties(this._textElement, { transform: transform });\n this._tspan.textContent = this._text;\n this.updatePatternTransform({ x: 0, y: 0 }, this.planeView);\n this.updateAnimations();\n }\n return this;\n };\n IsometricText.prototype.clear = function () {\n this.text = \'\';\n this.update();\n return this;\n };\n Object.defineProperty(IsometricText.prototype, "text", {\n get: function () {\n return this._text;\n },\n set: function (value) {\n this._text = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "planeView", {\n get: function () {\n return this._planeView;\n },\n set: function (value) {\n this._planeView = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontFamily", {\n get: function () {\n return this._fontFamily;\n },\n set: function (value) {\n this._fontFamily = value;\n addSVGProperties(this._tspan, {\n \'font-family\': this._fontFamily\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontSize", {\n get: function () {\n return this._fontSize;\n },\n set: function (value) {\n this._fontSize = value;\n addSVGProperties(this._tspan, {\n \'font-size\': "".concat(this._fontSize, "px")\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontStyle", {\n get: function () {\n return this._fontStyle;\n },\n set: function (value) {\n this._fontStyle = value;\n addSVGProperties(this._tspan, {\n \'font-style\': "".concat(this._fontStyle)\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontWeight", {\n get: function () {\n return this._fontWeight;\n },\n set: function (value) {\n this._fontWeight = value;\n addSVGProperties(this._tspan, {\n \'font-weight\': "".concat(this._fontWeight)\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "selectable", {\n get: function () {\n return this._selectable;\n },\n set: function (value) {\n this._selectable = value;\n if (this._selectable) {\n this._textElement.removeAttribute(\'style\');\n }\n else {\n addSVGProperties(this._textElement, {\n style: [\n \'-webkit-user-select\',\n \'-moz-user-select\',\n \'-ms-user-select\',\n \'user-select\',\n \'pointer-events\'\n ].map(function (decl) { return "".concat(decl, ": none"); }).join(\';\')\n });\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "origin", {\n get: function () {\n return this._origin;\n },\n set: function (value) {\n this._origin = value;\n var _a = this._origin, textAnchor = _a[0], alignmentBaseline = _a[1];\n addSVGProperties(this._tspan, {\n \'text-anchor\': this._originHash[textAnchor],\n \'alignment-baseline\': this._originHash[alignmentBaseline]\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "right", {\n get: function () {\n return this._right;\n },\n set: function (value) {\n if (this._right !== value) {\n this._right = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "left", {\n get: function () {\n return this._left;\n },\n set: function (value) {\n if (this._left !== value) {\n this._left = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "top", {\n get: function () {\n return this._top;\n },\n set: function (value) {\n if (this._top !== value) {\n this._top = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "rotation", {\n get: function () {\n return this._rotation;\n },\n set: function (value) {\n if (this._rotation !== value) {\n this._rotation = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n return IsometricText;\n}(IsometricGraphicAbstract));\n\n\n;// ./src/@classes/public/IsometricText/index.ts\n\n\n;// ./src/index.ts\n\n\n\n\n\n\n\n\n\n\n;// ./demo/demo1/index.js\n/* harmony default export */ const demo1 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricRectangle, PlaneView } = IsometricModule;\n\n function toggleColor() {\n this.fillColor = this.fillColor === \'white\' ? \'#EEE\' : \'white\';\n }\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonProps = {height: 1, width: 1};\n const topPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.TOP});\n const rightPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.FRONT});\n const leftPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.SIDE});\n\n topPiece.top = 1;\n topPiece.addEventListener(\'click\', toggleColor, true);\n\n rightPiece.right = 1;\n rightPiece.addEventListener(\'click\', toggleColor, true);\n\n leftPiece.left = 1;\n leftPiece.addEventListener(\'click\', toggleColor, true);\n\n cube\n .addChild(topPiece)\n .addChild(rightPiece)\n .addChild(leftPiece);\n\n});\n;// ./demo/demo2/index.js\n/* harmony default export */ const demo2 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath, IsometricRectangle, IsometricPentagram, PlaneView } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonProps = {height: 1, width: 1};\n\n const duration = 3;\n\n const rectangleAnimationProps = {\n property: \'height\',\n duration,\n values: [1, 0.5, 1]\n };\n\n const colorAnimationProps = {\n property: \'fillColor\',\n duration,\n values: [\'#FFF\', \'#DDD\', \'#FFF\']\n };\n\n const topPiece = new IsometricPath();\n const star = new IsometricPentagram({ radius: 0.35, planeView: PlaneView.TOP, right: 0.5, left: 0.5, top: 1});\n const rightPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.FRONT, right: 1});\n const leftPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.SIDE, left: 1});\n\n topPiece\n .moveTo(0, 0, 1)\n .lineTo(1, 0, 1)\n .lineTo(1, 1, 1)\n .lineTo(0, 1, 1);\n\n topPiece\n .addAnimation({\n property: \'path\',\n duration,\n values: [\n \'M0 0 1 L1 0 1 L1 1 1 L0 1 1\',\n \'M0 0 0.5 L1 0 0.5 L1 1 0.5 L0 1 0.5\',\n \'M0 0 1 L1 0 1 L1 1 1 L0 1 1\'\n ]\n })\n .addAnimation(colorAnimationProps);\n\n star\n .addAnimation({\n property: \'top\',\n duration,\n values: [1, 0.5, 1]\n });\n\n rightPiece\n .addAnimation(rectangleAnimationProps)\n .addAnimation(colorAnimationProps);\n\n leftPiece\n .addAnimation(rectangleAnimationProps)\n .addAnimation(colorAnimationProps);\n\n cube.addEventListener(\'click\', function() {\n if (this.animated) {\n this.pauseAnimations();\n } else {\n this.resumeAnimations();\n }\n });\n\n cube.addChildren(topPiece, rightPiece, leftPiece, star);\n\n});\n;// ./demo/images/block_side.png\nconst block_side_namespaceObject = __webpack_require__.p + "images/block_side.png";\n;// ./demo/images/block_top.png\nconst block_top_namespaceObject = __webpack_require__.p + "images/block_top.png";\n;// ./demo/demo3/index.js\n\n\n\n/* harmony default export */ const demo3 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricRectangle, IsometricText, PlaneView } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const rectangleCommonProps = { height: 1, width: 1 };\n\n const textCommonProps = {\n fontSize: 15,\n fillColor: \'#666\',\n strokeWidth: 0,\n right: 0.5,\n left: 0.5,\n top: 0.5,\n selectable: false\n };\n\n const pieces = [PlaneView.TOP, PlaneView.FRONT, PlaneView.SIDE].map((view, index) => {\n return {\n face: new IsometricRectangle({...rectangleCommonProps, planeView: view}),\n label: new IsometricText({...textCommonProps, planeView: view}),\n property: [\'top\', \'right\', \'left\'][index]\n };\n });\n\n pieces.forEach((piece) => {\n\n const { face, label, property } = piece;\n\n face[property] = 1;\n label[property] = 1;\n label.text = `${property.toUpperCase()} 0º`;\n\n face.addEventListener(\'click\', () => {\n const rotation = label.rotation + 45;\n label.rotation = rotation === 360 ? 0 : rotation;\n label.text = label.text.replace(/\\d+/, label.rotation);\n });\n\n cube.addChild(piece.face);\n cube.addChild(piece.label);\n });\n\n});\n;// ./demo/demo4/index.js\n/* harmony default export */ const demo4 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricGroup, IsometricPath } = IsometricModule;\n\n const isometric = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const bottomT = new IsometricPath();\n const bottomR = new IsometricPath();\n const bottomL = new IsometricPath();\n\n const topT = new IsometricPath();\n const topR = new IsometricPath();\n const topL = new IsometricPath();\n\n bottomT.mt(0, 0, .5).lt(1, 0, .5).lt(1, 1, .5).lt(0, 1, .5);\n bottomR.mt(1, 0, .5).lt(1, 0, 0).lt(1, 1, 0).lt(1, 1, .5);\n bottomL.mt(1, 1, .5).lt(1, 1, 0).lt(0, 1, 0).lt(0, 1, .5);\n\n topT.mt(.25, .25, 1).lt(.75, .25, 1).lt(.75, .75, .75).lt(.25, .75, .75);\n topR.mt(.75, .25, 1).lt(.75, .75, .75).lt(.75, .75, .25).lt(.75, .25, .25);\n topL.mt(.75, .75, .75).lt(.25, .75, .75).lt(.25, .75, .25).lt(.75, .75, .25);\n\n const bottomPiece = new IsometricGroup();\n const topPiece = new IsometricGroup();\n topPiece.top = .25;\n\n bottomPiece.addChildren(bottomT, bottomR, bottomL);\n topPiece.addChildren(topT, topR, topL);\n\n let flip = true;\n\n topPiece.addEventListener(\'click\', function() {\n if (this.right) {\n this.right = 0;\n return;\n }\n this.right = flip ? 0.25 : -0.25;\n flip = !flip;\n });\n\n isometric.addChildren(bottomPiece, topPiece);\n\n});\n;// ./demo/demo5/index.js\n/* harmony default export */ const demo5 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath } = IsometricModule;\n\n const isometric = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const right = new IsometricPath();\n const top1 = new IsometricPath();\n const top2 = new IsometricPath();\n const top3 = new IsometricPath();\n const top4 = new IsometricPath();\n const left1 = new IsometricPath();\n const left2 = new IsometricPath();\n\n // M r l t (Move to right left top)\n // L r l t (Line to right left top)\n // C cr cl ct r l t (Curve to control-right control-left control-top right left top)\n right.draw(\'M1 0 0 L1 1 0 L1 1 0.25 L1 0.5 0.25 L1 0.5 1 L1 0 1\');\n top1.draw(\'M0.25 0.5 1 C0.5 0.5 0.75 0.75 0.5 1 L0.75 0 1 C0.5 0 0.75 0.25 0 1 L0.25 0.5 1\');\n top2.draw(\'M1 0 1 L0.75 0 1 L0.75 0.5 1 L1 0.5 1 L1 0 1 M0 0 1 L0.25 0 1 L0.25 0.5 1 L0 0.5 1 L0 0 1\');\n top3.draw(\'M0 0.5 0.5 L0.5 0.5 0.5 L0.5 1 0.5 L0 1 0.5\');\n top4.draw(\'M0.5 0.5 0.5 L1 0.5 0.25 L1 1 0.25 L0.5 1 0.5\');\n left1.draw(\'M0 0.5 1 L0 0.5 0.5 L0.5 0.5 0.5 L1 0.5 0.25 L1 0.5 1 L0.75 0.5 1 C0.5 0.5 0.75 0.25 0.5 1 L0 0.5 1\');\n left2.draw(\'M0 1 0.5 L0.5 1 0.5 L1 1 0.25 L1 1 0 L0 1 0\');\n\n isometric.addChildren(right, top1, top2, top3, top4, left1, left2);\n\n});\n;// ./demo/demo6/index.js\n/* harmony default export */ const demo6 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const under = new IsometricPath({ fillColor: \'#EEE\' });\n const top = new IsometricPath();\n const right = new IsometricPath();\n const left = new IsometricPath();\n\n under\n .mt(0, 0, 1)\n .mt(0.25, 0, 1).ct(0.5, 0, 0.75, 0.75, 0, 1).lt(1, 0, 1)\n .lt(1, 0, 0.75).ct(0.75, 0, 0.5, 1, 0, 0.25).lt(1, 0, 0)\n .lt(1, 0.25, 0).ct(0.75, 0.5, 0, 1, 0.75, 0).lt(1, 1, 0)\n .lt(0.75, 1, 0).ct(0.5, 0.75, 0, 0.25, 1, 0).lt(0, 1, 0)\n .lt(0, 1, 0.25).ct(0, 0.75, 0.5, 0, 1, 0.75).lt(0, 1, 1)\n .lt(0, 0.75, 1).ct(0, 0.5, 0.75, 0, 0.25, 1).lt(0, 0, 1);\n\n top\n .mt(0, 0, 1)\n .lt(0.25, 0, 1).ct(0.5, 0.25, 1, 0.75, 0, 1).lt(1, 0, 1)\n .lt(1, 0.25, 1).ct(0.75, 0.5, 1, 1, 0.75, 1).lt(1, 1, 1)\n .lt(0.75, 1, 1).ct(0.5, 0.75, 1, 0.25, 1, 1).lt(0, 1, 1)\n .lt(0, 0.75, 1).ct(0.25, 0.5, 1, 0, 0.25, 1).lt(0, 0, 1);\n\n right\n .mt(1, 0, 1)\n .lt(1, 0, 0.75).ct(1, 0.25, 0.5, 1, 0, 0.25).lt(1, 0, 0)\n .lt(1, 0.25, 0).ct(1, 0.5, 0.25, 1, 0.75, 0).lt(1, 1, 0)\n .lt(1, 1, 0.25).ct(1, 0.75, 0.5, 1, 1, 0.75).lt(1, 1, 1)\n .lt(1, 0.75, 1).ct(1, 0.5, 0.75, 1, 0.25, 1).lt(1, 0, 1);\n\n left\n .mt(1, 1, 1)\n .lt(1, 1, 0.75).ct(0.75, 1, 0.5, 1, 1, 0.25).lt(1, 1, 0)\n .lt(0.75, 1, 0).ct(0.5, 1, 0.25, 0.25, 1, 0).lt(0, 1, 0)\n .lt(0, 1, 0.25).ct(0.25, 1, 0.5, 0, 1, 0.75).lt(0, 1, 1)\n .lt(0.25, 1, 1).ct(0.5, 1, 0.75, 0.75, 1, 1).lt(1, 1, 1);\n\n cube.addChildren(under, top, right, left);\n\n});\n;// ./demo/demo7/index.js\n/* harmony default export */ const demo7 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricStarPolygon, PlaneView } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonProps = {\n radius: 0.5,\n points: 8,\n density: 2,\n right: 0.5,\n left: 0.5,\n top: 0.5\n };\n\n const planes = [PlaneView.SIDE, PlaneView.FRONT, PlaneView.TOP];\n\n const planePropsHash = {\n [PlaneView.TOP]: \'top\',\n [PlaneView.FRONT]: \'right\',\n [PlaneView.SIDE]: \'left\'\n };\n\n planes.forEach((planeView) => {\n const props = { ...commonProps, planeView };\n const coord = planePropsHash[planeView];\n const starPolygonBack = new IsometricStarPolygon({...props, id: `${coord}-back`, fillColor: \'#EEE\'});\n const starPolygonFront = new IsometricStarPolygon({...props, id: `${coord}-front`});\n starPolygonBack[coord] = 0;\n starPolygonFront[coord] = 1;\n cube.addChildren(starPolygonBack, starPolygonFront);\n });\n\n planes.forEach((planeView) => {\n const coord = planePropsHash[planeView];\n const starPolygonBack = cube.getChildById(`${coord}-back`);\n const starPolygonFront = cube.getChildById(`${coord}-front`);\n cube.sendChildToBack(starPolygonBack);\n cube.bringChildToFront(starPolygonFront);\n });\n\n});\n;// ./demo/demo8/index.js\n/* harmony default export */ const demo8 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricGroup, IsometricRectangle, PlaneView } = IsometricModule;\n\n const canvas = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 20,\n width: 500,\n height: 320\n });\n\n function resetPlanes() {\n cube.right = cube.left = cube.top = 0;\n planeTop.fillOpacity = planeRight.fillOpacity = planeLeft.fillOpacity = 0.25;\n }\n\n function changePlane() {\n resetPlanes();\n this.fillOpacity = 1;\n cube.drag = this.planeView;\n }\n\n const planeProps = { height: 6, width: 6, fillOpacity: 0.25 };\n const planeTop = new IsometricRectangle({ ...planeProps, planeView: PlaneView.TOP, fillOpacity: 1 });\n const planeRight = new IsometricRectangle({ ...planeProps, planeView: PlaneView.FRONT });\n const planeLeft = new IsometricRectangle({ ...planeProps, planeView: PlaneView.SIDE });\n\n const cubeProps = { height: 1, width: 1 };\n const cubeTop = new IsometricRectangle({ ...cubeProps, planeView: PlaneView.TOP, top: 1 });\n const cubeRight = new IsometricRectangle({ ...cubeProps, planeView: PlaneView.FRONT, right: 1 });\n const cubeLeft = new IsometricRectangle({ ...cubeProps, planeView: PlaneView.SIDE, left: 1 });\n\n const cube = new IsometricGroup();\n\n const bounds = [0, 5];\n cube.drag = \'TOP\';\n cube.bounds = { top: bounds, right: bounds, left: bounds };\n\n planeTop.addEventListener(\'click\', changePlane, true);\n planeRight.addEventListener(\'click\', changePlane, true);\n planeLeft.addEventListener(\'click\', changePlane, true);\n\n cube.addChildren(cubeTop, cubeRight, cubeLeft);\n canvas.addChildren(planeTop, planeRight, planeLeft, cube);\n\n});\n;// ./demo/demo9/index.js\n\n\n\n/* harmony default export */ const demo9 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath, IsometricRectangle, PlaneView, Axis } = IsometricModule;\n\n const isometric = new IsometricCanvas({\n container,\n backgroundColor: \'#8AAA3F\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonTextureProps = {\n height: 1,\n width: 1,\n pixelated: true\n };\n\n const textureSides = {\n url: \'images/block_side.png\',\n ...commonTextureProps\n };\n\n const textureTop = {\n url: \'images/block_top.png\',\n planeView: PlaneView.TOP,\n rotation: {\n axis: Axis.LEFT,\n value: 26.5650\n },\n ...commonTextureProps\n };\n\n const side = new IsometricPath({\n texture: {\n planeView: PlaneView.SIDE,\n ...textureSides\n }\n });\n\n const front = new IsometricRectangle({\n planeView: PlaneView.FRONT,\n height: 0.5,\n width: 1,\n texture: textureSides\n });\n\n const chop = new IsometricPath({\n texture: textureTop\n });\n\n side.draw(\'M1 1 0 L1 1 0.5 L0 1 1 L0 1 0\');\n chop.draw(\'M1 1 0.5 L0 1 1 L0 0 1 L1 0 0.5\');\n\n side.left = 1;\n front.right = 1;\n\n isometric.addChildren(side, front, chop);\n\n});\n;// ./demo/demo.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst functioToString = (fn) => {\n const article = document.createElement(\'article\');\n const pre = document.createElement(\'pre\');\n article.classList.add(\'function-container\');\n pre.classList.add(\'prettyprint\');\n article.appendChild(pre);\n pre.innerHTML = fn.toString();\n return article;\n};\n\nconst demos = new Map([\n [\'demo1\', demo1],\n [\'demo2\', demo2],\n [\'demo3\', demo3],\n [\'demo4\', demo4],\n [\'demo5\', demo5],\n [\'demo6\', demo6],\n [\'demo7\', demo7],\n [\'demo8\', demo8],\n [\'demo9\', demo9],\n]);\n\ndocument.addEventListener(\'DOMContentLoaded\', function () {\n\n demos.forEach((module, div) => {\n const demo = document.getElementById(div);\n const container = document.createElement(\'div\');\n const wrapper = document.createElement(\'div\');\n\n container.classList.add(\'demo-container\');\n wrapper.classList.add(\'demo-wrapper\');\n\n module(src_namespaceObject, wrapper);\n container.appendChild(wrapper);\n demo.appendChild(container);\n demo.appendChild(functioToString(module));\n });\n\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODYwLmpzIiwibWFwcGluZ3MiOiI7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ICAgICAgICByZXR1cm4gcm90YXRlWCgtdmFsdWUpO1xuICAgICAgICAgICAgICAgIGNhc2UgQXhpcy5SSUdIVDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJvdGF0ZVkodmFsdWUpO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNhc2UgUGxhbmVWaWV3LkZST05UOiB7XG4gICAgICAgICAgICBzd2l0Y2ggKHJvdGF0aW9uLmF4aXMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEF4aXMuVE9QOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcm90YXRlWSh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgY2FzZSBBeGlzLkxFRlQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByb3RhdGVYKHZhbHVlKTtcbiAgICAgICAgICAgICAgICBjYXNlIEF4aXMuUklHSFQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByb3RhdGVaKHZhbHVlKTtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjYXNlIFBsYW5lVmlldy5TSURFOiB7XG4gICAgICAgICAgICBzd2l0Y2ggKHJvdGF0aW9uLmF4aXMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEF4aXMuVE9QOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcm90YXRlWSh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgY2FzZSBBeGlzLkxFRlQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByb3RhdGVaKHZhbHVlKTtcbiAgICAgICAgICAgICAgICBjYXNlIEF4aXMuUklHSFQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByb3RhdGVYKC12YWx1ZSk7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbn07XG5leHBvcnQgdmFyIGdldFZpZXdNYXRyaXggPSBmdW5jdGlvbiAocGxhbmVWaWV3LCByb3RhdGlvbikge1xuICAgIHZhciByb3RhdGlvbk1hdHJpY2VzID0gW107XG4gICAgdmFyIHJvdGF0aW9uTWF0cml4ID0gcm90YXRpb25cbiAgICAgICAgPyByb3RhdGlvblRvUm90YXRpb25NYXRyaXgocGxhbmVWaWV3LCByb3RhdGlvbilcbiAgICAgICAgOiBudWxsO1xuICAgIGlmIChyb3RhdGlvbk1hdHJpeClcbiAgICAgICAgcm90YXRpb25NYXRyaWNlcy5wdXNoKHJvdGF0aW9uTWF0cml4KTtcbiAgICBzd2l0Y2ggKHBsYW5lVmlldykge1xuICAgICAgICBjYXNlIFBsYW5lVmlldy5UT1A6IHtcbiAgICAgICAgICAgIHJldHVybiBtdWx0aXBseU1hdHJpY2VzLmFwcGx5KHZvaWQgMCwgX19zcHJlYWRBcnJheShbdG9wTWF0cml4XSwgcm90YXRpb25NYXRyaWNlcywgZmFsc2UpKTtcbiAgICAgICAgfVxuICAgICAgICBjYXNlIFBsYW5lVmlldy5GUk9OVDoge1xuICAgICAgICAgICAgcmV0dXJuIG11bHRpcGx5TWF0cmljZXMuYXBwbHkodm9pZCAwLCBfX3NwcmVhZEFycmF5KFtmcm9udE1hdHJpeF0sIHJvdGF0aW9uTWF0cmljZXMsIGZhbHNlKSk7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSBQbGFuZVZpZXcuU0lERToge1xuICAgICAgICAgICAgcmV0dXJuIG11bHRpcGx5TWF0cmljZXMuYXBwbHkodm9pZCAwLCBfX3NwcmVhZEFycmF5KFtzaWRlTWF0cml4XSw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gXCIgXCIpLmNvbmNhdChwb2ludC55KTtcbiAgICAgICAgICAgIGNhc2UgQ29tbWFuZC5jdXJ2ZToge1xuICAgICAgICAgICAgICAgIHZhciBzdGFydCA9IGdldFBvaW50RnJvbUlzb21ldHJpY1BvaW50KGNlbnRlclgsIGNlbnRlclksIGNvbW1hbmRzW2luZGV4IC0gMV0ucG9pbnQsIHNjYWxlKTtcbiAgICAgICAgICAgICAgICB2YXIgY29udHJvbCA9IGdldFBvaW50RnJvbUlzb21ldHJpY1BvaW50KGNlbnRlclgsIGNlbnRlclksIGMuY29udHJvbCwgc2NhbGUpO1xuICAgICAgICAgICAgICAgIHZhciBlbGxpcHNpc1NwZWNzID0gZ2V0RWxsaXBzaXNTcGVjcyhzdGFydCwgcG9pbnQsIGNvbnRyb2wpO1xuICAgICAgICAgICAgICAgIHZhciBzd2VlcEZsYWcgPSBnZXRPcmllbnRhdGlvbihzdGFydCwgY29udHJvbCwgcG9pbnQpO1xuICAgICAgICAgICAgICAgIHJldHVybiBcIkEgXCIuY29uY2F0KGVsbGlwc2lzU3BlY3NbMF0sIFwiIFwiKS5jb25jYXQoZWxsaXBzaXNTcGVjc1sxXSwgXCIgXCIpLmNvbmNhdChlbGxpcHNpc1NwZWNzWzJdLCBcIiAwIFwiKS5jb25jYXQoc3dlZXBGbGFnLCBcIiBcIikuY29uY2F0KHBvaW50LngsIFwiIFwiKS5jb25jYXQocG9pbnQueSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBpZiAoc3ZnUGF0aHMubGVuZ3RoKSB7XG4gICAgICAgIHZhciBwYXRoRW5kID0gYXV0b2Nsb3NlID8gJ3onIDogJyc7XG4gICAgICAgIHJldHVybiBcIlwiLmNvbmNhdChzdmdQYXRocy5qb2luKCcgJykudHJpbSgpKS5jb25jYXQocGF0aEVuZCk7XG4gICAgfVxuICAgIHJldHVybiAnJztcbn07XG5leHBvcnQgdmFyIHBhcnNlRHJhd0NvbW1hbmRzID0gZnVuY3Rpb24gKGNvbW1hbmRzKSB7XG4gICAgdmFyIGNvbW1hbmRzQXJyYXkgPSBbXTtcbiAgICB2YXIgYXJyYXk7XG4gICAgd2hpbGUgKChhcnJheSA9IENPTU1BTkRTX1JFR0VYUC5leGVjKGNvbW1hbmRzKSkgIT09IG51bGwpIHtcbiAgICAgICAgdmFyIGNvbW1hbmQgPSBhcnJheVs1XSB8fCBhcnJheVsxXTtcbiAgICAgICAgc3dpdGNoIChjb21tYW5kKSB7XG4gICAgICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICAgICAgICBjb21tYW5kc0FycmF5LnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLm1vdmUsXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6ICthcnJheVsyXSwgbDogK2FycmF5WzNdLCB0OiArYXJyYXlbNF0gfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgICAgICAgY29tbWFuZHNBcnJheS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogQ29tbWFuZC5saW5lLFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiArYXJyYXlbMl0sIGw6ICthcnJheVszXSwgdDogK2FycmF5WzRdIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgICAgICAgIGNvbW1hbmRzQXJyYXkucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IENvbW1hbmQuY3VydmUsXG4gICAgICAgICAgICAgICAgICAgIGNvbnRyb2w6IHsgcjogK2FycmF5WzZdLCBsOiArYXJyYXlbN10sIHQ6ICthcnJheVs4XSB9LFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiArYXJyYXlbOV0sI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ucy5mb3JFYWNoKGZ1bmN0aW9uIChhbmltYXRpb24pIHtcbiAgICAgICAgICAgIHZhciBpc05hdGl2ZVNWR1Byb3BlcnR5ID0gaXNTVkdQcm9wZXJ0eShhbmltYXRpb24ucHJvcGVydHkpO1xuICAgICAgICAgICAgaWYgKGlzTmF0aXZlU1ZHUHJvcGVydHkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvcGVydHkgPSBnZXRTVkdQcm9wZXJ0eShhbmltYXRpb24ucHJvcGVydHkpO1xuICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoU1ZHX05BTUVTUEFDRSwgU1ZHX0VMRU1FTlRTLmFuaW1hdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50LnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuZWxlbWVudC5hcHBlbmRDaGlsZChhbmltYXRpb24uZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF90aGlzLmFkZEFuaW1hdGlvbkJhc2ljUHJvcGVydGllcyhwcm9wZXJ0eSwgYW5pbWF0aW9uKTtcbiAgICAgICAgICAgICAgICBpZiAoYW5pbWF0aW9uLnZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGFuaW1hdGlvbi5lbGVtZW50LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXM6IEFycmF5LmlzQXJyYXkoYW5pbWF0aW9uLnZhbHVlcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFuaW1hdGlvbi52YWx1ZXMubWFwKGZ1bmN0aW9uICh2YWx1ZSkgeyByZXR1cm4gXCJcIi5jb25jYXQodmFsdWUpOyB9KS5qb2luKCc7JylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFwiXCIuY29uY2F0KGFuaW1hdGlvbi52YWx1ZXMpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyhhbmltYXRpb24uZWxlbWVudCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnJvbTogXCJcIi5jb25jYXQoYW5pbWF0aW9uLmZyb20pLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG86IFwiXCIuY29uY2F0KGFuaW1hdGlvbi50bylcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy51cGRhdGVTdWJDbGFzc0FuaW1hdGlvbnMoKTtcbiAgICB9O1xuICAgIElzb21ldHJpY0dyYXBoaWNBYnN0cmFjdC5wcm90b3R5cGUudXBkYXRlUGF0dGVyblRyYW5zZm9ybSA9IGZ1bmN0aW9uIChjb3JuZXIsIHBsYW5lVmlldykge1xuICAgICAgICB2YXIgX2EsIF9iLCBfYztcbiAgICAgICAgaWYgKHRoaXMucHJvcHMudGV4dHVyZSkge1xuICAgICAgICAgICAgdmFyIGhlaWdodCA9IHRoaXMucHJvcHMudGV4dHVyZS5oZWlnaHRcbiAgICAgICAgICAgICAgICA/IFwiXCIuY29uY2F0KHRoaXMucHJvcHMudGV4dHVyZS5oZWlnaHQgKiB0aGlzLmRhdGEuc2NhbGUpXG4gICAgICAgICAgICAgICAgOiAnMTAwJSc7XG4gICAgICAgICAgICB2YXIgd2lkdGggPSB0aGlzLnByb3BzLnRleHR1cmUud2lkdGhcbiAgICAgICAgICAgICAgICA/IFwiXCIuY29uY2F0KHRoaXMucHJvcHMudGV4dHVyZS53aWR0aCAqIHRoaXMu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ICAgJ2hlaWdodCc6IGhlaWdodCxcbiAgICAgICAgICAgICAgICAnd2lkdGgnOiB3aWR0aFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKHRoaXMucGF0dGVybi5maXJzdENoaWxkLCB7XG4gICAgICAgICAgICAgICAgJ2hlaWdodCc6IGhlaWdodCxcbiAgICAgICAgICAgICAgICAnd2lkdGgnOiB3aWR0aFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc29tZXRyaWNHcmFwaGljQWJzdHJhY3QucHJvdG90eXBlLCBcImlkXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5faWQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLnNldElkKHZhbHVlKTtcbiAgICAgICAgICAgIGlmICh0aGlzLnBhdHRlcm4pIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBhdHRlcm5JZCA9IFwiXCIuY29uY2F0KHRoaXMuaWQsIFwiX190ZXh0dXJlXCIpO1xuICAgICAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXModGhpcy5wYXR0ZXJuLCB7XG4gICAgICAgICAgICAgICAgICAgICdpZCc6IHRoaXMucGF0dGVybklkXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljR3JhcGhpY0Fic3RyYWN0LnByb3RvdHlwZSwgXCJmaWxsQ29sb3JcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiA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AgIGlmIChoYXNUZXh0dXJlIHx8IHZhbHVlLnVybCkge1xuICAgICAgICAgICAgdmFyIHNoaWZ0ID0gdmFsdWUuc2hpZnQsIHJvdGF0aW9uID0gdmFsdWUucm90YXRpb24sIG5ld1Byb3BzID0gX19yZXN0KHZhbHVlLCBbXCJzaGlmdFwiLCBcInJvdGF0aW9uXCJdKTtcbiAgICAgICAgICAgIHRoaXMucHJvcHMudGV4dHVyZSA9IGhhc1RleHR1cmVcbiAgICAgICAgICAgICAgICA/IF9fYXNzaWduKF9fYXNzaWduKHt9LCB0aGlzLnByb3BzLnRleHR1cmUpLCBuZXdQcm9wcykgOiBfX2Fzc2lnbih7fSwgbmV3UHJvcHMpO1xuICAgICAgICAgICAgaWYgKHNoaWZ0KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wcm9wcy50ZXh0dXJlLnNoaWZ0ID0gX19hc3NpZ24oX19hc3NpZ24oe30sICh0aGlzLnByb3BzLnRleHR1cmUuc2hpZnQgfHwge30pKSwgc2hpZnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHJvdGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wcm9wcy50ZXh0dXJlLnJvdGF0aW9uID0gcm90YXRpb247XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaGFzVGV4dHVyZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuX3VwZGF0ZVRleHR1cmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuY3JlYXRlVGV4dHVyZSh0aGlzLnByb3BzLnRleHR1cmUpO1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICBJc29tZXRyaWNHcmFwaGljQWJzdHJhY3QucHJvdG90eXBlLmFkZEFuaW1hdGlvbiA9IGZ1bmN0aW9uIChhbmltYXRpb24pIHtcbiAgICAgICAgdGhpcy5hbmltYXRpb25zLnB1c2goX19hc3NpZ24oe30sIGFuaW1hdGlvbikpO1xuICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIElzb21ldHJpY0dyYXBoaWNBYnN0cmFjdC5wcm90b3R5cGUucmVtb3ZlQW5pbWF0aW9uQnlJbmRleCA9IGZ1bmN0aW9uIChpbmRleCkge1xuICAgICAgICBpZiAoaW5kZXggPj0gMCAmJiBpbmRleCA8IHRoaXMuYW5pbWF0aW9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSB0aGlzLmFuaW1hdGlvbnMuc3BsaWNlKGluZGV4LCAxKVswXTtcbiAgICAgICAgICAgIGlmIChhbmltYXRpb24uZWxlbWVudCAmJiBhbmltYXRpb24uZWxlbWVudC5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChhbmltYXRpb24uZWxlbWVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcbiAgICBJc29tZXRyaWNHcmFwaGljQWJzdHJhY3QucHJvdG90eXBlLnJlbW92ZUFuaW1hdGlvbnMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBhbmltYXRpb25zID0gdGhpcy5hbmltYXRpb25zLnNwbGljZSgwKTtcbiAgICAgICAgYW5pbWF0aW9ucy5mb3JFYWNoKGZ1bmN0aW9uIChhbmltYXRpb24pIHtcbiAgICAgICAgICAgIGlmIChhbmltYXRpb24uZWxlbWVudCAmJiBhbmltYXRpb24uZWxlbWVudC5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQucGFyZW50Tm9kZS5yZ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cmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy50aHJvd0NoaWxkRXJyb3IoKTtcbiAgICB9O1xuICAgIElzb21ldHJpY0NvbnRhaW5lckFic3RyYWN0LnByb3RvdHlwZS5yZW1vdmVDaGlsZHJlbiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgdmFyIGNoaWxkcmVuID0gW107XG4gICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgICAgICBjaGlsZHJlbltfaV0gPSBhcmd1bWVudHNbX2ldO1xuICAgICAgICB9XG4gICAgICAgIGNoaWxkcmVuLmZvckVhY2goZnVuY3Rpb24gKGNoaWxkKSB7XG4gICAgICAgICAgICB2YXIgY2hpbGRJbmRleCA9IF90aGlzLmdldENoaWxkSW5kZXgoY2hpbGQpO1xuICAgICAgICAgICAgaWYgKGNoaWxkSW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMudGhyb3dDaGlsZEVycm9yKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfdGhpcy5yZW1vdmVDaGlsZChjaGlsZCk7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIElzb21ldHJpY0NvbnRhaW5lckFic3RyYWN0LnByb3RvdHlwZS5yZW1vdmVDaGlsZEJ5SW5kZXggPSBmdW5jdGlvbiAoaW5kZXgpIHtcbiAgICAgICAgaWYgKGluZGV4ID49IDAgJiYgaW5kZXggPCB0aGlzLl9jaGlsZHJlbi5sZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciBjaGlsZCA9IHRoaXMuX2NoaWxkcmVuLnNwbGljZShpbmRleCwgMSlbMF07XG4gICAgICAgICAgICB0aGlzLnJlbW92ZVNWR0NoaWxkKGNoaWxkKTtcbiAgICAgICAgfVxuICAgICAgICBy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W5zZXJ0QmVmb3JlKG1vdmVkRWxlbWVudCwgcmVwbGFjZWRFbGVtZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXBsYWNlZEVsZW1lbnQubmV4dFNpYmxpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5pbnNlcnRCZWZvcmUobW92ZWRFbGVtZW50LCByZXBsYWNlZEVsZW1lbnQubmV4dFNpYmxpbmcpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKG1vdmVkRWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnRocm93Q2hpbGRFcnJvcigpO1xuICAgIH07XG4gICAgSXNvbWV0cmljQ29udGFpbmVyQWJzdHJhY3QucHJvdG90eXBlLmJyaW5nQ2hpbGRUb0Zyb250ID0gZnVuY3Rpb24gKGNoaWxkKSB7XG4gICAgICAgIHZhciBjaGlsZEluZGV4ID0gdGhpcy5nZXRDaGlsZEluZGV4KGNoaWxkKTtcbiAgICAgICAgaWYgKGNoaWxkSW5kZXggPiAtMSkge1xuICAgICAgICAgICAgdGhpcy5zZXRDaGlsZEluZGV4KGNoaWxkLCB0aGlzLl9jaGlsZHJlbi5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMudGhyb3dDaGlsZEVycm9yKCk7XG4gICAgfTtcbiAgICBJc29tZXRyaWNDb250YWluZXJBYnN0cmFjdC5wcm90b3R5cGUuYnJpbmdDaGlsZEZvcndhcmQgPSBmdW5jdGlvbiAoY2hpbGQpIHtcbiAgICAgICAgdmFyIGNoaWxkSW5kZXggPSB0aGlzLmdldENoaWxkSW5kZXgoY2hpbGQpO1xuICAgICAgICBpZiAoY2hpbGRJbmRleCA+IC0xKSB7XG4gICAgICAgICAgICBpZiAoY2hpbGRJbmRleCA8IHRoaXMuX2NoaWxkcmVuLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNldENoaWxkSW5kZXgoY2hpbGQsIGNoaWxkSW5kZXggKyAxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMudGhyb3dDaGlsZEVycm9yKCk7XG4gICAgfTtcbiAgICBJc29tZXRyaWNDb250YWluZXJBYnN0cmFjdC5wcm90b3R5cGUuc2VuZENoaWxkVG9CYWNrID0gZnVuY3Rpb24gKGNoaWxkKSB7XG4gICAgICAgIHZhciBjaGlsZEluZGV4ID0gdGhpcy5nZXRDaGlsZEluZGV4KGNoaWxkKTtcbiAgICAgICAgaWYgKGNoaWxkSW5kZXggPiAtMSkge1xuICAgICAgICAgICAgdGhpcy5zZXRDaGlsZEluZGV4KGNoaWxkLCAwKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMudGhyb3dDaGlsZEVycm9yKCk7XG4gICAgfTtcbiAgICBJc29tZXRyaWNDb250YWluZXJBYnN0cmFjdC5wcm90b3R5cGUuc2VuZENoaWxkQmFja3dhcmQgPSBmdW5jdGlvbiAoY2hpbGQpIHtcbiAgICAgICAgdmFyIGNoaWxkSW5kZXggPSB0aGlzLmdldENoaWxkSW5kZXgoY2hpbGQpO1xuICAgICAgICBpZiAoY2hpbGRJbmRleCA+IC0xKSB7XG4gICAgICAgICAgICBpZiAoY2hpbGRJbmRleCA+IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNldENoaWxkSW5kZXgoY2hpbGQsI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G4gICAgICAgICAgICB2YXIgX2E7XG4gICAgICAgICAgICB0aGlzLmRhdGEud2lkdGggPSB2YWx1ZTtcbiAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXModGhpcy5lbGVtZW50LCAoX2EgPSB7fSxcbiAgICAgICAgICAgICAgICBfYVtTVkdfUFJPUEVSVElFUy52aWV3Qm94XSA9IFwiMCAwIFwiLmNvbmNhdCh0aGlzLmRhdGEud2lkdGgsIFwiIFwiKS5jb25jYXQodGhpcy5kYXRhLmhlaWdodCksXG4gICAgICAgICAgICAgICAgX2Eud2lkdGggPSBcIlwiLmNvbmNhdCh0aGlzLmRhdGEud2lkdGgsIFwicHhcIiksXG4gICAgICAgICAgICAgICAgX2EpKTtcbiAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXModGhpcy5iYWNrZ3JvdW5kLCB7XG4gICAgICAgICAgICAgICAgd2lkdGg6IFwiXCIuY29uY2F0KHRoaXMuZGF0YS53aWR0aCwgXCJweFwiKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY0NhbnZhcy5wcm90b3R5cGUsIFwiYW5pbWF0ZWRcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmlzQW5pbWF0ZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBJc29tZXRyaWNDYW52YXMucHJvdG90eXBlLmdldFNWR0NvZGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmVsZW1lbnQub3V0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F1ZXN0QW5pbWF0aW9uRnJhbWUgPSBfaXNCcm93c2VyXG4gICAgPyAod2luZG93LnJlcXVlc3RBbmltYXRpb25GcmFtZSB8fFxuICAgICAgICB3aW5kb3cubW96UmVxdWVzdEFuaW1hdGlvbkZyYW1lIHx8XG4gICAgICAgIHdpbmRvdy53ZWJraXRSZXF1ZXN0QW5pbWF0aW9uRnJhbWUgfHxcbiAgICAgICAgd2luZG93Lm1zUmVxdWVzdEFuaW1hdGlvbkZyYW1lKVxuICAgIDogbnVsbDtcbnZhciBfZHJhZ1N0b3JlRGVmYXVsdCA9IHtcbiAgICByaWdodDogMCxcbiAgICBsZWZ0OiAwLFxuICAgIHRvcDogMCxcbiAgICB4OiAwLFxuICAgIHk6IDBcbn07XG52YXIgaXNNb3VzZUV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50KSB7IHJldHVybiAnY2xpZW50WCcgaW4gZXZlbnQ7IH07XG52YXIgZ2V0Q2xpZW50Q29vcmRzID0gZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgaWYgKGV2ZW50IGluc3RhbmNlb2YgRXZlbnQpIHtcbiAgICAgICAgaWYgKGlzTW91c2VFdmVudChldmVudCkpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgY2xpZW50WDogZXZlbnQuY2xpZW50WCxcbiAgICAgICAgICAgICAgICBjbGllbnRZOiBldmVudC5jbGllbnRZXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjbGllbnRYOiBldmVudC50b3VjaGVzWzBdLmNsaWVudFgsXG4gICAgICAgICAgICBjbGllbnRZOiBldmVudC50b3VjaGVzWzBdLmNsaWVudFlcbiAgICAgICAgfTtcbiAgICB9XG4gICAgcmV0dXJuIGV2ZW50O1xufTtcbnZhciBJc29tZXRyaWNEcmFnZ2FibGVBYnN0cmFjdCA9IChmdW5jdGlvbiAoX3N1cGVyKSB7XG4gICAgX19leHRlb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ge1xuICAgICAgICB2YXIgYm91bmRzID0gdGhpcy5fYm91bmRzICYmIHRoaXMuX2JvdW5kcy50b3AgfHwgTk9fTElNSVRTO1xuICAgICAgICByZXR1cm4gdGhpcy5iZXR3ZWVuQm91bmRzKHRoaXMuX2RyYWdTdG9yZS50b3AgKyB2YWx1ZSAvIHRoaXMuZGF0YS5zY2FsZSwgYm91bmRzKTtcbiAgICB9O1xuICAgIElzb21ldHJpY0RyYWdnYWJsZUFic3RyYWN0LnByb3RvdHlwZS5nZXRGaXhlZENvb3JkaW5hdGVzID0gZnVuY3Rpb24gKGNvb3Jkcykge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICByZXR1cm4gT2JqZWN0LmVudHJpZXMoY29vcmRzKS5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgZW50cnkpIHtcbiAgICAgICAgICAgIHZhciBmaXhlZENvb3JkcyA9IF9fYXNzaWduKHt9LCBhY2MpO1xuICAgICAgICAgICAgc3dpdGNoIChlbnRyeVswXSkge1xuICAgICAgICAgICAgICAgIGNhc2UgJ3JpZ2h0JzpcbiAgICAgICAgICAgICAgICAgICAgZml4ZWRDb29yZHMucmlnaHQgPSBfdGhpcy5nZXRSaWdodChlbnRyeVsxXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ2xlZnQnOlxuICAgICAgICAgICAgICAgICAgICBmaXhlZENvb3Jkcy5sZWZ0ID0gX3RoaXMuZ2V0TGVmdChlbnRyeVsxXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIGZpeGVkQ29vcmRzLnRvcCA9IF90aGlzLmdldFRvcChlbnRyeVsxXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZml4ZWRDb29yZHM7XG4gICAgICAgIH0sIHt9KTtcbiAgICB9O1xuICAgIElzb21ldHJpY0RyYWdnYWJsZUFic3RyYWN0LnByb3RvdHlwZS5kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50VHlwZSkge1xuICAgICAgICB2YXIgZHJhZ0V2ZW50ID0gbmV3IEN1c3RvbUV2ZW50KGV2ZW50VHlwZSwge1xuICAgICAgICAgICAgY2FuY2VsYWJsZTogZXZlbnRUeXBlID09PSBEUkFHX0VWRU5ULkRSQUcsXG4gICAgICAgICAgICBkZXRhaWw6IHtcbiAgICAgICAgICAgICAgICByaWdodDogdGhpcy5fY29vcmRzLnJpZ2h0IHx8IHRoaXMucmlnaHQsXG4gICAgICAgICAgICAgICAgbGVmdDogdGhpcy5fY29vcmRzLmxlZnQgfHwgdGhpcy5sZWZ0LFxuICAgICAgICAgICAgICAgIHRvcDogdGhpcy5fY29vcmRzLnRvcCB8fCB0aGlzLnRvcFxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy5lbGVtZW50LmRpc3BhdGNoRXZlbnQoZHJhZ0V2ZW50KTtcbiAgICAgICAgcmV0dXJuIGRyYWdFdmVudDtcbiAgICB9O1xuICAgIElzb21ldHJpY0RyYWdnYWJsZUFic3RyYWN0LnByb3RvdHlwZS5hbmltYXRlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5fdXBkYXRlKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuX3ByZXZlbnRlZCkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpcy5fY29vcmRzLnJpZ2h0ID09PSBUeXBlb2YuTlVNQkVSKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmlnaHQgPSB0aGlzLl9jb29yZHMucmlnaHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpcy5fY29vcmRzLmxlZnQgPT09IFR5cGVvZi5OVU1CRVIpIHtcbiAgICAgICAgICAgICAgICAgICAgd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lvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5sZWZ0O1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJvcHMubGVmdCAhPT0gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnByb3BzLmxlZnQgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY0RyYWdnYWJsZUFic3RyYWN0LnByb3RvdHlwZSwgXCJ0b3BcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnByb3BzLnRvcDtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByb3BzLnRvcCAhPT0gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnByb3BzLnRvcCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljRHJhZ2dhYmxlQWJzdHJhY3QucHJvdG90eXBlLCBcImRyYWdcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kcmFnIHx8IGZhbHNlO1xuICAgICAg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gbGVmdDogX3RoaXMubGVmdCxcbiAgICAgICAgICAgICAgICAgICAgdG9wOiBfdGhpcy50b3AsXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBfdGhpcy53aWR0aCxcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBfdGhpcy5oZWlnaHRcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocHJvcHNfMSwgYW5pbWF0aW9uLnByb3BlcnR5KSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcGVydHlfMSA9IGFuaW1hdGlvbi5wcm9wZXJ0eTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb3BlcnRpZXMgPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhbmltYXRpb24udmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhbmltYXRpb24udmFsdWVzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlczogYW5pbWF0aW9uLnZhbHVlcy5tYXAoZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbW9kaWZpZWRBcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK3ZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmdldFJlY3RhbmdsZVBhdGgobW9kaWZpZWRBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkuam9pbignOycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtb2RpZmllZEFyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi52YWx1ZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzOiBfdGhpcy5nZXRSZWN0YW5nbGVQYXRoKG1vZGlmaWVkQXJncylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZyb21BcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wc18xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyb21BcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi5mcm9tO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9BcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi50bztcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbTogX3RoaXMuZ2V0UmVjdGFuZ2xlUGF0aChmcm9tQXJncyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdG86IF90aGlzLmdldFJlY3RhbmdsZVBhdGgodG9BcmdzKVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24uZWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUyhTVkdfTkFNRVNQQUNFLCBTVkdfRUxFTUVOVFMuYW5pbWF0ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhbmltYXRpb24uZWxlbWVudC5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKGFuaW1hdGlvbi5lbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hZGRBbmltYXRpb25CYXNpY1Byb3BlcnRpZXMoJ2QnLCBhbmltYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGFuaW1hdGlvbi5lbGVtZW50LCBwcm9wZXJ0aWVzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1JlY3RhbmdsZS5wcm90b3R5cGUsIFwid2lkdGhcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl93aWR0aDtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHRoaXMuX3dpZHRoID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4g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gMCA/IHZvaWQgMCA6IGFyZ3MucmFkaXVzKSB8fCB0aGlzLnJhZGl1cztcbiAgICAgICAgdmFyIGNvbW1hbmRzID0gW107XG4gICAgICAgIHN3aXRjaCAodGhpcy5wbGFuZVZpZXcpIHtcbiAgICAgICAgICAgIGNhc2UgUGxhbmVWaWV3LkZST05UOlxuICAgICAgICAgICAgICAgIGNvbW1hbmRzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLm1vdmUsXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6IDAsIGw6IHJhZGl1cywgdDogMCB9XG4gICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLmN1cnZlLFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiAwLCBsOiAtcmFkaXVzLCB0OiAwIH0sXG4gICAgICAgICAgICAgICAgICAgIGNvbnRyb2w6IHsgcjogMCwgbDogMCwgdDogLXJhZGl1cyB9XG4gICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLmN1cnZlLFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiAwLCBsOiByYWRpdXMsIHQ6IDAgfSxcbiAgICAgICAgICAgICAgICAgICAgY29udHJvbDogeyByOiAwLCBsOiAwLCB0OiByYWRpdXMgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBQbGFuZVZpZXcuU0lERTpcbiAgICAgICAgICAgICAgICBjb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogQ29tbWFuZC5tb3ZlLFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiAtcmFkaXVzLCBsOiAwLCB0OiAwIH1cbiAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IENvbW1hbmQuY3VydmUsXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6IHJhZGl1cywgbDogMCwgdDogMCB9LFxuICAgICAgICAgICAgICAgICAgICBjb250cm9sOiB7IHI6IDAsIGw6IDAsIHQ6IC1yYWRpdXMgfVxuICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogQ29tbWFuZC5jdXJ2ZSxcbiAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHsgcjogLXJhZGl1cywgbDogMCwgdDogMCB9LFxuICAgICAgICAgICAgICAgICAgICBjb250cm9sOiB7IHI6IDAsIGw6IDAsIHQ6IHJhZGl1cyB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFBsYW5lVmlldy5UT1A6XG4gICAgICAgICAgICAgICAgY29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IENvbW1hbmQubW92ZSxcbiAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHsgcjogMCwgbDogcmFkaXVzLCB0OiAwIH1cbiAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IENvbW1hbmQuY3VydmUsXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6IDAsIGw6IC1yYWRpdXMsIHQ6IDAgfSxcbiAgICAgICAgICAgICAgICAgICAgY29udHJvbDogeyByOiByYWRpdXMsIGw6IDAsIHQ6IDAgfVxuICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogQ29tbWFuZC5jdXJ2ZSxcbiAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHsgcjogMCwgbDogcmFkaXVzLCB0OiAwIH0sXG4gICAgICAgICAgICAgICAgICAgIGNvbnRyb2w6IHsgcjogLXJhZGl1cywgbDogMC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yYWRpdXNcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocHJvcHNfMSwgYW5pbWF0aW9uLnByb3BlcnR5KSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcGVydHlfMSA9IGFuaW1hdGlvbi5wcm9wZXJ0eTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb3BlcnRpZXMgPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhbmltYXRpb24udmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhbmltYXRpb24udmFsdWVzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlczogYW5pbWF0aW9uLnZhbHVlcy5tYXAoZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbW9kaWZpZWRBcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK3ZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmdldENpcmNsZVBhdGgobW9kaWZpZWRBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkuam9pbignOycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtb2RpZmllZEFyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi52YWx1ZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzOiBfdGhpcy5nZXRDaXJjbGVQYXRoKG1vZGlmaWVkQXJncylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZyb21BcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wc18xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyb21BcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi5mcm9tO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9BcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi50bztcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbTogX3RoaXMuZ2V0Q2lyY2xlUGF0aChmcm9tQXJncyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdG86IF90aGlzLmdldENpcmNsZVBhdGgodG9BcmdzKVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24uZWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUyhTVkdfTkFNRVNQQUNFLCBTVkdfRUxFTUVOVFMuYW5pbWF0ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhbmltYXRpb24uZWxlbWVudC5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKGFuaW1hdGlvbi5lbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hZGRBbmltYXRpb25CYXNpY1Byb3BlcnRpZXMoJ2QnLCBhbmltYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGFuaW1hdGlvbi5lbGVtZW50LCBwcm9wZXJ0aWVzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY0NpcmNsZS5wcm90b3R5cGUsIFwicmFkaXVzXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcmFkaXVzO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5fcmFkaXVzID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgSXNvbWV0cmljQ2lyY2xlLnByb3RvdHlwZS5hZGRBbmltYXRpb24gPSBmdW5jdGlvbiAoYW5pbWF0aW9uKSB7XG4gICAgICAgIHJldHVybiBfc3VwZXIucHJvdG90eXBlLmFkZEFuaW1hdGlvbi5jYWxsKHRoaXMsIGFuaW1hdGlvbik7XG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ICBjYXNlIFBsYW5lVmlldy5GUk9OVDpcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlcy5mb3JFYWNoKGZ1bmN0aW9uIChwb2ludCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBpbmRleCA9PT0gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gQ29tbWFuZC5tb3ZlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBDb21tYW5kLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb2ludDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHI6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbDogcG9pbnQueCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0OiBwb2ludC55XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBQbGFuZVZpZXcuU0lERTpcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlcy5mb3JFYWNoKGZ1bmN0aW9uIChwb2ludCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBpbmRleCA9PT0gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gQ29tbWFuZC5tb3ZlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBDb21tYW5kLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb2ludDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHI6IHBvaW50LngsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbDogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0OiBwb2ludC55XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBQbGFuZVZpZXcuVE9QOlxuICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzLmZvckVhY2goZnVuY3Rpb24gKHBvaW50LCBpbmRleCkge1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IGluZGV4ID09PSAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBDb21tYW5kLm1vdmVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IENvbW1hbmQubGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcjogLXBvaW50LngsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbDogLXBvaW50LnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdDogMFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICB0cmFuc2xhdGVDb21tYW5kUG9pbnRzKGNvbW1hbmRzLCByaWdodCwgbGVmdCwgdG9wKTtcbiAgICAgICAgcmV0dXJuIGNvbW1hbmRzO1xuICAgIH07XG4gICAgSXNvbWV0cmljU3RhclBvbHlnb25BYnN0cmFjdC5wcm90b3R5cGUuX2dldFJhZGlhbkFuZ2xlID0gZnVuY3Rpb24gKGFuZ2xlKSB7XG4gICAgICAgIHJldHVybiBhbmdsZSAqIE1hdGguUEkgLyAxODA7XG4gICAgfTtcbiAgICBJc29tZXRyaWNTdGFyUG9seWdvbkFic3RyYWN0LnByb3RvdHlwZS5fZ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W5nbGUpICogaW5uZXJSYWRpdXM7XG4gICAgICAgICAgICByZXR1cm4gX19zcHJlYWRBcnJheShfX3NwcmVhZEFycmF5KFtdLCBwb2ludHMsIHRydWUpLCBbXG4gICAgICAgICAgICAgICAgeyB4OiBvWCwgeTogb1kgfSxcbiAgICAgICAgICAgICAgICB7IHg6IGlYLCB5OiBpWSB9XG4gICAgICAgICAgICBdLCBmYWxzZSk7XG4gICAgICAgIH0sIFtdKTtcbiAgICB9O1xuICAgIElzb21ldHJpY1N0YXJQb2x5Z29uQWJzdHJhY3QucHJvdG90eXBlLmdldFBlbnRhZ3JhbVBhdGggPSBmdW5jdGlvbiAoYXJncykge1xuICAgICAgICB2YXIgY29tbWFuZHMgPSB0aGlzLmdldENvbW1hbmRzKGFyZ3MpO1xuICAgICAgICByZXR1cm4gZ2V0U1ZHUGF0aChjb21tYW5kcywgdGhpcy5kYXRhLmNlbnRlclgsIHRoaXMuZGF0YS5jZW50ZXJZLCB0aGlzLmRhdGEuc2NhbGUsIHRydWUpO1xuICAgIH07XG4gICAgSXNvbWV0cmljU3RhclBvbHlnb25BYnN0cmFjdC5wcm90b3R5cGUudXBkYXRlU3ViQ2xhc3NBbmltYXRpb25zID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzLmFuaW1hdGlvbnMuZm9yRWFjaChmdW5jdGlvbiAoYW5pbWF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgaXNOYXRpdmVTVkdQcm9wZXJ0eSA9IGlzU1ZHUHJvcGVydHkoYW5pbWF0aW9uLnByb3BlcnR5KTtcbiAgICAgICAgICAgIGlmICghaXNOYXRpdmVTVkdQcm9wZXJ0eSkge1xuICAgICAgICAgICAgICAgIHZhciBwcm9wc18xID0ge1xuICAgICAgICAgICAgICAgICAgICByaWdodDogX3RoaXMucmlnaHQsXG4gICAgICAgICAgICAgICAgICAgIGxlZnQ6IF90aGlzLmxlZnQsXG4gICAgICAgICAgICAgICAgICAgIHRvcDogX3RoaXMudG9wLFxuICAgICAgICAgICAgICAgICAgICByYWRpdXM6IF90aGlzLnJhZGl1cyxcbiAgICAgICAgICAgICAgICAgICAgcG9pbnRzOiBfdGhpcy5fcG9pbnRzLFxuICAgICAgICAgICAgICAgICAgICBkZW5zaXR5OiBfdGhpcy5fZGVuc2l0eSxcbiAgICAgICAgICAgICAgICAgICAgcm90YXRpb246IF90aGlzLnJvdGF0aW9uXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHByb3BzXzEsIGFuaW1hdGlvbi5wcm9wZXJ0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb3BlcnR5XzEgPSBhbmltYXRpb24ucHJvcGVydHk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0aWVzID0gdm9pZCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYW5pbWF0aW9uLnZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoYW5pbWF0aW9uLnZhbHVlcykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXM6IGFuaW1hdGlvbi52YWx1ZXMubWFwKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1vZGlmaWVkQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wc18xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGlmaWVkQXJnc1twcm9wZXJ0eV8xXSA9ICt2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5nZXRQZW50YWdyYW1QYXRoKG1vZGlmaWVkQXJncyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLmpvaW4oJzsnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbW9kaWZpZWRBcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGlmaWVkQXJnc1twcm9wZXJ0eV8xXSA9ICthbmltYXRpb24udmFsdWVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlczogX3RoaXMuZ2V0UGVudGFncmFtUGF0aChtb2RpZmllZEFyZ3MpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmcm9tQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wc18xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0b0FyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBmcm9tQXJnc1twcm9wZXJ0eV8xXSA9ICthbmltYXRpb24uZnJvbTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvQXJnc1twcm9wZXJ0eV8xXSA9ICthbmltYXRpb24udG87XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb206IF90aGlzLmdldFBlbnRhZ3JhbVBhdGgoZnJvbUFyZ3MpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvOiBfdGhpcy5nZXRQZW50YWdyYW1QYXRoKHRvQXJncylcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhbmltYXRpb24uZWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoU1ZHX05BTUVTUEFDRSwgU1ZHX0VMRU1FTlRTLmFuaW1hdGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQucGFyZW50Tm9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuZWxlbWVudC5hcHBlbmRDaGlsZChhbmltYXRpb24uZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYWRkQW5pbWF0aW9uQmFzaWNQcm9wZXJ0aWVzKCdkJywgYW5pbWF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyhhbmltYXRpb24uZWxlbWVudCwgcHJvcGVydGllcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9O1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc29tZXRyaWNTdGFyUG9seWdvbkFic3RyYWN0LnByb3RvdHlwZSwgXCJyYWRpdXNcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9yYWRpdXM7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLl9yYWRpdXMgPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXMud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bW1hbmRzKGNvbW1hbmRzKSwgX3RoaXMuZGF0YS5jZW50ZXJYLCBfdGhpcy5kYXRhLmNlbnRlclksIF90aGlzLmRhdGEuc2NhbGUsIF90aGlzLl9hdXRvY2xvc2UpOyB9O1xuICAgICAgICBfdGhpcy5jb21tYW5kcyA9IFtdO1xuICAgICAgICBfdGhpcy5fYXV0b2Nsb3NlID0gJ2F1dG9jbG9zZScgaW4gcHJvcHNcbiAgICAgICAgICAgID8gcHJvcHMuYXV0b2Nsb3NlXG4gICAgICAgICAgICA6IHRydWU7XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgSXNvbWV0cmljUGF0aC5wcm90b3R5cGUudXBkYXRlU3ViQ2xhc3NBbmltYXRpb25zID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzLmFuaW1hdGlvbnMuZm9yRWFjaChmdW5jdGlvbiAoYW5pbWF0aW9uKSB7XG4gICAgICAgICAgICBpZiAoYW5pbWF0aW9uLnByb3BlcnR5ID09PSAncGF0aCcpIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvcGVydGllcyA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICBpZiAoYW5pbWF0aW9uLnZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzOiBBcnJheS5pc0FycmF5KGFuaW1hdGlvbi52YWx1ZXMpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBhbmltYXRpb24udmFsdWVzLm1hcChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmdldFBhdGhGcm9tQ29tbWFuZHMoXCJcIi5jb25jYXQodmFsdWUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCc7JylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IF90aGlzLmdldFBhdGhGcm9tQ29tbWFuZHMoXCJcIi5jb25jYXQoYW5pbWF0aW9uLnZhbHVlcykpXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnJvbTogX3RoaXMuZ2V0UGF0aEZyb21Db21tYW5kcyhcIlwiLmNvbmNhdChhbmltYXRpb24uZnJvbSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG86IF90aGlzLmdldFBhdGhGcm9tQ29tbWFuZHMoXCJcIi5jb25jYXQoYW5pbWF0aW9uLnRvKSlcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFhbmltYXRpb24uZWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24uZWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUyhTVkdfTkFNRVNQQUNFLCBTVkdfRUxFTUVOVFMuYW5pbWF0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQucGFyZW50Tm9kZSkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKGFuaW1hdGlvbi5lbGVtZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgX3RoaXMuYWRkQW5pbWF0aW9uQmFzaWNQcm9wZXJ0aWVzKCdkJywgYW5pbWF0aW9uKTtcbiAgICAgICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGFuaW1hdGlvbi5lbGVtZW50LCBwcm9wZXJ0aWVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtc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hpcy5wbGFuZVZpZXcgPSBwbGFuZVZpZXc7XG4gICAgICAgIF90aGlzLmZvbnRGYW1pbHkgPSBmb250RmFtaWx5O1xuICAgICAgICBfdGhpcy5mb250U2l6ZSA9IGZvbnRTaXplO1xuICAgICAgICBfdGhpcy5mb250U3R5bGUgPSBmb250U3R5bGU7XG4gICAgICAgIF90aGlzLmZvbnRXZWlnaHQgPSBmb250V2VpZ2h0O1xuICAgICAgICBfdGhpcy5zZWxlY3RhYmxlID0gc2VsZWN0YWJsZTtcbiAgICAgICAgX3RoaXMub3JpZ2luID0gb3JpZ2luO1xuICAgICAgICBfdGhpcy5yaWdodCA9IHJpZ2h0O1xuICAgICAgICBfdGhpcy5sZWZ0ID0gbGVmdDtcbiAgICAgICAgX3RoaXMudG9wID0gdG9wO1xuICAgICAgICBfdGhpcy5yb3RhdGlvbiA9IHJvdGF0aW9uO1xuICAgICAgICBfdGhpcy50ZXh0ID0gdGV4dDtcbiAgICAgICAgcmV0dXJuIF90aGlzO1xuICAgIH1cbiAgICBJc29tZXRyaWNUZXh0LnByb3RvdHlwZS5nZXRQb3NpdGlvblRyYW5zZm9ybSA9IGZ1bmN0aW9uIChwcm9wcywgZnJvbUNlbnRlcikge1xuICAgICAgICBpZiAoZnJvbUNlbnRlciA9PT0gdm9pZCAwKSB7IGZyb21DZW50ZXIgPSB0cnVlOyB9XG4gICAgICAgIHJldHVybiBnZXRQb2ludEZyb21Jc29tZXRyaWNQb2ludChmcm9tQ2VudGVyXG4gICAgICAgICAgICA/IHRoaXMuZGF0YS5jZW50ZXJYXG4gICAgICAgICAgICA6IDAsIGZyb21DZW50ZXJcbiAgICAgICAgICAgID8gdGhpcy5kYXRhLmNlbnRlcllcbiAgICAgICAgICAgIDogMCwge1xuICAgICAgICAgICAgcjogcHJvcHMucmlnaHQsXG4gICAgICAgICAgICBsOiBwcm9wcy5sZWZ0LFxuICAgICAgICAgICAgdDogcHJvcHMudG9wXG4gICAgICAgIH0sIHRoaXMuZGF0YS5zY2FsZSk7XG4gICAgfTtcbiAgICBJc29tZXRyaWNUZXh0LnByb3RvdHlwZS51cGRhdGVTdWJDbGFzc0FuaW1hdGlvbnMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHZhciBwcm9wcyA9IHtcbiAgICAgICAgICAgIHJpZ2h0OiAwLFxuICAgICAgICAgICAgbGVmdDogMCxcbiAgICAgICAgICAgIHRvcDogMCxcbiAgICAgICAgICAgIHJvdGF0aW9uOiAwLFxuICAgICAgICB9O1xuICAgICAgICB0aGlzLmFuaW1hdGlvbnMuZm9yRWFjaChmdW5jdGlvbiAoYW5pbWF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgaXNOYXRpdmVTVkdQcm9wZXJ0eSA9IGlzU1ZHUHJvcGVydHkoYW5pbWF0aW9uLnByb3BlcnR5KTtcbiAgICAgICAgICAgIGlmICghaXNOYXRpdmVTVkdQcm9wZXJ0eSkge1xuICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocHJvcHMsIGFuaW1hdGlvbi5wcm9wZXJ0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb3BlcnR5XzEgPSBhbmltYXRpb24ucHJvcGVydHk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpc1JvdGF0aW9uXzEgPSBwcm9wZXJ0eV8xID09PSAncm90YXRpb24nO1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29tbW9uUHJvcHMgPSBfX2Fzc2lnbihfX2Fzc2lnbih7fSwgX3RoaXMuY29tbW9uQW5pbWF0aW9uQXR0cmlidXRlcyksIHsgdHlwZTogaXNSb3RhdGlvbl8xXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAncm90YXRlJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJ3RyYW5zbGF0ZScsIGJlZ2luOiAnaW5kZWZpbml0ZScgfSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0aWVzID0gdm9pZCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYW5pbWF0aW9uLnZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoYW5pbWF0aW9uLnZhbHVlcykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0gX19hc3NpZ24oeyB2YWx1ZXM6IGFuaW1hdGlvbi52YWx1ZXMubWFwKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzUm90YXRpb25fMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcIlwiLmNvbmNhdCh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbW9kaWZpZWRBcmdzID0gX19hc3NpZ24oe30sIHByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RpZmllZEFyZ3NbcHJvcGVydHlfMV0gPSArdmFsdWUgLSBfdGhpc1twcm9wZXJ0eV8xXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29vcmRzID0gX3RoaXMuZ2V0UG9zaXRpb25UcmFuc2Zvcm0obW9kaWZpZWRBcmdzLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiXCIuY29uY2F0KGNvb3Jkcy54LCBcIixcIikuY29uY2F0KGNvb3Jkcy55KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkuam9pbignOycpIH0sIGNvbW1vblByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1JvdGF0aW9uXzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IF9fYXNzaWduKHsgdmFsdWVzOiBcIlwiLmNvbmNhdChhbmltYXRpb24udmFsdWVzKSB9LCBjb21tb25Qcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbW9kaWZpZWRBcmdzID0gX19hc3NpZ24oe30sIHByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi52YWx1ZXMgLSBfdGhpc1twcm9wZXJ0eV8xXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvb3JkcyA9IF90aGlzLmdldFBvc2l0aW9uVHJhbnNmb3JtKG1vZGlmaWVkQXJncywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0gX19hc3NpZ24oeyB2YWx1ZXM6IFwiXCIuY29uY2F0KGNvb3Jkcy54LCBcIixcIikuY29uY2F0KGNvb3Jkcy55KSB9LCBjb21tb25Qcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzUm90YXRpb25fMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSBfX2Fzc2lnbih7IGZyb206IFwiXCIuY29uY2F0KGFuaW1hdGlvbi5mcm9tKSwgdG86IFwiXCIuY29uY2F0KGFuaW1hdGlvbi50bykgfSwgY29tbW9uUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZyb21BcmdzID0gX19hc3NpZ24oe30sIHByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdG9BcmdzID0gX19hc3NpZ24oe30sIHByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tQXJnc1twcm9wZXJ0eV8xXSA9ICthbmltYXRpb24uZnJvbSAtIF90aGlzW3Byb3BlcnR5XzFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvQXJnc1twcm9wZXJ0eV8xXSA9ICthbmltYXRpb24udG8gLSBfdGhpc1twcm9wZXJ0eV8xXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29vcmRzRnJvbSA9IF90aGlzLmdldFBvc2l0aW9uVHJhbnNmb3JtKGZyb21BcmdzLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvb3Jkc1RvID0gX3RoaXMuZ2V0UG9zaXRpb25UcmFuc2Zvcm0odG9BcmdzLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IF9fYXNzaWduKHsgZnJvbTogXCJcIi5jb25jYXQoY29vcmRzRnJvbS54LCBcIixcIikuY29uY2F0KGNvb3Jkc0Zyb20ueSksIHRvOiBcIlwiLmNvbmNhdChjb29yZHNUby54LCBcIixcIikuY29uY2F0KGNvb3Jkc1RvLnkpIH0sIGNvbW1vblByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24uZWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUyhTVkdfTkFNRVNQQUNFLCBTVkdfRUxFTUVOVFMuYW5pbWF0ZVRyYW5zZm9ybSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuYWRkQW5pbWF0aW9uQmFzaWNQcm9wZXJ0aWVzKCd0cmFuc2Zvcm0nLCBhbmltYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGFuaW1hdGlvbi5lbGVtZW50LCBwcm9wZXJ0aWVzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhbmltYXRpb24uZWxlbWVudC5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNSb3RhdGlvbl8xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3RleHRFbGVtZW50LmFwcGVuZENoaWxkKGFuaW1hdGlvbi5lbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmVsZW1lbnQuYXBwZW5kQ2hpbGQoYW5pbWF0aW9uLmVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQuYmVnaW5FbGVtZW50KCk7XG4gICAgICAgICAgICAgICAgIC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AgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLl90ZXh0RWxlbWVudCwge1xuICAgICAgICAgICAgICAgICAgICBzdHlsZTogW1xuICAgICAgICAgICAgICAgICAgICAgICAgJy13ZWJraXQtdXNlci1zZWxlY3QnLFxuICAgICAgICAgICAgICAgICAgICAgICAgJy1tb3otdXNlci1zZWxlY3QnLFxuICAgICAgICAgICAgICAgICAgICAgICAgJy1tcy11c2VyLXNlbGVjdCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAndXNlci1zZWxlY3QnLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3BvaW50ZXItZXZlbnRzJ1xuICAgICAgICAgICAgICAgICAgICBdLm1hcChmdW5jdGlvbiAoZGVjbCkgeyByZXR1cm4gXCJcIi5jb25jYXQoZGVjbCwgXCI6IG5vbmVcIik7IH0pLmpvaW4oJzsnKVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1RleHQucHJvdG90eXBlLCBcIm9yaWdpblwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX29yaWdpbjtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHRoaXMuX29yaWdpbiA9IHZhbHVlO1xuICAgICAgICAgICAgdmFyIF9hID0gdGhpcy5fb3JpZ2luLCB0ZXh0QW5jaG9yID0gX2FbMF0sIGFsaWdubWVudEJhc2VsaW5lID0gX2FbMV07XG4gICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKHRoaXMuX3RzcGFuLCB7XG4gICAgICAgICAgICAgICAgJ3RleHQtYW5jaG9yJzogdGhpcy5fb3JpZ2luSGFzaFt0ZXh0QW5jaG9yXSxcbiAgICAgICAgICAgICAgICAnYWxpZ25tZW50LWJhc2VsaW5lJzogdGhpcy5fb3JpZ2luSGFzaFthbGlnbm1lbnRCYXNlbGluZV1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1RleHQucHJvdG90eXBlLCBcInJpZ2h0XCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcmlnaHQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fcmlnaHQgIT09IHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fcmlnaHQgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1RleHQucHJvdG90eXBlLCBcImxlZnRcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9sZWZ0O1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuX2xlZnQgIT09IHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fbGVmdCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljVGV4dC5wcm90b3R5cGUsIFwidG9wXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fdG9wO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuX3RvcCAhPT0gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl90b3AgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1RleHQucHJvdG90eXBlLCBcInJvdGF0aW9uXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcm90YXRpb247XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fcm90YXRpb24gIT09IHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fcm90YXRpb24gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYm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G4gICAgICAgIGNvbnRhaW5lci5jbGFzc0xpc3QuYWRkKCdkZW1vLWNvbnRhaW5lcicpO1xuICAgICAgICB3cmFwcGVyLmNsYXNzTGlzdC5hZGQoJ2RlbW8td3JhcHBlcicpO1xuXG4gICAgICAgIG1vZHVsZShJc29tZXRyaWNNb2R1bGUsIHdyYXBwZXIpO1xuICAgICAgICBjb250YWluZXIuYXBwZW5kQ2hpbGQod3JhcHBlcik7XG4gICAgICAgIGRlbW8uYXBwZW5kQ2hpbGQoY29udGFpbmVyKTtcbiAgICAgICAgZGVtby5hcHBlbmRDaGlsZChmdW5jdGlvVG9TdHJpbmcobW9kdWxlKSk7XG4gICAgfSk7XG5cbn0pOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///860\n')},966:(module,exports)=>{eval('var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!function(){var r=null;\n(function(){function X(e){function j(){try{J.doScroll("left")}catch(e){P(j,50);return}w("poll")}function w(j){if(!(j.type=="readystatechange"&&x.readyState!="complete")&&((j.type=="load"?n:x)[z](i+j.type,w,!1),!m&&(m=!0)))e.call(n,j.type||j)}var Y=x.addEventListener,m=!1,C=!0,t=Y?"addEventListener":"attachEvent",z=Y?"removeEventListener":"detachEvent",i=Y?"":"on";if(x.readyState=="complete")e.call(n,"lazy");else{if(x.createEventObject&&J.doScroll){try{C=!n.frameElement}catch(A){}C&&j()}x[t](i+"DOMContentLoaded",\nw,!1);x[t](i+"readystatechange",w,!1);n[t](i+"load",w,!1)}}function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j=0;){var M=A[m],T=M.src.match(/^[^#?]*\\/run_prettify\\.js(\\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||"";M.parentNode.removeChild(M);break}}var S=!0,D=\n[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j=="autorun"?S=!/^[0fn]/i.test(w):j=="lang"?D.push(w):j=="skin"?N.push(w):j=="callback"&&K.push(w)});m=0;for(z=D.length;m122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f,a){return f[0]-\na[0]||a[1]-f[1]});b=[];g=[];for(a=0;ak[0]&&(k[1]+1>k[0]&&c.push("-"),c.push(h(k[1])));c.push("]");return c.join("")}function e(f){for(var a=f.source.match(/\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*]|\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\\\d+|\\\\[^\\dux]|\\(\\?[!:=]|[()^]|[^()[\\\\^]+/g),c=a.length,d=[],g=0,k=0;g=2&&f==="["?a[g]=b(o):f!=="\\\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I=5&&"lang-"===y.substring(0,5))&&!(u&&typeof u[1]==="string"))g=!1,y="src";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h,j);n(l+k+o,g,A(y,\ng),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c=0;)b[q.charAt(f)]=m;m=m[1];q=""+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\\S\\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:\'\'\'(?:[^\'\\\\]|\\\\[\\S\\s]|\'\'?(?=[^\']))*(?:\'\'\'|$)|"""(?:[^"\\\\]|\\\\[\\S\\s]|""?(?=[^"]))*(?:"""|$)|\'(?:[^\'\\\\]|\\\\[\\S\\s])*(?:\'|$)|"(?:[^"\\\\]|\\\\[\\S\\s])*(?:"|$))/,\nr,"\'\\""]):a.multiLineStrings?d.push(["str",/^(?:\'(?:[^\'\\\\]|\\\\[\\S\\s])*(?:\'|$)|"(?:[^"\\\\]|\\\\[\\S\\s])*(?:"|$)|`(?:[^\\\\`]|\\\\[\\S\\s])*(?:`|$))/,r,"\'\\"`"]):d.push(["str",/^(?:\'(?:[^\\n\\r\'\\\\]|\\\\.)*(?:\'|$)|"(?:[^\\n\\r"\\\\]|\\\\.)*(?:"|$))/,r,"\\"\'"]);a.verbatimStrings&&h.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\\b|[^\\n\\r]*)/,\nr,"#"]),h.push(["str",/^<(?:(?:(?:\\.\\.\\/)*|\\/?)(?:[\\w-]+(?:\\/[\\w-]+)+)?[\\w-]+\\.h(?:h|pp|\\+\\+)?|[a-z]\\w*)>/,r])):d.push(["com",/^#[^\\n\\r]*/,r,"#"]));a.cStyleComments&&(h.push(["com",/^\\/\\/[^\\n\\r]*/,r]),h.push(["com",/^\\/\\*[\\S\\s]*?(?:\\*\\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?"":"\\n\\r")?".":"[\\\\S\\\\s]";h.push(["lang-regex",RegExp("^(?:^^\\\\.?|[+-]|[!=]=?=?|\\\\#|%=?|&&?=?|\\\\(|\\\\*=?|[+\\\\-]=|->|\\\\/=?|::?|<>?>?=?|,|;|\\\\?|@|\\\\[|~|{|\\\\^\\\\^?=?|\\\\|\\\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\\\s*("+\n("/(?=[^/*"+b+"])(?:[^/\\\\x5B\\\\x5C"+b+"]|\\\\x5C"+e+"|\\\\x5B(?:[^\\\\x5C\\\\x5D"+b+"]|\\\\x5C"+e+")*(?:\\\\x5D|$))+/")+")")])}(b=a.types)&&h.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&h.push(["kwd",RegExp("^(?:"+b.replace(/[\\s,]+/g,"|")+")\\\\b"),r]);d.push(["pln",/^\\s+/,r," \\r\\n\\t\\u00a0"]);b="^.[^\\\\s\\\\w.$@\'\\"`/\\\\\\\\]*";a.regexLiterals&&(b+="(?!s*/)");h.push(["lit",/^@[$_a-z][\\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\\w$@]*|\\w+_t\\b)/,r],["pln",/^[$_a-z][\\w$@]*/i,r],["lit",/^(?:0x[\\da-f]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+-]?\\d+)?)[a-z]*/i,\nr,"0123456789"],["pln",/^\\\\[\\S\\s]?/,r],["pun",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}}\nfunction e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\\s)nocode(?:\\s|$)/,m=/\\r\\n?|\\n/,l=a.ownerDocument,i=l.createElement("li");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn("cannot override language handler %s",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\\s*=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=["break,continue,do,else,for,if,return,while"],O=[[G,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],\n"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[O,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],K=[O,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],\nL=[K,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],O=[O,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],M=[G,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],\nN=[G,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],R=[G,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],G=[G,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\\d*)\\b/,\nS=/\\S/,T=t({keywords:[J,L,O,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,["default-code"]);i(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\\!--[\\S\\s]*?(?:--\\>|$)/],["lang-",/^<\\?([\\S\\s]+?)(?:\\?>|$)/],["lang-",/^<%([\\S\\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",\n/^]*>([\\S\\s]+?)<\\/xmp\\b[^>]*>/i],["lang-js",/^]*>([\\S\\s]*?)(<\\/script\\b[^>]*>)/i],["lang-css",/^]*>([\\S\\s]*?)(<\\/style\\b[^>]*>)/i],["lang-in.tag",/^(<\\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);i(C([["pln",/^\\s+/,r," \\t\\r\\n"],["atv",/^(?:"[^"]*"?|\'[^\']*\'?)/,r,"\\"\'"]],[["tag",/^^<\\/?[a-z](?:[\\w-.:]*\\w)?|\\/?>$/i],["atn",/^(?!style[\\s=]|on)[a-z](?:[\\w:-]*\\w)?/i],["lang-uq.val",/^=\\s*([^\\s"\'>]*(?:[^\\s"\'/>]|\\/(?=\\s)))/],["pun",/^[/<->]+/],\n["lang-js",/^on\\w+\\s*=\\s*"([^"]+)"/i],["lang-js",/^on\\w+\\s*=\\s*\'([^\']+)\'/i],["lang-js",/^on\\w+\\s*=\\s*([^\\s"\'>]+)/i],["lang-css",/^style\\s*=\\s*"([^"]+)"/i],["lang-css",/^style\\s*=\\s*\'([^\']+)\'/i],["lang-css",/^style\\s*=\\s*([^\\s"\'>]+)/i]]),["in.tag"]);i(C([],[["atv",/^[\\S\\s]+/]]),["uq.val"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]);i(t({keywords:"null,true,false"}),["json"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}),\n["cs"]);i(t({keywords:K,cStyleComments:!0}),["java"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);i(t({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);i(t({keywords:N,\nhashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);i(t({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);\ni(C([],[["str",/^[\\S\\s]+/]]),["regex"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,e){var b=document.createElement("div");b.innerHTML="
"+a+"
";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML},\nprettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p{for(var C in g)__webpack_require__.o(g,C)&&!__webpack_require__.o(I,C)&&Object.defineProperty(I,C,{enumerable:!0,get:g[C]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(I){if("object"==typeof window)return window}}(),__webpack_require__.o=(I,g)=>Object.prototype.hasOwnProperty.call(I,g),__webpack_require__.r=I=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(I,"__esModule",{value:!0})},(()=>{var I;__webpack_require__.g.importScripts&&(I=__webpack_require__.g.location+"");var g=__webpack_require__.g.document;if(!I&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(I=g.currentScript.src),!I)){var C=g.getElementsByTagName("script");if(C.length)for(var t=C.length-1;t>-1&&(!I||!/^http(s?):/.test(I));)I=C[t--].src}if(!I)throw new Error("Automatic publicPath is not supported in this browser");I=I.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=I+"../"})();var __webpack_exports__=__webpack_require__(860),__webpack_export_target__=window;for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__]=__webpack_exports__[__webpack_i__];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})(); \ No newline at end of file +(()=>{var __webpack_modules__={741:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";eval('\n// NAMESPACE OBJECT: ./src/index.ts\nvar src_namespaceObject = {};\n__webpack_require__.r(src_namespaceObject);\n__webpack_require__.d(src_namespaceObject, {\n Axis: () => (Axis),\n IsometricCanvas: () => (IsometricCanvas),\n IsometricCircle: () => (IsometricCircle),\n IsometricGroup: () => (IsometricGroup),\n IsometricPath: () => (IsometricPath),\n IsometricPentagram: () => (IsometricPentagram),\n IsometricRectangle: () => (IsometricRectangle),\n IsometricStarPolygon: () => (IsometricStarPolygon),\n IsometricText: () => (IsometricText),\n LineCap: () => (LineCap),\n LineJoin: () => (LineJoin),\n PlaneView: () => (PlaneView)\n});\n\n// EXTERNAL MODULE: ./node_modules/.pnpm/google-code-prettify@1.0.5/node_modules/google-code-prettify/bin/run_prettify.min.js\nvar run_prettify_min = __webpack_require__(966);\n;// ./src/@constants/index.ts\nvar SVG_NAMESPACE = \'http://www.w3.org/2000/svg\';\nvar SVG_ELEMENTS;\n(function (SVG_ELEMENTS) {\n SVG_ELEMENTS["svg"] = "svg";\n SVG_ELEMENTS["group"] = "g";\n SVG_ELEMENTS["path"] = "path";\n SVG_ELEMENTS["rect"] = "rect";\n SVG_ELEMENTS["text"] = "text";\n SVG_ELEMENTS["tspan"] = "tspan";\n SVG_ELEMENTS["pattern"] = "pattern";\n SVG_ELEMENTS["image"] = "image";\n SVG_ELEMENTS["animate"] = "animate";\n SVG_ELEMENTS["animateTransform"] = "animateTransform";\n})(SVG_ELEMENTS || (SVG_ELEMENTS = {}));\nvar SVG_PROPERTIES;\n(function (SVG_PROPERTIES) {\n SVG_PROPERTIES["viewBox"] = "viewBox";\n})(SVG_PROPERTIES || (SVG_PROPERTIES = {}));\nvar DECIMALS = 6;\nvar SQRT3 = +(Math.sqrt(3).toFixed(DECIMALS));\nvar HSQRT3 = +((Math.sqrt(3) / 2).toFixed(DECIMALS));\nvar DEFAULT_WIDTH = 640;\nvar DEFAULT_HEIGHT = 480;\nvar N = \'(-?\\\\d+(?:\\\\.\\\\d+)?|-?\\\\.\\\\d+)\';\nvar S = \'\\\\s*\';\nvar SS = \'\\\\s+\';\nvar POINT = "".concat(N).concat(SS).concat(N).concat(SS).concat(N);\nvar CURVE = "".concat(POINT).concat(SS).concat(POINT);\nvar COMMANDS_REGEXP = new RegExp("(?:(M|L)".concat(S).concat(POINT).concat(S, "|(C)").concat(S).concat(CURVE, ")").concat(S), \'g\');\nvar SCALE = Math.sqrt(3 / 2);\nvar ROT_60 = Math.PI / 3;\nvar ROT_45 = Math.PI / 4;\nvar ROT_CMA = Math.atan(Math.SQRT2);\nvar Colors;\n(function (Colors) {\n Colors["white"] = "white";\n Colors["black"] = "black";\n})(Colors || (Colors = {}));\nvar LineCap;\n(function (LineCap) {\n LineCap["butt"] = "butt";\n LineCap["square"] = "square";\n LineCap["round"] = "round";\n})(LineCap || (LineCap = {}));\nvar LineJoin;\n(function (LineJoin) {\n LineJoin["miter"] = "miter";\n LineJoin["round"] = "round";\n LineJoin["bevel"] = "bevel";\n})(LineJoin || (LineJoin = {}));\nvar Command;\n(function (Command) {\n Command["move"] = "move";\n Command["line"] = "line";\n Command["curve"] = "curve";\n})(Command || (Command = {}));\nvar PlaneView;\n(function (PlaneView) {\n PlaneView["FRONT"] = "FRONT";\n PlaneView["SIDE"] = "SIDE";\n PlaneView["TOP"] = "TOP";\n})(PlaneView || (PlaneView = {}));\nvar Axis;\n(function (Axis) {\n Axis["RIGHT"] = "RIGHT";\n Axis["LEFT"] = "LEFT";\n Axis["TOP"] = "TOP";\n})(Axis || (Axis = {}));\nvar Typeof;\n(function (Typeof) {\n Typeof["UNDEFINED"] = "undefined";\n Typeof["NUMBER"] = "number";\n})(Typeof || (Typeof = {}));\nvar EVENTS;\n(function (EVENTS) {\n EVENTS["MOUSE_MOVE"] = "mousemove";\n EVENTS["MOUSE_DOWN"] = "mousedown";\n EVENTS["MOUSE_UP"] = "mouseup";\n EVENTS["TOUCH_START"] = "touchstart";\n EVENTS["TOUCH_MOVE"] = "touchmove";\n EVENTS["TOUCH_END"] = "touchend";\n})(EVENTS || (EVENTS = {}));\nvar ORIGIN;\n(function (ORIGIN) {\n ORIGIN["CENTER"] = "center";\n ORIGIN["LEFT"] = "left";\n ORIGIN["RIGHT"] = "right";\n ORIGIN["TOP"] = "top";\n ORIGIN["BOTTOM"] = "bottom";\n})(ORIGIN || (ORIGIN = {}));\n\n;// ./src/@utils/math.ts\n\nvar round = function (n, d) {\n var exp = Math.pow(10, d);\n return Math.round(n * exp) / exp;\n};\nvar radian = function (a) { return a * Math.PI / 180; };\nvar sincos = function (r) { return ({\n sin: round(Math.sin(r), DECIMALS),\n cos: round(Math.cos(r), DECIMALS)\n}); };\nvar getPointsDiff = function (pointA, pointB) { return ({\n x: pointA.x - pointB.x,\n y: pointA.y - pointB.y\n}); };\nvar getPointsDistance = function (pointA, pointB) {\n var diff = getPointsDiff(pointA, pointB);\n return Math.sqrt(Math.pow(diff.x, 2) + Math.pow(diff.y, 2));\n};\nvar translatePoint = function (point, angle, distance) { return ({\n x: point.x + Math.cos(angle) * distance,\n y: point.y + Math.sin(angle) * distance\n}); };\nvar rotate = function (point, center, angle) {\n var diff = getPointsDiff(point, center);\n var x = diff.x * Math.cos(angle) - diff.y * Math.sin(angle);\n var y = diff.x * Math.sin(angle) + diff.y * Math.cos(angle);\n return {\n x: center.x + x,\n y: center.y + y\n };\n};\nvar getPointsAngle = function (pointA, pointB) {\n var diff = getPointsDiff(pointB, pointA);\n return Math.atan2(diff.y, diff.x);\n};\nvar getOrientation = function (p1, p2, p3) {\n var value = (p2.y - p1.y) * (p3.x - p2.x) - (p2.x - p1.x) * (p3.y - p2.y);\n return value >= 0 ? 0 : 1;\n};\nvar getPointFromIsometricPoint = function (centerX, centerY, point, scale) {\n return {\n x: round(centerX + (point.r - point.l) * scale * HSQRT3, DECIMALS),\n y: round(centerY + ((point.r + point.l) / 2 - point.t) * scale, DECIMALS)\n };\n};\nvar getTopPlanePointFromCoordinates = function (x, y) {\n var XHSQRT3 = x / HSQRT3;\n var right = (y * 2 + XHSQRT3) / 2;\n var left = right - XHSQRT3;\n return {\n right: right,\n left: left\n };\n};\nvar getFrontPlanePointFromCoordinates = function (x, y) {\n var left = -x / HSQRT3;\n var top = left / 2 - y;\n return {\n left: left,\n top: top\n };\n};\nvar getSidePlanePointFromCoordinates = function (x, y) {\n var right = x / HSQRT3;\n var top = right / 2 - y;\n return {\n right: right,\n top: top\n };\n};\nvar getEllipsisSpecs = function (pointA, pointB, control) {\n var diff = getPointsDiff(pointB, pointA);\n var center = { x: pointA.x + diff.x / 2, y: pointA.y + diff.y / 2 };\n var P = rotate(pointB, center, Math.PI / 2);\n var D = { x: P.x + (control.x - P.x) / 2, y: P.y + (control.y - P.y) / 2 };\n var radius = getPointsDistance(D, center);\n var U = translatePoint(D, getPointsAngle(D, P), radius);\n var V = translatePoint(D, getPointsAngle(D, control), radius);\n return [\n round(getPointsDistance(control, U), DECIMALS),\n round(getPointsDistance(control, V), DECIMALS),\n round(getPointsAngle(center, V) * 180 / Math.PI, DECIMALS)\n ];\n};\nvar randomId = function () { return Math.random().toString(16).slice(2); };\nvar uuid = function () { return Array.from(Array(3)).map(function () { return randomId(); }).join(\'-\'); };\n\n;// ./src/@utils/matrix.ts\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\nvar multiplyMatrix = function (m1, m2) { return (m1.map(function (row, i) { return (m2[0].map(function (_, j) {\n return row.reduce(function (acc, _, n) {\n return acc + m1[i][n] * m2[n][j];\n }, 0);\n})); })); };\nvar multiplyMatrices = function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var matrix = m[0];\n for (var i = 1; i < m.length; i++) {\n matrix = multiplyMatrix(matrix, m[i]);\n }\n return matrix;\n};\nvar rotateX = function (r) {\n var sc = sincos(r);\n return [\n [1, 0, 0],\n [0, sc.cos, -sc.sin],\n [0, sc.sin, sc.cos]\n ];\n};\nvar rotateY = function (r) {\n var sc = sincos(r);\n return [\n [sc.cos, 0, sc.sin],\n [0, 1, 0],\n [-sc.sin, 0, sc.cos]\n ];\n};\nvar rotateZ = function (r) {\n var sc = sincos(r);\n return [\n [sc.cos, -sc.sin, 0],\n [sc.sin, sc.cos, 0],\n [0, 0, 1]\n ];\n};\nvar topMatrix = multiplyMatrices(rotateX(ROT_CMA), rotateZ(-ROT_45));\nvar frontMatrix = multiplyMatrices(rotateZ(-ROT_60), rotateX(ROT_CMA), rotateZ(ROT_45));\nvar sideMatrix = multiplyMatrices(rotateZ(ROT_60), rotateX(ROT_CMA), rotateZ(-ROT_45));\nvar rotationToRotationMatrix = function (view, rotation) {\n var value = radian(rotation.value);\n switch (view) {\n case PlaneView.TOP: {\n switch (rotation.axis) {\n case Axis.TOP:\n return rotateZ(value);\n case Axis.LEFT:\n return rotateX(-value);\n case Axis.RIGHT:\n return rotateY(value);\n default:\n return null;\n }\n }\n case PlaneView.FRONT: {\n switch (rotation.axis) {\n case Axis.TOP:\n return rotateY(value);\n case Axis.LEFT:\n return rotateX(value);\n case Axis.RIGHT:\n return rotateZ(value);\n default:\n return null;\n }\n }\n case PlaneView.SIDE: {\n switch (rotation.axis) {\n case Axis.TOP:\n return rotateY(value);\n case Axis.LEFT:\n return rotateZ(value);\n case Axis.RIGHT:\n return rotateX(-value);\n default:\n return null;\n }\n }\n default:\n return null;\n }\n};\nvar getViewMatrix = function (planeView, rotation) {\n var rotationMatrices = [];\n var rotationMatrix = rotation\n ? rotationToRotationMatrix(planeView, rotation)\n : null;\n if (rotationMatrix)\n rotationMatrices.push(rotationMatrix);\n switch (planeView) {\n case PlaneView.TOP: {\n return multiplyMatrices.apply(void 0, __spreadArray([topMatrix], rotationMatrices, false));\n }\n case PlaneView.FRONT: {\n return multiplyMatrices.apply(void 0, __spreadArray([frontMatrix], rotationMatrices, false));\n }\n case PlaneView.SIDE: {\n return multiplyMatrices.apply(void 0, __spreadArray([sideMatrix], rotationMatrices, false));\n }\n }\n return null;\n};\n\n;// ./src/@utils/svg.ts\nvar svg_spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\nvar addSVGProperties = function (svg, props) {\n Object.keys(props).forEach(function (prop) {\n svg.setAttributeNS(null, prop, props[prop]);\n });\n};\nvar getCommandsWithStart = function (commands) {\n return commands.length === 0 || commands[0].command === Command.move\n ? svg_spreadArray([], commands, true) : svg_spreadArray([\n {\n command: Command.move,\n point: { r: 0, l: 0, t: 0 }\n }\n ], commands, true);\n};\nvar getSVGPath = function (commands, centerX, centerY, scale, autoclose) {\n var drawCommands = getCommandsWithStart(commands);\n var svgPaths = drawCommands.map(function (c, index) {\n var point = getPointFromIsometricPoint(centerX, centerY, c.point, scale);\n switch (c.command) {\n case Command.move:\n return "M".concat(point.x, " ").concat(point.y);\n case Command.line:\n return "L".concat(point.x, " ").concat(point.y);\n case Command.curve: {\n var start = getPointFromIsometricPoint(centerX, centerY, commands[index - 1].point, scale);\n var control = getPointFromIsometricPoint(centerX, centerY, c.control, scale);\n var ellipsisSpecs = getEllipsisSpecs(start, point, control);\n var sweepFlag = getOrientation(start, control, point);\n return "A ".concat(ellipsisSpecs[0], " ").concat(ellipsisSpecs[1], " ").concat(ellipsisSpecs[2], " 0 ").concat(sweepFlag, " ").concat(point.x, " ").concat(point.y);\n }\n }\n });\n if (svgPaths.length) {\n var pathEnd = autoclose ? \'z\' : \'\';\n return "".concat(svgPaths.join(\' \').trim()).concat(pathEnd);\n }\n return \'\';\n};\nvar parseDrawCommands = function (commands) {\n var commandsArray = [];\n var array;\n while ((array = COMMANDS_REGEXP.exec(commands)) !== null) {\n var command = array[5] || array[1];\n switch (command) {\n case \'M\':\n commandsArray.push({\n command: Command.move,\n point: { r: +array[2], l: +array[3], t: +array[4] }\n });\n break;\n case \'L\':\n commandsArray.push({\n command: Command.line,\n point: { r: +array[2], l: +array[3], t: +array[4] }\n });\n break;\n case \'C\':\n commandsArray.push({\n command: Command.curve,\n control: { r: +array[6], l: +array[7], t: +array[8] },\n point: { r: +array[9], l: +array[10], t: +array[11] }\n });\n }\n }\n return commandsArray;\n};\nvar translateCommandPoints = function (commands, right, left, top) {\n commands.forEach(function (command) {\n command.point.r += right;\n command.point.l += left;\n command.point.t += top;\n if (command.control) {\n command.control.r += right;\n command.control.l += left;\n command.control.t += top;\n }\n });\n};\nvar getTextureCorner = function (commands, centerX, centerY, scale) {\n var corner = {\n x: Number.MAX_SAFE_INTEGER,\n y: Number.MAX_SAFE_INTEGER\n };\n getCommandsWithStart(commands)\n .forEach(function (c) {\n var point = getPointFromIsometricPoint(centerX, centerY, c.point, scale);\n if (point.x < corner.x ||\n (point.x === corner.x &&\n point.y < corner.y)) {\n corner.x = point.x;\n corner.y = point.y;\n }\n });\n return corner;\n};\nvar isSVGProperty = function (property) {\n return [\n \'fillColor\',\n \'fillOpacity\',\n \'strokeColor\',\n \'strokeOpacity\',\n \'strokeWidth\'\n ].includes(property);\n};\nvar getSVGProperty = function (property) {\n return {\n fillColor: \'fill\',\n fillOpacity: \'fill-opacity\',\n strokeColor: \'stroke\',\n strokeOpacity: \'stroke-opacity\',\n strokeWidth: \'stroke-width\'\n }[property];\n};\nfunction addEventListenerToElement(element, listeners, event, callback, useCapture) {\n var listener = {\n fn: callback,\n fnBind: callback.bind(this)\n };\n listeners.push(listener);\n element.addEventListener(event, listener.fnBind, useCapture);\n}\nfunction removeEventListenerFromElement(element, listeners, event, callback, useCapture) {\n var listener;\n listeners.find(function (ln, index) {\n if (ln.fn === callback) {\n listener = listeners.splice(index, 1)[0];\n return true;\n }\n });\n if (listener) {\n element.removeEventListener(event, listener.fnBind, useCapture);\n }\n}\nvar getPatternTransform = function (corner, planeView, scale, rotation) {\n var matrix = getViewMatrix(planeView, rotation);\n var transform = "translate(".concat(corner.x, " ").concat(corner.y, ")");\n if (matrix) {\n var m1 = round(matrix[0][0], DECIMALS);\n var m2 = round(matrix[1][0], DECIMALS);\n var m3 = round(matrix[0][1], DECIMALS);\n var m4 = round(matrix[1][1], DECIMALS);\n transform += " matrix(".concat(m1, ",").concat(m2, ",").concat(m3, ",").concat(m4, ",0,0)");\n transform += " scale(".concat(round(SCALE * (scale || 1), DECIMALS), ")");\n }\n else if (scale) {\n transform += " scale(".concat(round(scale, DECIMALS), ")");\n }\n return transform;\n};\nvar elementHasSVGParent = function (element) {\n if (element.parentNode) {\n if (element.parentNode.constructor.name === \'SVGSVGElement\') {\n return true;\n }\n return elementHasSVGParent(element.parentNode);\n }\n return false;\n};\n\n;// ./src/@store/index.ts\nvar Store = (function () {\n function Store(width, height, scale) {\n this.sizes = {\n centerX: width / 2,\n centerY: height / 2,\n height: height,\n width: width,\n scale: scale\n };\n }\n Object.defineProperty(Store.prototype, "width", {\n get: function () {\n return this.sizes.width;\n },\n set: function (value) {\n this.sizes.width = value;\n this.sizes.centerX = value / 2;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "height", {\n get: function () {\n return this.sizes.height;\n },\n set: function (value) {\n this.sizes.height = value;\n this.sizes.centerY = value / 2;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "scale", {\n get: function () {\n return this.sizes.scale;\n },\n set: function (value) {\n this.sizes.scale = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "centerX", {\n get: function () {\n return this.sizes.centerX;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, "centerY", {\n get: function () {\n return this.sizes.centerY;\n },\n enumerable: false,\n configurable: true\n });\n return Store;\n}());\n\n\n;// ./src/@classes/abstract/IsometricStore/IsometricStore.ts\nvar IsometricStore = (function () {\n function IsometricStore() {\n }\n Object.defineProperty(IsometricStore.prototype, "data", {\n get: function () {\n return this.dataStore;\n },\n set: function (store) {\n this.dataStore = store;\n },\n enumerable: false,\n configurable: true\n });\n return IsometricStore;\n}());\n\n\n;// ./src/@classes/abstract/IsometricStore/index.ts\n\n\n;// ./src/@classes/abstract/IsometricElementAbstract/IsometricElementAbstract.ts\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\nvar IsometricElementAbstract = (function (_super) {\n __extends(IsometricElementAbstract, _super);\n function IsometricElementAbstract(id, svgElement) {\n var _this = _super.call(this) || this;\n _this._id = id;\n _this.listeners = [];\n _this.element = document.createElementNS(SVG_NAMESPACE, svgElement);\n addSVGProperties(_this.element, {\n \'id\': _this._id\n });\n return _this;\n }\n IsometricElementAbstract.prototype.setId = function (value) {\n this._id = value;\n addSVGProperties(this.element, {\n \'id\': this._id\n });\n };\n IsometricElementAbstract.prototype.getElement = function () {\n return this.element;\n };\n IsometricElementAbstract.prototype.addEventListener = function (event, callback, useCapture) {\n if (useCapture === void 0) { useCapture = false; }\n addEventListenerToElement.call(this, this.element, this.listeners, event, callback, useCapture);\n return this;\n };\n IsometricElementAbstract.prototype.removeEventListener = function (event, callback, useCapture) {\n if (useCapture === void 0) { useCapture = false; }\n removeEventListenerFromElement(this.element, this.listeners, event, callback, useCapture);\n return this;\n };\n return IsometricElementAbstract;\n}(IsometricStore));\n\n\n;// ./src/@classes/abstract/IsometricElementAbstract/index.ts\n\n\n;// ./src/@classes/abstract/IsometricGraphicAbstract/IsometricGraphicAbstract.ts\nvar IsometricGraphicAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\nvar defaultObjectProps = {\n fillColor: Colors.white,\n fillOpacity: 1,\n strokeColor: Colors.black,\n strokeDashArray: [],\n strokeLinecap: LineCap.butt,\n strokeLinejoin: LineJoin.round,\n strokeOpacity: 1,\n strokeWidth: 1\n};\nvar IsometricGraphicAbstract = (function (_super) {\n IsometricGraphicAbstract_extends(IsometricGraphicAbstract, _super);\n function IsometricGraphicAbstract(props, svgElement) {\n var _this = _super.call(this, props.id || uuid(), svgElement) || this;\n _this.props = __assign(__assign({}, defaultObjectProps), props);\n _this.animations = [];\n if (_this.props.texture) {\n _this.createTexture(_this.props.texture);\n }\n addSVGProperties(_this.element, __assign({ \'fill\': _this.props.texture\n ? "url(#".concat(_this.patternId, ") ").concat(_this.fillColor)\n : _this.fillColor, \'fill-opacity\': "".concat(_this.fillOpacity), \'stroke\': _this.strokeColor, \'stroke-dasharray\': _this.strokeDashArray.join(\' \'), \'stroke-linecap\': _this.strokeLinecap, \'stroke-linejoin\': _this.strokeLinejoin, \'stroke-opacity\': "".concat(_this.strokeOpacity), \'stroke-width\': "".concat(_this.strokeWidth) }, (_this.props.className && {\n class: _this.props.className\n })));\n return _this;\n }\n IsometricGraphicAbstract.prototype.createTexture = function (texture) {\n this.patternId = "".concat(this.id, "__texture");\n this.pattern = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.pattern);\n addSVGProperties(this.pattern, {\n \'id\': this.patternId,\n \'preserveAspectRatio\': \'none\',\n \'patternUnits\': \'userSpaceOnUse\'\n });\n var image = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.image);\n addSVGProperties(image, {\n \'href\': texture.url,\n \'x\': \'0\',\n \'y\': \'0\',\n \'preserveAspectRatio\': \'none\'\n });\n if (texture.pixelated) {\n addSVGProperties(image, {\n \'style\': \'image-rendering: pixelated\'\n });\n }\n this.pattern.appendChild(image);\n };\n IsometricGraphicAbstract.prototype._updateTexture = function () {\n var image = this.pattern.firstChild;\n if (this.props.texture.url &&\n image.getAttribute(\'href\') !== this.props.texture.url) {\n addSVGProperties(image, {\n \'href\': this.props.texture.url\n });\n }\n if (this.props.texture.pixelated) {\n addSVGProperties(image, {\n \'style\': \'image-rendering: pixelated\'\n });\n }\n else {\n image.removeAttribute(\'style\');\n }\n this.update();\n };\n IsometricGraphicAbstract.prototype.addAnimationBasicProperties = function (attributeName, animation) {\n addSVGProperties(animation.element, {\n repeatCount: "".concat(animation.repeat || \'indefinite\'),\n attributeName: attributeName,\n dur: "".concat(animation.duration || 1, "s")\n });\n };\n IsometricGraphicAbstract.prototype.updateAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (isNativeSVGProperty) {\n var property = getSVGProperty(animation.property);\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(property, animation);\n if (animation.values) {\n addSVGProperties(animation.element, {\n values: Array.isArray(animation.values)\n ? animation.values.map(function (value) { return "".concat(value); }).join(\';\')\n : "".concat(animation.values)\n });\n }\n else {\n addSVGProperties(animation.element, {\n from: "".concat(animation.from),\n to: "".concat(animation.to)\n });\n }\n }\n });\n this.updateSubClassAnimations();\n };\n IsometricGraphicAbstract.prototype.updatePatternTransform = function (corner, planeView) {\n var _a, _b, _c;\n if (this.props.texture) {\n var height = this.props.texture.height\n ? "".concat(this.props.texture.height * this.data.scale)\n : \'100%\';\n var width = this.props.texture.width\n ? "".concat(this.props.texture.width * this.data.scale)\n : \'100%\';\n var shift = getPointFromIsometricPoint(0, 0, {\n r: ((_a = this.props.texture.shift) === null || _a === void 0 ? void 0 : _a.right) || 0,\n l: ((_b = this.props.texture.shift) === null || _b === void 0 ? void 0 : _b.left) || 0,\n t: ((_c = this.props.texture.shift) === null || _c === void 0 ? void 0 : _c.top) || 0\n }, this.data.scale);\n var transform = getPatternTransform({\n x: round(corner.x + shift.x, DECIMALS),\n y: round(corner.y + shift.y, DECIMALS)\n }, this.props.texture.planeView || planeView, this.props.texture.scale, this.props.texture.rotation);\n addSVGProperties(this.pattern, {\n \'patternTransform\': transform,\n \'height\': height,\n \'width\': width\n });\n addSVGProperties(this.pattern.firstChild, {\n \'height\': height,\n \'width\': width\n });\n }\n };\n Object.defineProperty(IsometricGraphicAbstract.prototype, "id", {\n get: function () {\n return this._id;\n },\n set: function (value) {\n this.setId(value);\n if (this.pattern) {\n this.patternId = "".concat(this.id, "__texture");\n addSVGProperties(this.pattern, {\n \'id\': this.patternId\n });\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "fillColor", {\n get: function () {\n return this.props.fillColor;\n },\n set: function (value) {\n this.props.fillColor = value;\n addSVGProperties(this.element, {\n \'fill\': this.props.texture\n ? "url(#".concat(this.patternId, ") ").concat(this.fillColor)\n : this.fillColor\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "fillOpacity", {\n get: function () {\n return this.props.fillOpacity;\n },\n set: function (value) {\n this.props.fillOpacity = value;\n addSVGProperties(this.element, { \'fill-opacity\': "".concat(this.fillOpacity) });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "texture", {\n get: function () {\n return this.props.texture;\n },\n set: function (value) {\n var hasTexture = !!this.props.texture;\n this.props.texture = value;\n if (hasTexture) {\n this._updateTexture();\n }\n else {\n this.createTexture(this.props.texture);\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeColor", {\n get: function () {\n return this.props.strokeColor;\n },\n set: function (value) {\n this.props.strokeColor = value;\n addSVGProperties(this.element, { \'stroke\': this.strokeColor });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeDashArray", {\n get: function () {\n return this.props.strokeDashArray;\n },\n set: function (value) {\n this.props.strokeDashArray = value;\n addSVGProperties(this.element, { \'stroke-dasharray\': this.strokeDashArray.join(\' \') });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeLinecap", {\n get: function () {\n return this.props.strokeLinecap;\n },\n set: function (value) {\n this.props.strokeLinecap = LineCap[value];\n addSVGProperties(this.element, { \'stroke-linecap\': this.strokeLinecap });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeLinejoin", {\n get: function () {\n return this.props.strokeLinejoin;\n },\n set: function (value) {\n this.props.strokeLinejoin = LineJoin[value];\n addSVGProperties(this.element, { \'stroke-linejoin\': this.strokeLinejoin });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeOpacity", {\n get: function () {\n return this.props.strokeOpacity;\n },\n set: function (value) {\n this.props.strokeOpacity = value;\n addSVGProperties(this.element, { \'stroke-opacity\': "".concat(this.strokeOpacity) });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "strokeWidth", {\n get: function () {\n return this.props.strokeWidth;\n },\n set: function (value) {\n this.props.strokeWidth = value;\n addSVGProperties(this.element, { \'stroke-width\': "".concat(this.strokeWidth) });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricGraphicAbstract.prototype, "className", {\n get: function () {\n return this.props.className;\n },\n set: function (value) {\n this.props.className = value;\n addSVGProperties(this.element, {\n \'class\': this.props.className\n });\n },\n enumerable: false,\n configurable: true\n });\n IsometricGraphicAbstract.prototype.getPattern = function () {\n return this.pattern;\n };\n IsometricGraphicAbstract.prototype.updateTexture = function (value) {\n var hasTexture = !!this.props.texture;\n if (hasTexture || value.url) {\n var shift = value.shift, rotation = value.rotation, newProps = __rest(value, ["shift", "rotation"]);\n this.props.texture = hasTexture\n ? __assign(__assign({}, this.props.texture), newProps) : __assign({}, newProps);\n if (shift) {\n this.props.texture.shift = __assign(__assign({}, (this.props.texture.shift || {})), shift);\n }\n if (rotation) {\n this.props.texture.rotation = rotation;\n }\n if (hasTexture) {\n this._updateTexture();\n }\n else {\n this.createTexture(this.props.texture);\n this.update();\n }\n }\n return this;\n };\n IsometricGraphicAbstract.prototype.addAnimation = function (animation) {\n this.animations.push(__assign({}, animation));\n this.update();\n return this;\n };\n IsometricGraphicAbstract.prototype.removeAnimationByIndex = function (index) {\n if (index >= 0 && index < this.animations.length) {\n var animation = this.animations.splice(index, 1)[0];\n if (animation.element && animation.element.parentNode) {\n animation.element.parentNode.removeChild(animation.element);\n }\n }\n return this;\n };\n IsometricGraphicAbstract.prototype.removeAnimations = function () {\n var animations = this.animations.splice(0);\n animations.forEach(function (animation) {\n if (animation.element && animation.element.parentNode) {\n animation.element.parentNode.removeChild(animation.element);\n }\n });\n return this;\n };\n return IsometricGraphicAbstract;\n}(IsometricElementAbstract));\n\n\n;// ./src/@classes/abstract/IsometricGraphicAbstract/index.ts\n\n\n;// ./src/@classes/abstract/IsometricContainerAbstract/IsometricContainerAbstract.ts\nvar IsometricContainerAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\nvar IsometricContainerAbstract = (function (_super) {\n IsometricContainerAbstract_extends(IsometricContainerAbstract, _super);\n function IsometricContainerAbstract(id, svgElement) {\n var _this = _super.call(this, id, svgElement) || this;\n _this._children = [];\n return _this;\n }\n IsometricContainerAbstract.prototype.getChildIndex = function (child) {\n return this._children.indexOf(child);\n };\n IsometricContainerAbstract.prototype.throwChildError = function () {\n throw new Error(\'You cannot provide a child that is not a children of the container\');\n };\n IsometricContainerAbstract.prototype.removeSVGChild = function (child) {\n var svgChild = child.getElement();\n if (child instanceof IsometricGraphicAbstract) {\n var svgPatternChild = child.getPattern();\n if (svgPatternChild && svgPatternChild.parentNode) {\n this.element.removeChild(svgPatternChild);\n }\n }\n if (svgChild.parentNode) {\n this.element.removeChild(svgChild);\n }\n };\n IsometricContainerAbstract.prototype.insertPattern = function (pattern) {\n if (pattern) {\n this.element.insertBefore(pattern, this.element.firstChild);\n }\n };\n Object.defineProperty(IsometricContainerAbstract.prototype, "id", {\n get: function () {\n return this._id;\n },\n set: function (value) {\n this.setId(value);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricContainerAbstract.prototype, "children", {\n get: function () {\n return this._children;\n },\n enumerable: false,\n configurable: true\n });\n IsometricContainerAbstract.prototype.update = function () {\n var _this = this;\n if (elementHasSVGParent(this.element)) {\n this._children.forEach(function (child) {\n child.data = _this.data;\n child.update();\n });\n }\n return this;\n };\n IsometricContainerAbstract.prototype.clear = function () {\n var _this = this;\n var children = this._children.splice(0);\n children.forEach(function (child) {\n _this.removeSVGChild(child);\n });\n return this;\n };\n IsometricContainerAbstract.prototype.addChild = function (child) {\n child.data = this.data;\n this._children.push(child);\n if (child instanceof IsometricGraphicAbstract) {\n this.insertPattern(child.getPattern());\n }\n this.element.appendChild(child.getElement());\n child.update();\n return this;\n };\n IsometricContainerAbstract.prototype.addChildren = function () {\n var _this = this;\n var children = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n children[_i] = arguments[_i];\n }\n children.forEach(function (child) { return _this.addChild(child); });\n return this;\n };\n IsometricContainerAbstract.prototype.getChildByIndex = function (index) {\n return this._children[index] || null;\n };\n IsometricContainerAbstract.prototype.getChildById = function (id) {\n var child = this._children.find(function (child) { return child.id === id; });\n return child || null;\n };\n IsometricContainerAbstract.prototype.removeChild = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n this._children.splice(childIndex, 1);\n this.removeSVGChild(child);\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.removeChildren = function () {\n var _this = this;\n var children = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n children[_i] = arguments[_i];\n }\n children.forEach(function (child) {\n var childIndex = _this.getChildIndex(child);\n if (childIndex === -1) {\n _this.throwChildError();\n }\n _this.removeChild(child);\n });\n return this;\n };\n IsometricContainerAbstract.prototype.removeChildByIndex = function (index) {\n if (index >= 0 && index < this._children.length) {\n var child = this._children.splice(index, 1)[0];\n this.removeSVGChild(child);\n }\n return this;\n };\n IsometricContainerAbstract.prototype.removeChildById = function (id) {\n var child = this.getChildById(id);\n if (child) {\n return this.removeChild(child);\n }\n };\n IsometricContainerAbstract.prototype.setChildIndex = function (child, index) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n index = Math.min(Math.max(0, index), this._children.length - 1);\n var movedElement = child.getElement();\n var replacedElement = this._children[index].getElement();\n if (this._children[index] !== child) {\n this._children.splice(childIndex, 1);\n this._children.splice(index, 0, child);\n if (childIndex > index) {\n this.element.insertBefore(movedElement, replacedElement);\n }\n else {\n if (replacedElement.nextSibling) {\n this.element.insertBefore(movedElement, replacedElement.nextSibling);\n }\n else {\n this.element.appendChild(movedElement);\n }\n }\n }\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.bringChildToFront = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n this.setChildIndex(child, this._children.length - 1);\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.bringChildForward = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n if (childIndex < this._children.length - 1) {\n this.setChildIndex(child, childIndex + 1);\n }\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.sendChildToBack = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n this.setChildIndex(child, 0);\n return this;\n }\n this.throwChildError();\n };\n IsometricContainerAbstract.prototype.sendChildBackward = function (child) {\n var childIndex = this.getChildIndex(child);\n if (childIndex > -1) {\n if (childIndex > 0) {\n this.setChildIndex(child, childIndex - 1);\n }\n return this;\n }\n this.throwChildError();\n };\n return IsometricContainerAbstract;\n}(IsometricElementAbstract));\n\n\n;// ./src/@classes/abstract/IsometricContainerAbstract/index.ts\n\n\n;// ./src/@classes/public/IsometricCanvas/IsometricCanvas.ts\nvar IsometricCanvas_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricCanvas_assign = (undefined && undefined.__assign) || function () {\n IsometricCanvas_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricCanvas_assign.apply(this, arguments);\n};\n\n\n\n\n\nvar defaultProps = {\n container: \'body\',\n backgroundColor: Colors.white,\n scale: 1,\n height: DEFAULT_HEIGHT,\n width: DEFAULT_WIDTH\n};\nvar IsometricCanvas = (function (_super) {\n IsometricCanvas_extends(IsometricCanvas, _super);\n function IsometricCanvas(props) {\n var _a;\n if (props === void 0) { props = {}; }\n var _this = _super.call(this, props.id || uuid(), SVG_ELEMENTS.svg) || this;\n _this.props = IsometricCanvas_assign(IsometricCanvas_assign({}, defaultProps), props);\n _this.isAnimated = true;\n _this.data = new Store(_this.props.width, _this.props.height, _this.props.scale);\n addSVGProperties(_this.element, (_a = {},\n _a[SVG_PROPERTIES.viewBox] = "0 0 ".concat(_this.data.width, " ").concat(_this.data.height),\n _a.width = "".concat(_this.data.width, "px"),\n _a.height = "".concat(_this.data.height, "px"),\n _a));\n _this.background = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.rect);\n addSVGProperties(_this.background, {\n fill: _this.backgroundColor,\n x: \'0\',\n y: \'0\',\n width: "".concat(_this.data.width, "px"),\n height: "".concat(_this.data.height, "px")\n });\n _this.element.appendChild(_this.background);\n var containerElement = typeof _this.props.container === \'string\'\n ? document.querySelector(_this.props.container)\n : _this.props.container;\n containerElement.appendChild(_this.element);\n return _this;\n }\n Object.defineProperty(IsometricCanvas.prototype, "backgroundColor", {\n get: function () {\n return this.props.backgroundColor;\n },\n set: function (value) {\n this.props.backgroundColor = value;\n addSVGProperties(this.background, { fill: this.backgroundColor });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "scale", {\n get: function () {\n return this.data.scale;\n },\n set: function (value) {\n this.data.scale = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "height", {\n get: function () {\n return this.data.height;\n },\n set: function (value) {\n var _a;\n this.data.height = value;\n addSVGProperties(this.element, (_a = {},\n _a[SVG_PROPERTIES.viewBox] = "0 0 ".concat(this.data.width, " ").concat(this.data.height),\n _a.height = "".concat(this.data.height, "px"),\n _a));\n addSVGProperties(this.background, {\n height: "".concat(this.data.height, "px")\n });\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "width", {\n get: function () {\n return this.data.width;\n },\n set: function (value) {\n var _a;\n this.data.width = value;\n addSVGProperties(this.element, (_a = {},\n _a[SVG_PROPERTIES.viewBox] = "0 0 ".concat(this.data.width, " ").concat(this.data.height),\n _a.width = "".concat(this.data.width, "px"),\n _a));\n addSVGProperties(this.background, {\n width: "".concat(this.data.width, "px")\n });\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricCanvas.prototype, "animated", {\n get: function () {\n return this.isAnimated;\n },\n enumerable: false,\n configurable: true\n });\n IsometricCanvas.prototype.getSVGCode = function () {\n return this.element.outerHTML;\n };\n IsometricCanvas.prototype.pauseAnimations = function () {\n var svg = this.element;\n if (typeof svg.pauseAnimations === \'function\') {\n svg.pauseAnimations();\n }\n this.isAnimated = false;\n return this;\n };\n IsometricCanvas.prototype.resumeAnimations = function () {\n var svg = this.element;\n if (typeof svg.unpauseAnimations === \'function\') {\n svg.unpauseAnimations();\n }\n this.isAnimated = true;\n return this;\n };\n return IsometricCanvas;\n}(IsometricContainerAbstract));\n\n\n;// ./src/@classes/public/IsometricCanvas/index.ts\n\n\n\n;// ./src/@utils/other.ts\nvar applyMixins = function (BaseClass, constructor) {\n Object.getOwnPropertyNames(constructor.prototype).forEach(function (name) {\n Object.defineProperty(BaseClass.prototype, name, Object.getOwnPropertyDescriptor(constructor.prototype, name));\n });\n};\n\n;// ./src/@classes/abstract/IsometricDraggableAbstract/constants.ts\nvar NO_LIMITS = [\n Number.MIN_SAFE_INTEGER,\n Number.MAX_SAFE_INTEGER\n];\nvar DRAG_EVENT;\n(function (DRAG_EVENT) {\n DRAG_EVENT["DRAG_START"] = "dragstart";\n DRAG_EVENT["DRAG"] = "drag";\n DRAG_EVENT["DRAG_END"] = "dragend";\n})(DRAG_EVENT || (DRAG_EVENT = {}));\n\n;// ./src/@classes/abstract/IsometricDraggableAbstract/IsometricDraggableAbstract.ts\nvar IsometricDraggableAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricDraggableAbstract_assign = (undefined && undefined.__assign) || function () {\n IsometricDraggableAbstract_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricDraggableAbstract_assign.apply(this, arguments);\n};\nvar IsometricDraggableAbstract_spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\nvar _isBrowser = typeof window !== Typeof.UNDEFINED;\nvar _requestAnimationFrame = _isBrowser\n ? (window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.msRequestAnimationFrame)\n : null;\nvar _dragStoreDefault = {\n right: 0,\n left: 0,\n top: 0,\n x: 0,\n y: 0\n};\nvar isMouseEvent = function (event) { return \'clientX\' in event; };\nvar getClientCoords = function (event) {\n if (event instanceof Event) {\n if (isMouseEvent(event)) {\n return {\n clientX: event.clientX,\n clientY: event.clientY\n };\n }\n return {\n clientX: event.touches[0].clientX,\n clientY: event.touches[0].clientY\n };\n }\n return event;\n};\nvar IsometricDraggableAbstract = (function (_super) {\n IsometricDraggableAbstract_extends(IsometricDraggableAbstract, _super);\n function IsometricDraggableAbstract() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n IsometricDraggableAbstract.prototype.setup = function () {\n this.startDrag = this.startDrag.bind(this);\n this.stopDrag = this.stopDrag.bind(this);\n this.moveElement = this.moveElement.bind(this);\n this.dropElement = this.dropElement.bind(this);\n this.animate = this.animate.bind(this);\n if (typeof this._bounds === Typeof.UNDEFINED) {\n this._bounds = false;\n }\n if (typeof this._dragStore === Typeof.UNDEFINED) {\n this._dragStore = _dragStoreDefault;\n }\n if (typeof this._coords === Typeof.UNDEFINED) {\n this._coords = {};\n }\n };\n IsometricDraggableAbstract.prototype.betweenBounds = function (value, bounds) {\n var orderedBounds = IsometricDraggableAbstract_spreadArray([], bounds, true).sort();\n return round(Math.min(Math.max(value, orderedBounds[0]), orderedBounds[1]), DECIMALS);\n };\n IsometricDraggableAbstract.prototype.getBoundOrMaximum = function (prop) {\n var _a;\n if (this.bounds) {\n return (_a = this.bounds[prop]) !== null && _a !== void 0 ? _a : IsometricDraggableAbstract_spreadArray([], NO_LIMITS, true);\n }\n return IsometricDraggableAbstract_spreadArray([], NO_LIMITS, true);\n };\n IsometricDraggableAbstract.prototype.getRight = function (value) {\n var bounds = this.getBoundOrMaximum(\'right\');\n return this.betweenBounds(this._dragStore.right + value / this.data.scale, bounds);\n };\n IsometricDraggableAbstract.prototype.getLeft = function (value) {\n var bounds = this.getBoundOrMaximum(\'left\');\n return this.betweenBounds(this._dragStore.left + value / this.data.scale, bounds);\n };\n IsometricDraggableAbstract.prototype.getTop = function (value) {\n var bounds = this.getBoundOrMaximum(\'top\');\n return this.betweenBounds(this._dragStore.top + value / this.data.scale, bounds);\n };\n IsometricDraggableAbstract.prototype.getFixedCoordinates = function (coords) {\n var _this = this;\n return Object.entries(coords).reduce(function (acc, entry) {\n var fixedCoords = IsometricDraggableAbstract_assign({}, acc);\n switch (entry[0]) {\n case \'right\':\n fixedCoords.right = _this.getRight(entry[1]);\n break;\n case \'left\':\n fixedCoords.left = _this.getLeft(entry[1]);\n break;\n default:\n fixedCoords.top = _this.getTop(entry[1]);\n }\n return fixedCoords;\n }, {});\n };\n IsometricDraggableAbstract.prototype.dispatchEvent = function (eventType) {\n var _a, _b, _c;\n var dragEvent = new CustomEvent(eventType, {\n cancelable: eventType === DRAG_EVENT.DRAG,\n detail: {\n right: (_a = this._coords.right) !== null && _a !== void 0 ? _a : this.right,\n left: (_b = this._coords.left) !== null && _b !== void 0 ? _b : this.left,\n top: (_c = this._coords.top) !== null && _c !== void 0 ? _c : this.top\n }\n });\n this.element.dispatchEvent(dragEvent);\n return dragEvent;\n };\n IsometricDraggableAbstract.prototype.animate = function () {\n if (this._update) {\n if (!this._prevented) {\n if (typeof this._coords.right === Typeof.NUMBER) {\n this.right = this._coords.right;\n }\n if (typeof this._coords.left === Typeof.NUMBER) {\n this.left = this._coords.left;\n }\n if (typeof this._coords.top === Typeof.NUMBER) {\n this.top = this._coords.top;\n }\n }\n _requestAnimationFrame(this.animate);\n }\n };\n IsometricDraggableAbstract.prototype.startDrag = function (event) {\n event.preventDefault();\n var _a = getClientCoords(event), clientX = _a.clientX, clientY = _a.clientY;\n this._dragStore.x = clientX;\n this._dragStore.y = clientY;\n this._dragStore.right = this.right;\n this._dragStore.left = this.left;\n this._dragStore.top = this.top;\n this._update = true;\n this.moveElement({ clientX: clientX, clientY: clientY });\n this.element.addEventListener(EVENTS.TOUCH_MOVE, this.moveElement, true);\n this.element.addEventListener(EVENTS.TOUCH_END, this.dropElement, true);\n document.addEventListener(EVENTS.MOUSE_MOVE, this.moveElement, true);\n document.addEventListener(EVENTS.MOUSE_UP, this.dropElement, true);\n _requestAnimationFrame(this.animate);\n };\n IsometricDraggableAbstract.prototype.moveElement = function (event) {\n var _a = getClientCoords(event), clientX = _a.clientX, clientY = _a.clientY;\n var diffX = clientX - this._dragStore.x;\n var diffY = clientY - this._dragStore.y;\n if (this._drag === PlaneView.TOP) {\n this._coords = this.getFixedCoordinates(getTopPlanePointFromCoordinates(diffX, diffY));\n }\n else if (this._drag === PlaneView.FRONT) {\n this._coords = this.getFixedCoordinates(getFrontPlanePointFromCoordinates(diffX, diffY));\n }\n else {\n this._coords = this.getFixedCoordinates(getSidePlanePointFromCoordinates(diffX, diffY));\n }\n var dragEvent;\n if (event instanceof Event) {\n event.preventDefault();\n if (!this._dragging) {\n this.dispatchEvent(DRAG_EVENT.DRAG_START);\n }\n this._dragging = true;\n dragEvent = this.dispatchEvent(DRAG_EVENT.DRAG);\n }\n this._prevented = !!(dragEvent && dragEvent.defaultPrevented);\n };\n IsometricDraggableAbstract.prototype.dropElement = function () {\n this._update = false;\n this._dragging = false;\n this.element.removeEventListener(EVENTS.TOUCH_MOVE, this.moveElement, true);\n this.element.removeEventListener(EVENTS.TOUCH_END, this.dropElement, true);\n document.removeEventListener(EVENTS.MOUSE_MOVE, this.moveElement, true);\n document.removeEventListener(EVENTS.MOUSE_UP, this.dropElement, true);\n this.dispatchEvent(DRAG_EVENT.DRAG_END);\n };\n IsometricDraggableAbstract.prototype.beginDrag = function () {\n this.element.addEventListener(EVENTS.TOUCH_START, this.startDrag, true);\n this.element.addEventListener(EVENTS.MOUSE_DOWN, this.startDrag, true);\n };\n IsometricDraggableAbstract.prototype.stopDrag = function () {\n this.element.removeEventListener(EVENTS.TOUCH_START, this.startDrag, true);\n this.element.removeEventListener(EVENTS.TOUCH_MOVE, this.moveElement, true);\n this.element.removeEventListener(EVENTS.TOUCH_END, this.dropElement, true);\n this.element.removeEventListener(EVENTS.MOUSE_DOWN, this.startDrag, true);\n document.removeEventListener(EVENTS.MOUSE_MOVE, this.moveElement, true);\n document.removeEventListener(EVENTS.MOUSE_UP, this.dropElement, true);\n };\n Object.defineProperty(IsometricDraggableAbstract.prototype, "right", {\n get: function () {\n return this.props.right;\n },\n set: function (value) {\n if (this.props.right !== value) {\n this.props.right = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "left", {\n get: function () {\n return this.props.left;\n },\n set: function (value) {\n if (this.props.left !== value) {\n this.props.left = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "top", {\n get: function () {\n return this.props.top;\n },\n set: function (value) {\n if (this.props.top !== value) {\n this.props.top = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "drag", {\n get: function () {\n return this._drag || false;\n },\n set: function (value) {\n if (typeof this._drag === Typeof.UNDEFINED) {\n this.setup();\n }\n this._drag = value;\n if (_isBrowser) {\n this.stopDrag();\n this.beginDrag();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricDraggableAbstract.prototype, "bounds", {\n get: function () {\n return this._bounds || false;\n },\n set: function (value) {\n this._bounds = value;\n var boundsRight = this.getBoundOrMaximum(\'right\');\n var boundsLeft = this.getBoundOrMaximum(\'left\');\n var boundsTop = this.getBoundOrMaximum(\'top\');\n this.right = this.betweenBounds(this.right, boundsRight);\n this.left = this.betweenBounds(this.left, boundsLeft);\n this.top = this.betweenBounds(this.top, boundsTop);\n },\n enumerable: false,\n configurable: true\n });\n return IsometricDraggableAbstract;\n}(IsometricElementAbstract));\n\n\n;// ./src/@classes/abstract/IsometricDraggableAbstract/index.ts\n\n\n;// ./src/@classes/public/IsometricGroup/IsometricGroup.ts\nvar IsometricGroup_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricGroup_assign = (undefined && undefined.__assign) || function () {\n IsometricGroup_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricGroup_assign.apply(this, arguments);\n};\n\n\n\n\n\n\nvar IsometricGroup_defaultProps = {\n right: 0,\n left: 0,\n top: 0,\n};\nvar IsometricGroup = (function (_super) {\n IsometricGroup_extends(IsometricGroup, _super);\n function IsometricGroup(props) {\n if (props === void 0) { props = {}; }\n var _this = _super.call(this, props.id || uuid(), SVG_ELEMENTS.group) || this;\n _this.props = IsometricGroup_assign(IsometricGroup_assign({}, IsometricGroup_defaultProps), props);\n return _this;\n }\n IsometricGroup.prototype.update = function () {\n if (elementHasSVGParent(this.element)) {\n var point = getPointFromIsometricPoint(0, 0, {\n r: this.props.right,\n l: this.props.left,\n t: this.props.top\n }, this.data.scale);\n addSVGProperties(this.element, {\n transform: "translate(".concat(point.x, ", ").concat(point.y, ")")\n });\n }\n return _super.prototype.update.call(this);\n };\n return IsometricGroup;\n}(IsometricContainerAbstract));\n\napplyMixins(IsometricGroup, IsometricDraggableAbstract);\n\n;// ./src/@classes/public/IsometricGroup/index.ts\n\n\n;// ./src/@classes/abstract/IsometricPathAbstract/IsometricPathAbstract.ts\nvar IsometricPathAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\nvar IsometricPathAbstract = (function (_super) {\n IsometricPathAbstract_extends(IsometricPathAbstract, _super);\n function IsometricPathAbstract(props, svgElement) {\n return _super.call(this, props, svgElement) || this;\n }\n IsometricPathAbstract.prototype.updateGraphic = function (planeView, autoclose) {\n if (autoclose === void 0) { autoclose = true; }\n if (elementHasSVGParent(this.element)) {\n var commands = this.getCommands();\n var corner = getTextureCorner(commands, this.data.centerX, this.data.centerY, this.data.scale);\n addSVGProperties(this.element, {\n d: getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, autoclose)\n });\n this.updatePatternTransform(corner, planeView);\n this.updateAnimations();\n }\n };\n return IsometricPathAbstract;\n}(IsometricGraphicAbstract));\n\n\n;// ./src/@classes/abstract/IsometricPathAbstract/index.ts\n\n\n;// ./src/@classes/abstract/IsometricShapeAbstract/IsometricShapeAbstract.ts\nvar IsometricShapeAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricShapeAbstract_assign = (undefined && undefined.__assign) || function () {\n IsometricShapeAbstract_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricShapeAbstract_assign.apply(this, arguments);\n};\n\n\n\n\n\nvar IsometricShapeAbstract_defaultProps = {\n right: 0,\n left: 0,\n top: 0,\n};\nvar IsometricShapeAbstract = (function (_super) {\n IsometricShapeAbstract_extends(IsometricShapeAbstract, _super);\n function IsometricShapeAbstract(props) {\n return _super.call(this, IsometricShapeAbstract_assign(IsometricShapeAbstract_assign({}, IsometricShapeAbstract_defaultProps), props), SVG_ELEMENTS.path) || this;\n }\n IsometricShapeAbstract.prototype.update = function () {\n this.updateGraphic(this.planeView);\n return this;\n };\n IsometricShapeAbstract.prototype.clear = function () {\n addSVGProperties(this.element, {\n d: \'\'\n });\n return this;\n };\n Object.defineProperty(IsometricShapeAbstract.prototype, "planeView", {\n get: function () {\n return this.props.planeView;\n },\n set: function (value) {\n this.props.planeView = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n return IsometricShapeAbstract;\n}(IsometricPathAbstract));\n\napplyMixins(IsometricShapeAbstract, IsometricDraggableAbstract);\n\n;// ./src/@classes/abstract/IsometricShapeAbstract/index.ts\n\n\n;// ./src/@classes/public/IsometricRectangle/IsometricRectangle.ts\nvar IsometricRectangle_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricRectangle_assign = (undefined && undefined.__assign) || function () {\n IsometricRectangle_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricRectangle_assign.apply(this, arguments);\n};\nvar IsometricRectangle_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\nvar IsometricRectangle = (function (_super) {\n IsometricRectangle_extends(IsometricRectangle, _super);\n function IsometricRectangle(props) {\n var _this = this;\n var height = props.height, width = props.width, rest = IsometricRectangle_rest(props, ["height", "width"]);\n _this = _super.call(this, rest) || this;\n _this._width = width;\n _this._height = height;\n return _this;\n }\n IsometricRectangle.prototype.getCommands = function (args) {\n var _a, _b, _c, _d, _e;\n var right = (_a = args === null || args === void 0 ? void 0 : args.right) !== null && _a !== void 0 ? _a : this.right;\n var left = (_b = args === null || args === void 0 ? void 0 : args.left) !== null && _b !== void 0 ? _b : this.left;\n var top = (_c = args === null || args === void 0 ? void 0 : args.top) !== null && _c !== void 0 ? _c : this.top;\n var width = (_d = args === null || args === void 0 ? void 0 : args.width) !== null && _d !== void 0 ? _d : this.width;\n var height = (_e = args === null || args === void 0 ? void 0 : args.height) !== null && _e !== void 0 ? _e : this.height;\n var commands = [{ command: Command.move, point: { r: 0, l: 0, t: 0 } }];\n switch (this.planeView) {\n case PlaneView.FRONT:\n commands.push({ command: Command.line, point: { r: 0, l: width, t: 0 } }, { command: Command.line, point: { r: 0, l: width, t: height } }, { command: Command.line, point: { r: 0, l: 0, t: height } });\n break;\n case PlaneView.SIDE:\n commands.push({ command: Command.line, point: { r: width, l: 0, t: 0 } }, { command: Command.line, point: { r: width, l: 0, t: height } }, { command: Command.line, point: { r: 0, l: 0, t: height } });\n break;\n case PlaneView.TOP:\n commands.push({ command: Command.line, point: { r: width, l: 0, t: 0 } }, { command: Command.line, point: { r: width, l: height, t: 0 } }, { command: Command.line, point: { r: 0, l: height, t: 0 } });\n break;\n }\n translateCommandPoints(commands, right, left, top);\n return commands;\n };\n IsometricRectangle.prototype.getRectanglePath = function (args) {\n var commands = this.getCommands(args);\n return getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, true);\n };\n IsometricRectangle.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n var props_1 = {\n right: _this.right,\n left: _this.left,\n top: _this.top,\n width: _this.width,\n height: _this.height\n };\n if (Object.prototype.hasOwnProperty.call(props_1, animation.property)) {\n var property_1 = animation.property;\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = {\n values: animation.values.map(function (value) {\n var modifiedArgs = IsometricRectangle_assign({}, props_1);\n modifiedArgs[property_1] = +value;\n return _this.getRectanglePath(modifiedArgs);\n }).join(\';\')\n };\n }\n else {\n var modifiedArgs = IsometricRectangle_assign({}, props_1);\n modifiedArgs[property_1] = +animation.values;\n properties = {\n values: _this.getRectanglePath(modifiedArgs)\n };\n }\n }\n else {\n var fromArgs = IsometricRectangle_assign({}, props_1);\n var toArgs = IsometricRectangle_assign({}, props_1);\n fromArgs[property_1] = +animation.from;\n toArgs[property_1] = +animation.to;\n properties = {\n from: _this.getRectanglePath(fromArgs),\n to: _this.getRectanglePath(toArgs)\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n }\n });\n };\n Object.defineProperty(IsometricRectangle.prototype, "width", {\n get: function () {\n return this._width;\n },\n set: function (value) {\n this._width = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricRectangle.prototype, "height", {\n get: function () {\n return this._height;\n },\n set: function (value) {\n this._height = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricRectangle.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricRectangle;\n}(IsometricShapeAbstract));\n\n\n;// ./src/@classes/public/IsometricRectangle/index.ts\n\n\n;// ./src/@classes/public/IsometricCircle/IsometricCircle.ts\nvar IsometricCircle_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricCircle_assign = (undefined && undefined.__assign) || function () {\n IsometricCircle_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricCircle_assign.apply(this, arguments);\n};\nvar IsometricCircle_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\nvar IsometricCircle = (function (_super) {\n IsometricCircle_extends(IsometricCircle, _super);\n function IsometricCircle(props) {\n var _this = this;\n var radius = props.radius, rest = IsometricCircle_rest(props, ["radius"]);\n _this = _super.call(this, rest) || this;\n _this._radius = radius;\n return _this;\n }\n IsometricCircle.prototype.getCommands = function (args) {\n var _a, _b, _c, _d;\n var right = (_a = args === null || args === void 0 ? void 0 : args.right) !== null && _a !== void 0 ? _a : this.right;\n var left = (_b = args === null || args === void 0 ? void 0 : args.left) !== null && _b !== void 0 ? _b : this.left;\n var top = (_c = args === null || args === void 0 ? void 0 : args.top) !== null && _c !== void 0 ? _c : this.top;\n var radius = (_d = args === null || args === void 0 ? void 0 : args.radius) !== null && _d !== void 0 ? _d : this.radius;\n var commands = [];\n switch (this.planeView) {\n case PlaneView.FRONT:\n commands.push({\n command: Command.move,\n point: { r: 0, l: radius, t: 0 }\n }, {\n command: Command.curve,\n point: { r: 0, l: -radius, t: 0 },\n control: { r: 0, l: 0, t: -radius }\n }, {\n command: Command.curve,\n point: { r: 0, l: radius, t: 0 },\n control: { r: 0, l: 0, t: radius }\n });\n break;\n case PlaneView.SIDE:\n commands.push({\n command: Command.move,\n point: { r: -radius, l: 0, t: 0 }\n }, {\n command: Command.curve,\n point: { r: radius, l: 0, t: 0 },\n control: { r: 0, l: 0, t: -radius }\n }, {\n command: Command.curve,\n point: { r: -radius, l: 0, t: 0 },\n control: { r: 0, l: 0, t: radius }\n });\n break;\n case PlaneView.TOP:\n commands.push({\n command: Command.move,\n point: { r: 0, l: radius, t: 0 }\n }, {\n command: Command.curve,\n point: { r: 0, l: -radius, t: 0 },\n control: { r: radius, l: 0, t: 0 }\n }, {\n command: Command.curve,\n point: { r: 0, l: radius, t: 0 },\n control: { r: -radius, l: 0, t: 0 }\n });\n break;\n }\n translateCommandPoints(commands, right, left, top);\n return commands;\n };\n IsometricCircle.prototype.getCirclePath = function (args) {\n var commands = this.getCommands(args);\n return getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, true);\n };\n IsometricCircle.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n var props_1 = {\n right: _this.right,\n left: _this.left,\n top: _this.top,\n radius: _this.radius\n };\n if (Object.prototype.hasOwnProperty.call(props_1, animation.property)) {\n var property_1 = animation.property;\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = {\n values: animation.values.map(function (value) {\n var modifiedArgs = IsometricCircle_assign({}, props_1);\n modifiedArgs[property_1] = +value;\n return _this.getCirclePath(modifiedArgs);\n }).join(\';\')\n };\n }\n else {\n var modifiedArgs = IsometricCircle_assign({}, props_1);\n modifiedArgs[property_1] = +animation.values;\n properties = {\n values: _this.getCirclePath(modifiedArgs)\n };\n }\n }\n else {\n var fromArgs = IsometricCircle_assign({}, props_1);\n var toArgs = IsometricCircle_assign({}, props_1);\n fromArgs[property_1] = +animation.from;\n toArgs[property_1] = +animation.to;\n properties = {\n from: _this.getCirclePath(fromArgs),\n to: _this.getCirclePath(toArgs)\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n }\n });\n };\n Object.defineProperty(IsometricCircle.prototype, "radius", {\n get: function () {\n return this._radius;\n },\n set: function (value) {\n this._radius = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricCircle.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricCircle;\n}(IsometricShapeAbstract));\n\n\n;// ./src/@classes/public/IsometricCircle/index.ts\n\n\n;// ./src/@classes/abstract/IsometricStarPolygonAbstract/IsometricStarPolygonAbstract.ts\nvar IsometricStarPolygonAbstract_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricStarPolygonAbstract_assign = (undefined && undefined.__assign) || function () {\n IsometricStarPolygonAbstract_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricStarPolygonAbstract_assign.apply(this, arguments);\n};\nvar IsometricStarPolygonAbstract_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar IsometricStarPolygonAbstract_spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\nvar IsometricStarPolygonAbstract = (function (_super) {\n IsometricStarPolygonAbstract_extends(IsometricStarPolygonAbstract, _super);\n function IsometricStarPolygonAbstract(props) {\n var _this = this;\n var radius = props.radius, points = props.points, density = props.density, _a = props.rotation, rotation = _a === void 0 ? 0 : _a, rest = IsometricStarPolygonAbstract_rest(props, ["radius", "points", "density", "rotation"]);\n _this = _super.call(this, rest) || this;\n _this._radius = radius;\n _this._points = points;\n _this._density = density;\n _this._rotation = rotation;\n _this._sector = 2 * Math.PI / _this._points;\n _this._halfSector = _this._sector / 2;\n return _this;\n }\n IsometricStarPolygonAbstract.prototype.getCommands = function (args) {\n var _a, _b, _c, _d, _e, _f, _g;\n var right = (_a = args === null || args === void 0 ? void 0 : args.right) !== null && _a !== void 0 ? _a : this.right;\n var left = (_b = args === null || args === void 0 ? void 0 : args.left) !== null && _b !== void 0 ? _b : this.left;\n var top = (_c = args === null || args === void 0 ? void 0 : args.top) !== null && _c !== void 0 ? _c : this.top;\n var radius = (_d = args === null || args === void 0 ? void 0 : args.radius) !== null && _d !== void 0 ? _d : this.radius;\n var points = (_e = args === null || args === void 0 ? void 0 : args.points) !== null && _e !== void 0 ? _e : this._points;\n var density = (_f = args === null || args === void 0 ? void 0 : args.density) !== null && _f !== void 0 ? _f : this._density;\n var rotation = (_g = args === null || args === void 0 ? void 0 : args.rotation) !== null && _g !== void 0 ? _g : this.rotation;\n var coordinates = this.get2DCoordinates(radius, points, density, rotation);\n var commands = [];\n switch (this.planeView) {\n case PlaneView.FRONT:\n coordinates.forEach(function (point, index) {\n commands.push({\n command: index === 0\n ? Command.move\n : Command.line,\n point: {\n r: 0,\n l: point.x,\n t: point.y\n }\n });\n });\n break;\n case PlaneView.SIDE:\n coordinates.forEach(function (point, index) {\n commands.push({\n command: index === 0\n ? Command.move\n : Command.line,\n point: {\n r: point.x,\n l: 0,\n t: point.y\n }\n });\n });\n break;\n case PlaneView.TOP:\n coordinates.forEach(function (point, index) {\n commands.push({\n command: index === 0\n ? Command.move\n : Command.line,\n point: {\n r: -point.x,\n l: -point.y,\n t: 0\n }\n });\n });\n break;\n }\n translateCommandPoints(commands, right, left, top);\n return commands;\n };\n IsometricStarPolygonAbstract.prototype._getRadianAngle = function (angle) {\n return angle * Math.PI / 180;\n };\n IsometricStarPolygonAbstract.prototype._getInnerRadius = function (radius, points, density) {\n return radius * Math.cos(Math.PI * density / points) / Math.cos(Math.PI * (density - 1) / points);\n };\n IsometricStarPolygonAbstract.prototype.get2DCoordinates = function (radius, points, density, rotation) {\n var _this = this;\n var innerRadius = this._getInnerRadius(radius, points, density);\n return IsometricStarPolygonAbstract_spreadArray([], Array(this._points), true).reduce(function (points, _undefined, index) {\n var angle = index * _this._sector + 2 * Math.PI - _this._getRadianAngle(rotation);\n var innerAngle = angle + _this._halfSector;\n var oX = Math.sin(angle) * radius;\n var oY = Math.cos(angle) * radius;\n var iX = Math.sin(innerAngle) * innerRadius;\n var iY = Math.cos(innerAngle) * innerRadius;\n return IsometricStarPolygonAbstract_spreadArray(IsometricStarPolygonAbstract_spreadArray([], points, true), [\n { x: oX, y: oY },\n { x: iX, y: iY }\n ], false);\n }, []);\n };\n IsometricStarPolygonAbstract.prototype.getPentagramPath = function (args) {\n var commands = this.getCommands(args);\n return getSVGPath(commands, this.data.centerX, this.data.centerY, this.data.scale, true);\n };\n IsometricStarPolygonAbstract.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n var props_1 = {\n right: _this.right,\n left: _this.left,\n top: _this.top,\n radius: _this.radius,\n points: _this._points,\n density: _this._density,\n rotation: _this.rotation\n };\n if (Object.prototype.hasOwnProperty.call(props_1, animation.property)) {\n var property_1 = animation.property;\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = {\n values: animation.values.map(function (value) {\n var modifiedArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n modifiedArgs[property_1] = +value;\n return _this.getPentagramPath(modifiedArgs);\n }).join(\';\')\n };\n }\n else {\n var modifiedArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n modifiedArgs[property_1] = +animation.values;\n properties = {\n values: _this.getPentagramPath(modifiedArgs)\n };\n }\n }\n else {\n var fromArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n var toArgs = IsometricStarPolygonAbstract_assign({}, props_1);\n fromArgs[property_1] = +animation.from;\n toArgs[property_1] = +animation.to;\n properties = {\n from: _this.getPentagramPath(fromArgs),\n to: _this.getPentagramPath(toArgs)\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n }\n });\n };\n Object.defineProperty(IsometricStarPolygonAbstract.prototype, "radius", {\n get: function () {\n return this._radius;\n },\n set: function (value) {\n this._radius = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricStarPolygonAbstract.prototype, "rotation", {\n get: function () {\n return this._rotation;\n },\n set: function (value) {\n this._rotation = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricStarPolygonAbstract.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricStarPolygonAbstract;\n}(IsometricShapeAbstract));\n\n\n;// ./src/@classes/abstract/IsometricStarPolygonAbstract/index.ts\n\n\n\n;// ./src/@classes/public/IsometricPentagram/IsometricPentagram.ts\nvar IsometricPentagram_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricPentagram_assign = (undefined && undefined.__assign) || function () {\n IsometricPentagram_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricPentagram_assign.apply(this, arguments);\n};\n\nvar IsometricPentagram = (function (_super) {\n IsometricPentagram_extends(IsometricPentagram, _super);\n function IsometricPentagram(props) {\n return _super.call(this, IsometricPentagram_assign(IsometricPentagram_assign({}, props), { points: 5, density: 2 })) || this;\n }\n return IsometricPentagram;\n}(IsometricStarPolygonAbstract));\n\n\n;// ./src/@classes/public/IsometricPentagram/index.ts\n\n\n;// ./src/@classes/public/IsometricStarPolygon/IsometricStarPolygon.ts\nvar IsometricStarPolygon_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\nvar IsometricStarPolygon = (function (_super) {\n IsometricStarPolygon_extends(IsometricStarPolygon, _super);\n function IsometricStarPolygon(props) {\n return _super.call(this, props) || this;\n }\n Object.defineProperty(IsometricStarPolygon.prototype, "points", {\n get: function () {\n return this._points;\n },\n set: function (value) {\n this._points = value;\n this._sector = 2 * Math.PI / this._points;\n this._halfSector = this._sector / 2;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricStarPolygon.prototype, "density", {\n get: function () {\n return this._density;\n },\n set: function (value) {\n this._density = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n return IsometricStarPolygon;\n}(IsometricStarPolygonAbstract));\n\n\n;// ./src/@classes/public/IsometricStarPolygon/index.ts\n\n\n;// ./src/@classes/public/IsometricPath/IsometricPath.ts\nvar IsometricPath_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\nvar IsometricPath = (function (_super) {\n IsometricPath_extends(IsometricPath, _super);\n function IsometricPath(props) {\n if (props === void 0) { props = {}; }\n var _this = _super.call(this, props, SVG_ELEMENTS.path) || this;\n _this.getPathFromCommands = function (commands) { return getSVGPath(parseDrawCommands(commands), _this.data.centerX, _this.data.centerY, _this.data.scale, _this._autoclose); };\n _this.commands = [];\n _this._autoclose = \'autoclose\' in props\n ? props.autoclose\n : true;\n return _this;\n }\n IsometricPath.prototype.updateSubClassAnimations = function () {\n var _this = this;\n this.animations.forEach(function (animation) {\n if (animation.property === \'path\') {\n var properties = void 0;\n if (animation.values) {\n properties = {\n values: Array.isArray(animation.values)\n ? animation.values.map(function (value) {\n return _this.getPathFromCommands("".concat(value));\n }).join(\';\')\n : _this.getPathFromCommands("".concat(animation.values))\n };\n }\n else {\n properties = {\n from: _this.getPathFromCommands("".concat(animation.from)),\n to: _this.getPathFromCommands("".concat(animation.to))\n };\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animate);\n }\n if (!animation.element.parentNode) {\n _this.element.appendChild(animation.element);\n }\n _this.addAnimationBasicProperties(\'d\', animation);\n addSVGProperties(animation.element, properties);\n }\n });\n };\n IsometricPath.prototype.getCommands = function () {\n return this.commands;\n };\n Object.defineProperty(IsometricPath.prototype, "autoclose", {\n get: function () {\n return this._autoclose;\n },\n set: function (value) {\n this._autoclose = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n IsometricPath.prototype.update = function () {\n this.updateGraphic(undefined, this.autoclose);\n return this;\n };\n IsometricPath.prototype.clear = function () {\n this.commands.splice(0);\n addSVGProperties(this.element, {\n d: \'\'\n });\n return this;\n };\n IsometricPath.prototype.moveTo = function (right, left, top) {\n this.commands.push({\n command: Command.move,\n point: { r: right, l: left, t: top }\n });\n this.update();\n return this;\n };\n IsometricPath.prototype.lineTo = function (right, left, top) {\n this.commands.push({\n command: Command.line,\n point: { r: right, l: left, t: top }\n });\n this.update();\n return this;\n };\n IsometricPath.prototype.curveTo = function (controlRight, controlLeft, controlTop, right, left, top) {\n this.commands.push({\n command: Command.curve,\n control: { r: controlRight, l: controlLeft, t: controlTop },\n point: { r: right, l: left, t: top }\n });\n this.update();\n return this;\n };\n IsometricPath.prototype.mt = function (right, left, top) {\n return this.moveTo(right, left, top);\n };\n IsometricPath.prototype.lt = function (right, left, top) {\n return this.lineTo(right, left, top);\n };\n IsometricPath.prototype.ct = function (controlRight, controlLeft, controlTop, right, left, top) {\n return this.curveTo(controlRight, controlLeft, controlTop, right, left, top);\n };\n IsometricPath.prototype.draw = function (commands) {\n this.commands = parseDrawCommands(commands);\n this.update();\n return this;\n };\n IsometricPath.prototype.addAnimation = function (animation) {\n return _super.prototype.addAnimation.call(this, animation);\n };\n return IsometricPath;\n}(IsometricPathAbstract));\n\n\n;// ./src/@classes/public/IsometricPath/index.ts\n\n\n;// ./src/@classes/public/IsometricText/IsometricText.ts\nvar IsometricText_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar IsometricText_assign = (undefined && undefined.__assign) || function () {\n IsometricText_assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return IsometricText_assign.apply(this, arguments);\n};\nvar IsometricText_rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\nvar IsometricText = (function (_super) {\n IsometricText_extends(IsometricText, _super);\n function IsometricText(props) {\n var _a;\n var _this = this;\n var planeView = props.planeView, _b = props.text, text = _b === void 0 ? \'\' : _b, _c = props.fontFamily, fontFamily = _c === void 0 ? \'Arial\' : _c, _d = props.fontSize, fontSize = _d === void 0 ? 12 : _d, _e = props.fontStyle, fontStyle = _e === void 0 ? \'normal\' : _e, _f = props.fontWeight, fontWeight = _f === void 0 ? \'normal\' : _f, _g = props.origin, origin = _g === void 0 ? [\'center\', \'center\'] : _g, _h = props.right, right = _h === void 0 ? 0 : _h, _j = props.left, left = _j === void 0 ? 0 : _j, _k = props.top, top = _k === void 0 ? 0 : _k, _l = props.rotation, rotation = _l === void 0 ? 0 : _l, _m = props.selectable, selectable = _m === void 0 ? true : _m, rest = IsometricText_rest(props, ["planeView", "text", "fontFamily", "fontSize", "fontStyle", "fontWeight", "origin", "right", "left", "top", "rotation", "selectable"]);\n _this = _super.call(this, rest, SVG_ELEMENTS.group) || this;\n _this._originHash = (_a = {},\n _a[ORIGIN.CENTER] = \'middle\',\n _a[ORIGIN.LEFT] = \'start\',\n _a[ORIGIN.RIGHT] = \'end\',\n _a[ORIGIN.TOP] = \'hanging\',\n _a[ORIGIN.BOTTOM] = \'baseline\',\n _a);\n _this.commonAnimationAttributes = {\n attributeName: \'transform\',\n attributeType: \'XML\',\n additive: \'sum\',\n fill: \'freeze\'\n };\n _this.getMatrixTransform = function (props) {\n var transformMatrix = getPatternTransform(_this.getPositionTransform(props), _this.planeView, 1);\n return "".concat(transformMatrix, " rotate(").concat(_this.rotation, ")");\n };\n _this._textElement = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.text);\n _this._tspan = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.tspan);\n _this._textElement.appendChild(_this._tspan);\n _this.element.appendChild(_this._textElement);\n _this.planeView = planeView;\n _this.fontFamily = fontFamily;\n _this.fontSize = fontSize;\n _this.fontStyle = fontStyle;\n _this.fontWeight = fontWeight;\n _this.selectable = selectable;\n _this.origin = origin;\n _this.right = right;\n _this.left = left;\n _this.top = top;\n _this.rotation = rotation;\n _this.text = text;\n return _this;\n }\n IsometricText.prototype.getPositionTransform = function (props, fromCenter) {\n if (fromCenter === void 0) { fromCenter = true; }\n return getPointFromIsometricPoint(fromCenter\n ? this.data.centerX\n : 0, fromCenter\n ? this.data.centerY\n : 0, {\n r: props.right,\n l: props.left,\n t: props.top\n }, this.data.scale);\n };\n IsometricText.prototype.updateSubClassAnimations = function () {\n var _this = this;\n var props = {\n right: 0,\n left: 0,\n top: 0,\n rotation: 0,\n };\n this.animations.forEach(function (animation) {\n var isNativeSVGProperty = isSVGProperty(animation.property);\n if (!isNativeSVGProperty) {\n if (Object.prototype.hasOwnProperty.call(props, animation.property)) {\n var property_1 = animation.property;\n var isRotation_1 = property_1 === \'rotation\';\n var commonProps = IsometricText_assign(IsometricText_assign({}, _this.commonAnimationAttributes), { type: isRotation_1\n ? \'rotate\'\n : \'translate\', begin: \'indefinite\' });\n var properties = void 0;\n if (animation.values) {\n if (Array.isArray(animation.values)) {\n properties = IsometricText_assign({ values: animation.values.map(function (value) {\n if (isRotation_1) {\n return "".concat(value);\n }\n else {\n var modifiedArgs = IsometricText_assign({}, props);\n modifiedArgs[property_1] = +value - _this[property_1];\n var coords = _this.getPositionTransform(modifiedArgs, false);\n return "".concat(coords.x, ",").concat(coords.y);\n }\n }).join(\';\') }, commonProps);\n }\n else {\n if (isRotation_1) {\n properties = IsometricText_assign({ values: "".concat(animation.values) }, commonProps);\n }\n else {\n var modifiedArgs = IsometricText_assign({}, props);\n modifiedArgs[property_1] = +animation.values - _this[property_1];\n var coords = _this.getPositionTransform(modifiedArgs, false);\n properties = IsometricText_assign({ values: "".concat(coords.x, ",").concat(coords.y) }, commonProps);\n }\n }\n }\n else {\n if (isRotation_1) {\n properties = IsometricText_assign({ from: "".concat(animation.from), to: "".concat(animation.to) }, commonProps);\n }\n else {\n var fromArgs = IsometricText_assign({}, props);\n var toArgs = IsometricText_assign({}, props);\n fromArgs[property_1] = +animation.from - _this[property_1];\n toArgs[property_1] = +animation.to - _this[property_1];\n var coordsFrom = _this.getPositionTransform(fromArgs, false);\n var coordsTo = _this.getPositionTransform(toArgs, false);\n properties = IsometricText_assign({ from: "".concat(coordsFrom.x, ",").concat(coordsFrom.y), to: "".concat(coordsTo.x, ",").concat(coordsTo.y) }, commonProps);\n }\n }\n if (!animation.element) {\n animation.element = document.createElementNS(SVG_NAMESPACE, SVG_ELEMENTS.animateTransform);\n }\n _this.addAnimationBasicProperties(\'transform\', animation);\n addSVGProperties(animation.element, properties);\n if (!animation.element.parentNode) {\n if (isRotation_1) {\n _this._textElement.appendChild(animation.element);\n }\n else {\n _this.element.appendChild(animation.element);\n }\n }\n window.requestAnimationFrame(function () {\n animation.element.beginElement();\n });\n }\n }\n });\n };\n IsometricText.prototype.update = function () {\n if (elementHasSVGParent(this.element)) {\n var transform = this.getMatrixTransform({\n right: this.right,\n left: this.left,\n top: this.top\n });\n addSVGProperties(this._textElement, { transform: transform });\n this._tspan.textContent = this._text;\n this.updatePatternTransform({ x: 0, y: 0 }, this.planeView);\n this.updateAnimations();\n }\n return this;\n };\n IsometricText.prototype.clear = function () {\n this.text = \'\';\n this.update();\n return this;\n };\n Object.defineProperty(IsometricText.prototype, "text", {\n get: function () {\n return this._text;\n },\n set: function (value) {\n this._text = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "planeView", {\n get: function () {\n return this._planeView;\n },\n set: function (value) {\n this._planeView = value;\n this.update();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontFamily", {\n get: function () {\n return this._fontFamily;\n },\n set: function (value) {\n this._fontFamily = value;\n addSVGProperties(this._tspan, {\n \'font-family\': this._fontFamily\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontSize", {\n get: function () {\n return this._fontSize;\n },\n set: function (value) {\n this._fontSize = value;\n addSVGProperties(this._tspan, {\n \'font-size\': "".concat(this._fontSize, "px")\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontStyle", {\n get: function () {\n return this._fontStyle;\n },\n set: function (value) {\n this._fontStyle = value;\n addSVGProperties(this._tspan, {\n \'font-style\': "".concat(this._fontStyle)\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "fontWeight", {\n get: function () {\n return this._fontWeight;\n },\n set: function (value) {\n this._fontWeight = value;\n addSVGProperties(this._tspan, {\n \'font-weight\': "".concat(this._fontWeight)\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "selectable", {\n get: function () {\n return this._selectable;\n },\n set: function (value) {\n this._selectable = value;\n if (this._selectable) {\n this._textElement.removeAttribute(\'style\');\n }\n else {\n addSVGProperties(this._textElement, {\n style: [\n \'-webkit-user-select\',\n \'-moz-user-select\',\n \'-ms-user-select\',\n \'user-select\',\n \'pointer-events\'\n ].map(function (decl) { return "".concat(decl, ": none"); }).join(\';\')\n });\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "origin", {\n get: function () {\n return this._origin;\n },\n set: function (value) {\n this._origin = value;\n var _a = this._origin, textAnchor = _a[0], alignmentBaseline = _a[1];\n addSVGProperties(this._tspan, {\n \'text-anchor\': this._originHash[textAnchor],\n \'alignment-baseline\': this._originHash[alignmentBaseline]\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "right", {\n get: function () {\n return this._right;\n },\n set: function (value) {\n if (this._right !== value) {\n this._right = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "left", {\n get: function () {\n return this._left;\n },\n set: function (value) {\n if (this._left !== value) {\n this._left = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "top", {\n get: function () {\n return this._top;\n },\n set: function (value) {\n if (this._top !== value) {\n this._top = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(IsometricText.prototype, "rotation", {\n get: function () {\n return this._rotation;\n },\n set: function (value) {\n if (this._rotation !== value) {\n this._rotation = value;\n this.update();\n }\n },\n enumerable: false,\n configurable: true\n });\n return IsometricText;\n}(IsometricGraphicAbstract));\n\n\n;// ./src/@classes/public/IsometricText/index.ts\n\n\n;// ./src/index.ts\n\n\n\n\n\n\n\n\n\n\n;// ./demo/demo1/index.js\n/* harmony default export */ const demo1 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricRectangle, PlaneView } = IsometricModule;\n\n function toggleColor() {\n this.fillColor = this.fillColor === \'white\' ? \'#EEE\' : \'white\';\n }\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonProps = {height: 1, width: 1};\n const topPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.TOP});\n const rightPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.FRONT});\n const leftPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.SIDE});\n\n topPiece.top = 1;\n topPiece.addEventListener(\'click\', toggleColor, true);\n\n rightPiece.right = 1;\n rightPiece.addEventListener(\'click\', toggleColor, true);\n\n leftPiece.left = 1;\n leftPiece.addEventListener(\'click\', toggleColor, true);\n\n cube\n .addChild(topPiece)\n .addChild(rightPiece)\n .addChild(leftPiece);\n\n});\n;// ./demo/demo2/index.js\n/* harmony default export */ const demo2 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath, IsometricRectangle, IsometricPentagram, PlaneView } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonProps = {height: 1, width: 1};\n\n const duration = 3;\n\n const rectangleAnimationProps = {\n property: \'height\',\n duration,\n values: [1, 0.5, 1]\n };\n\n const colorAnimationProps = {\n property: \'fillColor\',\n duration,\n values: [\'#FFF\', \'#DDD\', \'#FFF\']\n };\n\n const topPiece = new IsometricPath();\n const star = new IsometricPentagram({ radius: 0.35, planeView: PlaneView.TOP, right: 0.5, left: 0.5, top: 1});\n const rightPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.FRONT, right: 1});\n const leftPiece = new IsometricRectangle({...commonProps, planeView: PlaneView.SIDE, left: 1});\n\n topPiece\n .moveTo(0, 0, 1)\n .lineTo(1, 0, 1)\n .lineTo(1, 1, 1)\n .lineTo(0, 1, 1);\n\n topPiece\n .addAnimation({\n property: \'path\',\n duration,\n values: [\n \'M0 0 1 L1 0 1 L1 1 1 L0 1 1\',\n \'M0 0 0.5 L1 0 0.5 L1 1 0.5 L0 1 0.5\',\n \'M0 0 1 L1 0 1 L1 1 1 L0 1 1\'\n ]\n })\n .addAnimation(colorAnimationProps);\n\n star\n .addAnimation({\n property: \'top\',\n duration,\n values: [1, 0.5, 1]\n });\n\n rightPiece\n .addAnimation(rectangleAnimationProps)\n .addAnimation(colorAnimationProps);\n\n leftPiece\n .addAnimation(rectangleAnimationProps)\n .addAnimation(colorAnimationProps);\n\n cube.addEventListener(\'click\', function() {\n if (this.animated) {\n this.pauseAnimations();\n } else {\n this.resumeAnimations();\n }\n });\n\n cube.addChildren(topPiece, rightPiece, leftPiece, star);\n\n});\n;// ./demo/images/block_side.png\nconst block_side_namespaceObject = __webpack_require__.p + "images/block_side.png";\n;// ./demo/images/block_top.png\nconst block_top_namespaceObject = __webpack_require__.p + "images/block_top.png";\n;// ./demo/demo3/index.js\n\n\n\n/* harmony default export */ const demo3 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricRectangle, IsometricText, PlaneView } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const rectangleCommonProps = { height: 1, width: 1 };\n\n const textCommonProps = {\n fontSize: 15,\n fillColor: \'#666\',\n strokeWidth: 0,\n right: 0.5,\n left: 0.5,\n top: 0.5,\n selectable: false\n };\n\n const pieces = [PlaneView.TOP, PlaneView.FRONT, PlaneView.SIDE].map((view, index) => {\n return {\n face: new IsometricRectangle({...rectangleCommonProps, planeView: view}),\n label: new IsometricText({...textCommonProps, planeView: view}),\n property: [\'top\', \'right\', \'left\'][index]\n };\n });\n\n pieces.forEach((piece) => {\n\n const { face, label, property } = piece;\n\n face[property] = 1;\n label[property] = 1;\n label.text = `${property.toUpperCase()} 0º`;\n\n face.addEventListener(\'click\', () => {\n const rotation = label.rotation + 45;\n label.rotation = rotation === 360 ? 0 : rotation;\n label.text = label.text.replace(/\\d+/, label.rotation);\n });\n\n cube.addChild(piece.face);\n cube.addChild(piece.label);\n });\n\n});\n;// ./demo/demo4/index.js\n/* harmony default export */ const demo4 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricGroup, IsometricPath } = IsometricModule;\n\n const isometric = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const bottomT = new IsometricPath();\n const bottomR = new IsometricPath();\n const bottomL = new IsometricPath();\n\n const topT = new IsometricPath();\n const topR = new IsometricPath();\n const topL = new IsometricPath();\n\n bottomT.mt(0, 0, .5).lt(1, 0, .5).lt(1, 1, .5).lt(0, 1, .5);\n bottomR.mt(1, 0, .5).lt(1, 0, 0).lt(1, 1, 0).lt(1, 1, .5);\n bottomL.mt(1, 1, .5).lt(1, 1, 0).lt(0, 1, 0).lt(0, 1, .5);\n\n topT.mt(.25, .25, 1).lt(.75, .25, 1).lt(.75, .75, .75).lt(.25, .75, .75);\n topR.mt(.75, .25, 1).lt(.75, .75, .75).lt(.75, .75, .25).lt(.75, .25, .25);\n topL.mt(.75, .75, .75).lt(.25, .75, .75).lt(.25, .75, .25).lt(.75, .75, .25);\n\n const bottomPiece = new IsometricGroup();\n const topPiece = new IsometricGroup();\n topPiece.top = .25;\n\n bottomPiece.addChildren(bottomT, bottomR, bottomL);\n topPiece.addChildren(topT, topR, topL);\n\n let flip = true;\n\n topPiece.addEventListener(\'click\', function() {\n if (this.right) {\n this.right = 0;\n return;\n }\n this.right = flip ? 0.25 : -0.25;\n flip = !flip;\n });\n\n isometric.addChildren(bottomPiece, topPiece);\n\n});\n;// ./demo/demo5/index.js\n/* harmony default export */ const demo5 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath } = IsometricModule;\n\n const isometric = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const right = new IsometricPath();\n const top1 = new IsometricPath();\n const top2 = new IsometricPath();\n const top3 = new IsometricPath();\n const top4 = new IsometricPath();\n const left1 = new IsometricPath();\n const left2 = new IsometricPath();\n\n // M r l t (Move to right left top)\n // L r l t (Line to right left top)\n // C cr cl ct r l t (Curve to control-right control-left control-top right left top)\n right.draw(\'M1 0 0 L1 1 0 L1 1 0.25 L1 0.5 0.25 L1 0.5 1 L1 0 1\');\n top1.draw(\'M0.25 0.5 1 C0.5 0.5 0.75 0.75 0.5 1 L0.75 0 1 C0.5 0 0.75 0.25 0 1 L0.25 0.5 1\');\n top2.draw(\'M1 0 1 L0.75 0 1 L0.75 0.5 1 L1 0.5 1 L1 0 1 M0 0 1 L0.25 0 1 L0.25 0.5 1 L0 0.5 1 L0 0 1\');\n top3.draw(\'M0 0.5 0.5 L0.5 0.5 0.5 L0.5 1 0.5 L0 1 0.5\');\n top4.draw(\'M0.5 0.5 0.5 L1 0.5 0.25 L1 1 0.25 L0.5 1 0.5\');\n left1.draw(\'M0 0.5 1 L0 0.5 0.5 L0.5 0.5 0.5 L1 0.5 0.25 L1 0.5 1 L0.75 0.5 1 C0.5 0.5 0.75 0.25 0.5 1 L0 0.5 1\');\n left2.draw(\'M0 1 0.5 L0.5 1 0.5 L1 1 0.25 L1 1 0 L0 1 0\');\n\n isometric.addChildren(right, top1, top2, top3, top4, left1, left2);\n\n});\n;// ./demo/demo6/index.js\n/* harmony default export */ const demo6 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const under = new IsometricPath({ fillColor: \'#EEE\' });\n const top = new IsometricPath();\n const right = new IsometricPath();\n const left = new IsometricPath();\n\n under\n .mt(0, 0, 1)\n .mt(0.25, 0, 1).ct(0.5, 0, 0.75, 0.75, 0, 1).lt(1, 0, 1)\n .lt(1, 0, 0.75).ct(0.75, 0, 0.5, 1, 0, 0.25).lt(1, 0, 0)\n .lt(1, 0.25, 0).ct(0.75, 0.5, 0, 1, 0.75, 0).lt(1, 1, 0)\n .lt(0.75, 1, 0).ct(0.5, 0.75, 0, 0.25, 1, 0).lt(0, 1, 0)\n .lt(0, 1, 0.25).ct(0, 0.75, 0.5, 0, 1, 0.75).lt(0, 1, 1)\n .lt(0, 0.75, 1).ct(0, 0.5, 0.75, 0, 0.25, 1).lt(0, 0, 1);\n\n top\n .mt(0, 0, 1)\n .lt(0.25, 0, 1).ct(0.5, 0.25, 1, 0.75, 0, 1).lt(1, 0, 1)\n .lt(1, 0.25, 1).ct(0.75, 0.5, 1, 1, 0.75, 1).lt(1, 1, 1)\n .lt(0.75, 1, 1).ct(0.5, 0.75, 1, 0.25, 1, 1).lt(0, 1, 1)\n .lt(0, 0.75, 1).ct(0.25, 0.5, 1, 0, 0.25, 1).lt(0, 0, 1);\n\n right\n .mt(1, 0, 1)\n .lt(1, 0, 0.75).ct(1, 0.25, 0.5, 1, 0, 0.25).lt(1, 0, 0)\n .lt(1, 0.25, 0).ct(1, 0.5, 0.25, 1, 0.75, 0).lt(1, 1, 0)\n .lt(1, 1, 0.25).ct(1, 0.75, 0.5, 1, 1, 0.75).lt(1, 1, 1)\n .lt(1, 0.75, 1).ct(1, 0.5, 0.75, 1, 0.25, 1).lt(1, 0, 1);\n\n left\n .mt(1, 1, 1)\n .lt(1, 1, 0.75).ct(0.75, 1, 0.5, 1, 1, 0.25).lt(1, 1, 0)\n .lt(0.75, 1, 0).ct(0.5, 1, 0.25, 0.25, 1, 0).lt(0, 1, 0)\n .lt(0, 1, 0.25).ct(0.25, 1, 0.5, 0, 1, 0.75).lt(0, 1, 1)\n .lt(0.25, 1, 1).ct(0.5, 1, 0.75, 0.75, 1, 1).lt(1, 1, 1);\n\n cube.addChildren(under, top, right, left);\n\n});\n;// ./demo/demo7/index.js\n/* harmony default export */ const demo7 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricStarPolygon, PlaneView } = IsometricModule;\n\n const cube = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonProps = {\n radius: 0.5,\n points: 8,\n density: 2,\n right: 0.5,\n left: 0.5,\n top: 0.5\n };\n\n const planes = [PlaneView.SIDE, PlaneView.FRONT, PlaneView.TOP];\n\n const planePropsHash = {\n [PlaneView.TOP]: \'top\',\n [PlaneView.FRONT]: \'right\',\n [PlaneView.SIDE]: \'left\'\n };\n\n planes.forEach((planeView) => {\n const props = { ...commonProps, planeView };\n const coord = planePropsHash[planeView];\n const starPolygonBack = new IsometricStarPolygon({...props, id: `${coord}-back`, fillColor: \'#EEE\'});\n const starPolygonFront = new IsometricStarPolygon({...props, id: `${coord}-front`});\n starPolygonBack[coord] = 0;\n starPolygonFront[coord] = 1;\n cube.addChildren(starPolygonBack, starPolygonFront);\n });\n\n planes.forEach((planeView) => {\n const coord = planePropsHash[planeView];\n const starPolygonBack = cube.getChildById(`${coord}-back`);\n const starPolygonFront = cube.getChildById(`${coord}-front`);\n cube.sendChildToBack(starPolygonBack);\n cube.bringChildToFront(starPolygonFront);\n });\n\n});\n;// ./demo/demo8/index.js\n/* harmony default export */ const demo8 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricGroup, IsometricRectangle, PlaneView } = IsometricModule;\n\n const canvas = new IsometricCanvas({\n container,\n backgroundColor: \'#CCC\',\n scale: 20,\n width: 500,\n height: 320\n });\n\n function resetPlanes() {\n cube.right = cube.left = cube.top = 0;\n planeTop.fillOpacity = planeRight.fillOpacity = planeLeft.fillOpacity = 0.25;\n }\n\n function changePlane() {\n resetPlanes();\n this.fillOpacity = 1;\n cube.drag = this.planeView;\n }\n\n const planeProps = { height: 6, width: 6, fillOpacity: 0.25 };\n const planeTop = new IsometricRectangle({ ...planeProps, planeView: PlaneView.TOP, fillOpacity: 1 });\n const planeRight = new IsometricRectangle({ ...planeProps, planeView: PlaneView.FRONT });\n const planeLeft = new IsometricRectangle({ ...planeProps, planeView: PlaneView.SIDE });\n\n const cubeProps = { height: 1, width: 1 };\n const cubeTop = new IsometricRectangle({ ...cubeProps, planeView: PlaneView.TOP, top: 1 });\n const cubeRight = new IsometricRectangle({ ...cubeProps, planeView: PlaneView.FRONT, right: 1 });\n const cubeLeft = new IsometricRectangle({ ...cubeProps, planeView: PlaneView.SIDE, left: 1 });\n\n const cube = new IsometricGroup();\n\n const bounds = [0, 5];\n cube.drag = \'TOP\';\n cube.bounds = { top: bounds, right: bounds, left: bounds };\n\n planeTop.addEventListener(\'click\', changePlane, true);\n planeRight.addEventListener(\'click\', changePlane, true);\n planeLeft.addEventListener(\'click\', changePlane, true);\n\n cube.addChildren(cubeTop, cubeRight, cubeLeft);\n canvas.addChildren(planeTop, planeRight, planeLeft, cube);\n\n});\n;// ./demo/demo9/index.js\n\n\n\n/* harmony default export */ const demo9 = (( IsometricModule, container ) => {\n\n const { IsometricCanvas, IsometricPath, IsometricRectangle, PlaneView, Axis } = IsometricModule;\n\n const isometric = new IsometricCanvas({\n container,\n backgroundColor: \'#8AAA3F\',\n scale: 120,\n width: 500,\n height: 320\n });\n\n const commonTextureProps = {\n height: 1,\n width: 1,\n pixelated: true\n };\n\n const textureSides = {\n url: \'images/block_side.png\',\n ...commonTextureProps\n };\n\n const textureTop = {\n url: \'images/block_top.png\',\n planeView: PlaneView.TOP,\n rotation: {\n axis: Axis.LEFT,\n value: 26.5650\n },\n ...commonTextureProps\n };\n\n const side = new IsometricPath({\n texture: {\n planeView: PlaneView.SIDE,\n ...textureSides\n }\n });\n\n const front = new IsometricRectangle({\n planeView: PlaneView.FRONT,\n height: 0.5,\n width: 1,\n texture: textureSides\n });\n\n const chop = new IsometricPath({\n texture: textureTop\n });\n\n side.draw(\'M1 1 0 L1 1 0.5 L0 1 1 L0 1 0\');\n chop.draw(\'M1 1 0.5 L0 1 1 L0 0 1 L1 0 0.5\');\n\n side.left = 1;\n front.right = 1;\n\n isometric.addChildren(side, front, chop);\n\n});\n;// ./demo/demo.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst functioToString = (fn) => {\n const article = document.createElement(\'article\');\n const pre = document.createElement(\'pre\');\n article.classList.add(\'function-container\');\n pre.classList.add(\'prettyprint\');\n article.appendChild(pre);\n pre.innerHTML = fn.toString();\n return article;\n};\n\nconst demos = new Map([\n [\'demo1\', demo1],\n [\'demo2\', demo2],\n [\'demo3\', demo3],\n [\'demo4\', demo4],\n [\'demo5\', demo5],\n [\'demo6\', demo6],\n [\'demo7\', demo7],\n [\'demo8\', demo8],\n [\'demo9\', demo9],\n]);\n\ndocument.addEventListener(\'DOMContentLoaded\', function () {\n\n demos.forEach((module, div) => {\n const demo = document.getElementById(div);\n const container = document.createElement(\'div\');\n const wrapper = document.createElement(\'div\');\n\n container.classList.add(\'demo-container\');\n wrapper.classList.add(\'demo-wrapper\');\n\n module(src_namespaceObject, wrapper);\n container.appendChild(wrapper);\n demo.appendChild(container);\n demo.appendChild(functioToString(module));\n });\n\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQxLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBTztBQUNBO0FBQ1A7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLENBQUMsb0NBQW9DO0FBQzlCO0FBQ1A7QUFDQTtBQUNBLENBQUMsd0NBQXdDO0FBQ2xDO0FBQ0E7Q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GlzLlJJR0hUOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcm90YXRlWSh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSBQbGFuZVZpZXcuRlJPTlQ6IHtcbiAgICAgICAgICAgIHN3aXRjaCAocm90YXRpb24uYXhpcykge1xuICAgICAgICAgICAgICAgIGNhc2UgQXhpcy5UT1A6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByb3RhdGVZKHZhbHVlKTtcbiAgICAgICAgICAgICAgICBjYXNlIEF4aXMuTEVGVDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJvdGF0ZVgodmFsdWUpO1xuICAgICAgICAgICAgICAgIGNhc2UgQXhpcy5SSUdIVDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJvdGF0ZVoodmFsdWUpO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNhc2UgUGxhbmVWaWV3LlNJREU6IHtcbiAgICAgICAgICAgIHN3aXRjaCAocm90YXRpb24uYXhpcykge1xuICAgICAgICAgICAgICAgIGNhc2UgQXhpcy5UT1A6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByb3RhdGVZKHZhbHVlKTtcbiAgICAgICAgICAgICAgICBjYXNlIEF4aXMuTEVGVDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJvdGF0ZVoodmFsdWUpO1xuICAgICAgICAgICAgICAgIGNhc2UgQXhpcy5SSUdIVDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJvdGF0ZVgoLXZhbHVlKTtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICByZXR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gICB2YXIgY29tbWFuZHNBcnJheSA9IFtdO1xuICAgIHZhciBhcnJheTtcbiAgICB3aGlsZSAoKGFycmF5ID0gQ09NTUFORFNfUkVHRVhQLmV4ZWMoY29tbWFuZHMpKSAhPT0gbnVsbCkge1xuICAgICAgICB2YXIgY29tbWFuZCA9IGFycmF5WzVdIHx8IGFycmF5WzFdO1xuICAgICAgICBzd2l0Y2ggKGNvbW1hbmQpIHtcbiAgICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgICAgIGNvbW1hbmRzQXJyYXkucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IENvbW1hbmQubW92ZSxcbiAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHsgcjogK2FycmF5WzJdLCBsOiArYXJyYXlbM10sIHQ6ICthcnJheVs0XSB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdMJzpcbiAgICAgICAgICAgICAgICBjb21tYW5kc0FycmF5LnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6ICthcnJheVsyXSwgbDogK2FycmF5WzNdLCB0OiArYXJyYXlbNF0gfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgICAgICAgY29tbWFuZHNBcnJheS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogQ29tbWFuZC5jdXJ2ZSxcbiAgICAgICAgICAgICAgICAgICAgY29udHJvbDogeyByOiArYXJyYXlbNl0sIGw6ICthcnJheVs3XSwgdDogK2FycmF5WzhdIH0sXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6ICthcnJheVs5XSwgbDogK2FycmF5WzEwXSwgdDogK2FycmF5WzExXSB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGNvbW1hbmRzQXJyYXk7XG59O1xuZXhwb3J0IHZhciB0cmFuc2xhdGVDb21tYW5kUG9pbnRzID0gZnVuY3Rpb24gKGNvbW1hbmRzLCByaWdodCwgbGVmdCwgdG9wKSB7XG4gICAgY29tbWFuZHMuZm9yRWFjaChmdW5jdGlvbiAoY29tbWFuZCkge1xuICAgICAgICBjb21tYW5kLnBvaW50LnIgKz0gcmlnaHQ7XG4gICAgICAgIGNvbW1hbmQucG9pbnQubCArPSBsZWZ0O1xuICAgICAgICBjb21tYW5kLnBvaW50LnQgKz0gdG9wO1xuICAgICAgICBpZiAoY29tbWFuZC5jb250cm9sKSB7XG4gICAgICAgICAgICBjb21tYW5kLmNvbnRyb2wuciArPSByaWdodDtcbiAgICAgICAgICAgIGNvbW1hbmQuY29udHJvbC5sICs9IGxlZnQ7XG4gICAgICAgICAgICBjb21tYW5kLmNvbnRyb2wudCArPSB0b3A7XG4gICAgICAgIH1cbiAgICB9KTtcbn07XG5leHBvcnQgdmFyIGdldFRleHR1cmVDb3JuZXIgPSBmdW5jdGlvbiAoY29tbWFuZHMsIGNlbnRlclgsIGNlbnRlclksIHNjYWxlKSB7XG4gICAgdmFyIGNvcm5lciA9IHtcbiAgICAgICAgeDogTnVtYmVyLk1BWF9TQUZFX0lOVEVHRVIsXG4gICAgICAgIHk6IE51bWJlci5NQVhfU0FGRV9JTlRFR0VSXG4gICAgfTtcbiAgICBnZXRDb21tYW5kc1dpdGhTdGFydChjb21tYW5kcylcbiAgICAgICAgLmZvckVhY2goZnVuY3Rpb24gKGMpIHtcbiAgICAgICAgdmFyIHBvaW50ID0gZ2V0UG9pbnRGcm9tSXNvbWV0cmljUG9pbnQoY2VudGVyWCwgY2VudGVyWSwgYy5wb2ludCwgc2NhbGUpO1xuICAgICAgICBpZiAocG9pbnQueCA8IGNvcm5lci54IHx8XG4gICAg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ICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KFN0b3JlLnByb3RvdHlwZSwgXCJzY2FsZVwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2l6ZXMuc2NhbGU7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLnNpemVzLnNjYWxlID0gdmFsdWU7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoU3RvcmUucHJvdG90eXBlLCBcImNlbnRlclhcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNpemVzLmNlbnRlclg7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoU3RvcmUucHJvdG90eXBlLCBcImNlbnRlcllcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNpemVzLmNlbnRlclk7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICByZXR1cm4gU3RvcmU7XG59KCkpO1xuZXhwb3J0IHsgU3RvcmUgfTtcbiIsInZhciBJc29tZXRyaWNTdG9yZSA9IChmdW5jdGlvbiAoKSB7XG4gICAgZnVuY3Rpb24gSXNvbWV0cmljU3RvcmUoKSB7XG4gICAgfVxuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc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ICAgICAgICAgICAncGF0dGVyblVuaXRzJzogJ3VzZXJTcGFjZU9uVXNlJ1xuICAgICAgICB9KTtcbiAgICAgICAgdmFyIGltYWdlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKFNWR19OQU1FU1BBQ0UsIFNWR19FTEVNRU5UUy5pbWFnZSk7XG4gICAgICAgIGFkZFNWR1Byb3BlcnRpZXMoaW1hZ2UsIHtcbiAgICAgICAgICAgICdocmVmJzogdGV4dHVyZS51cmwsXG4gICAgICAgICAgICAneCc6ICcwJyxcbiAgICAgICAgICAgICd5JzogJzAnLFxuICAgICAgICAgICAgJ3ByZXNlcnZlQXNwZWN0UmF0aW8nOiAnbm9uZSdcbiAgICAgICAgfSk7XG4gICAgICAgIGlmICh0ZXh0dXJlLnBpeGVsYXRlZCkge1xuICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyhpbWFnZSwge1xuICAgICAgICAgICAgICAgICdzdHlsZSc6ICdpbWFnZS1yZW5kZXJpbmc6IHBpeGVsYXRlZCdcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMucGF0dGVybi5hcHBlbmRDaGlsZChpbWFnZSk7XG4gICAgfTtcbiAgICBJc29tZXRyaWNHcmFwaGljQWJzdHJhY3QucHJvdG90eXBlLl91cGRhdGVUZXh0dXJlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgaW1hZ2UgPSB0aGlzLnBhdHRlcm4uZmlyc3RDaGlsZDtcbiAgICAgICAgaWYgKHRoaXMucHJvcHMudGV4dHVyZS51cmwgJiZcbiAgICAgICAgICAgIGltYWdlLmdldEF0dHJpYnV0ZSgnaHJlZicpICE9PSB0aGlzLnByb3BzLnRleHR1cmUudXJsKSB7XG4gICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGltYWdlLCB7XG4gICAgICAgICAgICAgICAgJ2hyZWYnOiB0aGlzLnByb3BzLnRleHR1cmUudXJsXG4gICAgICAgICAgICB9KTt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aXNTVkdQcm9wZXJ0eShhbmltYXRpb24ucHJvcGVydHkpO1xuICAgICAgICAgICAgaWYgKGlzTmF0aXZlU1ZHUHJvcGVydHkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvcGVydHkgPSBnZXRTVkdQcm9wZXJ0eShhbmltYXRpb24ucHJvcGVydHkpO1xuICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoU1ZHX05BTUVTUEFDRSwgU1ZHX0VMRU1FTlRTLmFuaW1hdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50LnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuZWxlbWVudC5hcHBlbmRDaGlsZChhbmltYXRpb24uZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF90aGlzLmFkZEFuaW1hdGlvbkJhc2ljUHJvcGVydGllcyhwcm9wZXJ0eSwgYW5pbWF0aW9uKTtcbiAgICAgICAgICAgICAgICBpZiAoYW5pbWF0aW9uLnZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGFuaW1hdGlvbi5lbGVtZW50LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXM6IEFycmF5LmlzQXJyYXkoYW5pbWF0aW9uLnZhbHVlcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFuaW1hdGlvbi52YWx1ZXMubWFwKGZ1bmN0aW9uICh2YWx1ZSkgeyByZXR1cm4gXCJcIi5jb25jYXQodmFsdWUpOyB9KS5qb2luKCc7JylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFwiXCIuY29uY2F0KGFuaW1hdGlvbi52YWx1ZXMpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyhhbmltYXRpb24uZWxlbWVudCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnJvbTogXCJcIi5jb25jYXQoYW5pbWF0aW9uLmZyb20pLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG86IFwiXCIuY29uY2F0KGFuaW1hdGlvbi50bylcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy51cGRhdGVTdWJDbGFzc0FuaW1hdGlvbnMoKTtcbiAgICB9O1xuICAgIElzb21ldHJpY0dyYXBoaWNBYnN0cmFjdC5wcm90b3R5cGUudXBkYXRlUGF0dGVyblRyYW5zZm9ybSA9IGZ1bmN0aW9uIChjb3JuZXIsIHBsYW5lVmlldykge1xuICAgICAgICB2YXIgX2EsIF9iLCBfYztcbiAgICAgICAgaWYgKHRoaXMucHJvcHMudGV4dHVyZSkge1xuICAgICAgICAgICAgdmFyIGhlaWdodCA9IHRoaXMucHJvcHMudGV4dHVyZS5oZWlnaHRcbiAgICAgICAgICAgICAgICA/IFwiXCIuY29uY2F0KHRoaXMucHJvcHMudGV4dHVyZS5oZWlnaHQgKiB0aGlzLmRhdGEuc2NhbGUpXG4gICAgICAgICAgICAgICAgOiAnMTAwJSc7XG4gICAgICAgICAgICB2YXIgd2lkdGggPSB0aGlzLnByb3BzLnRleHR1cmUud2lkdGhcbiAgICAgICAgICAgICAgICA/IFwiXCIuY29uY2F0KHRoaXMucHJvcHMudGV4dHVyZS53aWR0aCAqIHRoaXMuZGF0YS5zY2FsZSlcbiAgICAgICAgICAgICAgICA6ICcxMDAlJztcbiAgICAgICAgICAgIHZhciBzaGlmdCA9IGdldFBvaW50RnJvbUl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ICAgICBhZGRTVkdQcm9wZXJ0aWVzKHRoaXMucGF0dGVybi5maXJzdENoaWxkLCB7XG4gICAgICAgICAgICAgICAgJ2hlaWdodCc6IGhlaWdodCxcbiAgICAgICAgICAgICAgICAnd2lkdGgnOiB3aWR0aFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc29tZXRyaWNHcmFwaGljQWJzdHJhY3QucHJvdG90eXBlLCBcImlkXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5faWQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLnNldElkKHZhbHVlKTtcbiAgICAgICAgICAgIGlmICh0aGlzLnBhdHRlcm4pIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBhdHRlcm5JZCA9IFwiXCIuY29uY2F0KHRoaXMuaWQsIFwiX190ZXh0dXJlXCIpO1xuICAgICAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXModGhpcy5wYXR0ZXJuLCB7XG4gICAgICAgICAgICAgICAgICAgICdpZCc6IHRoaXMucGF0dGVybklkXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljR3JhcGhpY0Fic3RyYWN0LnByb3RvdHlwZSwgXCJmaWxsQ29sb3JcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnByb3BzLmZpbGxDb2xvcjtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAod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LnByb3BzLnRleHR1cmUucm90YXRpb24gPSByb3RhdGlvbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChoYXNUZXh0dXJlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fdXBkYXRlVGV4dHVyZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jcmVhdGVUZXh0dXJlKHRoaXMucHJvcHMudGV4dHVyZSk7XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIElzb21ldHJpY0dyYXBoaWNBYnN0cmFjdC5wcm90b3R5cGUuYWRkQW5pbWF0aW9uID0gZnVuY3Rpb24gKGFuaW1hdGlvbikge1xuICAgICAgICB0aGlzLmFuaW1hdGlvbnMucHVzaChfX2Fzc2lnbih7fSwgYW5pbWF0aW9uKSk7XG4gICAgICAgIHRoaXMudXBkYXRlKCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgSXNvbWV0cmljR3JhcGhpY0Fic3RyYWN0LnByb3RvdHlwZS5yZW1vdmVBbmltYXRpb25CeUluZGV4ID0gZnVuY3Rpb24gKGluZGV4KSB7XG4gICAgICAgIGlmIChpbmRleCA+PSAwICYmIGluZGV4IDwgdGhpcy5hbmltYXRpb25zLmxlbmd0aCkge1xuICAgICAgICAgICAgdmFyIGFuaW1hdGlvbiA9IHRoaXMuYW5pbWF0aW9ucy5zcGxpY2UoaW5kZXgsIDEpWzBdO1xuICAgICAgICAgICAgaWYgKGFuaW1hdGlvbi5lbGVtZW50ICYmIGFuaW1hdGlvbi5lbGVtZW50LnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICBhbmltYXRpb24uZWxlbWVudC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKGFuaW1hdGlvbi5lbGVtZW50KTtc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pbGRyZW4ubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICB2YXIgbW92ZWRFbGVtZW50ID0gY2hpbGQuZ2V0RWxlbWVudCgpO1xuICAgICAgICAgICAgdmFyIHJlcGxhY2VkRWxlbWVudCA9IHRoaXMuX2NoaWxkcmVuW2luZGV4XS5nZXRFbGVtZW50KCk7XG4gICAgICAgICAgICBpZiAodGhpcy5fY2hpbGRyZW5baW5kZXhdICE9PSBjaGlsZCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX2NoaWxkcmVuLnNwbGljZShjaGlsZEluZGV4LCAxKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9jaGlsZHJlbi5zcGxpY2UoaW5kZXgsIDAsIGNoaWxkKTtcbiAgICAgICAgICAgICAgICBpZiAoY2hpbGRJbmRleCA+IGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5pbnNlcnRCZWZvcmUobW92ZWRFbGVtZW50LCByZXBsYWNlZEVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcGxhY2VkRWxlbWVudC5uZXh0U2libGluZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50Lmluc2VydEJlZm9yZShtb3ZlZEVsZW1lbnQsIHJlcGxhY2VkRWxlbWVudC5uZXh0U2libGluZyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQuYXBwZW5kQ2hpbGQobW92ZWRFbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMudGhyb3dDaGlsZEVycm9yKCk7XG4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ICAgICAgICAgeDogJzAnLFxuICAgICAgICAgICAgeTogJzAnLFxuICAgICAgICAgICAgd2lkdGg6IFwiXCIuY29uY2F0KF90aGlzLmRhdGEud2lkdGgsIFwicHhcIiksXG4gICAgICAgICAgICBoZWlnaHQ6IFwiXCIuY29uY2F0KF90aGlzLmRhdGEuaGVpZ2h0LCBcInB4XCIpXG4gICAgICAgIH0pO1xuICAgICAgICBfdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKF90aGlzLmJhY2tncm91bmQpO1xuICAgICAgICB2YXIgY29udGFpbmVyRWxlbWVudCA9IHR5cGVvZiBfdGhpcy5wcm9wcy5jb250YWluZXIgPT09ICdzdHJpbmcnXG4gICAgICAgICAgICA/IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoX3RoaXMucHJvcHMuY29udGFpbmVyKVxuICAgICAgICAgICAgOiBfdGhpcy5wcm9wcy5jb250YWluZXI7XG4gICAgICAgIGNvbnRhaW5lckVsZW1lbnQuYXBwZW5kQ2hpbGQoX3RoaXMuZWxlbWVudCk7XG4gICAgICAgIHJldHVybiBfdGhpcztcbiAgICB9XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY0NhbnZhcy5wcm90b3R5cGUsIFwiYmFja2dyb3VuZENvbG9yXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5iYWNrZ3JvdW5kQ29sb3I7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLnByb3BzLmJhY2tncm91bmRDb2xvciA9IHZhbHVlO1xuICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLmJhY2tncm91bmQsIHsgZmlsbDogdGhpcy5iYWNrZ3JvdW5kQ29sb3IgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljQ2FudmFzLnByb3RvdHlwZSwgXCJzY2FsZVwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YS5zY2FsZTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHRoaXMuZGF0YS5zY2FsZSA9IHZhbHVlO1xuICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgfSxcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgIH0pO1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc29tZXRyaWNDYW52YXMucHJvdG90eXBlLCBcImhlaWdodFwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YS5oZWlnaHQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB2YXIgX2E7XG4gICAgICAgICAgICB0aGlzLmRhdGEuaGVpZ2h0ID0gdmFsdWU7XG4gICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKHRoaXMuZWxlbWVudCwgKF9hID0ge30sXG4gICAgICAgICAgICAgICAgX2FbU1ZHX1BST1BFUlRJRVMudmlld0JveF0gPSBcIjAgMCBcIi5jb25jYXQodGhpcy5kYXRhLndpZHRoLCBcIiBcIikuY29uY2F0KHRoaXMuZGF0YS5oZWlnaHQpLFxuICAgICAgICAgICAgICAgIF9hLmhlaWdodCA9IFwiXCIuY29uY2F0KHRoaXMuZGF0YS5oZWlnaHQsIFwicHhcIiksXG4gICAgICAgICAgICAgICAgX2EpKTtcbiAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXModGhpcy5iYWNrZ3JvdW5kLCB7XG4gICAgICAgICAgICAgICAgaGVpZ2h0OiBcIlwiLmNvbmNhdCh0aGlzLmRhdGEuaGVpZ2h0LCBcInB4XCIpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlKCk7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljQ2FudmFzLnByb3RvdHlwZSwgXCJ3aWR0aFwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YS53aWR0aDtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHZhciBfYTtcbiAgICAgICAgICAgIHRoaXMuZGF0YS53aWR0aCA9IHZhbHVlO1xuICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLmVsZW1lbnQsIChfYSA9IHt9LFxuICAgICAgICAgICAgICAgIF9hW1NWR19QUk9QRVJUSUVTLnZpZXdCb3hdID0gXCIwIDAgXCIuY29uY2F0KHRoaXMuZGF0YS53aWR0aCwgXCIgXCIpLmNvbmNhdCh0aGlzLmRhdGEuaGVpZ2h0KSxcbiAgICAgICAgICAgICAgICBfYS53aWR0aCA9IFwiXCIuY29uY2F0KHRoaXMuZGF0YS53aWR0aCwgXCJweFwiKSxcbiAgICAgICAgICAgICAgICBfYSkpO1xuICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLmJhY2tncm91bmQsIHtcbiAgICAgICAgICAgICAgICB3aWR0aDogXCJcIi5jb25jYXQodGhpcy5kYXRhLndpZHRoLCBcInB4XCIpXG4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fKCkpO1xuICAgIH07XG59KSgpO1xudmFyIF9fYXNzaWduID0gKHRoaXMgJiYgdGhpcy5fX2Fzc2lnbikgfHwgZnVuY3Rpb24gKCkge1xuICAgIF9fYXNzaWduID0gT2JqZWN0LmFzc2lnbiB8fCBmdW5jdGlvbih0KSB7XG4gICAgICAgIGZvciAodmFyIHMsIGkgPSAxLCBuID0gYXJndW1lbnRzLmxlbmd0aDsgaSA8IG47IGkrKykge1xuICAgICAgICAgICAgcyA9IGFyZ3VtZW50c1tpXTtcbiAgICAgICAgICAgIGZvciAodmFyIHAgaW4gcykgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChzLCBwKSlcbiAgICAgICAgICAgICAgICB0W3BdID0gc1twXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdDtcbiAgICB9O1xuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xufTtcbnZhciBfX3NwcmVhZEFycmF5ID0gKHRoaXMgJiYgdGhpcy5fX3NwcmVhZEFycmF5KSB8fCBmdW5jdGlvbiAodG8sIGZyb20sIHBhY2spIHtcbiAgICBpZiAocGFjayB8fCBhcmd1bWVudHMubGVuZ3RoID09PSAyKSBmb3IgKHZhciBpID0gMCwgbCA9IGZyb20ubGVuZ3RoLCBhcjsgaSA8IGw7IGkrKykge1xuICAgICAgICBpZiAoYXIgfHwgIShpIGluIGZyb20pKSB7XG4gICAgICAgICAgICBpZiAoIWFyKSBhciA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGZyb20sIDAsIGkpO1xuICAgICAgICAgICAgYXJbaV0gPSBmcm9tW2ldO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0by5jb25jYXQoYXIgfHwgQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoZnJvbSkpO1xufTtcbmltcG9ydCB7IEVWRU5UUywgREVDSU1BTFMsIFBsYW5lVmlldywgVHlwZ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1xuICAgIElzb21ldHJpY0RyYWdnYWJsZUFic3RyYWN0LnByb3RvdHlwZS5nZXRGaXhlZENvb3JkaW5hdGVzID0gZnVuY3Rpb24gKGNvb3Jkcykge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICByZXR1cm4gT2JqZWN0LmVudHJpZXMoY29vcmRzKS5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgZW50cnkpIHtcbiAgICAgICAgICAgIHZhciBmaXhlZENvb3JkcyA9IF9fYXNzaWduKHt9LCBhY2MpO1xuICAgICAgICAgICAgc3dpdGNoIChlbnRyeVswXSkge1xuICAgICAgICAgICAgICAgIGNhc2UgJ3JpZ2h0JzpcbiAgICAgICAgICAgICAgICAgICAgZml4ZWRDb29yZHMucmlnaHQgPSBfdGhpcy5nZXRSaWdodChlbnRyeVsxXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ2xlZnQnOlxuICAgICAgICAgICAgICAgICAgICBmaXhlZENvb3Jkcy5sZWZ0ID0gX3RoaXMuZ2V0TGVmdChlbnRyeVsxXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIGZpeGVkQ29vcmRzLnRvcCA9IF90aGlzLmdldFRvcChlbnRyeVsxXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZml4ZWRDb29yZHM7XG4gICAgICAgIH0sIHt9KTtcbiAgICB9O1xuICAgIElzb21ldHJpY0RyYWdnYWJsZUFic3RyYWN0LnByb3RvdHlwZS5kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50VHlwZSkge1xuICAgICAgICB2YXIgX2EsIF9iLCBfYztcbiAgICAgICAgdmFyIGRyYWdFdmVudCA9IG5ldyBDdXN0b21FdmVudChldmVudFR5cGUsIHtcbiAgICAgICAgICAgIGNhbm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TmF0aXZlU1ZHUHJvcGVydHkgPSBpc1NWR1Byb3BlcnR5KGFuaW1hdGlvbi5wcm9wZXJ0eSk7XG4gICAgICAgICAgICBpZiAoIWlzTmF0aXZlU1ZHUHJvcGVydHkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvcHNfMSA9IHtcbiAgICAgICAgICAgICAgICAgICAgcmlnaHQ6IF90aGlzLnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICBsZWZ0OiBfdGhpcy5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICB0b3A6IF90aGlzLnRvcCxcbiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IF90aGlzLndpZHRoLFxuICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IF90aGlzLmhlaWdodFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChwcm9wc18xLCBhbmltYXRpb24ucHJvcGVydHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0eV8xID0gYW5pbWF0aW9uLnByb3BlcnR5O1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcGVydGllcyA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFuaW1hdGlvbi52YWx1ZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFuaW1hdGlvbi52YWx1ZXMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzOiBhbmltYXRpb24udmFsdWVzLm1hcChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtb2RpZmllZEFyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RpZmllZEFyZ3NbcHJvcGVydHlfMV0gPSArdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuZ2V0UmVjdGFuZ2xlUGF0aChtb2RpZmllZEFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCc7JylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1vZGlmaWVkQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wc18xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RpZmllZEFyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLnZhbHVlcztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXM6IF90aGlzLmdldFJlY3RhbmdsZVBhdGgobW9kaWZpZWRBcmdzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZnJvbUFyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdG9BcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZnJvbUFyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLmZyb207XG4gICAgICAgICAgICAgICAgICAgICAgICB0b0FyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLnRvO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tOiBfdGhpcy5nZXRSZWN0YW5nbGVQYXRoKGZyb21BcmdzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0bzogX3RoaXMuZ2V0UmVjdGFuZ2xlUGF0aCh0b0FyZ3MpXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi5lbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKFNWR19OQU1FU1BBQ0UsIFNWR19FTEVNRU5UUy5hbmltYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50LnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmVsZW1lbnQuYXBwZW5kQ2hpbGQoYW5pbWF0aW9uLmVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmFkZEFuaW1hdGlvbkJhc2ljUHJvcGVydGllcygnZCcsIGFuaW1hdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXMoYW5pbWF0aW9uLmVsZW1lbnQsIHByb3BlcnRpZXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljUmVjdGFuZ2xlLnByb3RvdHlwZSwgXCJ3aWR0aFwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICA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pcy5yaWdodDtcbiAgICAgICAgdmFyIGxlZnQgPSAoX2IgPSBhcmdzID09PSBudWxsIHx8IGFyZ3MgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGFyZ3MubGVmdCkgIT09IG51bGwgJiYgX2IgIT09IHZvaWQgMCA/IF9iIDogdGhpcy5sZWZ0O1xuICAgICAgICB2YXIgdG9wID0gKF9jID0gYXJncyA9PT0gbnVsbCB8fCBhcmdzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBhcmdzLnRvcCkgIT09IG51bGwgJiYgX2MgIT09IHZvaWQgMCA/IF9jIDogdGhpcy50b3A7XG4gICAgICAgIHZhciByYWRpdXMgPSAoX2QgPSBhcmdzID09PSBudWxsIHx8IGFyZ3MgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGFyZ3MucmFkaXVzKSAhPT0gbnVsbCAmJiBfZCAhPT0gdm9pZCAwID8gX2QgOiB0aGlzLnJhZGl1cztcbiAgICAgICAgdmFyIGNvbW1hbmRzID0gW107XG4gICAgICAgIHN3aXRjaCAodGhpcy5wbGFuZVZpZXcpIHtcbiAgICAgICAgICAgIGNhc2UgUGxhbmVWaWV3LkZST05UOlxuICAgICAgICAgICAgICAgIGNvbW1hbmRzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLm1vdmUsXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6IDAsIGw6IHJhZGl1cywgdDogMCB9XG4gICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLmN1cnZlLFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiAwLCBsOiAtcmFkaXVzLCB0OiAwIH0sXG4gICAgICAgICAgICAgICAgICAgIGNvbnRyb2w6IHsgcjogMCwgbDogMCwgdDogLXJhZGl1cyB9XG4gICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLmN1cnZlLFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiAwLCBsOiByYWRpdXMsIHQ6IDAgfSxcbiAgICAgICAgICAgICAgICAgICAgY29udHJvbDogeyByOiAwLCBsOiAwLCB0OiByYWRpdXMgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBQbGFuZVZpZXcuU0lERTpcbiAgICAgICAgICAgICAgICBjb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogQ29tbWFuZC5tb3ZlLFxuICAgICAgICAgICAgICAgICAgICBwb2ludDogeyByOiAtcmFkaXVzLCBsOiAwLCB0OiAwIH1cbiAgICAgICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IENvbW1hbmQuY3VydmUsXG4gICAgICAgICAgICAgICAgICAgIHBvaW50OiB7IHI6IHJhZGl1cywgbDogMCwgdDogMCB9LFxuICAgICAgICAgICAgICAgICAgICBjb250cm9sOiB7IHI6IDAsIGw6IDAsIHQ6IC1yYWRpdXMgfVxuICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogQ29tbWFuZC5jdXJ2ZSxcbiAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHsgcjogLXJhZGl1cywgbDogMCwgdDogMCB9LFxuICAgICAgICAgICAgICAgICAgICBjb250cm9sOiB7IHI6IDAsIGw6IDAsIHQ6IHJhZGl1cyB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFBsYW5lVmlldy5UT1A6XG4gICAgICAgICAgICAgICAgY29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmQ6IENvbW1hbmQubW92ZSxcbiAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHsgcjogMCwgbDogc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iAgICAgICAgdGhpcy5hbmltYXRpb25zLmZvckVhY2goZnVuY3Rpb24gKGFuaW1hdGlvbikge1xuICAgICAgICAgICAgdmFyIGlzTmF0aXZlU1ZHUHJvcGVydHkgPSBpc1NWR1Byb3BlcnR5KGFuaW1hdGlvbi5wcm9wZXJ0eSk7XG4gICAgICAgICAgICBpZiAoIWlzTmF0aXZlU1ZHUHJvcGVydHkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvcHNfMSA9IHtcbiAgICAgICAgICAgICAgICAgICAgcmlnaHQ6IF90aGlzLnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICBsZWZ0OiBfdGhpcy5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICB0b3A6IF90aGlzLnRvcCxcbiAgICAgICAgICAgICAgICAgICAgcmFkaXVzOiBfdGhpcy5yYWRpdXNcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocHJvcHNfMSwgYW5pbWF0aW9uLnByb3BlcnR5KSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcGVydHlfMSA9IGFuaW1hdGlvbi5wcm9wZXJ0eTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb3BlcnRpZXMgPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhbmltYXRpb24udmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShhbmltYXRpb24udmFsdWVzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlczogYW5pbWF0aW9uLnZhbHVlcy5tYXAoZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbW9kaWZpZWRBcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK3ZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmdldENpcmNsZVBhdGgobW9kaWZpZWRBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkuam9pbignOycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtb2RpZmllZEFyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi52YWx1ZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzOiBfdGhpcy5nZXRDaXJjbGVQYXRoKG1vZGlmaWVkQXJncylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZyb21BcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wc18xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyb21BcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi5mcm9tO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9BcmdzW3Byb3BlcnR5XzFdID0gK2FuaW1hdGlvbi50bztcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbTogX3RoaXMuZ2V0Q2lyY2xlUGF0aChmcm9tQXJncyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdG86IF90aGlzLmdldENpcmNsZVBhdGgodG9BcmdzKVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24uZWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnROUyhTVkdfTkFNRVNQQUNFLCBTVkdfRUxFTUVOVFMuYW5pbWF0ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhbmltYXRpb24uZWxlbWVudC5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKGFuaW1hdGlvbi5lbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBfdGhpcy5hZGRBbmltYXRpb25CYXNpY1Byb3BlcnRpZXMoJ2QnLCBhbmltYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKGFuaW1hdGlvbi5lbGVtZW50LCBwcm9wZXJ0aWVzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY0NpcmNsZS5wcm90b3R5cGUsIFwicmFkaXVzXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgIC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dm9pZCAwID8gdm9pZCAwIDogYXJncy5yYWRpdXMpICE9PSBudWxsICYmIF9kICE9PSB2b2lkIDAgPyBfZCA6IHRoaXMucmFkaXVzO1xuICAgICAgICB2YXIgcG9pbnRzID0gKF9lID0gYXJncyA9PT0gbnVsbCB8fCBhcmdzID09PSB2b2lkIDAgPyB2b2lkIDAgOiBhcmdzLnBvaW50cykgIT09IG51bGwgJiYgX2UgIT09IHZvaWQgMCA/IF9lIDogdGhpcy5fcG9pbnRzO1xuICAgICAgICB2YXIgZGVuc2l0eSA9IChfZiA9IGFyZ3MgPT09IG51bGwgfHwgYXJncyA9PT0gdm9pZCAwID8gdm9pZCAwIDogYXJncy5kZW5zaXR5KSAhPT0gbnVsbCAmJiBfZiAhPT0gdm9pZCAwID8gX2YgOiB0aGlzLl9kZW5zaXR5O1xuICAgICAgICB2YXIgcm90YXRpb24gPSAoX2cgPSBhcmdzID09PSBudWxsIHx8IGFyZ3MgPT09IHZvaWQgMCA/IHZvaWQgMCA6IGFyZ3Mucm90YXRpb24pICE9PSBudWxsICYmIF9nICE9PSB2b2lkIDAgPyBfZyA6IHRoaXMucm90YXRpb247XG4gICAgICAgIHZhciBjb29yZGluYXRlcyA9IHRoaXMuZ2V0MkRDb29yZGluYXRlcyhyYWRpdXMsIHBvaW50cywgZGVuc2l0eSwgcm90YXRpb24pO1xuICAgICAgICB2YXIgY29tbWFuZHMgPSBbXTtcbiAgICAgICAgc3dpdGNoICh0aGlzLnBsYW5lVmlldykge1xuICAgICAgICAgICAgY2FzZSBQbGFuZVZpZXcuRlJPTlQ6XG4gICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMuZm9yRWFjaChmdW5jdGlvbiAocG9pbnQsIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmRzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogaW5kZXggPT09IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IENvbW1hbmQubW92ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogQ29tbWFuZC5saW5lLFxuICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByOiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGw6IHBvaW50LngsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdDogcG9pbnQueVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgUGxhbmVWaWV3LlNJREU6XG4gICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMuZm9yRWFjaChmdW5jdGlvbiAocG9pbnQsIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbW1hbmRzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tbWFuZDogaW5kZXggPT09IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IENvbW1hbmQubW92ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogQ29tbWFuZC5saW5lLFxuICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByOiBwb2ludC54LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGw6IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdDogcG9pbnQueVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgUGxhbmVWaWV3LlRPUDpcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlcy5mb3JFYWNoKGZ1bmN0aW9uIChwb2ludCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21tYW5kOiBpbmRleCA9PT0gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gQ29tbWFuZC5tb3ZlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBDb21tYW5kLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb2ludDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHI6IC1wb2ludC54LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGw6IC1wb2ludC55LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQ6IDBcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgdHJhbnNsYXRlQ29tbWFuZFBvaW50cyhjb21tYW5kcywgcmlnaHQsIGxlZnQsIHRvcCk7XG4gICAgICAgIHJldHVybiBjb21tYW5kcztcbiAgICB9O1xuICAgIElzb21ldHJpY1N0YXJQb2x5Z29uQWJzdHJhY3QucHJvdG90eXBlLl9nZXRSYWRpYW5BbmdsZSA9IGZ1bmN0aW9uIChhbmdsZSkge1xuICAgICAgICByZXR1cm4gYW5nbGUgKiBNYXRoLlBJIC8gMTgwO1xuICAgIH07XG4gICAgSXNvbWV0cmljU3RhclBvbHlnb25BYnN0cmFjdC5wcm90b3R5cGUuX2dldElubmVyUmFkaXVzID0gZnVuY3Rpb24gKHJhZGl1cywgcG9pbnRzLCBkZW5zaXR5KSB7XG4gICAgICAgIHJldHVybiByYWRpdXMgKiBNYXRoLmNvcyhNYXRoLlBJICogZGVuc2l0eSAvIHBvaW50cykgLyBNYXRoLmNvcyhNYXRoLlBJICogKGRlbnNpdHkgLSAxKSAvIHBvaW50cyk7XG4gICAgfTtcbiAgICBJc29tZXRyaWNTdGFyUG9seWdvbkFic3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iBfdGhpcy5yb3RhdGlvblxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChwcm9wc18xLCBhbmltYXRpb24ucHJvcGVydHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0eV8xID0gYW5pbWF0aW9uLnByb3BlcnR5O1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcGVydGllcyA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFuaW1hdGlvbi52YWx1ZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFuaW1hdGlvbi52YWx1ZXMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzOiBhbmltYXRpb24udmFsdWVzLm1hcChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtb2RpZmllZEFyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RpZmllZEFyZ3NbcHJvcGVydHlfMV0gPSArdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuZ2V0UGVudGFncmFtUGF0aChtb2RpZmllZEFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCc7JylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1vZGlmaWVkQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wc18xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RpZmllZEFyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLnZhbHVlcztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXM6IF90aGlzLmdldFBlbnRhZ3JhbVBhdGgobW9kaWZpZWRBcmdzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZnJvbUFyZ3MgPSBfX2Fzc2lnbih7fSwgcHJvcHNfMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdG9BcmdzID0gX19hc3NpZ24oe30sIHByb3BzXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZnJvbUFyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLmZyb207XG4gICAgICAgICAgICAgICAgICAgICAgICB0b0FyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLnRvO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tOiBfdGhpcy5nZXRQZW50YWdyYW1QYXRoKGZyb21BcmdzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0bzogX3RoaXMuZ2V0UGVudGFncmFtUGF0aCh0b0FyZ3MpXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi5lbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKFNWR19OQU1FU1BBQ0UsIFNWR19FTEVNRU5UUy5hbmltYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50LnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmVsZW1lbnQuYXBwZW5kQ2hpbGQoYW5pbWF0aW9uLmVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmFkZEFuaW1hdGlvbkJhc2ljUHJvcGVydGllcygnZCcsIGFuaW1hdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXMoYW5pbWF0aW9uLmVsZW1lbnQsIHByb3BlcnRpZXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljU3RhclBvbHlnb25BYnN0cmFjdC5wcm90b3R5cGUsIFwicmFkaXVzXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcmFkaXVzO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5fcmFkaXVzID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1N0YXJQb2x5Z29uQWJzdHJhY3QucHJvdG90eXBlLCBcInJvdGF0aW9uXCIsIHtcbiAgICAgICAgZ2V0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ICdhdXRvY2xvc2UnIGluIHByb3BzXG4gICAgICAgICAgICA/IHByb3BzLmF1dG9jbG9zZVxuICAgICAgICAgICAgOiB0cnVlO1xuICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgfVxuICAgIElzb21ldHJpY1BhdGgucHJvdG90eXBlLnVwZGF0ZVN1YkNsYXNzQW5pbWF0aW9ucyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgdGhpcy5hbmltYXRpb25zLmZvckVhY2goZnVuY3Rpb24gKGFuaW1hdGlvbikge1xuICAgICAgICAgICAgaWYgKGFuaW1hdGlvbi5wcm9wZXJ0eSA9PT0gJ3BhdGgnKSB7XG4gICAgICAgICAgICAgICAgdmFyIHByb3BlcnRpZXMgPSB2b2lkIDA7XG4gICAgICAgICAgICAgICAgaWYgKGFuaW1hdGlvbi52YWx1ZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlczogQXJyYXkuaXNBcnJheShhbmltYXRpb24udmFsdWVzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gYW5pbWF0aW9uLnZhbHVlcy5tYXAoZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5nZXRQYXRoRnJvbUNvbW1hbmRzKFwiXCIuY29uY2F0KHZhbHVlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkuam9pbignOycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBfdGhpcy5nZXRQYXRoRnJvbUNvbW1hbmRzKFwiXCIuY29uY2F0KGFuaW1hdGlvbi52YWx1ZXMpKVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyb206IF90aGlzLmdldFBhdGhGcm9tQ29tbWFuZHMoXCJcIi5jb25jYXQoYW5pbWF0aW9uLmZyb20pKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvOiBfdGhpcy5nZXRQYXRoRnJvbUNvbW1hbmRzKFwiXCIuY29uY2F0KGFuaW1hdGlvbi50bykpXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoU1ZHX05BTUVTUEFDRSwgU1ZHX0VMRU1FTlRTLmFuaW1hdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWFuaW1hdGlvbi5lbGVtZW50LnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgX3RoaXMuZWxlbWVudC5hcHBlbmRDaGlsZChhbmltYXRpb24uZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF90aGlzLmFkZEFuaW1hdGlvbkJhc2ljUHJvcGVydGllcygnZCcsIGFuaW1hdGlvbik7XG4gICAgICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyhhbmltYXRpb24uZWxlbWVudCwgcHJvcGVydGllcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgSXNvbWV0cmljUGF0aC5wcm90b3R5cGUuZ2V0Q29tbWFuZHMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmNvbW1hbmRzO1xuICAgIH07XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1BhdGgucHJvdG90eXBlLCBcImF1dG9jbG9zZVwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2F1dG9jbG9zZTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHRoaXMuX2F1dG9jbG9zZSA9IHZhbHVlO1xuICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgfSxcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgIH0pO1xuICAgIElzb21ldHJpY1BhdGgucHJvdG90eXBlLnVwZGF0ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy51cGRhdGVHcmFwaGljKHVuZGVmaW5lZCwgdGhpcy5hdXRvY2xvc2UpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIElzb21ldHJpY1BhdGgucHJvdG90eXBlLmNsZWFyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLmNvbW1hbmRzLnNwbGljZSgwKTtcbiAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLmVsZW1lbnQsIHtcbiAgICAgICAgICAgIGQ6ICcnXG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9O1xuICAgIElzb21ldHJpY1BhdGgucHJvdG90eXBlLm1vdmVUbyA9IGZ1bmN0aW9uIChyaWdodCwgbGVmdCwgdG9wKSB7XG4gICAgICAgIHRoaXMuY29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICBjb21tYW5kOiBDb21tYW5kLm1vdmUsXG4gICAgICAgICAgICBwb2ludDogeyByOiByaWdodCwgbDogbGVmdCwgdDogdG9wIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHRoaXMudXBkYXRlKCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH07XG4gICAgSXNvbWV0cmljU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6IDAsXG4gICAgICAgICAgICByb3RhdGlvbjogMCxcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5hbmltYXRpb25zLmZvckVhY2goZnVuY3Rpb24gKGFuaW1hdGlvbikge1xuICAgICAgICAgICAgdmFyIGlzTmF0aXZlU1ZHUHJvcGVydHkgPSBpc1NWR1Byb3BlcnR5KGFuaW1hdGlvbi5wcm9wZXJ0eSk7XG4gICAgICAgICAgICBpZiAoIWlzTmF0aXZlU1ZHUHJvcGVydHkpIHtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHByb3BzLCBhbmltYXRpb24ucHJvcGVydHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0eV8xID0gYW5pbWF0aW9uLnByb3BlcnR5O1xuICAgICAgICAgICAgICAgICAgICB2YXIgaXNSb3RhdGlvbl8xID0gcHJvcGVydHlfMSA9PT0gJ3JvdGF0aW9uJztcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbW1vblByb3BzID0gX19hc3NpZ24oX19hc3NpZ24oe30sIF90aGlzLmNvbW1vbkFuaW1hdGlvbkF0dHJpYnV0ZXMpLCB7IHR5cGU6IGlzUm90YXRpb25fMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gJ3JvdGF0ZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICd0cmFuc2xhdGUnLCBiZWdpbjogJ2luZGVmaW5pdGUnIH0pO1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvcGVydGllcyA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFuaW1hdGlvbi52YWx1ZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFuaW1hdGlvbi52YWx1ZXMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IF9fYXNzaWduKHsgdmFsdWVzOiBhbmltYXRpb24udmFsdWVzLm1hcChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1JvdGF0aW9uXzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJcIi5jb25jYXQodmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1vZGlmaWVkQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kaWZpZWRBcmdzW3Byb3BlcnR5XzFdID0gK3ZhbHVlIC0gX3RoaXNbcHJvcGVydHlfMV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvb3JkcyA9IF90aGlzLmdldFBvc2l0aW9uVHJhbnNmb3JtKG1vZGlmaWVkQXJncywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcIlwiLmNvbmNhdChjb29yZHMueCwgXCIsXCIpLmNvbmNhdChjb29yZHMueSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLmpvaW4oJzsnKSB9LCBjb21tb25Qcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNSb3RhdGlvbl8xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSBfX2Fzc2lnbih7IHZhbHVlczogXCJcIi5jb25jYXQoYW5pbWF0aW9uLnZhbHVlcykgfSwgY29tbW9uUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1vZGlmaWVkQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGlmaWVkQXJnc1twcm9wZXJ0eV8xXSA9ICthbmltYXRpb24udmFsdWVzIC0gX3RoaXNbcHJvcGVydHlfMV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb29yZHMgPSBfdGhpcy5nZXRQb3NpdGlvblRyYW5zZm9ybShtb2RpZmllZEFyZ3MsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA9IF9fYXNzaWduKHsgdmFsdWVzOiBcIlwiLmNvbmNhdChjb29yZHMueCwgXCIsXCIpLmNvbmNhdChjb29yZHMueSkgfSwgY29tbW9uUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1JvdGF0aW9uXzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzID0gX19hc3NpZ24oeyBmcm9tOiBcIlwiLmNvbmNhdChhbmltYXRpb24uZnJvbSksIHRvOiBcIlwiLmNvbmNhdChhbmltYXRpb24udG8pIH0sIGNvbW1vblByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmcm9tQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvQXJncyA9IF9fYXNzaWduKHt9LCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbUFyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLmZyb20gLSBfdGhpc1twcm9wZXJ0eV8xXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b0FyZ3NbcHJvcGVydHlfMV0gPSArYW5pbWF0aW9uLnRvIC0gX3RoaXNbcHJvcGVydHlfMV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvb3Jkc0Zyb20gPSBfdGhpcy5nZXRQb3NpdGlvblRyYW5zZm9ybShmcm9tQXJncywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb29yZHNUbyA9IF90aGlzLmdldFBvc2l0aW9uVHJhbnNmb3JtKHRvQXJncywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgPSBfX2Fzc2lnbih7IGZyb206IFwiXCIuY29uY2F0KGNvb3Jkc0Zyb20ueCwgXCIsXCIpLmNvbmNhdChjb29yZHNGcm9tLnkpLCB0bzogXCJcIi5jb25jYXQoY29vcmRzVG8ueCwgXCIsXCIpLmNvbmNhdChjb29yZHNUby55KSB9LCBjb21tb25Qcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhbmltYXRpb24uZWxlbWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uLmVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoU1ZHX05BTUVTUEFDRSwgU1ZHX0VMRU1FTlRTLmFuaW1hdGVUcmFuc2Zvcm0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmFkZEFuaW1hdGlvbkJhc2ljUHJvcGVydGllcygndHJhbnNmb3JtJywgYW5pbWF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyhhbmltYXRpb24uZWxlbWVudCwgcHJvcGVydGllcyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghYW5pbWF0aW9uLmVsZW1lbnQucGFyZW50Tm9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzUm90YXRpb25fMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLl90ZXh0RWxlbWVudC5hcHBlbmRDaGlsZChhbmltYXRpb24uZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKGFuaW1hdGlvbi5lbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cucmVxdWVzdEFuaW1hdGlvbkZyYW1lKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi5lbGVtZW50LmJlZ2luRWxlbWVudCgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgSXNvbWV0cmljVGV4dC5wcm90b3R5cGUudXBkYXRlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAoZWxlbWVudEhhc1NWR1BhcmVudCh0aGlzLmVsZW1lbnQpKSB7XG4gICAgICAgICAgICB2YXIgdHJhbnNmb3JtID0gdGhpcy5nZXRNYXRyaXhUcmFuc2Zvcm0o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iAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljVGV4dC5wcm90b3R5cGUsIFwicGxhbmVWaWV3XCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fcGxhbmVWaWV3O1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5fcGxhbmVWaWV3ID0gdmFsdWU7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1RleHQucHJvdG90eXBlLCBcImZvbnRGYW1pbHlcIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9mb250RmFtaWx5O1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5fZm9udEZhbWlseSA9IHZhbHVlO1xuICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLl90c3Bhbiwge1xuICAgICAgICAgICAgICAgICdmb250LWZhbWlseSc6IHRoaXMuX2ZvbnRGYW1pbHlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgfSk7XG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KElzb21ldHJpY1RleHQucHJvdG90eXBlLCBcImZvbnRTaXplXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9udFNpemU7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLl9mb250U2l6ZSA9IHZhbHVlO1xuICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLl90c3Bhbiwge1xuICAgICAgICAgICAgICAgICdmb250LXNpemUnOiBcIlwiLmNvbmNhdCh0aGlzLl9mb250U2l6ZSwgXCJweFwiKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljVGV4dC5wcm90b3R5cGUsIFwiZm9udFN0eWxlXCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9udFN0eWxlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5fZm9udFN0eWxlID0gdmFsdWU7XG4gICAgICAgICAgICBhZGRTVkdQcm9wZXJ0aWVzKHRoaXMuX3RzcGFuLCB7XG4gICAgICAgICAgICAgICAgJ2ZvbnQtc3R5bGUnOiBcIlwiLmNvbmNhdCh0aGlzLl9mb250U3R5bGUpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgIH0pO1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc29tZXRyaWNUZXh0LnByb3RvdHlwZSwgXCJmb250V2VpZ2h0XCIsIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fZm9udFdlaWdodDtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIHRoaXMuX2ZvbnRXZWlnaHQgPSB2YWx1ZTtcbiAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXModGhpcy5fdHNwYW4sIHtcbiAgICAgICAgICAgICAgICAnZm9udC13ZWlnaHQnOiBcIlwiLmNvbmNhdCh0aGlzLl9mb250V2VpZ2h0KVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSXNvbWV0cmljVGV4dC5wcm90b3R5cGUsIFwic2VsZWN0YWJsZVwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3NlbGVjdGFibGU7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLl9zZWxlY3RhYmxlID0gdmFsdWU7XG4gICAgICAgICAgICBpZiAodGhpcy5fc2VsZWN0YWJsZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuX3RleHRFbGVtZW50LnJlbW92ZUF0dHJpYnV0ZSgnc3R5bGUnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGFkZFNWR1Byb3BlcnRpZXModGhpcy5fdGV4dEVsZW1lbnQsIHtcbiAgICAgICAgICAgICAgICAgICAgc3R5bGU6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICctd2Via2l0LXVzZXItc2VsZWN0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICctbW96LXVzZXItc2VsZWN0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICctbXMtdXNlci1zZWxlY3QnLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3VzZXItc2VsZWN0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICdwb2ludGVyLWV2ZW50cydcbiAgICAgICAgICAgICAgICAgICAgXS5tYXAoZnVuY3Rpb24gKGRlY2wpIHsgcmV0dXJuIFwiXCIuY29uY2F0KGRlY2wsIFwiOiBub25lXCIpOyB9KS5qb2luKCc7JylcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgIH0pO1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc29tZXRyaWNUZXh0LnByb3RvdHlwZSwgXCJvcmlnaW5cIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9vcmlnaW47XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLl9vcmlnaW4gPSB2YWx1ZTtcbiAgICAgICAgICAgIHZhciBfYSA9IHRoaXMuX29yaWdpbiwgdGV4dEFuY2hvciA9IF9hWzBdLCBhbGlnbm1lbnRCYXNlbGluZSA9IF9hWzFdO1xuICAgICAgICAgICAgYWRkU1ZHUHJvcGVydGllcyh0aGlzLl90c3Bhbiwge1xuICAgICAgICAgICAgICAgICd0ZXh0LWFuY2hvcic6IHRoaXMuX29yaWdpbkhhc2hbdGV4dEFuY2hvcl0sXG4gICAgICAgICAgICAgICAgJ2FsaWdubWVudC1iYXNlbGluZSc6IHRoaXMuX29yaWdpbkhhc2hbYWxpZ25tZW50QmFzZWxpbmVdXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ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Y3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3RvcDtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0OiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl90b3AgIT09IHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fdG9wID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgIH0pO1xuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShJc29tZXRyaWNUZXh0LnByb3RvdHlwZSwgXCJyb3RhdGlvblwiLCB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JvdGF0aW9uO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuX3JvdGF0aW9uICE9PSB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuX3JvdGF0aW9uID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgIH0pO1xuICAgIHJldHVybiBJc29tZXRyaWNUZXh0O1xufShJc29tZXRyaWNHcmFwaGljQWJzdHJhY3QpKTtcbmV4cG9ydCB7IElzb21ldHJpY1RleHQgfTtcbiIsImV4cG9ydCB7IElzb21ldHJpY1RleHQgfSBmcm9tICcuL0lzb21ldHJpY1RleHQnO1xuIiwiZXhwb3J0IHsgTGluZUNhcCwgTGluZUpvaW4sIFBs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ICAgbGFiZWxbcHJvcGVydHldID0gMTtcbiAgICAgICAgbGFiZWwudGV4dCA9IGAke3Byb3BlcnR5LnRvVXBwZXJDYXNlKCl9IDDCumA7XG5cbiAgICAgICAgZmFjZS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsICgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHJvdGF0aW9uID0gbGFiZWwucm90YXRpb24gKyA0NTtcbiAgICAgICAgICAgIGxhYmVsLnJvdGF0aW9uID0gcm90YXRpb24gPT09IDM2MCA/IDAgOiByb3RhdGlvbjtcbiAgICAgICAgICAgIGxhYmVsLnRleHQgPSBsYWJlbC50ZXh0LnJlcGxhY2UoL1xcZCsvLCBsYWJlbC5yb3RhdGlvbik7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGN1YmUuYWRkQ2hpbGQocGllY2UuZmFjZSk7XG4gICAgICAgIGN1YmUuYWRkQ2hpbGQocGllY2UubGFiZWwpO1xuICAgIH0pO1xuXG59OyIsImV4cG9ydCBkZWZhdWx0ICggSXNvbWV0cmljTW9kdWxlLCBjb250YWluZXIgKSA9PiB7XG5cbiAgICBjb25zdCB7IElzb21ldHJpY0NhbnZhcywgSXNvbWV0cmljR3JvdXAsIElzb21ldHJpY1BhdGggfSA9IElzb21ldHJpY01vZHVsZTtcblxuICAgIGNvbnN0IGlzb21ldHJpYyA9IG5ldyBJc29tZXRyaWNDYW52YXMoe1xuICAgICAgICBjb250YWluZXIsXG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogJyNDQ0MnLFxuICAgICAgICBzY2FsZTogMTIwLFxuICAgICAgICB3aWR0aDogNTAwLFxuICAgICAgICBoZWlnaHQ6IDMyMFxuICAgIH0pO1xuXG4gICAgY29uc3QgYm90dG9tVCA9IG5ldyBJc29tZXRyaWNQYXRoKCk7XG4gICAgY29uc3QgYm90dG9tUiA9IG5ldyBJc29tZXRyaWNQYXRoKCk7XG4gICAgY29uc3QgYm90dG9tTCA9IG5ldyBJc29tZXRyaWNQ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BwZXIpO1xuICAgICAgICBkZW1vLmFwcGVuZENoaWxkKGNvbnRhaW5lcik7XG4gICAgICAgIGRlbW8uYXBwZW5kQ2hpbGQoZnVuY3Rpb1RvU3RyaW5nKG1vZHVsZSkpO1xuICAgIH0pO1xuXG59KTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///741\n')},966:(module,exports)=>{eval('var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!function(){var r=null;\n(function(){function X(e){function j(){try{J.doScroll("left")}catch(e){P(j,50);return}w("poll")}function w(j){if(!(j.type=="readystatechange"&&x.readyState!="complete")&&((j.type=="load"?n:x)[z](i+j.type,w,!1),!m&&(m=!0)))e.call(n,j.type||j)}var Y=x.addEventListener,m=!1,C=!0,t=Y?"addEventListener":"attachEvent",z=Y?"removeEventListener":"detachEvent",i=Y?"":"on";if(x.readyState=="complete")e.call(n,"lazy");else{if(x.createEventObject&&J.doScroll){try{C=!n.frameElement}catch(A){}C&&j()}x[t](i+"DOMContentLoaded",\nw,!1);x[t](i+"readystatechange",w,!1);n[t](i+"load",w,!1)}}function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j=0;){var M=A[m],T=M.src.match(/^[^#?]*\\/run_prettify\\.js(\\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||"";M.parentNode.removeChild(M);break}}var S=!0,D=\n[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j=="autorun"?S=!/^[0fn]/i.test(w):j=="lang"?D.push(w):j=="skin"?N.push(w):j=="callback"&&K.push(w)});m=0;for(z=D.length;m122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f,a){return f[0]-\na[0]||a[1]-f[1]});b=[];g=[];for(a=0;ak[0]&&(k[1]+1>k[0]&&c.push("-"),c.push(h(k[1])));c.push("]");return c.join("")}function e(f){for(var a=f.source.match(/\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*]|\\\\u[\\dA-Fa-f]{4}|\\\\x[\\dA-Fa-f]{2}|\\\\\\d+|\\\\[^\\dux]|\\(\\?[!:=]|[()^]|[^()[\\\\^]+/g),c=a.length,d=[],g=0,k=0;g=2&&f==="["?a[g]=b(o):f!=="\\\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I=5&&"lang-"===y.substring(0,5))&&!(u&&typeof u[1]==="string"))g=!1,y="src";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h,j);n(l+k+o,g,A(y,\ng),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c=0;)b[q.charAt(f)]=m;m=m[1];q=""+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\\S\\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:\'\'\'(?:[^\'\\\\]|\\\\[\\S\\s]|\'\'?(?=[^\']))*(?:\'\'\'|$)|"""(?:[^"\\\\]|\\\\[\\S\\s]|""?(?=[^"]))*(?:"""|$)|\'(?:[^\'\\\\]|\\\\[\\S\\s])*(?:\'|$)|"(?:[^"\\\\]|\\\\[\\S\\s])*(?:"|$))/,\nr,"\'\\""]):a.multiLineStrings?d.push(["str",/^(?:\'(?:[^\'\\\\]|\\\\[\\S\\s])*(?:\'|$)|"(?:[^"\\\\]|\\\\[\\S\\s])*(?:"|$)|`(?:[^\\\\`]|\\\\[\\S\\s])*(?:`|$))/,r,"\'\\"`"]):d.push(["str",/^(?:\'(?:[^\\n\\r\'\\\\]|\\\\.)*(?:\'|$)|"(?:[^\\n\\r"\\\\]|\\\\.)*(?:"|$))/,r,"\\"\'"]);a.verbatimStrings&&h.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\\b|[^\\n\\r]*)/,\nr,"#"]),h.push(["str",/^<(?:(?:(?:\\.\\.\\/)*|\\/?)(?:[\\w-]+(?:\\/[\\w-]+)+)?[\\w-]+\\.h(?:h|pp|\\+\\+)?|[a-z]\\w*)>/,r])):d.push(["com",/^#[^\\n\\r]*/,r,"#"]));a.cStyleComments&&(h.push(["com",/^\\/\\/[^\\n\\r]*/,r]),h.push(["com",/^\\/\\*[\\S\\s]*?(?:\\*\\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?"":"\\n\\r")?".":"[\\\\S\\\\s]";h.push(["lang-regex",RegExp("^(?:^^\\\\.?|[+-]|[!=]=?=?|\\\\#|%=?|&&?=?|\\\\(|\\\\*=?|[+\\\\-]=|->|\\\\/=?|::?|<>?>?=?|,|;|\\\\?|@|\\\\[|~|{|\\\\^\\\\^?=?|\\\\|\\\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\\\s*("+\n("/(?=[^/*"+b+"])(?:[^/\\\\x5B\\\\x5C"+b+"]|\\\\x5C"+e+"|\\\\x5B(?:[^\\\\x5C\\\\x5D"+b+"]|\\\\x5C"+e+")*(?:\\\\x5D|$))+/")+")")])}(b=a.types)&&h.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&h.push(["kwd",RegExp("^(?:"+b.replace(/[\\s,]+/g,"|")+")\\\\b"),r]);d.push(["pln",/^\\s+/,r," \\r\\n\\t\\u00a0"]);b="^.[^\\\\s\\\\w.$@\'\\"`/\\\\\\\\]*";a.regexLiterals&&(b+="(?!s*/)");h.push(["lit",/^@[$_a-z][\\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\\w$@]*|\\w+_t\\b)/,r],["pln",/^[$_a-z][\\w$@]*/i,r],["lit",/^(?:0x[\\da-f]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+-]?\\d+)?)[a-z]*/i,\nr,"0123456789"],["pln",/^\\\\[\\S\\s]?/,r],["pun",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}}\nfunction e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\\s)nocode(?:\\s|$)/,m=/\\r\\n?|\\n/,l=a.ownerDocument,i=l.createElement("li");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn("cannot override language handler %s",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\\s*=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=["break,continue,do,else,for,if,return,while"],O=[[G,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],\n"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[O,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],K=[O,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],\nL=[K,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],O=[O,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],M=[G,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],\nN=[G,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],R=[G,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],G=[G,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\\d*)\\b/,\nS=/\\S/,T=t({keywords:[J,L,O,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,["default-code"]);i(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\\!--[\\S\\s]*?(?:--\\>|$)/],["lang-",/^<\\?([\\S\\s]+?)(?:\\?>|$)/],["lang-",/^<%([\\S\\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",\n/^]*>([\\S\\s]+?)<\\/xmp\\b[^>]*>/i],["lang-js",/^]*>([\\S\\s]*?)(<\\/script\\b[^>]*>)/i],["lang-css",/^]*>([\\S\\s]*?)(<\\/style\\b[^>]*>)/i],["lang-in.tag",/^(<\\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);i(C([["pln",/^\\s+/,r," \\t\\r\\n"],["atv",/^(?:"[^"]*"?|\'[^\']*\'?)/,r,"\\"\'"]],[["tag",/^^<\\/?[a-z](?:[\\w-.:]*\\w)?|\\/?>$/i],["atn",/^(?!style[\\s=]|on)[a-z](?:[\\w:-]*\\w)?/i],["lang-uq.val",/^=\\s*([^\\s"\'>]*(?:[^\\s"\'/>]|\\/(?=\\s)))/],["pun",/^[/<->]+/],\n["lang-js",/^on\\w+\\s*=\\s*"([^"]+)"/i],["lang-js",/^on\\w+\\s*=\\s*\'([^\']+)\'/i],["lang-js",/^on\\w+\\s*=\\s*([^\\s"\'>]+)/i],["lang-css",/^style\\s*=\\s*"([^"]+)"/i],["lang-css",/^style\\s*=\\s*\'([^\']+)\'/i],["lang-css",/^style\\s*=\\s*([^\\s"\'>]+)/i]]),["in.tag"]);i(C([],[["atv",/^[\\S\\s]+/]]),["uq.val"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]);i(t({keywords:"null,true,false"}),["json"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}),\n["cs"]);i(t({keywords:K,cStyleComments:!0}),["java"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);i(t({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);i(t({keywords:N,\nhashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);i(t({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);\ni(C([],[["str",/^[\\S\\s]+/]]),["regex"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,e){var b=document.createElement("div");b.innerHTML="
"+a+"
";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML},\nprettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p{for(var C in g)__webpack_require__.o(g,C)&&!__webpack_require__.o(I,C)&&Object.defineProperty(I,C,{enumerable:!0,get:g[C]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(I){if("object"==typeof window)return window}}(),__webpack_require__.o=(I,g)=>Object.prototype.hasOwnProperty.call(I,g),__webpack_require__.r=I=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(I,"__esModule",{value:!0})},(()=>{var I;__webpack_require__.g.importScripts&&(I=__webpack_require__.g.location+"");var g=__webpack_require__.g.document;if(!I&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(I=g.currentScript.src),!I)){var C=g.getElementsByTagName("script");if(C.length)for(var t=C.length-1;t>-1&&(!I||!/^http(s?):/.test(I));)I=C[t--].src}if(!I)throw new Error("Automatic publicPath is not supported in this browser");I=I.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=I+"../"})();var __webpack_exports__=__webpack_require__(741),__webpack_export_target__=window;for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__]=__webpack_exports__[__webpack_i__];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})(); \ No newline at end of file