commit f82d568788925701377459156d07dacbb2c18bd6 Author: TorgaW Date: Tue Apr 9 16:39:10 2024 +0300 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da93220 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/node_modules/ +/public/build/ + +.DS_Store diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..54d7873 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "cSpell.words": [ + "Alea", + "amogus", + "PIXI" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d488b3c --- /dev/null +++ b/README.md @@ -0,0 +1,107 @@ +# This repo is no longer maintained. Consider using `npm init vite` and selecting the `svelte` option or — if you want a full-fledged app framework — use [SvelteKit](https://kit.svelte.dev), the official application framework for Svelte. + +--- + +# svelte app + +This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template. + +To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit): + +```bash +npx degit sveltejs/template svelte-app +cd svelte-app +``` + +*Note that you will need to have [Node.js](https://nodejs.org) installed.* + + +## Get started + +Install the dependencies... + +```bash +cd svelte-app +npm install +``` + +...then start [Rollup](https://rollupjs.org): + +```bash +npm run dev +``` + +Navigate to [localhost:8080](http://localhost:8080). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes. + +By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`. + +If you're using [Visual Studio Code](https://code.visualstudio.com/) we recommend installing the official extension [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense. + +## Building and running in production mode + +To create an optimised version of the app: + +```bash +npm run build +``` + +You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com). + + +## Single-page app mode + +By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere. + +If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json: + +```js +"start": "sirv public --single" +``` + +## Using TypeScript + +This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with: + +```bash +node scripts/setupTypeScript.js +``` + +Or remove the script via: + +```bash +rm scripts/setupTypeScript.js +``` + +If you want to use `baseUrl` or `path` aliases within your `tsconfig`, you need to set up `@rollup/plugin-alias` to tell Rollup to resolve the aliases. For more info, see [this StackOverflow question](https://stackoverflow.com/questions/63427935/setup-tsconfig-path-in-svelte). + +## Deploying to the web + +### With [Vercel](https://vercel.com) + +Install `vercel` if you haven't already: + +```bash +npm install -g vercel +``` + +Then, from within your project folder: + +```bash +cd public +vercel deploy --name my-project +``` + +### With [surge](https://surge.sh/) + +Install `surge` if you haven't already: + +```bash +npm install -g surge +``` + +Then, from within your project folder: + +```bash +npm run build +surge public my-project.surge.sh +``` diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..dbcffc4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2553 @@ +{ + "name": "svelte-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "svelte-app", + "version": "1.0.0", + "dependencies": { + "@rollup/plugin-typescript": "^11.1.6", + "alea": "^1.0.1", + "howler": "^2.2.4", + "mathjs": "^12.4.1", + "noisejs": "^2.1.0", + "sirv-cli": "^2.0.0", + "svelte-preprocess": "^5.1.3" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-node-resolve": "^15.0.0", + "@rollup/plugin-terser": "^0.4.0", + "@tsconfig/svelte": "^5.0.4", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "rollup": "^3.15.0", + "rollup-plugin-css-only": "^4.3.0", + "rollup-plugin-livereload": "^2.0.0", + "rollup-plugin-svelte": "^7.1.2", + "svelte": "^3.55.0", + "tailwindcss": "^3.4.1", + "tslib": "^2.6.2" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@babel/runtime": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", + "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.25", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==" + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz", + "integrity": "sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "glob": "^8.0.3", + "is-reference": "1.2.1", + "magic-string": "^0.27.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.2.1", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "dev": true, + "dependencies": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", + "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@tsconfig/svelte": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-5.0.4.tgz", + "integrity": "sha512-BV9NplVgLmSi4mwKzD8BD/NQ8erOY/nUE/GpgWe2ckx+wIQF5RyRirn/QsSSCPeulVpc3RA/iJt6DpfTIZps0Q==", + "dev": true + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, + "node_modules/@types/pug": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.10.tgz", + "integrity": "sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==" + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/alea": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/alea/-/alea-1.0.1.tgz", + "integrity": "sha512-QU+wv+ziDXaMxRdsQg/aH7sVfWdhKps5YP97IIwFkHCsbDZA3k87JXoZ5/iuemf4ntytzIWeScrRpae8+lDrXA==" + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/autoprefixer": { + "version": "10.4.19", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", + "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001599", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/autoprefixer/node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001605", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", + "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "node_modules/complex.js": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.1.1.tgz", + "integrity": "sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg==", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/console-clear": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", + "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.723", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.723.tgz", + "integrity": "sha512-rxFVtrMGMFROr4qqU6n95rUi9IlfIm+lIAt+hOToy/9r6CDv0XiEcQdC3VP71y1pE5CFTzKV0RvxOGYCPWWHPw==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-latex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/escape-latex/-/escape-latex-1.2.0.tgz", + "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw==" + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fraction.js": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.4.tgz", + "integrity": "sha512-pwiTgt0Q7t+GHZA4yaLjObx4vXmmdcS0iSJ19o8d/goUGgItX9UZWKWNnLHehxviD8wU2IWRsnR8cD5+yOJP2Q==", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/howler": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.4.tgz", + "integrity": "sha512-iARIBPgcQrwtEr+tALF+rapJ8qSc+Set2GJQl7xT1MQzWaVkFebdJhR3alVlSiUf5U7nAANKuj3aWpwerocD5w==" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==" + }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/livereload": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz", + "integrity": "sha512-q7Z71n3i4X0R9xthAryBdNGVGAO2R5X+/xXpmKeuPMrteg+W2U8VusTKV3YiJbXZwKsOlFlHe+go6uSNjfxrZw==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.0", + "livereload-js": "^3.3.1", + "opts": ">= 1.2.0", + "ws": "^7.4.3" + }, + "bin": { + "livereload": "bin/livereload.js" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/livereload-js": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.4.1.tgz", + "integrity": "sha512-5MP0uUeVCec89ZbNOT/i97Mc+q3SxXmiUGhRFOTmhrGPn//uWVQdCvcLJDy64MSBR5MidFdOR7B9viumoavy6g==", + "dev": true + }, + "node_modules/local-access": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.1.0.tgz", + "integrity": "sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mathjs": { + "version": "12.4.1", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-12.4.1.tgz", + "integrity": "sha512-welnW3khgwYjPYvECFHO+xkCxAx9IKIIPDDWPi8B5rKAvmgoEHnQX9slEmHKZTNaJiE+OS4qrJJcB4sfDn/4sw==", + "dependencies": { + "@babel/runtime": "^7.24.0", + "complex.js": "^2.1.1", + "decimal.js": "^10.4.3", + "escape-latex": "^1.2.0", + "fraction.js": "4.3.4", + "javascript-natural-sort": "^0.7.1", + "seedrandom": "^3.0.5", + "tiny-emitter": "^2.1.0", + "typed-function": "^4.1.1" + }, + "bin": { + "mathjs": "bin/cli.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "engines": { + "node": ">=10" + } + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "devOptional": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/noisejs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/noisejs/-/noisejs-2.1.0.tgz", + "integrity": "sha512-sw39KaUS2YBta6apZ0/H+nnCsUyxT/ZRxgv/HnDxx6pWO2e2nUmWgLhpOaQdlxxkFepIpxDrlXy3fHVx0S3SLg==" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/opts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", + "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", + "dev": true + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-scurry": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "devOptional": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "devOptional": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "devOptional": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-load-config/node_modules/lilconfig": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", + "devOptional": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/postcss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", + "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.11" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.16", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", + "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "devOptional": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-css-only": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-css-only/-/rollup-plugin-css-only-4.5.2.tgz", + "integrity": "sha512-7rj9+jB17Pz8LNcPgtMUb16JcgD8lxQMK9HcGfAVhMK3na/WXes3oGIo5QsrQQVqtgAU6q6KnQNXJrYunaUIQQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "5" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "rollup": "<5" + } + }, + "node_modules/rollup-plugin-livereload": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-2.0.5.tgz", + "integrity": "sha512-vqQZ/UQowTW7VoiKEM5ouNW90wE5/GZLfdWuR0ELxyKOJUIaj+uismPZZaICU4DnWPVjnpCDDxEqwU7pcKY/PA==", + "dev": true, + "dependencies": { + "livereload": "^0.9.1" + }, + "engines": { + "node": ">=8.3" + } + }, + "node_modules/rollup-plugin-svelte": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-7.2.0.tgz", + "integrity": "sha512-Qvo5VNFQZtaI+sHSjcCIFDP+olfKVyslAoJIkL3DxuhUpNY5Ys0+hhxUY3kuEKt9BXFgkFJiiic/XRb07zdSbg==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^4.1.0", + "resolve.exports": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "rollup": ">=2.0.0", + "svelte": ">=3.5.0" + } + }, + "node_modules/rollup-plugin-svelte/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==", + "dependencies": { + "es6-promise": "^3.1.2", + "graceful-fs": "^4.1.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.2" + } + }, + "node_modules/seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" + }, + "node_modules/semiver": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz", + "integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sirv-cli": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-2.0.2.tgz", + "integrity": "sha512-OtSJDwxsF1NWHc7ps3Sa0s+dPtP15iQNJzfKVz+MxkEo3z72mCD+yu30ct79rPr0CaV1HXSOBp+MIY5uIhHZ1A==", + "dependencies": { + "console-clear": "^1.1.0", + "get-port": "^3.2.0", + "kleur": "^4.1.4", + "local-access": "^1.0.1", + "sade": "^1.6.0", + "semiver": "^1.0.0", + "sirv": "^2.0.0", + "tinydate": "^1.0.0" + }, + "bin": { + "sirv": "bin.js" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/smob": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", + "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", + "dev": true + }, + "node_modules/sorcery": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz", + "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.14", + "buffer-crc32": "^0.2.5", + "minimist": "^1.2.0", + "sander": "^0.5.0" + }, + "bin": { + "sorcery": "bin/sorcery" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "devOptional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svelte": { + "version": "3.59.2", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz", + "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/svelte-preprocess": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.3.tgz", + "integrity": "sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==", + "hasInstallScript": true, + "dependencies": { + "@types/pug": "^2.0.6", + "detect-indent": "^6.1.0", + "magic-string": "^0.30.5", + "sorcery": "^0.11.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">= 16.0.0", + "pnpm": "^8.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.10.2", + "coffeescript": "^2.5.1", + "less": "^3.11.3 || ^4.0.0", + "postcss": "^7 || ^8", + "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", + "pug": "^3.0.0", + "sass": "^1.26.8", + "stylus": "^0.55.0", + "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", + "svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0", + "typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "coffeescript": { + "optional": true + }, + "less": { + "optional": true + }, + "postcss": { + "optional": true + }, + "postcss-load-config": { + "optional": true + }, + "pug": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/svelte-preprocess/node_modules/magic-string": { + "version": "0.30.8", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", + "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==", + "dev": true, + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.0", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.0", + "lilconfig": "^2.1.0", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.23", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.1", + "postcss-nested": "^6.0.1", + "postcss-selector-parser": "^6.0.11", + "resolve": "^1.22.2", + "sucrase": "^3.32.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tailwindcss/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/terser": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.0.tgz", + "integrity": "sha512-Y/SblUl5kEyEFzhMAQdsxVHh+utAxd4IuRNJzKywY/4uzSogh3G219jqbDDxYu4MXO9CzY3tSEqmZvW6AoEDJw==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + }, + "node_modules/tinydate": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz", + "integrity": "sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "devOptional": true + }, + "node_modules/typed-function": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.1.1.tgz", + "integrity": "sha512-Pq1DVubcvibmm8bYcMowjVnnMwPVMeh0DIdA8ad8NZY2sJgapANJmiigSUwlt+EgXxpfIv8MWrQXTIzkfYZLYQ==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/typescript": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yaml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", + "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "devOptional": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..bddcafd --- /dev/null +++ b/package.json @@ -0,0 +1,35 @@ +{ + "name": "svelte-app", + "version": "1.0.0", + "private": true, + "type": "module", + "scripts": { + "build": "rollup -c", + "dev": "rollup -c -w", + "start": "sirv public --no-clear" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-node-resolve": "^15.0.0", + "@rollup/plugin-terser": "^0.4.0", + "@tsconfig/svelte": "^5.0.4", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "rollup": "^3.15.0", + "rollup-plugin-css-only": "^4.3.0", + "rollup-plugin-livereload": "^2.0.0", + "rollup-plugin-svelte": "^7.1.2", + "svelte": "^3.55.0", + "tailwindcss": "^3.4.1", + "tslib": "^2.6.2" + }, + "dependencies": { + "@rollup/plugin-typescript": "^11.1.6", + "alea": "^1.0.1", + "howler": "^2.2.4", + "mathjs": "^12.4.1", + "noisejs": "^2.1.0", + "sirv-cli": "^2.0.0", + "svelte-preprocess": "^5.1.3" + } +} diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 0000000..e582628 --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + plugins: [ + require('tailwindcss')('./tailwind.config.js'), + require('autoprefixer') + ], + }; \ No newline at end of file diff --git a/public/assets/images/amogus.png b/public/assets/images/amogus.png new file mode 100644 index 0000000..2110d7c Binary files /dev/null and b/public/assets/images/amogus.png differ diff --git a/public/assets/images/amogus_b.png b/public/assets/images/amogus_b.png new file mode 100644 index 0000000..9135811 Binary files /dev/null and b/public/assets/images/amogus_b.png differ diff --git a/public/assets/images/amogus_g.png b/public/assets/images/amogus_g.png new file mode 100644 index 0000000..2672910 Binary files /dev/null and b/public/assets/images/amogus_g.png differ diff --git a/public/assets/images/amogus_gb.png b/public/assets/images/amogus_gb.png new file mode 100644 index 0000000..f62fef4 Binary files /dev/null and b/public/assets/images/amogus_gb.png differ diff --git a/public/assets/images/amogus_p.png b/public/assets/images/amogus_p.png new file mode 100644 index 0000000..4387752 Binary files /dev/null and b/public/assets/images/amogus_p.png differ diff --git a/public/assets/images/buildings/buildings.png b/public/assets/images/buildings/buildings.png new file mode 100644 index 0000000..02c8c2b Binary files /dev/null and b/public/assets/images/buildings/buildings.png differ diff --git a/public/assets/images/selection.png b/public/assets/images/selection.png new file mode 100644 index 0000000..ef098cd Binary files /dev/null and b/public/assets/images/selection.png differ diff --git a/public/assets/images/world/vegetation_ts.png b/public/assets/images/world/vegetation_ts.png new file mode 100644 index 0000000..2b6fb6a Binary files /dev/null and b/public/assets/images/world/vegetation_ts.png differ diff --git a/public/assets/images/world/world_terrain_atlas.png b/public/assets/images/world/world_terrain_atlas.png new file mode 100644 index 0000000..cc53d21 Binary files /dev/null and b/public/assets/images/world/world_terrain_atlas.png differ diff --git a/public/assets/sound/chip_loop.mp3 b/public/assets/sound/chip_loop.mp3 new file mode 100644 index 0000000..b736588 Binary files /dev/null and b/public/assets/sound/chip_loop.mp3 differ diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..7e6f5eb Binary files /dev/null and b/public/favicon.png differ diff --git a/public/global.css b/public/global.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/public/global.css @@ -0,0 +1 @@ + diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..fdc713e --- /dev/null +++ b/public/index.html @@ -0,0 +1,21 @@ + + + + + + + Amogus factory + + + + + + + + + + + + + + diff --git a/resources/MiniWorldSprites/AllAssetsPreview.png b/resources/MiniWorldSprites/AllAssetsPreview.png new file mode 100644 index 0000000..013d2ec Binary files /dev/null and b/resources/MiniWorldSprites/AllAssetsPreview.png differ diff --git a/resources/MiniWorldSprites/Animals/Boar.png b/resources/MiniWorldSprites/Animals/Boar.png new file mode 100644 index 0000000..5f7af6c Binary files /dev/null and b/resources/MiniWorldSprites/Animals/Boar.png differ diff --git a/resources/MiniWorldSprites/Animals/Chick.png b/resources/MiniWorldSprites/Animals/Chick.png new file mode 100644 index 0000000..a54038f Binary files /dev/null and b/resources/MiniWorldSprites/Animals/Chick.png differ diff --git a/resources/MiniWorldSprites/Animals/Chicken.png b/resources/MiniWorldSprites/Animals/Chicken.png new file mode 100644 index 0000000..20b0253 Binary files /dev/null and b/resources/MiniWorldSprites/Animals/Chicken.png differ diff --git a/resources/MiniWorldSprites/Animals/HornedSheep.png b/resources/MiniWorldSprites/Animals/HornedSheep.png new file mode 100644 index 0000000..2508fad Binary files /dev/null and b/resources/MiniWorldSprites/Animals/HornedSheep.png differ diff --git a/resources/MiniWorldSprites/Animals/Horse(32x32).png b/resources/MiniWorldSprites/Animals/Horse(32x32).png new file mode 100644 index 0000000..62fdbd3 Binary files /dev/null and b/resources/MiniWorldSprites/Animals/Horse(32x32).png differ diff --git a/resources/MiniWorldSprites/Animals/MarineAnimals.png b/resources/MiniWorldSprites/Animals/MarineAnimals.png new file mode 100644 index 0000000..9d42f50 Binary files /dev/null and b/resources/MiniWorldSprites/Animals/MarineAnimals.png differ diff --git a/resources/MiniWorldSprites/Animals/Pig.png b/resources/MiniWorldSprites/Animals/Pig.png new file mode 100644 index 0000000..9d6c7b4 Binary files /dev/null and b/resources/MiniWorldSprites/Animals/Pig.png differ diff --git a/resources/MiniWorldSprites/Animals/Sheep.png b/resources/MiniWorldSprites/Animals/Sheep.png new file mode 100644 index 0000000..4e00eac Binary files /dev/null and b/resources/MiniWorldSprites/Animals/Sheep.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanBarracks.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanBarracks.png new file mode 100644 index 0000000..6fef590 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanBarracks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanChapels.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanChapels.png new file mode 100644 index 0000000..15b2640 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanChapels.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanDocks.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanDocks.png new file mode 100644 index 0000000..799c233 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanDocks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanHouses.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanHouses.png new file mode 100644 index 0000000..7f2e4eb Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanHouses.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanHuts.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanHuts.png new file mode 100644 index 0000000..2b043c2 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanHuts.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanKeep.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanKeep.png new file mode 100644 index 0000000..afdf4af Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanKeep.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanMarket.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanMarket.png new file mode 100644 index 0000000..bf2edb5 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanMarket.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanResources.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanResources.png new file mode 100644 index 0000000..cc98587 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanResources.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanShip.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanShip.png new file mode 100644 index 0000000..debd15b Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanShip.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanTaverns.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanTaverns.png new file mode 100644 index 0000000..0e59d6d Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanTaverns.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanTower.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanTower.png new file mode 100644 index 0000000..24bc167 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanTower.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanWell.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanWell.png new file mode 100644 index 0000000..73e56ce Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanWell.png differ diff --git a/resources/MiniWorldSprites/Buildings/Cyan/CyanWorkshops.png b/resources/MiniWorldSprites/Buildings/Cyan/CyanWorkshops.png new file mode 100644 index 0000000..b58373c Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Cyan/CyanWorkshops.png differ diff --git a/resources/MiniWorldSprites/Buildings/Enemy/Mausoleum.png b/resources/MiniWorldSprites/Buildings/Enemy/Mausoleum.png new file mode 100644 index 0000000..d2d59db Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Enemy/Mausoleum.png differ diff --git a/resources/MiniWorldSprites/Buildings/Enemy/Orc/AllBuildings-Preview.png b/resources/MiniWorldSprites/Buildings/Enemy/Orc/AllBuildings-Preview.png new file mode 100644 index 0000000..9caa104 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Enemy/Orc/AllBuildings-Preview.png differ diff --git a/resources/MiniWorldSprites/Buildings/Enemy/SpearWall.png b/resources/MiniWorldSprites/Buildings/Enemy/SpearWall.png new file mode 100644 index 0000000..43119fd Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Enemy/SpearWall.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeBarracks.png b/resources/MiniWorldSprites/Buildings/Lime/LimeBarracks.png new file mode 100644 index 0000000..5d737d1 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeBarracks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeChapels.png b/resources/MiniWorldSprites/Buildings/Lime/LimeChapels.png new file mode 100644 index 0000000..df2c207 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeChapels.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeDocks.png b/resources/MiniWorldSprites/Buildings/Lime/LimeDocks.png new file mode 100644 index 0000000..411bba7 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeDocks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeHouses.png b/resources/MiniWorldSprites/Buildings/Lime/LimeHouses.png new file mode 100644 index 0000000..9328c39 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeHouses.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeHuts.png b/resources/MiniWorldSprites/Buildings/Lime/LimeHuts.png new file mode 100644 index 0000000..7f605a5 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeHuts.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeKeep.png b/resources/MiniWorldSprites/Buildings/Lime/LimeKeep.png new file mode 100644 index 0000000..2f0caeb Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeKeep.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeMarket.png b/resources/MiniWorldSprites/Buildings/Lime/LimeMarket.png new file mode 100644 index 0000000..b8e315c Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeMarket.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeResources.png b/resources/MiniWorldSprites/Buildings/Lime/LimeResources.png new file mode 100644 index 0000000..4e1ead0 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeResources.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeShip.png b/resources/MiniWorldSprites/Buildings/Lime/LimeShip.png new file mode 100644 index 0000000..f1c6a8e Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeShip.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeTaverns.png b/resources/MiniWorldSprites/Buildings/Lime/LimeTaverns.png new file mode 100644 index 0000000..8e1e3ef Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeTaverns.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeTower.png b/resources/MiniWorldSprites/Buildings/Lime/LimeTower.png new file mode 100644 index 0000000..9e9942a Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeTower.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeWell.png b/resources/MiniWorldSprites/Buildings/Lime/LimeWell.png new file mode 100644 index 0000000..0d41506 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeWell.png differ diff --git a/resources/MiniWorldSprites/Buildings/Lime/LimeWorkshops.png b/resources/MiniWorldSprites/Buildings/Lime/LimeWorkshops.png new file mode 100644 index 0000000..b9c6570 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Lime/LimeWorkshops.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleBarracks.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleBarracks.png new file mode 100644 index 0000000..eec44a0 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleBarracks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleChapels.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleChapels.png new file mode 100644 index 0000000..06b2ad1 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleChapels.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleDocks.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleDocks.png new file mode 100644 index 0000000..d14f61f Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleDocks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleHouses.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleHouses.png new file mode 100644 index 0000000..7721199 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleHouses.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleHuts.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleHuts.png new file mode 100644 index 0000000..9404ff3 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleHuts.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleKeep.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleKeep.png new file mode 100644 index 0000000..cc4f974 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleKeep.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleMarket.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleMarket.png new file mode 100644 index 0000000..06f5560 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleMarket.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleResources.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleResources.png new file mode 100644 index 0000000..487b3c9 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleResources.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleShip.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleShip.png new file mode 100644 index 0000000..4762481 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleShip.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleTaverns.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleTaverns.png new file mode 100644 index 0000000..fdaa5b7 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleTaverns.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleTower.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleTower.png new file mode 100644 index 0000000..73337ae Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleTower.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleWell.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleWell.png new file mode 100644 index 0000000..259b61e Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleWell.png differ diff --git a/resources/MiniWorldSprites/Buildings/Purple/PurpleWorkshops.png b/resources/MiniWorldSprites/Buildings/Purple/PurpleWorkshops.png new file mode 100644 index 0000000..d0e1011 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Purple/PurpleWorkshops.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedBarracks.png b/resources/MiniWorldSprites/Buildings/Red/RedBarracks.png new file mode 100644 index 0000000..6477ca4 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedBarracks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedChapels.png b/resources/MiniWorldSprites/Buildings/Red/RedChapels.png new file mode 100644 index 0000000..afa8810 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedChapels.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedDocks.png b/resources/MiniWorldSprites/Buildings/Red/RedDocks.png new file mode 100644 index 0000000..061e389 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedDocks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedHouses.png b/resources/MiniWorldSprites/Buildings/Red/RedHouses.png new file mode 100644 index 0000000..2dbcdd3 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedHouses.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedHuts.png b/resources/MiniWorldSprites/Buildings/Red/RedHuts.png new file mode 100644 index 0000000..247c01b Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedHuts.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedKeep.png b/resources/MiniWorldSprites/Buildings/Red/RedKeep.png new file mode 100644 index 0000000..75dab45 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedKeep.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedMarket.png b/resources/MiniWorldSprites/Buildings/Red/RedMarket.png new file mode 100644 index 0000000..4ead015 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedMarket.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedResources.png b/resources/MiniWorldSprites/Buildings/Red/RedResources.png new file mode 100644 index 0000000..c6c9c21 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedResources.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedShip.png b/resources/MiniWorldSprites/Buildings/Red/RedShip.png new file mode 100644 index 0000000..08546da Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedShip.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedTaverns.png b/resources/MiniWorldSprites/Buildings/Red/RedTaverns.png new file mode 100644 index 0000000..4b35dda Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedTaverns.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedTower.png b/resources/MiniWorldSprites/Buildings/Red/RedTower.png new file mode 100644 index 0000000..f23295b Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedTower.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedWell.png b/resources/MiniWorldSprites/Buildings/Red/RedWell.png new file mode 100644 index 0000000..53dbef3 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedWell.png differ diff --git a/resources/MiniWorldSprites/Buildings/Red/RedWorkshops.png b/resources/MiniWorldSprites/Buildings/Red/RedWorkshops.png new file mode 100644 index 0000000..820b424 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Red/RedWorkshops.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Barracks.png b/resources/MiniWorldSprites/Buildings/Wood/Barracks.png new file mode 100644 index 0000000..a520070 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Barracks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/CaveV2.png b/resources/MiniWorldSprites/Buildings/Wood/CaveV2.png new file mode 100644 index 0000000..a0b326b Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/CaveV2.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Chapels.png b/resources/MiniWorldSprites/Buildings/Wood/Chapels.png new file mode 100644 index 0000000..3a81923 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Chapels.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Docks.png b/resources/MiniWorldSprites/Buildings/Wood/Docks.png new file mode 100644 index 0000000..22189d1 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Docks.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Houses.png b/resources/MiniWorldSprites/Buildings/Wood/Houses.png new file mode 100644 index 0000000..e703735 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Houses.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Huts.png b/resources/MiniWorldSprites/Buildings/Wood/Huts.png new file mode 100644 index 0000000..e3ede0a Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Huts.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Keep.png b/resources/MiniWorldSprites/Buildings/Wood/Keep.png new file mode 100644 index 0000000..a3fe097 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Keep.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Market.png b/resources/MiniWorldSprites/Buildings/Wood/Market.png new file mode 100644 index 0000000..2832e3e Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Market.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Resources.png b/resources/MiniWorldSprites/Buildings/Wood/Resources.png new file mode 100644 index 0000000..1bc688c Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Resources.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Taverns.png b/resources/MiniWorldSprites/Buildings/Wood/Taverns.png new file mode 100644 index 0000000..057b1a8 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Taverns.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Tower.png b/resources/MiniWorldSprites/Buildings/Wood/Tower.png new file mode 100644 index 0000000..f3cc863 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Tower.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Tower2.png b/resources/MiniWorldSprites/Buildings/Wood/Tower2.png new file mode 100644 index 0000000..10fcefb Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Tower2.png differ diff --git a/resources/MiniWorldSprites/Buildings/Wood/Workshops.png b/resources/MiniWorldSprites/Buildings/Wood/Workshops.png new file mode 100644 index 0000000..c236c10 Binary files /dev/null and b/resources/MiniWorldSprites/Buildings/Wood/Workshops.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Arthax.png b/resources/MiniWorldSprites/Characters/Champions/Arthax.png new file mode 100644 index 0000000..874334a Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Arthax.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Börg.png b/resources/MiniWorldSprites/Characters/Champions/Börg.png new file mode 100644 index 0000000..85008b1 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Börg.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Gangblanc.png b/resources/MiniWorldSprites/Characters/Champions/Gangblanc.png new file mode 100644 index 0000000..291181e Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Gangblanc.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Grum.png b/resources/MiniWorldSprites/Characters/Champions/Grum.png new file mode 100644 index 0000000..339e335 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Grum.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Kanji.png b/resources/MiniWorldSprites/Characters/Champions/Kanji.png new file mode 100644 index 0000000..23ec685 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Kanji.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Katan.png b/resources/MiniWorldSprites/Characters/Champions/Katan.png new file mode 100644 index 0000000..7699735 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Katan.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Okomo.png b/resources/MiniWorldSprites/Characters/Champions/Okomo.png new file mode 100644 index 0000000..01459f9 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Okomo.png differ diff --git a/resources/MiniWorldSprites/Characters/Champions/Zhinja.png b/resources/MiniWorldSprites/Characters/Champions/Zhinja.png new file mode 100644 index 0000000..30640e3 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Champions/Zhinja.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Demons/ArmouredRedDemon.png b/resources/MiniWorldSprites/Characters/Monsters/Demons/ArmouredRedDemon.png new file mode 100644 index 0000000..6671481 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Demons/ArmouredRedDemon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Demons/PurpleDemon.png b/resources/MiniWorldSprites/Characters/Monsters/Demons/PurpleDemon.png new file mode 100644 index 0000000..9dd91bb Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Demons/PurpleDemon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Demons/RedDemon.png b/resources/MiniWorldSprites/Characters/Monsters/Demons/RedDemon.png new file mode 100644 index 0000000..fba20e9 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Demons/RedDemon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Dragons/BlackDragon.png b/resources/MiniWorldSprites/Characters/Monsters/Dragons/BlackDragon.png new file mode 100644 index 0000000..d1d8c4d Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Dragons/BlackDragon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Dragons/BlueDragon.png b/resources/MiniWorldSprites/Characters/Monsters/Dragons/BlueDragon.png new file mode 100644 index 0000000..fbf46d5 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Dragons/BlueDragon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Dragons/RedDragon.png b/resources/MiniWorldSprites/Characters/Monsters/Dragons/RedDragon.png new file mode 100644 index 0000000..154416d Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Dragons/RedDragon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Dragons/WhiteDragon.png b/resources/MiniWorldSprites/Characters/Monsters/Dragons/WhiteDragon.png new file mode 100644 index 0000000..16cc2d5 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Dragons/WhiteDragon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Dragons/YellowDragon.png b/resources/MiniWorldSprites/Characters/Monsters/Dragons/YellowDragon.png new file mode 100644 index 0000000..831a772 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Dragons/YellowDragon.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Mammoth.png b/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Mammoth.png new file mode 100644 index 0000000..843afff Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Mammoth.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Wendigo.png b/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Wendigo.png new file mode 100644 index 0000000..6a83455 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Wendigo.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Yeti.png b/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Yeti.png new file mode 100644 index 0000000..c77d84c Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Frostborn/Yeti.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/GiantAnimals/GiantCrab.png b/resources/MiniWorldSprites/Characters/Monsters/GiantAnimals/GiantCrab.png new file mode 100644 index 0000000..b6c02a0 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/GiantAnimals/GiantCrab.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/ArcherGoblin.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/ArcherGoblin.png new file mode 100644 index 0000000..a6991fe Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/ArcherGoblin.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/ClubGoblin.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/ClubGoblin.png new file mode 100644 index 0000000..b59efa3 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/ClubGoblin.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/FarmerGoblin.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/FarmerGoblin.png new file mode 100644 index 0000000..f249b50 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/FarmerGoblin.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/KamikazeGoblin.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/KamikazeGoblin.png new file mode 100644 index 0000000..abded4d Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/KamikazeGoblin.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/Minotaur.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/Minotaur.png new file mode 100644 index 0000000..ac3a494 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/Minotaur.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/Orc.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/Orc.png new file mode 100644 index 0000000..bf5c7d7 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/Orc.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/OrcMage.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/OrcMage.png new file mode 100644 index 0000000..5220ea0 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/OrcMage.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/OrcShaman.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/OrcShaman.png new file mode 100644 index 0000000..b944d72 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/OrcShaman.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Orcs/SpearGoblin.png b/resources/MiniWorldSprites/Characters/Monsters/Orcs/SpearGoblin.png new file mode 100644 index 0000000..685da10 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Orcs/SpearGoblin.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateCaptain.png b/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateCaptain.png new file mode 100644 index 0000000..e21fcc3 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateCaptain.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateGrunt.png b/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateGrunt.png new file mode 100644 index 0000000..0764b6d Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateGrunt.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateGunner.png b/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateGunner.png new file mode 100644 index 0000000..4e72847 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Pirates/PirateGunner.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Slimes/KingSlimeBlue.png b/resources/MiniWorldSprites/Characters/Monsters/Slimes/KingSlimeBlue.png new file mode 100644 index 0000000..372b9cc Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Slimes/KingSlimeBlue.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Slimes/KingSlimeGreen.png b/resources/MiniWorldSprites/Characters/Monsters/Slimes/KingSlimeGreen.png new file mode 100644 index 0000000..2679cc7 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Slimes/KingSlimeGreen.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Slimes/MegaSlimeBlue.png b/resources/MiniWorldSprites/Characters/Monsters/Slimes/MegaSlimeBlue.png new file mode 100644 index 0000000..ca0bdbf Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Slimes/MegaSlimeBlue.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Slimes/MegaSlimeGreen.png b/resources/MiniWorldSprites/Characters/Monsters/Slimes/MegaSlimeGreen.png new file mode 100644 index 0000000..1802712 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Slimes/MegaSlimeGreen.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Slimes/Slime.png b/resources/MiniWorldSprites/Characters/Monsters/Slimes/Slime.png new file mode 100644 index 0000000..8c7f049 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Slimes/Slime.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Slimes/SlimeBlue.png b/resources/MiniWorldSprites/Characters/Monsters/Slimes/SlimeBlue.png new file mode 100644 index 0000000..8b2abd2 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Slimes/SlimeBlue.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Undead/Necromancer.png b/resources/MiniWorldSprites/Characters/Monsters/Undead/Necromancer.png new file mode 100644 index 0000000..e3e3345 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Undead/Necromancer.png differ diff --git a/resources/MiniWorldSprites/Characters/Monsters/Undead/Skeleton-Soldier.png b/resources/MiniWorldSprites/Characters/Monsters/Undead/Skeleton-Soldier.png new file mode 100644 index 0000000..ec0fb7f Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Monsters/Undead/Skeleton-Soldier.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/AssasinTemplate.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/AssasinTemplate.png new file mode 100644 index 0000000..d2dc544 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/AssasinTemplate.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/AxemanTemplate.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/AxemanTemplate.png new file mode 100644 index 0000000..73fc272 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/AxemanTemplate.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/AssasinCyan.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/AssasinCyan.png new file mode 100644 index 0000000..85ecf3a Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/AssasinCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/AxemanCyan.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/AxemanCyan.png new file mode 100644 index 0000000..66aff6c Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/AxemanCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/SpearmanCyan.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/SpearmanCyan.png new file mode 100644 index 0000000..8bd8647 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/SpearmanCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/SwordsmanCyan.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/SwordsmanCyan.png new file mode 100644 index 0000000..cf7a4bc Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/CyanMelee/SwordsmanCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/AssasinLime.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/AssasinLime.png new file mode 100644 index 0000000..a26edd9 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/AssasinLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/AxemanLime.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/AxemanLime.png new file mode 100644 index 0000000..7300a3a Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/AxemanLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/SpearmanLime.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/SpearmanLime.png new file mode 100644 index 0000000..391bc84 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/SpearmanLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/SwordsmanLime.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/SwordsmanLime.png new file mode 100644 index 0000000..5762ba2 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/LimeMelee/SwordsmanLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/AssasinPurple.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/AssasinPurple.png new file mode 100644 index 0000000..5aa5f2f Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/AssasinPurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/AxemanPurple.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/AxemanPurple.png new file mode 100644 index 0000000..4dfe2be Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/AxemanPurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/SpearmanPurple.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/SpearmanPurple.png new file mode 100644 index 0000000..0679e44 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/SpearmanPurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/SwordsmanPurple.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/SwordsmanPurple.png new file mode 100644 index 0000000..f1cb710 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/PurpleMelee/SwordsmanPurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/AssasinRed.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/AssasinRed.png new file mode 100644 index 0000000..1053f6e Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/AssasinRed.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/AxemanRed.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/AxemanRed.png new file mode 100644 index 0000000..8f1efde Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/AxemanRed.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/SpearmanRed.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/SpearmanRed.png new file mode 100644 index 0000000..6e65979 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/SpearmanRed.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/SwordsmanRed.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/SwordsmanRed.png new file mode 100644 index 0000000..0af485a Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/RedMelee/SwordsmanRed.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/SpearmanTemplate.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/SpearmanTemplate.png new file mode 100644 index 0000000..bd48225 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/SpearmanTemplate.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Melee/SwordsmanTemplate.png b/resources/MiniWorldSprites/Characters/Soldiers/Melee/SwordsmanTemplate.png new file mode 100644 index 0000000..ae5e628 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Melee/SwordsmanTemplate.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Mounted/CyanKnight.png b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/CyanKnight.png new file mode 100644 index 0000000..4123b10 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/CyanKnight.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Mounted/LimeKnight.png b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/LimeKnight.png new file mode 100644 index 0000000..22addf8 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/LimeKnight.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Mounted/PurpleKnight.png b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/PurpleKnight.png new file mode 100644 index 0000000..00fcb15 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/PurpleKnight.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Mounted/RedKnight.png b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/RedKnight.png new file mode 100644 index 0000000..5e34dee Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Mounted/RedKnight.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/Ballista.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/Ballista.png new file mode 100644 index 0000000..a4312ea Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/Ballista.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/BowmanTemplate.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/BowmanTemplate.png new file mode 100644 index 0000000..66ecfe2 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/BowmanTemplate.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/BowmanCyan.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/BowmanCyan.png new file mode 100644 index 0000000..16438f4 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/BowmanCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/MageCyan.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/MageCyan.png new file mode 100644 index 0000000..bdcba5b Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/MageCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/MusketeerCyan.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/MusketeerCyan.png new file mode 100644 index 0000000..a42f7c8 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/CyanRanged/MusketeerCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/BowmanLime.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/BowmanLime.png new file mode 100644 index 0000000..29b0e51 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/BowmanLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/MageLime.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/MageLime.png new file mode 100644 index 0000000..20c7c5f Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/MageLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/MusketeerLime.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/MusketeerLime.png new file mode 100644 index 0000000..53361c0 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/LimeRanged/MusketeerLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/MageTemplate.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/MageTemplate.png new file mode 100644 index 0000000..35da623 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/MageTemplate.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/BowmanPurple.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/BowmanPurple.png new file mode 100644 index 0000000..fd6b2ee Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/BowmanPurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/MagePurple.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/MagePurple.png new file mode 100644 index 0000000..441f4cb Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/MagePurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/MusketeerPurple.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/MusketeerPurple.png new file mode 100644 index 0000000..315ce14 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/PurpleRanged/MusketeerPurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/BowmanRed.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/BowmanRed.png new file mode 100644 index 0000000..5d3f252 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/BowmanRed.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/MageRed.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/MageRed.png new file mode 100644 index 0000000..2518acd Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/MageRed.png differ diff --git a/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/MusketeerRed.png b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/MusketeerRed.png new file mode 100644 index 0000000..f277535 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Soldiers/Ranged/RedRanged/MusketeerRed.png differ diff --git a/resources/MiniWorldSprites/Characters/Workers/CyanWorker/FarmerCyan.png b/resources/MiniWorldSprites/Characters/Workers/CyanWorker/FarmerCyan.png new file mode 100644 index 0000000..f7b4bd9 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Workers/CyanWorker/FarmerCyan.png differ diff --git a/resources/MiniWorldSprites/Characters/Workers/FarmerTemplate.png b/resources/MiniWorldSprites/Characters/Workers/FarmerTemplate.png new file mode 100644 index 0000000..0ffba40 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Workers/FarmerTemplate.png differ diff --git a/resources/MiniWorldSprites/Characters/Workers/LimeWorker/FarmerLime.png b/resources/MiniWorldSprites/Characters/Workers/LimeWorker/FarmerLime.png new file mode 100644 index 0000000..16ea842 Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Workers/LimeWorker/FarmerLime.png differ diff --git a/resources/MiniWorldSprites/Characters/Workers/PurpleWorker/FarmerPurple.png b/resources/MiniWorldSprites/Characters/Workers/PurpleWorker/FarmerPurple.png new file mode 100644 index 0000000..1cdef7a Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Workers/PurpleWorker/FarmerPurple.png differ diff --git a/resources/MiniWorldSprites/Characters/Workers/RedWorker/FarmerRed.png b/resources/MiniWorldSprites/Characters/Workers/RedWorker/FarmerRed.png new file mode 100644 index 0000000..4aa0b0b Binary files /dev/null and b/resources/MiniWorldSprites/Characters/Workers/RedWorker/FarmerRed.png differ diff --git a/resources/MiniWorldSprites/ColoredBuildingsPreview.png b/resources/MiniWorldSprites/ColoredBuildingsPreview.png new file mode 100644 index 0000000..58057df Binary files /dev/null and b/resources/MiniWorldSprites/ColoredBuildingsPreview.png differ diff --git a/resources/MiniWorldSprites/Ground/Cliff-Water.png b/resources/MiniWorldSprites/Ground/Cliff-Water.png new file mode 100644 index 0000000..4831f00 Binary files /dev/null and b/resources/MiniWorldSprites/Ground/Cliff-Water.png differ diff --git a/resources/MiniWorldSprites/Ground/Cliff.png b/resources/MiniWorldSprites/Ground/Cliff.png new file mode 100644 index 0000000..6cd2f8c Binary files /dev/null and b/resources/MiniWorldSprites/Ground/Cliff.png differ diff --git a/resources/MiniWorldSprites/Ground/DeadGrass.png b/resources/MiniWorldSprites/Ground/DeadGrass.png new file mode 100644 index 0000000..536d424 Binary files /dev/null and b/resources/MiniWorldSprites/Ground/DeadGrass.png differ diff --git a/resources/MiniWorldSprites/Ground/Grass.png b/resources/MiniWorldSprites/Ground/Grass.png new file mode 100644 index 0000000..ca0a39f Binary files /dev/null and b/resources/MiniWorldSprites/Ground/Grass.png differ diff --git a/resources/MiniWorldSprites/Ground/Shore.png b/resources/MiniWorldSprites/Ground/Shore.png new file mode 100644 index 0000000..2bf6968 Binary files /dev/null and b/resources/MiniWorldSprites/Ground/Shore.png differ diff --git a/resources/MiniWorldSprites/Ground/TexturedGrass.png b/resources/MiniWorldSprites/Ground/TexturedGrass.png new file mode 100644 index 0000000..c3e2b68 Binary files /dev/null and b/resources/MiniWorldSprites/Ground/TexturedGrass.png differ diff --git a/resources/MiniWorldSprites/Ground/Winter.png b/resources/MiniWorldSprites/Ground/Winter.png new file mode 100644 index 0000000..43d9aed Binary files /dev/null and b/resources/MiniWorldSprites/Ground/Winter.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/Boat.png b/resources/MiniWorldSprites/Miscellaneous/Boat.png new file mode 100644 index 0000000..92ec447 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/Boat.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/Bridge.png b/resources/MiniWorldSprites/Miscellaneous/Bridge.png new file mode 100644 index 0000000..7b61445 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/Bridge.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/Chests.png b/resources/MiniWorldSprites/Miscellaneous/Chests.png new file mode 100644 index 0000000..d756fbb Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/Chests.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/PirateShip.png b/resources/MiniWorldSprites/Miscellaneous/PirateShip.png new file mode 100644 index 0000000..27c3ac8 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/PirateShip.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/Portal.png b/resources/MiniWorldSprites/Miscellaneous/Portal.png new file mode 100644 index 0000000..76aaf04 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/Portal.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/QuestBoard.png b/resources/MiniWorldSprites/Miscellaneous/QuestBoard.png new file mode 100644 index 0000000..817299b Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/QuestBoard.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/Signs.png b/resources/MiniWorldSprites/Miscellaneous/Signs.png new file mode 100644 index 0000000..d8463a3 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/Signs.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/StreetSigns.png b/resources/MiniWorldSprites/Miscellaneous/StreetSigns.png new file mode 100644 index 0000000..7993803 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/StreetSigns.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/Tombstones.png b/resources/MiniWorldSprites/Miscellaneous/Tombstones.png new file mode 100644 index 0000000..57113ab Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/Tombstones.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/TransportShip.png b/resources/MiniWorldSprites/Miscellaneous/TransportShip.png new file mode 100644 index 0000000..31c0b9a Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/TransportShip.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/WarShip.png b/resources/MiniWorldSprites/Miscellaneous/WarShip.png new file mode 100644 index 0000000..c6f1418 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/WarShip.png differ diff --git a/resources/MiniWorldSprites/Miscellaneous/Well.png b/resources/MiniWorldSprites/Miscellaneous/Well.png new file mode 100644 index 0000000..9ca0209 Binary files /dev/null and b/resources/MiniWorldSprites/Miscellaneous/Well.png differ diff --git a/resources/MiniWorldSprites/Nature/Cactus.png b/resources/MiniWorldSprites/Nature/Cactus.png new file mode 100644 index 0000000..27256aa Binary files /dev/null and b/resources/MiniWorldSprites/Nature/Cactus.png differ diff --git a/resources/MiniWorldSprites/Nature/CoconutTrees.png b/resources/MiniWorldSprites/Nature/CoconutTrees.png new file mode 100644 index 0000000..6c7c750 Binary files /dev/null and b/resources/MiniWorldSprites/Nature/CoconutTrees.png differ diff --git a/resources/MiniWorldSprites/Nature/DeadTrees.png b/resources/MiniWorldSprites/Nature/DeadTrees.png new file mode 100644 index 0000000..628afd1 Binary files /dev/null and b/resources/MiniWorldSprites/Nature/DeadTrees.png differ diff --git a/resources/MiniWorldSprites/Nature/PineTrees.png b/resources/MiniWorldSprites/Nature/PineTrees.png new file mode 100644 index 0000000..89cd78e Binary files /dev/null and b/resources/MiniWorldSprites/Nature/PineTrees.png differ diff --git a/resources/MiniWorldSprites/Nature/Rocks.png b/resources/MiniWorldSprites/Nature/Rocks.png new file mode 100644 index 0000000..5714bb7 Binary files /dev/null and b/resources/MiniWorldSprites/Nature/Rocks.png differ diff --git a/resources/MiniWorldSprites/Nature/Trees.png b/resources/MiniWorldSprites/Nature/Trees.png new file mode 100644 index 0000000..8a0d114 Binary files /dev/null and b/resources/MiniWorldSprites/Nature/Trees.png differ diff --git a/resources/MiniWorldSprites/Nature/Tumbleweed.png b/resources/MiniWorldSprites/Nature/Tumbleweed.png new file mode 100644 index 0000000..087e43a Binary files /dev/null and b/resources/MiniWorldSprites/Nature/Tumbleweed.png differ diff --git a/resources/MiniWorldSprites/Nature/Wheatfield.png b/resources/MiniWorldSprites/Nature/Wheatfield.png new file mode 100644 index 0000000..ddc313b Binary files /dev/null and b/resources/MiniWorldSprites/Nature/Wheatfield.png differ diff --git a/resources/MiniWorldSprites/Nature/WinterDeadTrees.png b/resources/MiniWorldSprites/Nature/WinterDeadTrees.png new file mode 100644 index 0000000..44d4e34 Binary files /dev/null and b/resources/MiniWorldSprites/Nature/WinterDeadTrees.png differ diff --git a/resources/MiniWorldSprites/Nature/WinterTrees.png b/resources/MiniWorldSprites/Nature/WinterTrees.png new file mode 100644 index 0000000..ab077fa Binary files /dev/null and b/resources/MiniWorldSprites/Nature/WinterTrees.png differ diff --git a/resources/MiniWorldSprites/Objects/ArrowLong.png b/resources/MiniWorldSprites/Objects/ArrowLong.png new file mode 100644 index 0000000..fe004ef Binary files /dev/null and b/resources/MiniWorldSprites/Objects/ArrowLong.png differ diff --git a/resources/MiniWorldSprites/Objects/ArrowShort.png b/resources/MiniWorldSprites/Objects/ArrowShort.png new file mode 100644 index 0000000..e51e28a Binary files /dev/null and b/resources/MiniWorldSprites/Objects/ArrowShort.png differ diff --git a/resources/MiniWorldSprites/Objects/Axe.png b/resources/MiniWorldSprites/Objects/Axe.png new file mode 100644 index 0000000..aa6c1b3 Binary files /dev/null and b/resources/MiniWorldSprites/Objects/Axe.png differ diff --git a/resources/MiniWorldSprites/Objects/BallistaBolt.png b/resources/MiniWorldSprites/Objects/BallistaBolt.png new file mode 100644 index 0000000..a1e144a Binary files /dev/null and b/resources/MiniWorldSprites/Objects/BallistaBolt.png differ diff --git a/resources/MiniWorldSprites/Objects/Bullet.png b/resources/MiniWorldSprites/Objects/Bullet.png new file mode 100644 index 0000000..0fa157a Binary files /dev/null and b/resources/MiniWorldSprites/Objects/Bullet.png differ diff --git a/resources/MiniWorldSprites/Objects/FireballProjectile.png b/resources/MiniWorldSprites/Objects/FireballProjectile.png new file mode 100644 index 0000000..f0020f2 Binary files /dev/null and b/resources/MiniWorldSprites/Objects/FireballProjectile.png differ diff --git a/resources/MiniWorldSprites/Objects/ShortBig.png b/resources/MiniWorldSprites/Objects/ShortBig.png new file mode 100644 index 0000000..744012b Binary files /dev/null and b/resources/MiniWorldSprites/Objects/ShortBig.png differ diff --git a/resources/MiniWorldSprites/Objects/Spear.png b/resources/MiniWorldSprites/Objects/Spear.png new file mode 100644 index 0000000..2f98940 Binary files /dev/null and b/resources/MiniWorldSprites/Objects/Spear.png differ diff --git a/resources/MiniWorldSprites/Objects/SwordShort.png b/resources/MiniWorldSprites/Objects/SwordShort.png new file mode 100644 index 0000000..4e9e0df Binary files /dev/null and b/resources/MiniWorldSprites/Objects/SwordShort.png differ diff --git a/resources/MiniWorldSprites/OtherLinks.docx b/resources/MiniWorldSprites/OtherLinks.docx new file mode 100644 index 0000000..5dd6c8a Binary files /dev/null and b/resources/MiniWorldSprites/OtherLinks.docx differ diff --git a/resources/MiniWorldSprites/Templates/16x16Large.png b/resources/MiniWorldSprites/Templates/16x16Large.png new file mode 100644 index 0000000..c59f229 Binary files /dev/null and b/resources/MiniWorldSprites/Templates/16x16Large.png differ diff --git a/resources/MiniWorldSprites/Templates/16x16Small.png b/resources/MiniWorldSprites/Templates/16x16Small.png new file mode 100644 index 0000000..6c1a039 Binary files /dev/null and b/resources/MiniWorldSprites/Templates/16x16Small.png differ diff --git a/resources/MiniWorldSprites/Templates/32x32Small.png b/resources/MiniWorldSprites/Templates/32x32Small.png new file mode 100644 index 0000000..6d3303b Binary files /dev/null and b/resources/MiniWorldSprites/Templates/32x32Small.png differ diff --git a/resources/MiniWorldSprites/User Interface/BoxSelector.png b/resources/MiniWorldSprites/User Interface/BoxSelector.png new file mode 100644 index 0000000..0f0e277 Binary files /dev/null and b/resources/MiniWorldSprites/User Interface/BoxSelector.png differ diff --git a/resources/MiniWorldSprites/User Interface/Highlighted-Boxes.png b/resources/MiniWorldSprites/User Interface/Highlighted-Boxes.png new file mode 100644 index 0000000..1beb29a Binary files /dev/null and b/resources/MiniWorldSprites/User Interface/Highlighted-Boxes.png differ diff --git a/resources/MiniWorldSprites/User Interface/Icons-Essentials.png b/resources/MiniWorldSprites/User Interface/Icons-Essentials.png new file mode 100644 index 0000000..19b2d35 Binary files /dev/null and b/resources/MiniWorldSprites/User Interface/Icons-Essentials.png differ diff --git a/resources/MiniWorldSprites/User Interface/UiIcons.png b/resources/MiniWorldSprites/User Interface/UiIcons.png new file mode 100644 index 0000000..5088743 Binary files /dev/null and b/resources/MiniWorldSprites/User Interface/UiIcons.png differ diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..744058a --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,85 @@ +import { spawn } from 'child_process'; +import svelte from 'rollup-plugin-svelte'; +import commonjs from '@rollup/plugin-commonjs'; +import terser from '@rollup/plugin-terser'; +import resolve from '@rollup/plugin-node-resolve'; +import livereload from 'rollup-plugin-livereload'; +import css from 'rollup-plugin-css-only'; +import sveltePreprocess from 'svelte-preprocess'; +import typescript from "@rollup/plugin-typescript"; + +const production = !process.env.ROLLUP_WATCH; + +function serve() { + let server; + + function toExit() { + if (server) server.kill(0); + } + + return { + writeBundle() { + if (server) return; + server = spawn('npm', ['run', 'start', '--', '--dev'], { + stdio: ['ignore', 'inherit', 'inherit'], + shell: true + }); + + process.on('SIGTERM', toExit); + process.on('exit', toExit); + } + }; +} + +export default { + input: 'src/main.js', + output: { + sourcemap: !production, + format: 'iife', + name: 'app', + file: 'public/build/bundle.js' + }, + plugins: [ + svelte({ + compilerOptions: { + // enable run-time checks when not in production + dev: !production + }, + preprocess: sveltePreprocess({ + postcss: true, + typescript: true + }) + }), + typescript({ sourceMap: !production }), + // we'll extract any component CSS out into + // a separate file - better for performance + css({ output: 'bundle.css' }), + + // If you have external dependencies installed from + // npm, you'll most likely need these plugins. In + // some cases you'll need additional configuration - + // consult the documentation for details: + // https://github.com/rollup/plugins/tree/master/packages/commonjs + resolve({ + browser: true, + dedupe: ['svelte'], + exportConditions: ['svelte'] + }), + commonjs(), + + // In dev mode, call `npm run start` once + // the bundle has been generated + !production && serve(), + + // Watch the `public` directory and refresh the + // browser on changes when not in production + !production && livereload('public'), + + // If we're building for production (npm run build + // instead of npm run dev), minify + production && terser() + ], + watch: { + clearScreen: false + } +}; diff --git a/scripts/setupTypeScript.js b/scripts/setupTypeScript.js new file mode 100644 index 0000000..4385f65 --- /dev/null +++ b/scripts/setupTypeScript.js @@ -0,0 +1,134 @@ +// @ts-check + +/** This script modifies the project to support TS code in .svelte files like: + + + + As well as validating the code for CI. + */ + +/** To work on this script: + rm -rf test-template template && git clone sveltejs/template test-template && node scripts/setupTypeScript.js test-template +*/ + +import fs from "fs" +import path from "path" +import { argv } from "process" +import url from 'url'; + +const __filename = url.fileURLToPath(import.meta.url); +const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); +const projectRoot = argv[2] || path.join(__dirname, "..") + +// Add deps to pkg.json +const packageJSON = JSON.parse(fs.readFileSync(path.join(projectRoot, "package.json"), "utf8")) +packageJSON.devDependencies = Object.assign(packageJSON.devDependencies, { + "svelte-check": "^3.0.0", + "svelte-preprocess": "^5.0.0", + "@rollup/plugin-typescript": "^11.0.0", + "typescript": "^4.9.0", + "tslib": "^2.5.0", + "@tsconfig/svelte": "^3.0.0" +}) + +// Add script for checking +packageJSON.scripts = Object.assign(packageJSON.scripts, { + "check": "svelte-check" +}) + +// Write the package JSON +fs.writeFileSync(path.join(projectRoot, "package.json"), JSON.stringify(packageJSON, null, " ")) + +// mv src/main.js to main.ts - note, we need to edit rollup.config.js for this too +const beforeMainJSPath = path.join(projectRoot, "src", "main.js") +const afterMainTSPath = path.join(projectRoot, "src", "main.ts") +fs.renameSync(beforeMainJSPath, afterMainTSPath) + +// Switch the app.svelte file to use TS +const appSveltePath = path.join(projectRoot, "src", "App.svelte") +let appFile = fs.readFileSync(appSveltePath, "utf8") +appFile = appFile.replace(" + +
+ {#if !loadingAssets} +
+
+

Camera info

+

Position: {cameraInfo.position.x.toFixed(1)} {cameraInfo.position.y.toFixed(1)}

+

Zoom: {cameraInfo.zoom}

+

Selection Info

+ {#each selectedTypes as selection} +

Selected cell type: {selection}

+ {/each} +
+
+ + {/if} + {#if loadingAssets} +
+
+

Loading assets

+ + + + +
+
+

{downloadedAssets >= 0 ? downloadedAssets:"Calculating..."}

+

/

+

{totalToDownloadAssets >= 0 ? totalToDownloadAssets:"Calculating..."}

+
+
+ {/if} + +
+ +
+
+

FPS: {(1000.0 / frameLatency).toFixed(2)} {frameLatency.toFixed(2)}ms

+ {#each profileMessages as msg} +

{msg.text}

+ {/each} +
+
+ + \ No newline at end of file diff --git a/src/Game/AssetsLoader/AssetsLoader.d.ts b/src/Game/AssetsLoader/AssetsLoader.d.ts new file mode 100644 index 0000000..ff913f0 --- /dev/null +++ b/src/Game/AssetsLoader/AssetsLoader.d.ts @@ -0,0 +1 @@ +export function loadGameAssets(): Promise; diff --git a/src/Game/AssetsLoader/AssetsLoader.js b/src/Game/AssetsLoader/AssetsLoader.js new file mode 100644 index 0000000..1456eb9 --- /dev/null +++ b/src/Game/AssetsLoader/AssetsLoader.js @@ -0,0 +1,47 @@ +import { UIAssetsLoaderInfoPipe } from "../UIPipes/UIPipes"; +import { loadPixelAsset } from "../Utils/Assets.utils"; + +export async function loadGameAssets() +{ + UIAssetsLoaderInfoPipe.update((s)=>{ + s.totalToDownload = 4; + s.downloaded = 0; + }); + // await loadPixelAsset("assets/images/amogus.png"); + // UIAssetsLoaderInfoPipe.update((s)=>{ + // s.downloaded += 1; + // }); + // await loadPixelAsset("assets/images/amogus_gb.png"); + // UIAssetsLoaderInfoPipe.update((s)=>{ + // s.downloaded += 1; + // }); + // await loadPixelAsset("assets/images/amogus_g.png"); + // UIAssetsLoaderInfoPipe.update((s)=>{ + // s.downloaded += 1; + // }); + // await loadPixelAsset("assets/images/amogus_b.png"); + // UIAssetsLoaderInfoPipe.update((s)=>{ + // s.downloaded += 1; + // }); + // await loadPixelAsset("assets/images/amogus_p.png"); + // UIAssetsLoaderInfoPipe.update((s)=>{ + // s.downloaded += 1; + // }); + await loadPixelAsset("assets/images/world/vegetation_ts.png"); + UIAssetsLoaderInfoPipe.update((s)=>{ + s.downloaded += 1; + }); + await loadPixelAsset("assets/images/buildings/buildings.png"); + UIAssetsLoaderInfoPipe.update((s)=>{ + s.downloaded += 1; + }); + await loadPixelAsset("assets/images/world/world_terrain_atlas.png"); + UIAssetsLoaderInfoPipe.update((s)=>{ + s.downloaded += 1; + }); + await loadPixelAsset("assets/images/selection.png"); + UIAssetsLoaderInfoPipe.update((s)=>{ + s.downloaded += 1; + s.finished = false; + }); +} \ No newline at end of file diff --git a/src/Game/Buildings/Buildings.d.ts b/src/Game/Buildings/Buildings.d.ts new file mode 100644 index 0000000..25f2f37 --- /dev/null +++ b/src/Game/Buildings/Buildings.d.ts @@ -0,0 +1,3 @@ +export function incBuildingCount(x: any): void; +export function handleBuildingsIncome(tick: any): void; +export let buildingsCount: number; diff --git a/src/Game/Buildings/Buildings.js b/src/Game/Buildings/Buildings.js new file mode 100644 index 0000000..51e4a30 --- /dev/null +++ b/src/Game/Buildings/Buildings.js @@ -0,0 +1,24 @@ +import { UIObtainedResourcesPipe } from "../UIPipes/UIPipes"; + +const period = 1; +let currentPeriod = 0; +const goldForBuilding = 0.35; +export let buildingsCount = 0; +export function incBuildingCount(x) { + buildingsCount += x; + UIObtainedResourcesPipe.update((s)=>{ + s.score += 100 + (Math.floor(buildingsCount / 10) * (buildingsCount * goldForBuilding * 10)); + }); +}; +export function handleBuildingsIncome(tick) { + currentPeriod += tick.deltaMS / 1000; + if(currentPeriod > period) + { + currentPeriod = 0; + let r = buildingsCount * goldForBuilding + (Math.floor(buildingsCount / 10) * (buildingsCount * goldForBuilding)); + UIObtainedResourcesPipe.update((s)=>{ + s.gold += r; + s.goldPerSec = r; + }); + } +}; \ No newline at end of file diff --git a/src/Game/Camera/Camera.d.ts b/src/Game/Camera/Camera.d.ts new file mode 100644 index 0000000..1f6f54c --- /dev/null +++ b/src/Game/Camera/Camera.d.ts @@ -0,0 +1,10 @@ +export function calculateViewportFromCamera(): void; +/** + * + * @param {Number} x + * @param {Number} y + */ +export function screenToWorldCoordinates(x: number, y: number): { + x: number; + y: number; +}; diff --git a/src/Game/Camera/Camera.js b/src/Game/Camera/Camera.js new file mode 100644 index 0000000..ef3c60b --- /dev/null +++ b/src/Game/Camera/Camera.js @@ -0,0 +1,23 @@ +import { BC_CAMERA, BC_VIEWPORT } from "../GlobalVariables/GlobalVariables"; + + +export function calculateViewportFromCamera() { + // BC_VIEWPORT.pivot.set(0.5, 0.5); + BC_VIEWPORT.position.set( + Math.floor(((window.innerWidth / 2.0 / BC_CAMERA.zoom) - BC_CAMERA.position.x) * BC_CAMERA.zoom), + Math.floor(((window.innerHeight / 2.0 / BC_CAMERA.zoom) - BC_CAMERA.position.y) * BC_CAMERA.zoom) + ); + BC_VIEWPORT.scale.set(BC_CAMERA.zoom, BC_CAMERA.zoom); +} + +/** + * + * @param {Number} x + * @param {Number} y + */ +export function screenToWorldCoordinates(x, y) { + return { + x: (((x - window.innerWidth / 2.0) / BC_CAMERA.zoom) + BC_CAMERA.position.x), + y: (((y - window.innerHeight / 2.0) / BC_CAMERA.zoom) + BC_CAMERA.position.y) + } +} \ No newline at end of file diff --git a/src/Game/Game.d.ts b/src/Game/Game.d.ts new file mode 100644 index 0000000..4950ac3 --- /dev/null +++ b/src/Game/Game.d.ts @@ -0,0 +1,2 @@ +export function generateWorld(): void; +export function initGame(): Promise; diff --git a/src/Game/Game.js b/src/Game/Game.js new file mode 100644 index 0000000..f84aef9 --- /dev/null +++ b/src/Game/Game.js @@ -0,0 +1,259 @@ +// import { dot } from "mathjs"; +import * as PIXI from "../pixi/pixi.mjs"; +// import { loadPixelAsset } from "./Utils/Assets.utils"; +// import { Howl } from "howler"; +import { loadGameAssets } from "./AssetsLoader/AssetsLoader"; +import { UICameraInfo, UIGameProfilerPipe, UIMainPipe, UIObtainedResourcesPipe, UISelectionInfo } from "./UIPipes/UIPipes"; +import { getSpriteFromAtlas } from "./Utils/Sprites.utils"; +import { profileFPS } from "./Profiler/Profiler"; +import { createKeyboardBinding, inputControllerTick } from "./InputController/InputController"; +import { BC_BUILDING_PLACEHOLDERS, BC_CAMERA, BC_SPRITES_SETTINGS, BC_VIEWPORT, BC_WORLD, PRNG, setBC_SELECTION, setBC_VIEWPORT, setBC_WORLD } from "./GlobalVariables/GlobalVariables"; +import { clampNumber, } from "./Utils/Math.utils"; +// import { addToTerrain, addToVegetation, addToViewport } from "./Utils/World.utils"; +import { calculateViewportFromCamera, screenToWorldCoordinates } from "./Camera/Camera"; +// import { Noise } from "noisejs"; +// import { createWorldChunk } from "./WorldChunk/WorldChunk"; +import { + addToBuildings, + createFirstWorldChunks, + getChunk, + getObjectFromBuildingsLayer, + getObjectFromTerrainLayer, + getObjectFromVegetationLayer, + removeFromVegetation, + updateChunksVisibility, + worldCoordinatesToChunkIndexesCoordinates, + worldCoordinatesToChunkLocalCoordinates, +} from "./WorldGeneration/WorldGeneration"; +import { handleBuildingsIncome, incBuildingCount } from "./Buildings/Buildings"; + +function moveVertically(tick, keyCode) { + BC_CAMERA.position.y += (tick.deltaMS / 1000) * 800 * (keyCode === "KeyS" ? 1 : -1); + UICameraInfo.update((s) => { + s.position.y = BC_CAMERA.position.y; + }); +} + +function moveHorizontally(tick, keyCode) { + BC_CAMERA.position.x += (tick.deltaMS / 1000) * 800 * (keyCode === "KeyD" ? 1 : -1); + UICameraInfo.update((s) => { + s.position.x = BC_CAMERA.position.x; + }); +} + +export function generateWorld() { + setTimeout(()=>{ + createFirstWorldChunks(); + startGame(); + }, 0); +} + +function setupGlobalInput() { + window.addEventListener("wheel", (event) => { + const delta = Math.sign(event.deltaY); + if (delta > 0) { + BC_CAMERA.zoom = Number(clampNumber(BC_CAMERA.zoom - 0.1, 0.6, 1.2).toFixed(2)); + } else { + BC_CAMERA.zoom = Number(clampNumber(BC_CAMERA.zoom + 0.1, 0.6, 1.2).toFixed(2)); + } + UICameraInfo.update((s) => { + s.zoom = BC_CAMERA.zoom; + }); + }); +} + +function setupInGameSelector() { + + let ph = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(0, 0, 16, 16)); + ph.scale.set(BC_SPRITES_SETTINGS.scale); + ph.alpha = 0.5; + ph.visible = false; + ph.zIndex = 1; + BC_BUILDING_PLACEHOLDERS.push(ph); + BC_VIEWPORT.addChild(ph); + ph = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(16, 0, 16, 16)); + ph.scale.set(BC_SPRITES_SETTINGS.scale); + ph.alpha = 0.5; + ph.visible = false; + ph.zIndex = 1; + BC_BUILDING_PLACEHOLDERS.push(ph); + BC_VIEWPORT.addChild(ph); + ph = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(0, 16, 16, 16)); + ph.scale.set(BC_SPRITES_SETTINGS.scale); + ph.alpha = 0.5; + ph.visible = false; + ph.zIndex = 1; + BC_BUILDING_PLACEHOLDERS.push(ph); + BC_VIEWPORT.addChild(ph); + ph = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(16, 16, 16, 16)); + ph.scale.set(BC_SPRITES_SETTINGS.scale); + ph.alpha = 0.5; + ph.visible = false; + ph.zIndex = 1; + BC_BUILDING_PLACEHOLDERS.push(ph); + BC_VIEWPORT.addChild(ph); + + UIMainPipe.subscribe((s)=>{ + for (const i of BC_BUILDING_PLACEHOLDERS) { + i.visible = false; + } + BC_BUILDING_PLACEHOLDERS[s.selectedBuilding].visible = true; + }); + + let sprite0 = PIXI.Sprite.from("assets/images/selection.png"); + sprite0.scale.set(BC_SPRITES_SETTINGS.scale, BC_SPRITES_SETTINGS.scale); + BC_VIEWPORT.addChild(sprite0); + sprite0.zIndex = 100; + setBC_SELECTION(sprite0); + + BC_VIEWPORT.eventMode = "static"; + BC_VIEWPORT.onmousemove = (e) => { + let t = screenToWorldCoordinates(e.data.global.x, e.data.global.y); + let terrainObject = getObjectFromTerrainLayer(t.x, t.y); + let vegetationObject = getObjectFromVegetationLayer(t.x, t.y); + let buildingObject = getObjectFromBuildingsLayer(t.x, t.y); + + UISelectionInfo.update((s) => { + let t_arr = []; + if (terrainObject) { + t_arr.push(terrainObject.type); + } + if (vegetationObject) { + t_arr.push(vegetationObject.type); + } + s.types = [...t_arr]; + }); + + t.x = BC_SPRITES_SETTINGS.defaultSize * BC_SPRITES_SETTINGS.scale * Math.floor(t.x / (BC_SPRITES_SETTINGS.defaultSize * BC_SPRITES_SETTINGS.scale)); + t.y = BC_SPRITES_SETTINGS.defaultSize * BC_SPRITES_SETTINGS.scale * Math.floor(t.y / (BC_SPRITES_SETTINGS.defaultSize * BC_SPRITES_SETTINGS.scale)); + sprite0.position.set(t.x, t.y); + + if(UIMainPipe.get().building && terrainObject.type !== "ter_water" && !vegetationObject && !buildingObject) + { + let q = UIMainPipe.get().selectedBuilding; + BC_BUILDING_PLACEHOLDERS[q].visible = true; + BC_BUILDING_PLACEHOLDERS[q].position.set(t.x, t.y); + } + else + { + BC_BUILDING_PLACEHOLDERS[UIMainPipe.get().selectedBuilding].visible = false; + } + }; + + BC_VIEWPORT.onpointerdown = (e)=>{ + let t = screenToWorldCoordinates(e.data.global.x, e.data.global.y); + let terrainObject = getObjectFromTerrainLayer(t.x, t.y); + let vegetationObject = getObjectFromVegetationLayer(t.x, t.y); + let buildingObject = getObjectFromBuildingsLayer(t.x, t.y); + if(UIMainPipe.get().building && terrainObject.type !== "ter_water" && !vegetationObject && !buildingObject) + { + if(UIObtainedResourcesPipe.get().gold >= 50) + { + let chunk = getChunk(t.x, t.y); + if(chunk) + { + let ns; + switch(UIMainPipe.get().selectedBuilding) + { + case 0: + ns = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(0, 0, 16, 16)); + break; + case 1: + ns = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(16, 0, 16, 16)); + break; + case 2: + ns = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(0, 16, 16, 16)); + break; + case 3: + ns = getSpriteFromAtlas("assets/images/buildings/buildings.png", new PIXI.Rectangle(16, 16, 16, 16)); + break; + } + ns.scale.set(BC_SPRITES_SETTINGS.scale, BC_SPRITES_SETTINGS.scale); + let r = worldCoordinatesToChunkIndexesCoordinates(t.x, t.y); + // console.log(r); + addToBuildings(chunk, ns, {type: "building"}, r.x, r.y); + r = worldCoordinatesToChunkLocalCoordinates(t.x, t.y); + // console.log(r); + ns.position.set(r.x * BC_SPRITES_SETTINGS.scale * BC_SPRITES_SETTINGS.defaultSize, r.y * BC_SPRITES_SETTINGS.scale * BC_SPRITES_SETTINGS.defaultSize); + UIObtainedResourcesPipe.update((s)=>{ + s.gold -= 50; + }); + incBuildingCount(1); + } + } + } + else if(!UIMainPipe.get().building) + { + if(vegetationObject) + { + try { + switch (vegetationObject.type) { + case "grass": + UIObtainedResourcesPipe.update((s)=>{ + s.grass += vegetationObject.num; + }); + break; + case "stone": + UIObtainedResourcesPipe.update((s)=>{ + s.stone += vegetationObject.num; + }); + break; + case "wood": + UIObtainedResourcesPipe.update((s)=>{ + s.wood += vegetationObject.num; + }); + break; + default: + break; + } + removeFromVegetation(t.x, t.y, vegetationObject.obj); + } catch (error) { + + } + } + } + }; +} + +export async function initGame() { + const app = new PIXI.Application(); + await app.init({ resizeTo: window, antialias: false }); + document.body.appendChild(app.canvas); + + await loadGameAssets(); + UIMainPipe.update((s) => { + s.loadingAssets = false; + }); + + let world = new PIXI.Container(); + let viewport = new PIXI.Container(); + world.addChild(viewport); + setBC_VIEWPORT(viewport); + setBC_WORLD(world); + viewport.isRenderGroup = true; + app.stage.addChild(world); + + BC_CAMERA.position.x = Math.floor(PRNG() * 3242 - 372); + BC_CAMERA.position.y = Math.floor(PRNG() * 1285 - 255); + + UICameraInfo.update((s)=>{ + s.position.x = BC_CAMERA.position.x; + s.position.y = BC_CAMERA.position.y; + }) + + app.ticker.add(inputControllerTick); + app.ticker.add(calculateViewportFromCamera); + app.ticker.add(updateChunksVisibility); + app.ticker.add(profileFPS); + app.ticker.add(handleBuildingsIncome); + + createKeyboardBinding("KeyW", "Hold", [moveVertically]); + createKeyboardBinding("KeyS", "Hold", [moveVertically]); + createKeyboardBinding("KeyA", "Hold", [moveHorizontally]); + createKeyboardBinding("KeyD", "Hold", [moveHorizontally]); +} + +function startGame() { + setupGlobalInput(); + setupInGameSelector(); +} diff --git a/src/Game/GlobalVariables/GlobalVariables.d.ts b/src/Game/GlobalVariables/GlobalVariables.d.ts new file mode 100644 index 0000000..9eb7efa --- /dev/null +++ b/src/Game/GlobalVariables/GlobalVariables.d.ts @@ -0,0 +1,44 @@ +export function setBC_VIEWPORT(viewport: any): void; +export function setBC_WORLD(world: any): void; +export function setBC_SELECTION(selection: any): void; +export function setNewPRNG(prng: any): void; +/** + * {PIXI.Container} + */ +export let BC_VIEWPORT: any; +/** + * {PIXI.Container} + */ +export let BC_WORLD: any; +/** + * {PIXI.Container} + */ +export let BC_SELECTION: any; +export namespace BC_TERRAIN_SETTINGS { + let tileSize: number; + let scale: number; +} +export namespace BC_SPRITES_SETTINGS { + export let defaultSize: number; + let scale_1: number; + export { scale_1 as scale }; +} +export namespace BC_CHUNKS_SETTINGS { + let width: number; + let height: number; +} +export namespace BC_CAMERA { + namespace position { + let x: number; + let y: number; + } + namespace offset_position { + let x_1: number; + export { x_1 as x }; + let y_1: number; + export { y_1 as y }; + } + let zoom: number; +} +export let PRNG: any; +export const BC_BUILDING_PLACEHOLDERS: any[]; diff --git a/src/Game/GlobalVariables/GlobalVariables.js b/src/Game/GlobalVariables/GlobalVariables.js new file mode 100644 index 0000000..c962bc5 --- /dev/null +++ b/src/Game/GlobalVariables/GlobalVariables.js @@ -0,0 +1,66 @@ +import Alea from "alea"; +import * as PIXI from "../../pixi/pixi.mjs"; +import { getSpriteFromAtlas } from "../Utils/Sprites.utils"; +/** + * {PIXI.Container} + */ +export let BC_VIEWPORT; +export function setBC_VIEWPORT(viewport) { + BC_VIEWPORT = viewport; +}; + +/** + * {PIXI.Container} + */ +export let BC_WORLD; +export function setBC_WORLD(world) { + BC_WORLD = world; +}; + +/** + * {PIXI.Container} + */ +export let BC_SELECTION; +export function setBC_SELECTION(selection) { + BC_SELECTION = selection; +}; + +// export let BC_TERRAIN; +export let BC_TERRAIN_SETTINGS = { + tileSize: 16, + scale: 8.0 +} +// export let BC_TERRAIN_VAULT = {}; +// export function setBC_TERRAIN(terrain) { +// BC_TERRAIN = terrain; +// }; + +// export let BC_VEGETATION; +// export let BC_VEGETATION_VAULT = {}; +// export function setBC_VEGETATION(veg) { +// BC_VEGETATION = veg; +// }; + +export let BC_SPRITES_SETTINGS = { + defaultSize: 16, + scale: 8.0 +}; + +// export let BC_CHUNKS_VAULT = {}; +export let BC_CHUNKS_SETTINGS = { + width: 20, //tiles + height: 20, //tiles +}; + +export const BC_CAMERA = { + position: {x: 0.0, y: 0.0}, + offset_position: {x: 0.0, y: 0.0}, + zoom: 1.0 +}; + +export let PRNG = new Alea(); +export function setNewPRNG(prng) { + PRNG = prng; +}; + +export const BC_BUILDING_PLACEHOLDERS = []; \ No newline at end of file diff --git a/src/Game/InputController/InputController.d.ts b/src/Game/InputController/InputController.d.ts new file mode 100644 index 0000000..1cb57d4 --- /dev/null +++ b/src/Game/InputController/InputController.d.ts @@ -0,0 +1,12 @@ +/** + * + * @param {String} key + * @param {_binding_types} type + * @param {Array} event + */ +export function createKeyboardBinding(key: string, type: { + Up: string; + Down: string; + Hold: string; +}, events: any): void; +export function inputControllerTick(deltaTime: any): void; diff --git a/src/Game/InputController/InputController.js b/src/Game/InputController/InputController.js new file mode 100644 index 0000000..5fa0fbb --- /dev/null +++ b/src/Game/InputController/InputController.js @@ -0,0 +1,77 @@ +const _keyboard_controller_bindings = {}; +const _binding_types = { + Up: "Up", + Down: "Down", + Hold: "Hold", +}; +const _keyboard_current_states = {}; + +window.addEventListener("keydown", (event) => { + _keyboard_current_states[event.code] = true; + // console.log(_keyboard_current_states); +}); + +window.addEventListener("keyup", (event) => { + _keyboard_current_states[event.code] = false; + // console.log(_keyboard_current_states); +}); + +/** + * + * @param {String} key + * @param {_binding_types} type + * @param {Array} event + */ +export function createKeyboardBinding(key, type, events) { + + if(_keyboard_controller_bindings[key] !== undefined) + { + _keyboard_controller_bindings[key] = [..._keyboard_controller_bindings[key], { + type: type, + events: [..._keyboard_controller_bindings[key].events, ...events], + triggered: _keyboard_controller_bindings[key].triggered, + }]; + } + else + { + _keyboard_controller_bindings[key] = [{ + type, + events: [...events], + triggered: false, + }]; + } +} + +export function inputControllerTick(deltaTime) { + for (const binding in _keyboard_controller_bindings) { + let bind0 = _keyboard_controller_bindings[binding]; + if(_keyboard_current_states[binding] === undefined) continue; + for (const bind of bind0) { + if(bind.type === "Hold" && _keyboard_current_states[binding]) + { + for (const i of bind.events) { + i(deltaTime, binding); + } + } + else if ((bind.type === "Down" && !bind.triggered && _keyboard_current_states[binding]) || + (bind.type === "Up" && !bind.triggered && !_keyboard_current_states[binding])) + { + for (const i of bind.events) { + i(deltaTime, binding); + } + bind.triggered = true; + } + else if ((bind.type === "Down" && bind.triggered && !_keyboard_current_states[binding]) || + (bind.type === "Up" && bind.triggered && _keyboard_current_states[binding])) + { + bind.triggered = false; + } + } + } +} + +// export function _debugKeyboardStates() +// { +// console.log(_keyboard_current_states); +// console.log(_keyboard_controller_bindings); +// } diff --git a/src/Game/Profiler/Profiler.d.ts b/src/Game/Profiler/Profiler.d.ts new file mode 100644 index 0000000..37b556a --- /dev/null +++ b/src/Game/Profiler/Profiler.d.ts @@ -0,0 +1,7 @@ +/** + * + * @param {PIXI._Ticker} tick + */ +export function profileFPS(tick: PIXI._Ticker): void; +export function printOnScreenDebugMessage(text: any, time: any): void; +export function profileDebugMessages(tick: any): void; diff --git a/src/Game/Profiler/Profiler.js b/src/Game/Profiler/Profiler.js new file mode 100644 index 0000000..c294356 --- /dev/null +++ b/src/Game/Profiler/Profiler.js @@ -0,0 +1,43 @@ + +import * as PIXI from "../../pixi/pixi.mjs"; +import { UIGameProfilerPipe } from "../UIPipes/UIPipes"; + +/** + * How many times per second FPS will be updated + */ +const ProfilerIntervalScale = 2.0; + +let _profilerInterval = 5; +let _counter = 0; +let _latency = 0; + +/** + * + * @param {PIXI._Ticker} tick + */ +export function profileFPS(tick) +{ + _counter++; + _latency += tick.elapsedMS; + if(_counter >= _profilerInterval) + { + _counter = 0; + UIGameProfilerPipe.update((s)=>{ + s.frameLatency = _latency / _profilerInterval; + }); + _profilerInterval = 1000.0 / (_latency / _profilerInterval) / ProfilerIntervalScale; + _latency = 0; + } +} + +export function printOnScreenDebugMessage(text, time) { + UIGameProfilerPipe.update((s)=>{ + s.profileMessages.push({text, time}); + }); +} + +export function profileDebugMessages(tick) { + UIGameProfilerPipe.update((s)=>{ + s.profileMessages = []; + }); +} \ No newline at end of file diff --git a/src/Game/UIPipes/UIPipes.d.ts b/src/Game/UIPipes/UIPipes.d.ts new file mode 100644 index 0000000..a7a3ddb --- /dev/null +++ b/src/Game/UIPipes/UIPipes.d.ts @@ -0,0 +1,7 @@ +export const UIMainPipe: StateStorage; +export const UIAssetsLoaderInfoPipe: StateStorage; +export const UIGameProfilerPipe: StateStorage; +export const UISelectionInfo: StateStorage; +export const UICameraInfo: StateStorage; +export const UIObtainedResourcesPipe: StateStorage; +import { StateStorage } from "../Utils/Storage.util"; diff --git a/src/Game/UIPipes/UIPipes.js b/src/Game/UIPipes/UIPipes.js new file mode 100644 index 0000000..1a60e2d --- /dev/null +++ b/src/Game/UIPipes/UIPipes.js @@ -0,0 +1,36 @@ +import { StateStorage } from "../Utils/Storage.util"; + +export const UIMainPipe = new StateStorage({ + building: false, + selectedBuilding: 0, + volume: 0.7, + loadingAssets: true, +}); + +export const UIAssetsLoaderInfoPipe = new StateStorage({ + totalToDownload: -1, + downloaded: -1, + finished: false, +}); + +export const UIGameProfilerPipe = new StateStorage({ + frameLatency: 0, + profileMessages: [] +}); + +export const UISelectionInfo = new StateStorage({ + types: [""], +}); +export const UICameraInfo = new StateStorage({ + position: {x:0, y:0}, + zoom: 1 +}); + +export const UIObtainedResourcesPipe = new StateStorage({ + wood: 0, + stone: 0, + grass: 0, + gold: 0, + goldPerSec: 0, + score: 0 +}); \ No newline at end of file diff --git a/src/Game/Utils/Assets.utils.d.ts b/src/Game/Utils/Assets.utils.d.ts new file mode 100644 index 0000000..e2d4fc7 --- /dev/null +++ b/src/Game/Utils/Assets.utils.d.ts @@ -0,0 +1 @@ +export function loadPixelAsset(source?: string): Promise; diff --git a/src/Game/Utils/Assets.utils.js b/src/Game/Utils/Assets.utils.js new file mode 100644 index 0000000..b33b242 --- /dev/null +++ b/src/Game/Utils/Assets.utils.js @@ -0,0 +1,7 @@ +import * as PIXI from "../../pixi/pixi.mjs"; + +export async function loadPixelAsset(source = "") { + let texture = await PIXI.Assets.load(source); + texture.source.scaleMode = 'nearest'; + return texture; +} \ No newline at end of file diff --git a/src/Game/Utils/Math.utils.d.ts b/src/Game/Utils/Math.utils.d.ts new file mode 100644 index 0000000..bd91126 --- /dev/null +++ b/src/Game/Utils/Math.utils.d.ts @@ -0,0 +1,69 @@ +/** + * + * @param {Point2D} pointA + * @param {Point2D} pointB + * @param {Number} a + * @returns + */ +export function interpolate2D(pointA: Point2D, pointB: Point2D, a: number): Point2D; +/** + * + * @param {Number} num + * @param {Number} min + * @param {Number} max + * @returns + */ +export function clampNumber(num: number, min: number, max: number): number; +/** + * + * @param {Point2D} point + * @param {Point2D} min + * @param {Point2D} max + * @returns + */ +export function clamp2D(point: Point2D, min: Point2D, max: Point2D): Point2D; +/** + * + * @param {Number} x + * @param {Number} y + * @param {Number} a + * @returns + */ +export function interpolate(x: number, y: number, a: number): number; +/** + * Returns a random integer between min (inclusive) and max (inclusive). + * The value is no lower than min (or the next integer greater than min + * if min isn't an integer) and no greater than max (or the next integer + * lower than max if max isn't an integer). + * @param {Number} min + * @param {Number} max + * @returns + */ +export function getRandomInt(min: number, max: number): number; +/** + * + * @param {Array} array + * @returns + */ +export function selectRandom(array: any[]): any; +/** + * + * @param {Number} val + * @param {Number} by + * @returns + */ +export function integerDivision(val: number, by: number): number; +export class Point2D { + /** + * Point2D object + * @param {Number} x + * @param {Number} y + */ + constructor(x?: number, y?: number); + _x: number; + _y: number; + getX(): number; + setX(x: any): void; + getY(): number; + setY(y: any): void; +} diff --git a/src/Game/Utils/Math.utils.js b/src/Game/Utils/Math.utils.js new file mode 100644 index 0000000..aca2de8 --- /dev/null +++ b/src/Game/Utils/Math.utils.js @@ -0,0 +1,111 @@ +import { PRNG } from "../GlobalVariables/GlobalVariables"; + +export class Point2D +{ + /** + * Point2D object + * @param {Number} x + * @param {Number} y + */ + constructor(x = 0.0, y = 0.0) + { + this._x = x; + this._y = y; + } + + getX() { + return this._x; + }; + + setX(x) { + this._x = x; + }; + + getY() { + return this._y; + }; + + setY(y) { + this._y = y; + }; +} + +/** + * + * @param {Point2D} pointA + * @param {Point2D} pointB + * @param {Number} a + * @returns + */ +export function interpolate2D(pointA, pointB, a) { + return (new Point2D(interpolate(pointA.getX(), pointB.getX(), a), interpolate(pointA.getY(), pointB.getY(), a))); +} + +/** + * + * @param {Number} num + * @param {Number} min + * @param {Number} max + * @returns + */ +export function clampNumber(num, min, max) { + return Math.min(Math.max(num, min), max); +} + +/** + * + * @param {Point2D} point + * @param {Point2D} min + * @param {Point2D} max + * @returns + */ +export function clamp2D(point, min, max) { + return new Point2D(Math.min(Math.max(point.getX(), min.getX()), max.getX()), + Math.min(Math.max(point.getY(), min.getY()), max.getY())); +} + +/** + * + * @param {Number} x + * @param {Number} y + * @param {Number} a + * @returns + */ +export function interpolate(x, y, a) { + return x * (1 - a) + y * a; +} + +/** + * Returns a random integer between min (inclusive) and max (inclusive). + * The value is no lower than min (or the next integer greater than min + * if min isn't an integer) and no greater than max (or the next integer + * lower than max if max isn't an integer). + * @param {Number} min + * @param {Number} max + * @returns + */ +export function getRandomInt(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(PRNG() * (max - min + 1)) + min; +} + +/** + * + * @param {Array} array + * @returns + */ +export function selectRandom(array) { + if(array.length < 1) return null; + return array[getRandomInt(0, array.length - 1)]; +} + +/** + * + * @param {Number} val + * @param {Number} by + * @returns + */ +export function integerDivision(val, by){ + return (val - val % by) / by; +} \ No newline at end of file diff --git a/src/Game/Utils/PRNG.utils.d.ts b/src/Game/Utils/PRNG.utils.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/Game/Utils/PRNG.utils.js b/src/Game/Utils/PRNG.utils.js new file mode 100644 index 0000000..e69de29 diff --git a/src/Game/Utils/Sprites.utils.d.ts b/src/Game/Utils/Sprites.utils.d.ts new file mode 100644 index 0000000..68261c4 --- /dev/null +++ b/src/Game/Utils/Sprites.utils.d.ts @@ -0,0 +1,8 @@ +/** + * Creates new PIXI.Sprite object from existing SpriteSheet (Atlas) + * @param {String} source + * @param {PIXI.Rectangle} rectangle + * @returns + */ +export function getSpriteFromAtlas(source: string, rectangle: PIXI.Rectangle): PIXI.Sprite; +import * as PIXI from "../../pixi/pixi.mjs"; diff --git a/src/Game/Utils/Sprites.utils.js b/src/Game/Utils/Sprites.utils.js new file mode 100644 index 0000000..6855122 --- /dev/null +++ b/src/Game/Utils/Sprites.utils.js @@ -0,0 +1,15 @@ +import * as PIXI from "../../pixi/pixi.mjs"; + +/** + * Creates new PIXI.Sprite object from existing SpriteSheet (Atlas) + * @param {String} source + * @param {PIXI.Rectangle} rectangle + * @returns + */ +export function getSpriteFromAtlas(source, rectangle) { + let texture = new PIXI.Texture({ + source: PIXI.Assets.get(source), + frame: rectangle + }); + return PIXI.Sprite.from(texture); +} \ No newline at end of file diff --git a/src/Game/Utils/Storage.util.d.ts b/src/Game/Utils/Storage.util.d.ts new file mode 100644 index 0000000..142d39b --- /dev/null +++ b/src/Game/Utils/Storage.util.d.ts @@ -0,0 +1,33 @@ +/** + * + * @param {Object} states + */ +export function StateStorage(states: Object): void; +export class StateStorage { + /** + * + * @param {Object} states + */ + constructor(states: Object); + states: { + constructor: Function; + toString(): string; + toLocaleString(): string; + valueOf(): Object; + hasOwnProperty(v: PropertyKey): boolean; + isPrototypeOf(v: Object): boolean; + propertyIsEnumerable(v: PropertyKey): boolean; + }; + listeners: any[]; + subscribe: (func: any) => void; + update: (changes: any) => void; + get: () => { + constructor: Function; + toString(): string; + toLocaleString(): string; + valueOf(): Object; + hasOwnProperty(v: PropertyKey): boolean; + isPrototypeOf(v: Object): boolean; + propertyIsEnumerable(v: PropertyKey): boolean; + }; +} diff --git a/src/Game/Utils/Storage.util.js b/src/Game/Utils/Storage.util.js new file mode 100644 index 0000000..1cf11b9 --- /dev/null +++ b/src/Game/Utils/Storage.util.js @@ -0,0 +1,20 @@ + +/** + * + * @param {Object} states + */ +export function StateStorage(states) { + this.states = {...states}; + this.listeners = []; + this.subscribe = (func) => { + this.listeners.push(func); + func({...this.states}); + }; + this.update = (changes) => { + changes(this.states); + for (const i of this.listeners) { + i({...this.states}); + } + }; + this.get = ()=>{return{...this.states}}; +} \ No newline at end of file diff --git a/src/Game/Utils/World.utils.d.ts b/src/Game/Utils/World.utils.d.ts new file mode 100644 index 0000000..80d398a --- /dev/null +++ b/src/Game/Utils/World.utils.d.ts @@ -0,0 +1 @@ +export function addToViewport(object: any): void; diff --git a/src/Game/Utils/World.utils.js b/src/Game/Utils/World.utils.js new file mode 100644 index 0000000..1401b56 --- /dev/null +++ b/src/Game/Utils/World.utils.js @@ -0,0 +1,22 @@ +import { BC_SELECTION, BC_VIEWPORT } from "../GlobalVariables/GlobalVariables"; + + +export function addToViewport(object) { + BC_VIEWPORT.addChild(object); + // if(BC_SELECTION) + // BC_VIEWPORT.setChildIndex(BC_SELECTION, 0); +}; +// export function addToTerrain(object, cellPosition, settings = {}) { +// BC_TERRAIN.addChild(object); +// BC_TERRAIN_VAULT[cellPosition.x + "_" + cellPosition.y] = { +// ref: object, +// ...settings +// } +// }; +// export function addToVegetation(object, cellPosition, settings = {}) { +// BC_VEGETATION.addChild(object); +// BC_VEGETATION_VAULT[cellPosition.x + "_" + cellPosition.y] = { +// ref: object, +// ...settings +// } +// }; \ No newline at end of file diff --git a/src/Game/Viewport/Viewport.d.ts b/src/Game/Viewport/Viewport.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/Game/Viewport/Viewport.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/Game/Viewport/Viewport.js b/src/Game/Viewport/Viewport.js new file mode 100644 index 0000000..498a38b --- /dev/null +++ b/src/Game/Viewport/Viewport.js @@ -0,0 +1 @@ +import { Container } from "pixi.js"; \ No newline at end of file diff --git a/src/Game/WorldChunk/WorldChunk.d.ts b/src/Game/WorldChunk/WorldChunk.d.ts new file mode 100644 index 0000000..ee81a9d --- /dev/null +++ b/src/Game/WorldChunk/WorldChunk.d.ts @@ -0,0 +1,2 @@ +export function createWorldChunk(): PIXI.Container; +import * as PIXI from "../../pixi/pixi.mjs"; diff --git a/src/Game/WorldChunk/WorldChunk.js b/src/Game/WorldChunk/WorldChunk.js new file mode 100644 index 0000000..60cae55 --- /dev/null +++ b/src/Game/WorldChunk/WorldChunk.js @@ -0,0 +1,67 @@ +import * as PIXI from "../../pixi/pixi.mjs"; + +export function createWorldChunk() { + let chunk = new PIXI.Container(); + let terrainLayer = new PIXI.Container(); + let vegetationLayer = new PIXI.Container(); + let buildingsLayer = new PIXI.Container(); + chunk.addChild(terrainLayer); + chunk.addChild(vegetationLayer); + chunk.addChild(buildingsLayer); + return chunk; +} + +/** + * + * @param {String} type + */ +export function terrainObjectProps(type) { + this.type = type; +}; + +/** + * + * @param {String} type + */ +export function buildingObjectProps(type) { + this.type = type; +}; + +/** + * + * @param {String} type + * @param {Number} num + */ +export function vegetationObjectProps(type, num) { + this.type = type; + this.num = num; +}; + +/** + * + * @param {terrainObjectProps} obj + */ +export function terrainObjectsVaultType(obj) +{ + +} + +/** + * + * @param {PIXI.Container} chunk + * @param {PIXI.Container} terrainLayer + * @param {PIXI.Container} vegetationLayer + * @param {PIXI.Container} buildingsLayer + * @param {terrainObjectsVaultType} terrainObjectsVault + * @param {vegetationObjectProps} vegetationObjectsVault + * @param {buildingObjectProps} buildingsObjectsVault + */ +export function WorldChunk(chunk, terrainLayer, vegetationLayer, buildingsLayer, terrainObjectsVault, vegetationObjectsVault, buildingsObjectsVault) { + this.chunk = chunk; + this.terrainLayer = terrainLayer; + this.vegetationLayer = vegetationLayer; + this.buildingsLayer = buildingsLayer; + this.terrainObjectsVault = terrainObjectsVault; + this.vegetationObjectsVault = vegetationObjectsVault; + this.buildingsObjectsVault = buildingsObjectsVault; +} diff --git a/src/Game/WorldGeneration/WorldGeneration.d.ts b/src/Game/WorldGeneration/WorldGeneration.d.ts new file mode 100644 index 0000000..d8f999f --- /dev/null +++ b/src/Game/WorldGeneration/WorldGeneration.d.ts @@ -0,0 +1,80 @@ +export function worldCoordinatesToChunkIndex(x: any, y: any): { + x: number; + y: number; +}; +export function worldCoordinatesToChunkIndexesCoordinates(x: any, y: any): { + x: number; + y: number; +}; +export function worldCoordinatesToChunkLocalCoordinates(x: any, y: any): { + x: number; + y: number; +}; +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getChunk(x: number, y: number): any; +export function updateChunksVisibility(): void; +/** + * + * @param {*} chunk from WORLD_CHUNKS + * @param {PIXI.Container} object + * @param {*} props any props + * @param {Number} ceiledX + * @param {Number} ceiledY + */ +export function addToTerrain(chunk: any, object: PIXI.Container, props: any, ceiledX: number, ceiledY: number): void; +/** + * + * @param {*} chunk from WORLD_CHUNKS + * @param {PIXI.Container} object + * @param {*} props any props + * @param {Number} ceiledX + * @param {Number} ceiledY + */ +export function addToVegetation(chunk: any, object: PIXI.Container, props: any, ceiledX: number, ceiledY: number): void; +/** + * + * @param {*} chunk from WORLD_CHUNKS + * @param {PIXI.Container} object + * @param {*} props any props + * @param {Number} ceiledX + * @param {Number} ceiledY + */ +export function addToBuildings(chunk: any, object: PIXI.Container, props: any, ceiledX: number, ceiledY: number): void; +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + * @param {PIXI.Container} object object to remove + */ +export function removeFromTerrain(x: number, y: number, object: PIXI.Container): void; +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + * @param {PIXI.Container} object object to remove + */ +export function removeFromVegetation(x: number, y: number, object: PIXI.Container): void; +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getObjectFromTerrainLayer(x: number, y: number): any; +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getObjectFromVegetationLayer(x: number, y: number): any; +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getObjectFromBuildingsLayer(x: number, y: number): any; +export function createFirstWorldChunks(): void; +import * as PIXI from "../../pixi/pixi.mjs"; diff --git a/src/Game/WorldGeneration/WorldGeneration.js b/src/Game/WorldGeneration/WorldGeneration.js new file mode 100644 index 0000000..398c362 --- /dev/null +++ b/src/Game/WorldGeneration/WorldGeneration.js @@ -0,0 +1,404 @@ +import { Noise } from "noisejs"; +import { BC_CAMERA, BC_CHUNKS_SETTINGS, BC_SPRITES_SETTINGS, BC_TERRAIN_SETTINGS, PRNG } from "../GlobalVariables/GlobalVariables"; +import { integerDivision } from "../Utils/Math.utils"; +import { addToViewport } from "../Utils/World.utils"; +import { WorldChunk, createWorldChunk } from "../WorldChunk/WorldChunk"; +import { getSpriteFromAtlas } from "../Utils/Sprites.utils"; +import * as PIXI from "../../pixi/pixi.mjs"; +// import {WorldChunk} from "../Types/WorldGenerationTypes"; + +const terrainSpriteList = { + 0: { x: 1, y: 1 }, //water + 1: { x: 0, y: 1 }, //sand + 2: { x: 0, y: 0 }, //grass + 3: { x: 1, y: 0 }, //stone +}; +const terrainTypeList = { + 0: "ter_water", //water + 1: "ter_sand", //sand + 2: "ter_grass", //grass + 3: "ter_stone", //stone +}; +const grassVegetationSpriteList = { + 0: { x: 10, y: 11 }, + 1: { x: 11, y: 11 }, + 2: { x: 12, y: 11 }, + 3: { x: 13, y: 11 }, + 4: { x: 14, y: 11 }, + 5: { x: 15, y: 11 }, + 6: { x: 16, y: 11 }, + 7: { x: 17, y: 11 }, + 8: { x: 18, y: 11 }, + 9: { x: 19, y: 11 }, + 10: { x: 0, y: 12 }, + 11: { x: 1, y: 12 }, + 12: { x: 2, y: 12 }, + 13: { x: 3, y: 12 }, + 14: { x: 7, y: 13 }, + 15: { x: 7, y: 12 }, + 16: { x: 8, y: 12 }, + 17: { x: 9, y: 12 }, +}; +const sandVegetationSpriteList = { + 0: { x: 14, y: 10 }, + 1: { x: 7, y: 13 }, + 2: { x: 6, y: 13 }, + 3: { x: 5, y: 13 }, + 4: { x: 4, y: 13 }, + 5: { x: 3, y: 13 }, +}; +const stoneVegetationSpriteList = { + 0: { x: 5, y: 13 }, + 1: { x: 4, y: 13 }, + 2: { x: 3, y: 13 }, +}; +const grassVegResourcesList = { + 0: { type: "grass", num: 10 / 5 }, + 1: { type: "grass", num: 9 / 5 }, + 2: { type: "grass", num: 8 / 5 }, + 3: { type: "grass", num: 7 / 5 }, + 4: { type: "grass", num: 4 / 5 }, + 5: { type: "grass", num: 4 / 5 }, + 6: { type: "grass", num: 5 / 5 }, + 7: { type: "grass", num: 3 / 5 }, + 8: { type: "grass", num: 2 / 5 }, + 9: { type: "grass", num: 1 / 5 }, + 10: { type: "grass", num: 2 / 5 }, + 11: { type: "grass", num: 2 / 5 }, + 12: { type: "grass", num: 2 / 5 }, + 13: { type: "grass", num: 2 / 5 }, + 14: { type: "stone", num: 1 / 5 }, + 15: { type: "wood", num: 2 / 5 }, + 16: { type: "wood", num: 2 / 5 }, + 17: { type: "wood", num: 2 / 5 }, +}; + +const sandVegResourcesList = { + 0: { type: "grass", num: 4 / 5 }, + 1: { type: "stone", num: 1 / 5 }, + 2: { type: "stone", num: 3 / 5 }, + 3: { type: "stone", num: 4 / 5 }, + 4: { type: "stone", num: 5 / 5 }, + 5: { type: "stone", num: 5 / 5 }, +}; + +const stoneVegResourcesList = { + 0: { type: "stone", num: 4 / 5 }, + 1: { type: "stone", num: 5 / 5 }, + 2: { type: "stone", num: 5 / 5 }, +}; + +/** + * { + * chunk: PIXI.Container - chunk, + terrainLayer: PIXI.Container - 0 index child, + vegetationLayer: PIXI.Container - 1st child, + terrainObjectsVault: {}, + vegetationObjectsVault: {} + * } +*/ +const WORLD_CHUNKS = {}; +let VISIBLE_CHUNKS = {}; + +export function worldCoordinatesToChunkIndex(x, y) { + let w = BC_CHUNKS_SETTINGS.width * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let h = BC_CHUNKS_SETTINGS.height * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + return { x: Math.floor(x / w), y: Math.floor(y / h) }; +} +export function worldCoordinatesToChunkIndexesCoordinates(x, y) { + let ws = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let hs = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + return { x: Math.floor(x / ws), y: Math.floor(y / hs) }; +} +export function worldCoordinatesToChunkLocalCoordinates(x, y) { + let ws = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let hs = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + if (x < 0 && y >= 0) + return { + x: BC_CHUNKS_SETTINGS.width - (Math.floor(Math.abs(x) / ws) % BC_CHUNKS_SETTINGS.width) - 1, + y: Math.floor(Math.abs(y) / hs) % BC_CHUNKS_SETTINGS.height, + }; + else if (x < 0 && y < 0) + return { + x: BC_CHUNKS_SETTINGS.width - (Math.floor(Math.abs(x) / ws) % BC_CHUNKS_SETTINGS.width) - 1, + y: BC_CHUNKS_SETTINGS.height - (Math.floor(Math.abs(y) / hs) % BC_CHUNKS_SETTINGS.height) - 1, + }; + else if (x > 0 && y < 0) + return { + x: Math.floor(Math.abs(x) / ws) % BC_CHUNKS_SETTINGS.width, + y: BC_CHUNKS_SETTINGS.height - (Math.floor(Math.abs(y) / hs) % BC_CHUNKS_SETTINGS.height) - 1, + }; + else + return { + x: Math.floor(Math.abs(x) / ws) % BC_CHUNKS_SETTINGS.width, + y: Math.floor(Math.abs(y) / hs) % BC_CHUNKS_SETTINGS.height, + }; +} + +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getChunk(x, y) { + let t = worldCoordinatesToChunkIndex(x, y); + if (WORLD_CHUNKS[t.x + "_" + t.y]) return WORLD_CHUNKS[t.x + "_" + t.y]; + else return undefined; +} + +let enableAutoGeneration = false; + +export function updateChunksVisibility() { + let w = BC_CHUNKS_SETTINGS.width * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let h = BC_CHUNKS_SETTINGS.height * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let cx = Math.floor(BC_CAMERA.position.x / w); + let cy = Math.floor(BC_CAMERA.position.y / h); + let chunkId = cx + "_" + cy; + if ((VISIBLE_CHUNKS[chunkId] && !VISIBLE_CHUNKS[chunkId].central) || !VISIBLE_CHUNKS[chunkId]) { + for (const key in VISIBLE_CHUNKS) { + VISIBLE_CHUNKS[key].chunkRef.chunk.visible = false; + } + VISIBLE_CHUNKS = {}; + for (let i = -1; i < 2; i++) { + for (let j = -1; j < 2; j++) { + let t_chunkId = cx + i + "_" + (cy + j); + if (WORLD_CHUNKS[t_chunkId]) { + VISIBLE_CHUNKS[t_chunkId] = { chunkRef: WORLD_CHUNKS[t_chunkId], central: i === 0 && j === 0 }; + VISIBLE_CHUNKS[t_chunkId].chunkRef.chunk.visible = true; + } else if (enableAutoGeneration) { + console.log(t_chunkId); + let newChunk = createWorldChunk(); + // chunkRef.isRenderGroup = true; + newChunk.position.set(w * (cx + i), h * (cy + j)); + // console.log(w * chunkXCeiled, h * chunkYCeiled); + let chunk0 = new WorldChunk(newChunk, newChunk.getChildAt(0), newChunk.getChildAt(1), newChunk.getChildAt(2), {}, {}, {}); + fillChunk(chunk0, cx + i, cy + j); + WORLD_CHUNKS[t_chunkId] = chunk0; + addToViewport(newChunk); + VISIBLE_CHUNKS[t_chunkId] = { chunkRef: WORLD_CHUNKS[t_chunkId], central: i === 0 && j === 0 }; + VISIBLE_CHUNKS[t_chunkId].chunkRef.chunk.visible = true; + } + } + } + } +} + +/** + * + * @param {*} chunk from WORLD_CHUNKS + * @param {PIXI.Container} object + * @param {*} props any props + * @param {Number} ceiledX + * @param {Number} ceiledY + */ +export function addToTerrain(chunk, object, props = {}, ceiledX, ceiledY) { + chunk.terrainLayer.addChild(object); + chunk.terrainObjectsVault[ceiledX + "_" + ceiledY] = { obj: object, ...props }; +} + +/** + * + * @param {*} chunk from WORLD_CHUNKS + * @param {PIXI.Container} object + * @param {*} props any props + * @param {Number} ceiledX + * @param {Number} ceiledY + */ +export function addToVegetation(chunk, object, props = {}, ceiledX, ceiledY) { + chunk.vegetationLayer.addChild(object); + chunk.vegetationObjectsVault[ceiledX + "_" + ceiledY] = { obj: object, ...props }; +} + +/** + * + * @param {*} chunk from WORLD_CHUNKS + * @param {PIXI.Container} object + * @param {*} props any props + * @param {Number} ceiledX + * @param {Number} ceiledY + */ +export function addToBuildings(chunk, object, props = {}, ceiledX, ceiledY) { + chunk.buildingsLayer.addChild(object); + chunk.buildingsObjectsVault[ceiledX + "_" + ceiledY] = { obj: object, ...props }; +} + +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + * @param {PIXI.Container} object object to remove + */ +export function removeFromTerrain(x, y, object) { + let chunkIndex = worldCoordinatesToChunkIndex(x, y); + let chunkId = chunkIndex.x + "_" + chunkIndex.y; + if (WORLD_CHUNKS[chunkId]) { + let objLocalPos = worldCoordinatesToChunkIndexesCoordinates(x, y); + let objId = objLocalPos.x + "_" + objLocalPos.y; + WORLD_CHUNKS[chunkId].terrainLayer.removeChild(object); + WORLD_CHUNKS[chunkId].terrainObjectsVault[objId] = undefined; + object.destroy(); + } +} +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + * @param {PIXI.Container} object object to remove + */ +export function removeFromVegetation(x, y, object) { + let chunkIndex = worldCoordinatesToChunkIndex(x, y); + let chunkId = chunkIndex.x + "_" + chunkIndex.y; + if (WORLD_CHUNKS[chunkId]) { + let objLocalPos = worldCoordinatesToChunkIndexesCoordinates(x, y); + let objId = objLocalPos.x + "_" + objLocalPos.y; + WORLD_CHUNKS[chunkId].vegetationLayer.removeChild(object); + WORLD_CHUNKS[chunkId].vegetationObjectsVault[objId] = undefined; + object.destroy(); + } +} + +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getObjectFromTerrainLayer(x, y) { + // let t_ceiled = {x: Math.floor(t.x / (BC_TERRAIN_SETTINGS.tileSize*BC_TERRAIN_SETTINGS.scale)), y: Math.floor(t.y / (BC_TERRAIN_SETTINGS.tileSize*BC_TERRAIN_SETTINGS.scale))}; + let w = BC_CHUNKS_SETTINGS.width * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let h = BC_CHUNKS_SETTINGS.height * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let ws = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let hs = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let chunkId = Math.floor(x / w) + "_" + Math.floor(y / h); + let objectId = Math.floor(x / ws) + "_" + Math.floor(y / hs); + if (WORLD_CHUNKS[chunkId]) return WORLD_CHUNKS[chunkId].terrainObjectsVault[objectId]; +} +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getObjectFromVegetationLayer(x, y) { + // let t_ceiled = {x: Math.floor(t.x / (BC_TERRAIN_SETTINGS.tileSize*BC_TERRAIN_SETTINGS.scale)), y: Math.floor(t.y / (BC_TERRAIN_SETTINGS.tileSize*BC_TERRAIN_SETTINGS.scale))}; + let w = BC_CHUNKS_SETTINGS.width * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let h = BC_CHUNKS_SETTINGS.height * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let ws = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let hs = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let chunkId = Math.floor(x / w) + "_" + Math.floor(y / h); + let objectId = Math.floor(x / ws) + "_" + Math.floor(y / hs); + if (WORLD_CHUNKS[chunkId]) return WORLD_CHUNKS[chunkId].vegetationObjectsVault[objectId]; +} + +/** + * + * @param {Number} x world coordinates + * @param {Number} y world coordinates + */ +export function getObjectFromBuildingsLayer(x, y) { + // let t_ceiled = {x: Math.floor(t.x / (BC_TERRAIN_SETTINGS.tileSize*BC_TERRAIN_SETTINGS.scale)), y: Math.floor(t.y / (BC_TERRAIN_SETTINGS.tileSize*BC_TERRAIN_SETTINGS.scale))}; + let w = BC_CHUNKS_SETTINGS.width * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let h = BC_CHUNKS_SETTINGS.height * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let ws = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let hs = BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let chunkId = Math.floor(x / w) + "_" + Math.floor(y / h); + let objectId = Math.floor(x / ws) + "_" + Math.floor(y / hs); + if (WORLD_CHUNKS[chunkId]) return WORLD_CHUNKS[chunkId].buildingsObjectsVault[objectId]; +} + +export function createFirstWorldChunks() { + let w = BC_CHUNKS_SETTINGS.width * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + let h = BC_CHUNKS_SETTINGS.height * BC_TERRAIN_SETTINGS.tileSize * BC_TERRAIN_SETTINGS.scale; + for (let i = -1; i < 2; i++) { + for (let j = -1; j < 2; j++) { + let chunkXCeiled = Math.floor((BC_CAMERA.position.x + w * i) / w); + let chunkYCeiled = Math.floor((BC_CAMERA.position.y + h * j) / h); + let chunkId = chunkXCeiled + "_" + chunkYCeiled; + console.log(chunkId); + let chunkRef = createWorldChunk(); + // chunkRef.isRenderGroup = true; + chunkRef.position.set(w * chunkXCeiled, h * chunkYCeiled); + // console.log(w * chunkXCeiled, h * chunkYCeiled); + let chunk0 = { + chunk: chunkRef, + terrainLayer: chunkRef.getChildAt(0), + vegetationLayer: chunkRef.getChildAt(1), + buildingsLayer: chunkRef.getChildAt(2), + terrainObjectsVault: {}, + vegetationObjectsVault: {}, + buildingsObjectsVault: {}, + }; + + fillChunk(chunk0, chunkXCeiled, chunkYCeiled); + WORLD_CHUNKS[chunkId] = chunk0; + chunkRef.visible = false; + addToViewport(chunkRef); + // console.log(chunkXCeiled, chunkYCeiled); + } + } + enableAutoGeneration = true; +} + +let noise = new Noise(Math.floor(PRNG() * 18882232)); + +function fillChunk(chunk, x, y) { + let ii = 0; + let jj = 0; + for (let i = BC_CHUNKS_SETTINGS.width * x; i < BC_CHUNKS_SETTINGS.width * (x + 1); i++) { + jj = 0; + for (let j = BC_CHUNKS_SETTINGS.height * y; j < BC_CHUNKS_SETTINGS.height * (y + 1); j++) { + let res = (noise.simplex2(i * 0.04, j * 0.04) + 1) / 2; + // console.log(res); + res = Math.pow(res, 1.2); + res = Math.floor(res * 4); + let sprite = getSpriteFromAtlas( + "assets/images/world/world_terrain_atlas.png", + new PIXI.Rectangle(16 * terrainSpriteList[res].x, 16 * terrainSpriteList[res].y, 16, 16) + ); + sprite.position.set(16 * BC_SPRITES_SETTINGS.scale * ii, 16 * BC_SPRITES_SETTINGS.scale * jj); + sprite.scale.set(BC_SPRITES_SETTINGS.scale, BC_SPRITES_SETTINGS.scale); + addToTerrain(chunk, sprite, { type: terrainTypeList[res] }, i, j); + // console.log(ii, jj); + // addToTerrain(sprite, {x: i, y: j}, {type: terrainTypeList[res]}); + if (res === 2 && PRNG() > 0.9) { + let rv = Math.floor(PRNG() * 18); + + let veg = getSpriteFromAtlas( + "assets/images/world/vegetation_ts.png", + new PIXI.Rectangle(16 * grassVegetationSpriteList[rv].x, 16 * grassVegetationSpriteList[rv].y, 16, 16) + ); + veg.position.set(16 * BC_SPRITES_SETTINGS.scale * ii, 16 * BC_SPRITES_SETTINGS.scale * jj); + veg.scale.set(BC_SPRITES_SETTINGS.scale, BC_SPRITES_SETTINGS.scale); + addToVegetation(chunk, veg, { ...grassVegResourcesList[rv] }, i, j); + jj++; + continue; + } + if (res === 1 && PRNG() > 0.99) { + let rv = Math.floor(PRNG() * 6); + + let veg = getSpriteFromAtlas( + "assets/images/world/vegetation_ts.png", + new PIXI.Rectangle(16 * sandVegetationSpriteList[rv].x, 16 * sandVegetationSpriteList[rv].y, 16, 16) + ); + veg.position.set(16 * BC_SPRITES_SETTINGS.scale * ii, 16 * BC_SPRITES_SETTINGS.scale * jj); + veg.scale.set(BC_SPRITES_SETTINGS.scale, BC_SPRITES_SETTINGS.scale); + addToVegetation(chunk, veg, { ...sandVegResourcesList[rv] }, i, j); + jj++; + continue; + } + if (res === 3 && PRNG() > 0.9) { + let rv = Math.floor(PRNG() * 3); + + let veg = getSpriteFromAtlas( + "assets/images/world/vegetation_ts.png", + new PIXI.Rectangle(16 * stoneVegetationSpriteList[rv].x, 16 * stoneVegetationSpriteList[rv].y, 16, 16) + ); + veg.position.set(16 * BC_SPRITES_SETTINGS.scale * ii, 16 * BC_SPRITES_SETTINGS.scale * jj); + veg.scale.set(BC_SPRITES_SETTINGS.scale, BC_SPRITES_SETTINGS.scale); + addToVegetation(chunk, veg, { ...stoneVegResourcesList[rv] }, i, j); + jj++; + continue; + } + jj++; + } + ii++; + } +} diff --git a/src/TailwindCss.svelte b/src/TailwindCss.svelte new file mode 100644 index 0000000..7954e02 --- /dev/null +++ b/src/TailwindCss.svelte @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/UI/GlobalNamespace/GlobalNamespace.d.ts b/src/UI/GlobalNamespace/GlobalNamespace.d.ts new file mode 100644 index 0000000..8049fbd --- /dev/null +++ b/src/UI/GlobalNamespace/GlobalNamespace.d.ts @@ -0,0 +1,2 @@ +export const UIGlobalPipe: StateStorage; +import { StateStorage } from "../../Game/Utils/Storage.util"; diff --git a/src/UI/GlobalNamespace/GlobalNamespace.js b/src/UI/GlobalNamespace/GlobalNamespace.js new file mode 100644 index 0000000..04a1c34 --- /dev/null +++ b/src/UI/GlobalNamespace/GlobalNamespace.js @@ -0,0 +1,8 @@ +import { StateStorage } from "../../Game/Utils/Storage.util"; +import MainMenuState from "../States/MainMenu/MainMenuState.svelte"; + +export const UIGlobalPipe = new StateStorage({ + previousStateComponent: null, + currentStateComponent: MainMenuState + // currentStateComponent: null +}); \ No newline at end of file diff --git a/src/UI/States/HUD/HUD.svelte b/src/UI/States/HUD/HUD.svelte new file mode 100644 index 0000000..c035330 --- /dev/null +++ b/src/UI/States/HUD/HUD.svelte @@ -0,0 +1,85 @@ + + +
+
+
+

Wood: {obtainedWood.toFixed(2)}

+

Stone: {obtainedStone.toFixed(2)}

+

Grass: {obtainedGrass.toFixed(2)}

+

Gold: {obtainedGold.toFixed(2)}

+

Gold / sec: {goldPerSec.toFixed(2)}

+

Score: {score.toFixed(2)}

+ + + {#if buildMode} +
+
+ + +
+
+ + +
+
+ {/if} +
+
+
diff --git a/src/UI/States/MainMenu/MainMenuState.svelte b/src/UI/States/MainMenu/MainMenuState.svelte new file mode 100644 index 0000000..9063b27 --- /dev/null +++ b/src/UI/States/MainMenu/MainMenuState.svelte @@ -0,0 +1,27 @@ + + +
+
+ + + +
+
diff --git a/src/UI/States/NotImplementedYet/NotImplementedYet.svelte b/src/UI/States/NotImplementedYet/NotImplementedYet.svelte new file mode 100644 index 0000000..da484cc --- /dev/null +++ b/src/UI/States/NotImplementedYet/NotImplementedYet.svelte @@ -0,0 +1,21 @@ + +
+

+ Well, here's a funny story: our resident wizard, Archmage Debuggon (who, by the way, claims to have graduated top of his class from the Arcane + University of Coding... we have our doubts), was supposed to cast the mighty spell of Implementation on this very feature. But, as it turns out, he + mixed up his scrolls and accidentally conjured a flock of digital ducks into the game instead. Quack! +

+ +
diff --git a/src/main.d.ts b/src/main.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..4c473fa --- /dev/null +++ b/src/main.js @@ -0,0 +1,7 @@ +import App from './App.svelte'; + +const app = new App({ + target: document.body +}); + +export default app; \ No newline at end of file diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/pixi/pixi.d.mts b/src/pixi/pixi.d.mts new file mode 100644 index 0000000..b863be8 --- /dev/null +++ b/src/pixi/pixi.d.mts @@ -0,0 +1,10692 @@ +declare const eo_base: any; +declare class eo extends eo_base { + [x: string]: any; + constructor(...args: any[]); + chars: any; + lineHeight: number; + fontFamily: string; + fontMetrics: { + fontSize: number; + ascent: number; + descent: number; + }; + baseLineOffset: number; + distanceField: { + type: string; + range: number; + }; + pages: any[]; + baseMeasurementFontSize: number; + baseRenderedFontSize: number; + get font(): string; + get pageTextures(): any[]; + get size(): number; + get distanceFieldRange(): number; + get distanceFieldType(): string; + destroy(t?: boolean): void; +} +declare let Or: { + new (t: any): { + [x: string]: any; + runners: any; + renderPipes: any; + _initOptions: {}; + _systemsHash: any; + type: any; + name: any; + init(t?: {}): Promise; + _roundPixels: number | undefined; + render(t: any, e: any): void; + _lastObjectRendered: any; + resize(t: any, e: any, s: any): void; + clear(t?: {}): void; + resolution: any; + readonly width: any; + readonly height: any; + readonly canvas: any; + readonly lastObjectRendered: any; + readonly renderingToScreen: any; + readonly screen: any; + _addRunners(...t: any[]): void; + _addSystems(t: any): void; + _addSystem(t: any, e: any): any; + _addPipes(t: any, e: any): void; + destroy(t?: boolean): void; + generateTexture(t: any): any; + readonly roundPixels: boolean; + _unsafeEvalCheck(): void; + }; + [x: string]: any; + defaultOptions: { + resolution: number; + failIfMajorPerformanceCaveat: boolean; + roundPixels: boolean; + }; +}; +declare class fi extends V { + constructor(t: any, e: any); + batched: boolean; + resolution: any; + _didTextUpdate: boolean; + _roundPixels: number; + _bounds: lt; + _boundsDirty: boolean; + _styleClass: any; + set text(t: any); + get text(): any; + set style(t: any); + get style(): any; + allowChildren: boolean; + _anchor: rt; + set anchor(t: rt); + get anchor(): rt; + set roundPixels(t: boolean); + get roundPixels(): boolean; + _text: any; + _style: any; + get bounds(): lt; + addBounds(t: any): void; + containsPoint(t: any): boolean; + onViewUpdate(): void; + _getKey(): string; + owner: any; +} +declare class en { + constructor(t: any, e?: any); + _mobileInfo: any; + debug: boolean; + _isActive: boolean; + _isMobileAccessibility: boolean; + _pool: any[]; + _renderId: number; + _children: any[]; + _androidUpdateCount: number; + _androidUpdateFrequency: number; + _hookDiv: HTMLButtonElement | null; + _div: HTMLDivElement; + _renderer: any; + _onKeyDown(t: any): void; + _onMouseMove(t: any): void; + get isActive(): boolean; + get isMobileAccessibility(): boolean; + get hookDiv(): HTMLButtonElement | null; + _createTouchHook(): void; + _destroyTouchHook(): void; + _activate(): void; + _deactivate(): void; + _updateAccessibleObjects(t: any): void; + init(t: any): void; + postrender(): void; + _updateDebugHTML(t: any): void; + _capHitArea(t: any): void; + _addChild(t: any): void; + _dispatchEvent(t: any, e: any): void; + _onClick(t: any): void; + _onFocus(t: any): void; + _onFocusOut(t: any): void; + destroy(): void; +} +declare namespace en { + namespace extension { + let type: any[]; + let name: string; + } +} +declare let KT: { + new (t: any): { + [x: string]: any; + alpha: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + alpha: number; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; +}; +declare class pn { + static test(t: any): boolean; + constructor(t: any); + priority: number; + pipe: string; + init(t: any): void; + mask: any; + renderMaskToTexture: boolean | undefined; + reset(): void; + addBounds(t: any, e: any): void; + addLocalBounds(t: any, e: any): void; + containsPoint(t: any, e: any): any; + destroy(): void; +} +declare namespace pn { + let extension_1: any; + export { extension_1 as extension }; +} +declare class Pa { + constructor(t: any); + _activeMaskStage: any[]; + _renderer: any; + push(t: any, e: any, s: any): void; + pop(t: any, e: any, s: any): void; + execute(t: any): void; + destroy(): void; +} +declare namespace Pa { + export namespace extension_2 { + let type_1: any[]; + export { type_1 as type }; + let name_1: string; + export { name_1 as name }; + } + export { extension_2 as extension }; +} +declare class Yr extends Ft { + static fromFrames(t: any): Yr; + static fromImages(t: any): Yr; + constructor(t: any, e?: boolean); + _textures: any; + _durations: any[] | null; + _autoUpdate: boolean; + _isConnectedToTicker: boolean; + animationSpeed: number; + loop: boolean; + updateAnchor: boolean; + onComplete: any; + onFrameChange: any; + onLoop: any; + _currentTime: number; + _playing: boolean; + _previousFrame: any; + set textures(t: any); + get textures(): any; + stop(): void; + play(): void; + gotoAndStop(t: any): void; + set currentFrame(t: number); + get currentFrame(): number; + gotoAndPlay(t: any): void; + update(t: any): void; + _updateTexture(): void; + destroy(): void; + get totalFrames(): any; + get playing(): boolean; + set autoUpdate(t: boolean); + get autoUpdate(): boolean; +} +declare let Cp: { + new (...t: any[]): { + stage: V; + init(t: any): Promise; + renderer: z_ | null | undefined; + render(): void; + readonly canvas: any; + readonly view: any; + readonly screen: any; + destroy(t?: boolean, e?: boolean): void; + }; + _plugins: any[]; +}; +declare const Br: mf; +declare class mf { + _detections: any[]; + _initialized: boolean; + resolver: qt; + loader: Xp; + cache: { + _parsers: any[]; + _cache: Map; + _cacheMap: Map; + reset(): void; + has(t: any): boolean; + get(t: any): any; + set(t: any, e: any): void; + remove(t: any): void; + readonly parsers: any[]; + }; + _backgroundLoader: Gp; + init(t?: {}): Promise; + add(t: any): void; + load(t: any, e: any): Promise; + addBundle(t: any, e: any): void; + loadBundle(t: any, e: any): Promise; + backgroundLoad(t: any): Promise; + backgroundLoadBundle(t: any): Promise; + reset(): void; + get(t: any): any; + _mapLoadToResolve(t: any, e: any): Promise<{}>; + unload(t: any): Promise; + unloadBundle(t: any): Promise; + _unloadFromResolved(t: any): Promise; + _detectFormats(t: any): Promise; + get detections(): any[]; + setPreferences(t: any): void; +} +declare namespace Lh { + let normal: string; + let add: string; + let screen: string; +} +declare var Xr: any; +declare class Gp { + constructor(t: any, e?: boolean); + _loader: any; + _assetList: any[]; + _isLoading: boolean; + _maxConcurrent: number; + verbose: boolean; + add(t: any): void; + _next(): Promise; + set active(t: any); + get active(): any; + _isActive: any; +} +declare let o_: { + new (): { + clearBeforeRender: boolean; + _backgroundColor: { + _value: any; + _components: Float32Array; + _int: number; + value: any; + readonly red: number; + readonly green: number; + readonly blue: number; + readonly alpha: number; + setValue(t: any): any; + _cloneSource(t: any): any; + _isSourceEqual(t: any, e: any): any; + toRgba(): { + r: number; + g: number; + b: number; + a: number; + }; + toRgb(): { + r: number; + g: number; + b: number; + }; + toRgbaString(): string; + toUint8RgbArray(t: any): any; + _arrayRgb: any[] | undefined; + toArray(t: any): any; + _arrayRgba: any[] | undefined; + toRgbArray(t: any): any; + toNumber(): number; + toBgrNumber(): any; + toLittleEndianNumber(): number; + multiply(t: any): any; + premultiply(t: any, e?: boolean): any; + toPremultiplied(t: any, e?: boolean): number; + toHex(): string; + toHexa(): string; + setAlpha(t: any): any; + _normalize(t: any): void; + _refreshInt(): void; + _clamp(t: any, e?: number, s?: number): any; + }; + color: { + _value: any; + _components: Float32Array; + _int: number; + value: any; + readonly red: number; + readonly green: number; + readonly blue: number; + readonly alpha: number; + setValue(t: any): any; + _cloneSource(t: any): any; + _isSourceEqual(t: any, e: any): any; + toRgba(): { + r: number; + g: number; + b: number; + a: number; + }; + toRgb(): { + r: number; + g: number; + b: number; + }; + toRgbaString(): string; + toUint8RgbArray(t: any): any; + _arrayRgb: any[] | undefined; + toArray(t: any): any; + _arrayRgba: any[] | undefined; + toRgbArray(t: any): any; + toNumber(): number; + toBgrNumber(): any; + toLittleEndianNumber(): number; + multiply(t: any): any; + premultiply(t: any, e?: boolean): any; + toPremultiplied(t: any, e?: boolean): number; + toHex(): string; + toHexa(): string; + setAlpha(t: any): any; + _normalize(t: any): void; + _refreshInt(): void; + _clamp(t: any, e?: number, s?: number): any; + }; + alpha: number; + init(t: any): void; + readonly colorRgba: any; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + priority: number; + }; + defaultOptions: { + backgroundAlpha: number; + backgroundColor: number; + clearBeforeRender: boolean; + }; +}; +declare class An { + renderPipeId: string; + action: string; + start: number; + size: number; + blendMode: string; + canBundle: boolean; + destroy(): void; + textures: any; + gpuBindGroup: any; + bindGroup: any; + batcher: any; +} +declare class yn extends Oe { + constructor(); +} +declare class En { + ids: any; + textures: any[]; + count: number; + clear(): void; +} +declare class vs { + batcher: any; + batch: any; + applyTransform: boolean; + roundPixels: number; + get blendMode(): any; + packIndex(t: any, e: any, s: any): void; + packAttributes(t: any, e: any, s: any, i: any): void; + get vertSize(): any; + copyTo(t: any): void; + reset(): void; +} +declare class ws { + batcher: any; + batch: any; + roundPixels: number; + _uvUpdateId: number; + _textureMatrixUpdateId: number; + get blendMode(): any; + reset(): void; + mesh: any; + texture: any; + packIndex(t: any, e: any, s: any): void; + packAttributes(t: any, e: any, s: any, i: any): void; + _transformedUvs: Float32Array | undefined; + get vertexSize(): number; + get indexSize(): any; +} +declare class Rs { + vertexSize: number; + indexSize: number; + location: number; + batcher: any; + batch: any; + roundPixels: number; + get blendMode(): any; + packAttributes(t: any, e: any, s: any, i: any): void; + packIndex(t: any, e: any, s: any): void; + reset(): void; + renderable: any; + texture: any; + bounds: any; +} +declare let Pn: { + new (t?: {}): { + uid: number; + dirty: boolean; + batchIndex: number; + batches: any[]; + _vertexSize: number; + _elements: any[]; + _batchPool: any[]; + _batchPoolIndex: number; + _textureBatchPool: any[]; + _textureBatchPoolIndex: number; + attributeBuffer: Tn; + indexBuffer: Uint16Array; + begin(): void; + elementSize: number | undefined; + elementStart: number | undefined; + indexSize: number | undefined; + attributeSize: number | undefined; + _batchIndexStart: any; + _batchIndexSize: any; + add(t: any): void; + checkAndUpdateTexture(t: any, e: any): boolean; + updateElement(t: any): void; + break(t: any): void; + _finishBatch(t: any, e: any, s: any, i: any, n: any, o: any, a: any): void; + finish(t: any): void; + ensureAttributeBuffer(t: any): void; + ensureIndexBuffer(t: any): void; + _resizeAttributeBuffer(t: any): void; + _resizeIndexBuffer(t: any): void; + destroy(): void; + }; + defaultOptions: { + vertexSize: number; + indexSize: number; + }; +}; +declare class Aa { + constructor(t: any, e: any); + state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + _batches: any; + _geometries: any; + renderer: any; + _adaptor: any; + buildStart(t: any): void; + _activeBatch: any; + _activeGeometry: any; + addToBatch(t: any): void; + break(t: any): void; + buildEnd(t: any): void; + upload(t: any): void; + execute(t: any): void; + destroy(): void; +} +declare namespace Aa { + export namespace extension_3 { + let type_2: any[]; + export { type_2 as type }; + let name_2: string; + export { name_2 as name }; + } + export { extension_3 as extension }; +} +declare const H: El; +declare class Lt { + constructor(t: any); + resources: any; + _dirty: boolean; + _updateKey(): void; + _key: string | undefined; + setResource(t: any, e: any): void; + getResource(t: any): any; + _touch(t: any): void; + destroy(): void; + onResourceChange(): void; +} +declare class Pu { + constructor(t: any); + _hash: any; + _renderer: any; + contextChange(t: any): void; + _gpu: any; + getBindGroup(t: any, e: any, s: any): any; + _createBindGroup(t: any, e: any, s: any): any; + destroy(): void; +} +declare namespace Pu { + export namespace extension_4 { + let type_3: any[]; + export { type_3 as type }; + let name_3: string; + export { name_3 as name }; + } + export { extension_4 as extension }; +} +declare class bo extends eo { + static install(t: any): void; + static uninstall(t: any): void; + constructor(t: any, e: any); + baseRenderedFontSize: any; + baseMeasurementFontSize: any; + fontMetrics: { + ascent: number; + descent: number; + fontSize: any; + }; + baseLineOffset: any; + lineHeight: any; + fontFamily: any; + distanceField: any; + url: any; + destroy(): void; +} +declare const Pr: { + ALPHA: (string | string[])[]; + NUMERIC: string[][]; + ALPHANUMERIC: (string | string[])[]; + ASCII: string[][]; + defaultOptions: { + chars: (string | string[])[]; + resolution: number; + padding: number; + skipKerning: boolean; + }; + getFont(t: any, e: any): any; + getLayout(t: any, e: any): { + width: number; + height: number; + offsetY: number; + scale: number; + lines: { + width: number; + charPositions: never[]; + spaceWidth: number; + spacesIndex: never[]; + chars: never[]; + }[]; + }; + measureText(t: any, e: any): { + width: number; + height: number; + offsetY: number; + scale: number; + lines: { + width: number; + charPositions: never[]; + spaceWidth: number; + spacesIndex: never[]; + chars: never[]; + }[]; + }; + install(...t: any[]): go; + uninstall(t: any): void; +}; +declare class zm extends fi { + constructor(...t: any[]); + renderPipeId: string; + _updateBounds(): void; +} +declare class Go { + constructor(t: any); + _gpuBitmapText: {}; + _renderer: any; + validateRenderable(t: any): any; + addRenderable(t: any, e: any): void; + destroyRenderable(t: any): void; + _destroyRenderableByUid(t: any): void; + updateRenderable(t: any): void; + _updateContext(t: any, e: any): void; + _sdfShader: Id | null | undefined; + _getGpuBitmapText(t: any): any; + initGpuText(t: any): any; + _updateDistanceField(t: any): void; + destroy(): void; +} +declare namespace Go { + export namespace extension_5 { + let type_4: any[]; + export { type_4 as type }; + let name_4: string; + export { name_4 as name }; + } + export { extension_5 as extension }; +} +declare const NT_base: { + new (t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + blendMode: string; + resolution: number; + padding: number; + antialias: string; + blendRequired: boolean; + }; +}; +declare class NT extends NT_base { +} +declare class fu { + constructor(t: any); + _isAdvanced: boolean; + _filterHash: any; + _renderer: any; + setBlendMode(t: any, e: any, s: any): void; + _activeBlendMode: any; + _beginAdvancedBlendMode(t: any): void; + _renderableList: any[] | null | undefined; + _endAdvancedBlendMode(t: any): void; + buildStart(): void; + buildEnd(t: any): void; + destroy(): void; +} +declare namespace fu { + export namespace extension_6 { + let type_5: any[]; + export { type_5 as type }; + let name_5: string; + export { name_5 as name }; + } + export { extension_6 as extension }; +} +declare const um_base: { + new (t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + blendMode: string; + resolution: number; + padding: number; + antialias: string; + blendRequired: boolean; + }; +}; +declare class um extends um_base { + constructor(...t: any[]); + _repeatEdgePixels: boolean; + blurXFilter: { + [x: string]: any; + horizontal: any; + _quality: number; + quality: number; + blur: any; + _uniforms: any; + apply(t: any, e: any, s: any, i: any): void; + padding: any; + strength: any; + passes: number | undefined; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + antialias: any; + resolution: any; + blendRequired: any; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + blurYFilter: { + [x: string]: any; + horizontal: any; + _quality: number; + quality: number; + blur: any; + _uniforms: any; + apply(t: any, e: any, s: any, i: any): void; + padding: any; + strength: any; + passes: number | undefined; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + antialias: any; + resolution: any; + blendRequired: any; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + set quality(t: number); + get quality(): number; + set blur(t: any); + get blur(): any; + set repeatEdgePixels(t: boolean); + get repeatEdgePixels(): boolean; + updatePadding(): void; + set blurX(t: any); + get blurX(): any; + set blurY(t: any); + get blurY(): any; +} +declare namespace um { + namespace defaultOptions { + let strength: number; + let quality: number; + let kernelSize: number; + } +} +declare let oi: { + new (t: any): { + [x: string]: any; + horizontal: any; + _quality: number; + quality: number; + blur: any; + _uniforms: any; + apply(t: any, e: any, s: any, i: any): void; + padding: any; + strength: any; + passes: number | undefined; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + antialias: any; + resolution: any; + blendRequired: any; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + strength: number; + quality: number; + kernelSize: number; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; +}; +declare class lt { + constructor(t?: number, e?: number, s?: number, i?: number); + minX: number; + minY: number; + maxX: number; + maxY: number; + matrix: G; + isEmpty(): boolean; + get rectangle(): z; + _rectangle: z | undefined; + clear(): this; + set(t: any, e: any, s: any, i: any): void; + addFrame(t: any, e: any, s: any, i: any, n: any): void; + addRect(t: any, e: any): void; + addBounds(t: any, e: any): void; + addBoundsMask(t: any): void; + applyMatrix(t: any): void; + fit(t: any): this; + fitBounds(t: any, e: any, s: any, i: any): this; + pad(t: any, e?: any): this; + ceil(): this; + clone(): lt; + scale(t: any, e?: any): this; + set x(t: number); + get x(): number; + set y(t: number); + get y(): number; + set width(t: number); + get width(): number; + set height(t: number); + get height(): number; + get left(): number; + get right(): number; + get top(): number; + get bottom(): number; + get isPositive(): boolean; + get isValid(): boolean; + addVertexData(t: any, e: any, s: any, i: any): void; + containsPoint(t: any, e: any): boolean; + toString(): string; +} +declare namespace nh { + function createCanvas(r: any, t: any): HTMLCanvasElement; + function getCanvasRenderingContext2D(): { + new (): CanvasRenderingContext2D; + prototype: CanvasRenderingContext2D; + }; + function getWebGLRenderingContext(): { + new (): WebGLRenderingContext; + prototype: WebGLRenderingContext; + readonly DEPTH_BUFFER_BIT: 256; + readonly STENCIL_BUFFER_BIT: 1024; + readonly COLOR_BUFFER_BIT: 16384; + readonly POINTS: 0; + readonly LINES: 1; + readonly LINE_LOOP: 2; + readonly LINE_STRIP: 3; + readonly TRIANGLES: 4; + readonly TRIANGLE_STRIP: 5; + readonly TRIANGLE_FAN: 6; + readonly ZERO: 0; + readonly ONE: 1; + readonly SRC_COLOR: 768; + readonly ONE_MINUS_SRC_COLOR: 769; + readonly SRC_ALPHA: 770; + readonly ONE_MINUS_SRC_ALPHA: 771; + readonly DST_ALPHA: 772; + readonly ONE_MINUS_DST_ALPHA: 773; + readonly DST_COLOR: 774; + readonly ONE_MINUS_DST_COLOR: 775; + readonly SRC_ALPHA_SATURATE: 776; + readonly FUNC_ADD: 32774; + readonly BLEND_EQUATION: 32777; + readonly BLEND_EQUATION_RGB: 32777; + readonly BLEND_EQUATION_ALPHA: 34877; + readonly FUNC_SUBTRACT: 32778; + readonly FUNC_REVERSE_SUBTRACT: 32779; + readonly BLEND_DST_RGB: 32968; + readonly BLEND_SRC_RGB: 32969; + readonly BLEND_DST_ALPHA: 32970; + readonly BLEND_SRC_ALPHA: 32971; + readonly CONSTANT_COLOR: 32769; + readonly ONE_MINUS_CONSTANT_COLOR: 32770; + readonly CONSTANT_ALPHA: 32771; + readonly ONE_MINUS_CONSTANT_ALPHA: 32772; + readonly BLEND_COLOR: 32773; + readonly ARRAY_BUFFER: 34962; + readonly ELEMENT_ARRAY_BUFFER: 34963; + readonly ARRAY_BUFFER_BINDING: 34964; + readonly ELEMENT_ARRAY_BUFFER_BINDING: 34965; + readonly STREAM_DRAW: 35040; + readonly STATIC_DRAW: 35044; + readonly DYNAMIC_DRAW: 35048; + readonly BUFFER_SIZE: 34660; + readonly BUFFER_USAGE: 34661; + readonly CURRENT_VERTEX_ATTRIB: 34342; + readonly FRONT: 1028; + readonly BACK: 1029; + readonly FRONT_AND_BACK: 1032; + readonly CULL_FACE: 2884; + readonly BLEND: 3042; + readonly DITHER: 3024; + readonly STENCIL_TEST: 2960; + readonly DEPTH_TEST: 2929; + readonly SCISSOR_TEST: 3089; + readonly POLYGON_OFFSET_FILL: 32823; + readonly SAMPLE_ALPHA_TO_COVERAGE: 32926; + readonly SAMPLE_COVERAGE: 32928; + readonly NO_ERROR: 0; + readonly INVALID_ENUM: 1280; + readonly INVALID_VALUE: 1281; + readonly INVALID_OPERATION: 1282; + readonly OUT_OF_MEMORY: 1285; + readonly CW: 2304; + readonly CCW: 2305; + readonly LINE_WIDTH: 2849; + readonly ALIASED_POINT_SIZE_RANGE: 33901; + readonly ALIASED_LINE_WIDTH_RANGE: 33902; + readonly CULL_FACE_MODE: 2885; + readonly FRONT_FACE: 2886; + readonly DEPTH_RANGE: 2928; + readonly DEPTH_WRITEMASK: 2930; + readonly DEPTH_CLEAR_VALUE: 2931; + readonly DEPTH_FUNC: 2932; + readonly STENCIL_CLEAR_VALUE: 2961; + readonly STENCIL_FUNC: 2962; + readonly STENCIL_FAIL: 2964; + readonly STENCIL_PASS_DEPTH_FAIL: 2965; + readonly STENCIL_PASS_DEPTH_PASS: 2966; + readonly STENCIL_REF: 2967; + readonly STENCIL_VALUE_MASK: 2963; + readonly STENCIL_WRITEMASK: 2968; + readonly STENCIL_BACK_FUNC: 34816; + readonly STENCIL_BACK_FAIL: 34817; + readonly STENCIL_BACK_PASS_DEPTH_FAIL: 34818; + readonly STENCIL_BACK_PASS_DEPTH_PASS: 34819; + readonly STENCIL_BACK_REF: 36003; + readonly STENCIL_BACK_VALUE_MASK: 36004; + readonly STENCIL_BACK_WRITEMASK: 36005; + readonly VIEWPORT: 2978; + readonly SCISSOR_BOX: 3088; + readonly COLOR_CLEAR_VALUE: 3106; + readonly COLOR_WRITEMASK: 3107; + readonly UNPACK_ALIGNMENT: 3317; + readonly PACK_ALIGNMENT: 3333; + readonly MAX_TEXTURE_SIZE: 3379; + readonly MAX_VIEWPORT_DIMS: 3386; + readonly SUBPIXEL_BITS: 3408; + readonly RED_BITS: 3410; + readonly GREEN_BITS: 3411; + readonly BLUE_BITS: 3412; + readonly ALPHA_BITS: 3413; + readonly DEPTH_BITS: 3414; + readonly STENCIL_BITS: 3415; + readonly POLYGON_OFFSET_UNITS: 10752; + readonly POLYGON_OFFSET_FACTOR: 32824; + readonly TEXTURE_BINDING_2D: 32873; + readonly SAMPLE_BUFFERS: 32936; + readonly SAMPLES: 32937; + readonly SAMPLE_COVERAGE_VALUE: 32938; + readonly SAMPLE_COVERAGE_INVERT: 32939; + readonly COMPRESSED_TEXTURE_FORMATS: 34467; + readonly DONT_CARE: 4352; + readonly FASTEST: 4353; + readonly NICEST: 4354; + readonly GENERATE_MIPMAP_HINT: 33170; + readonly BYTE: 5120; + readonly UNSIGNED_BYTE: 5121; + readonly SHORT: 5122; + readonly UNSIGNED_SHORT: 5123; + readonly INT: 5124; + readonly UNSIGNED_INT: 5125; + readonly FLOAT: 5126; + readonly DEPTH_COMPONENT: 6402; + readonly ALPHA: 6406; + readonly RGB: 6407; + readonly RGBA: 6408; + readonly LUMINANCE: 6409; + readonly LUMINANCE_ALPHA: 6410; + readonly UNSIGNED_SHORT_4_4_4_4: 32819; + readonly UNSIGNED_SHORT_5_5_5_1: 32820; + readonly UNSIGNED_SHORT_5_6_5: 33635; + readonly FRAGMENT_SHADER: 35632; + readonly VERTEX_SHADER: 35633; + readonly MAX_VERTEX_ATTRIBS: 34921; + readonly MAX_VERTEX_UNIFORM_VECTORS: 36347; + readonly MAX_VARYING_VECTORS: 36348; + readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661; + readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660; + readonly MAX_TEXTURE_IMAGE_UNITS: 34930; + readonly MAX_FRAGMENT_UNIFORM_VECTORS: 36349; + readonly SHADER_TYPE: 35663; + readonly DELETE_STATUS: 35712; + readonly LINK_STATUS: 35714; + readonly VALIDATE_STATUS: 35715; + readonly ATTACHED_SHADERS: 35717; + readonly ACTIVE_UNIFORMS: 35718; + readonly ACTIVE_ATTRIBUTES: 35721; + readonly SHADING_LANGUAGE_VERSION: 35724; + readonly CURRENT_PROGRAM: 35725; + readonly NEVER: 512; + readonly LESS: 513; + readonly EQUAL: 514; + readonly LEQUAL: 515; + readonly GREATER: 516; + readonly NOTEQUAL: 517; + readonly GEQUAL: 518; + readonly ALWAYS: 519; + readonly KEEP: 7680; + readonly REPLACE: 7681; + readonly INCR: 7682; + readonly DECR: 7683; + readonly INVERT: 5386; + readonly INCR_WRAP: 34055; + readonly DECR_WRAP: 34056; + readonly VENDOR: 7936; + readonly RENDERER: 7937; + readonly VERSION: 7938; + readonly NEAREST: 9728; + readonly LINEAR: 9729; + readonly NEAREST_MIPMAP_NEAREST: 9984; + readonly LINEAR_MIPMAP_NEAREST: 9985; + readonly NEAREST_MIPMAP_LINEAR: 9986; + readonly LINEAR_MIPMAP_LINEAR: 9987; + readonly TEXTURE_MAG_FILTER: 10240; + readonly TEXTURE_MIN_FILTER: 10241; + readonly TEXTURE_WRAP_S: 10242; + readonly TEXTURE_WRAP_T: 10243; + readonly TEXTURE_2D: 3553; + readonly TEXTURE: 5890; + readonly TEXTURE_CUBE_MAP: 34067; + readonly TEXTURE_BINDING_CUBE_MAP: 34068; + readonly TEXTURE_CUBE_MAP_POSITIVE_X: 34069; + readonly TEXTURE_CUBE_MAP_NEGATIVE_X: 34070; + readonly TEXTURE_CUBE_MAP_POSITIVE_Y: 34071; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072; + readonly TEXTURE_CUBE_MAP_POSITIVE_Z: 34073; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074; + readonly MAX_CUBE_MAP_TEXTURE_SIZE: 34076; + readonly TEXTURE0: 33984; + readonly TEXTURE1: 33985; + readonly TEXTURE2: 33986; + readonly TEXTURE3: 33987; + readonly TEXTURE4: 33988; + readonly TEXTURE5: 33989; + readonly TEXTURE6: 33990; + readonly TEXTURE7: 33991; + readonly TEXTURE8: 33992; + readonly TEXTURE9: 33993; + readonly TEXTURE10: 33994; + readonly TEXTURE11: 33995; + readonly TEXTURE12: 33996; + readonly TEXTURE13: 33997; + readonly TEXTURE14: 33998; + readonly TEXTURE15: 33999; + readonly TEXTURE16: 34000; + readonly TEXTURE17: 34001; + readonly TEXTURE18: 34002; + readonly TEXTURE19: 34003; + readonly TEXTURE20: 34004; + readonly TEXTURE21: 34005; + readonly TEXTURE22: 34006; + readonly TEXTURE23: 34007; + readonly TEXTURE24: 34008; + readonly TEXTURE25: 34009; + readonly TEXTURE26: 34010; + readonly TEXTURE27: 34011; + readonly TEXTURE28: 34012; + readonly TEXTURE29: 34013; + readonly TEXTURE30: 34014; + readonly TEXTURE31: 34015; + readonly ACTIVE_TEXTURE: 34016; + readonly REPEAT: 10497; + readonly CLAMP_TO_EDGE: 33071; + readonly MIRRORED_REPEAT: 33648; + readonly FLOAT_VEC2: 35664; + readonly FLOAT_VEC3: 35665; + readonly FLOAT_VEC4: 35666; + readonly INT_VEC2: 35667; + readonly INT_VEC3: 35668; + readonly INT_VEC4: 35669; + readonly BOOL: 35670; + readonly BOOL_VEC2: 35671; + readonly BOOL_VEC3: 35672; + readonly BOOL_VEC4: 35673; + readonly FLOAT_MAT2: 35674; + readonly FLOAT_MAT3: 35675; + readonly FLOAT_MAT4: 35676; + readonly SAMPLER_2D: 35678; + readonly SAMPLER_CUBE: 35680; + readonly VERTEX_ATTRIB_ARRAY_ENABLED: 34338; + readonly VERTEX_ATTRIB_ARRAY_SIZE: 34339; + readonly VERTEX_ATTRIB_ARRAY_STRIDE: 34340; + readonly VERTEX_ATTRIB_ARRAY_TYPE: 34341; + readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922; + readonly VERTEX_ATTRIB_ARRAY_POINTER: 34373; + readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975; + readonly IMPLEMENTATION_COLOR_READ_TYPE: 35738; + readonly IMPLEMENTATION_COLOR_READ_FORMAT: 35739; + readonly COMPILE_STATUS: 35713; + readonly LOW_FLOAT: 36336; + readonly MEDIUM_FLOAT: 36337; + readonly HIGH_FLOAT: 36338; + readonly LOW_INT: 36339; + readonly MEDIUM_INT: 36340; + readonly HIGH_INT: 36341; + readonly FRAMEBUFFER: 36160; + readonly RENDERBUFFER: 36161; + readonly RGBA4: 32854; + readonly RGB5_A1: 32855; + readonly RGBA8: 32856; + readonly RGB565: 36194; + readonly DEPTH_COMPONENT16: 33189; + readonly STENCIL_INDEX8: 36168; + readonly DEPTH_STENCIL: 34041; + readonly RENDERBUFFER_WIDTH: 36162; + readonly RENDERBUFFER_HEIGHT: 36163; + readonly RENDERBUFFER_INTERNAL_FORMAT: 36164; + readonly RENDERBUFFER_RED_SIZE: 36176; + readonly RENDERBUFFER_GREEN_SIZE: 36177; + readonly RENDERBUFFER_BLUE_SIZE: 36178; + readonly RENDERBUFFER_ALPHA_SIZE: 36179; + readonly RENDERBUFFER_DEPTH_SIZE: 36180; + readonly RENDERBUFFER_STENCIL_SIZE: 36181; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051; + readonly COLOR_ATTACHMENT0: 36064; + readonly DEPTH_ATTACHMENT: 36096; + readonly STENCIL_ATTACHMENT: 36128; + readonly DEPTH_STENCIL_ATTACHMENT: 33306; + readonly NONE: 0; + readonly FRAMEBUFFER_COMPLETE: 36053; + readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054; + readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055; + readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057; + readonly FRAMEBUFFER_UNSUPPORTED: 36061; + readonly FRAMEBUFFER_BINDING: 36006; + readonly RENDERBUFFER_BINDING: 36007; + readonly MAX_RENDERBUFFER_SIZE: 34024; + readonly INVALID_FRAMEBUFFER_OPERATION: 1286; + readonly UNPACK_FLIP_Y_WEBGL: 37440; + readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441; + readonly CONTEXT_LOST_WEBGL: 37442; + readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443; + readonly BROWSER_DEFAULT_WEBGL: 37444; + }; + function getWebGL2RenderingContext(): { + new (): WebGL2RenderingContext; + prototype: WebGL2RenderingContext; + readonly READ_BUFFER: 3074; + readonly UNPACK_ROW_LENGTH: 3314; + readonly UNPACK_SKIP_ROWS: 3315; + readonly UNPACK_SKIP_PIXELS: 3316; + readonly PACK_ROW_LENGTH: 3330; + readonly PACK_SKIP_ROWS: 3331; + readonly PACK_SKIP_PIXELS: 3332; + readonly COLOR: 6144; + readonly DEPTH: 6145; + readonly STENCIL: 6146; + readonly RED: 6403; + readonly RGB8: 32849; + readonly RGB10_A2: 32857; + readonly TEXTURE_BINDING_3D: 32874; + readonly UNPACK_SKIP_IMAGES: 32877; + readonly UNPACK_IMAGE_HEIGHT: 32878; + readonly TEXTURE_3D: 32879; + readonly TEXTURE_WRAP_R: 32882; + readonly MAX_3D_TEXTURE_SIZE: 32883; + readonly UNSIGNED_INT_2_10_10_10_REV: 33640; + readonly MAX_ELEMENTS_VERTICES: 33000; + readonly MAX_ELEMENTS_INDICES: 33001; + readonly TEXTURE_MIN_LOD: 33082; + readonly TEXTURE_MAX_LOD: 33083; + readonly TEXTURE_BASE_LEVEL: 33084; + readonly TEXTURE_MAX_LEVEL: 33085; + readonly MIN: 32775; + readonly MAX: 32776; + readonly DEPTH_COMPONENT24: 33190; + readonly MAX_TEXTURE_LOD_BIAS: 34045; + readonly TEXTURE_COMPARE_MODE: 34892; + readonly TEXTURE_COMPARE_FUNC: 34893; + readonly CURRENT_QUERY: 34917; + readonly QUERY_RESULT: 34918; + readonly QUERY_RESULT_AVAILABLE: 34919; + readonly STREAM_READ: 35041; + readonly STREAM_COPY: 35042; + readonly STATIC_READ: 35045; + readonly STATIC_COPY: 35046; + readonly DYNAMIC_READ: 35049; + readonly DYNAMIC_COPY: 35050; + readonly MAX_DRAW_BUFFERS: 34852; + readonly DRAW_BUFFER0: 34853; + readonly DRAW_BUFFER1: 34854; + readonly DRAW_BUFFER2: 34855; + readonly DRAW_BUFFER3: 34856; + readonly DRAW_BUFFER4: 34857; + readonly DRAW_BUFFER5: 34858; + readonly DRAW_BUFFER6: 34859; + readonly DRAW_BUFFER7: 34860; + readonly DRAW_BUFFER8: 34861; + readonly DRAW_BUFFER9: 34862; + readonly DRAW_BUFFER10: 34863; + readonly DRAW_BUFFER11: 34864; + readonly DRAW_BUFFER12: 34865; + readonly DRAW_BUFFER13: 34866; + readonly DRAW_BUFFER14: 34867; + readonly DRAW_BUFFER15: 34868; + readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: 35657; + readonly MAX_VERTEX_UNIFORM_COMPONENTS: 35658; + readonly SAMPLER_3D: 35679; + readonly SAMPLER_2D_SHADOW: 35682; + readonly FRAGMENT_SHADER_DERIVATIVE_HINT: 35723; + readonly PIXEL_PACK_BUFFER: 35051; + readonly PIXEL_UNPACK_BUFFER: 35052; + readonly PIXEL_PACK_BUFFER_BINDING: 35053; + readonly PIXEL_UNPACK_BUFFER_BINDING: 35055; + readonly FLOAT_MAT2x3: 35685; + readonly FLOAT_MAT2x4: 35686; + readonly FLOAT_MAT3x2: 35687; + readonly FLOAT_MAT3x4: 35688; + readonly FLOAT_MAT4x2: 35689; + readonly FLOAT_MAT4x3: 35690; + readonly SRGB: 35904; + readonly SRGB8: 35905; + readonly SRGB8_ALPHA8: 35907; + readonly COMPARE_REF_TO_TEXTURE: 34894; + readonly RGBA32F: 34836; + readonly RGB32F: 34837; + readonly RGBA16F: 34842; + readonly RGB16F: 34843; + readonly VERTEX_ATTRIB_ARRAY_INTEGER: 35069; + readonly MAX_ARRAY_TEXTURE_LAYERS: 35071; + readonly MIN_PROGRAM_TEXEL_OFFSET: 35076; + readonly MAX_PROGRAM_TEXEL_OFFSET: 35077; + readonly MAX_VARYING_COMPONENTS: 35659; + readonly TEXTURE_2D_ARRAY: 35866; + readonly TEXTURE_BINDING_2D_ARRAY: 35869; + readonly R11F_G11F_B10F: 35898; + readonly UNSIGNED_INT_10F_11F_11F_REV: 35899; + readonly RGB9_E5: 35901; + readonly UNSIGNED_INT_5_9_9_9_REV: 35902; + readonly TRANSFORM_FEEDBACK_BUFFER_MODE: 35967; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 35968; + readonly TRANSFORM_FEEDBACK_VARYINGS: 35971; + readonly TRANSFORM_FEEDBACK_BUFFER_START: 35972; + readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: 35973; + readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 35976; + readonly RASTERIZER_DISCARD: 35977; + readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 35978; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 35979; + readonly INTERLEAVED_ATTRIBS: 35980; + readonly SEPARATE_ATTRIBS: 35981; + readonly TRANSFORM_FEEDBACK_BUFFER: 35982; + readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: 35983; + readonly RGBA32UI: 36208; + readonly RGB32UI: 36209; + readonly RGBA16UI: 36214; + readonly RGB16UI: 36215; + readonly RGBA8UI: 36220; + readonly RGB8UI: 36221; + readonly RGBA32I: 36226; + readonly RGB32I: 36227; + readonly RGBA16I: 36232; + readonly RGB16I: 36233; + readonly RGBA8I: 36238; + readonly RGB8I: 36239; + readonly RED_INTEGER: 36244; + readonly RGB_INTEGER: 36248; + readonly RGBA_INTEGER: 36249; + readonly SAMPLER_2D_ARRAY: 36289; + readonly SAMPLER_2D_ARRAY_SHADOW: 36292; + readonly SAMPLER_CUBE_SHADOW: 36293; + readonly UNSIGNED_INT_VEC2: 36294; + readonly UNSIGNED_INT_VEC3: 36295; + readonly UNSIGNED_INT_VEC4: 36296; + readonly INT_SAMPLER_2D: 36298; + readonly INT_SAMPLER_3D: 36299; + readonly INT_SAMPLER_CUBE: 36300; + readonly INT_SAMPLER_2D_ARRAY: 36303; + readonly UNSIGNED_INT_SAMPLER_2D: 36306; + readonly UNSIGNED_INT_SAMPLER_3D: 36307; + readonly UNSIGNED_INT_SAMPLER_CUBE: 36308; + readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: 36311; + readonly DEPTH_COMPONENT32F: 36012; + readonly DEPTH32F_STENCIL8: 36013; + readonly FLOAT_32_UNSIGNED_INT_24_8_REV: 36269; + readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 33296; + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 33297; + readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: 33298; + readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 33299; + readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 33300; + readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 33301; + readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 33302; + readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 33303; + readonly FRAMEBUFFER_DEFAULT: 33304; + readonly UNSIGNED_INT_24_8: 34042; + readonly DEPTH24_STENCIL8: 35056; + readonly UNSIGNED_NORMALIZED: 35863; + readonly DRAW_FRAMEBUFFER_BINDING: 36006; + readonly READ_FRAMEBUFFER: 36008; + readonly DRAW_FRAMEBUFFER: 36009; + readonly READ_FRAMEBUFFER_BINDING: 36010; + readonly RENDERBUFFER_SAMPLES: 36011; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 36052; + readonly MAX_COLOR_ATTACHMENTS: 36063; + readonly COLOR_ATTACHMENT1: 36065; + readonly COLOR_ATTACHMENT2: 36066; + readonly COLOR_ATTACHMENT3: 36067; + readonly COLOR_ATTACHMENT4: 36068; + readonly COLOR_ATTACHMENT5: 36069; + readonly COLOR_ATTACHMENT6: 36070; + readonly COLOR_ATTACHMENT7: 36071; + readonly COLOR_ATTACHMENT8: 36072; + readonly COLOR_ATTACHMENT9: 36073; + readonly COLOR_ATTACHMENT10: 36074; + readonly COLOR_ATTACHMENT11: 36075; + readonly COLOR_ATTACHMENT12: 36076; + readonly COLOR_ATTACHMENT13: 36077; + readonly COLOR_ATTACHMENT14: 36078; + readonly COLOR_ATTACHMENT15: 36079; + readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 36182; + readonly MAX_SAMPLES: 36183; + readonly HALF_FLOAT: 5131; + readonly RG: 33319; + readonly RG_INTEGER: 33320; + readonly R8: 33321; + readonly RG8: 33323; + readonly R16F: 33325; + readonly R32F: 33326; + readonly RG16F: 33327; + readonly RG32F: 33328; + readonly R8I: 33329; + readonly R8UI: 33330; + readonly R16I: 33331; + readonly R16UI: 33332; + readonly R32I: 33333; + readonly R32UI: 33334; + readonly RG8I: 33335; + readonly RG8UI: 33336; + readonly RG16I: 33337; + readonly RG16UI: 33338; + readonly RG32I: 33339; + readonly RG32UI: 33340; + readonly VERTEX_ARRAY_BINDING: 34229; + readonly R8_SNORM: 36756; + readonly RG8_SNORM: 36757; + readonly RGB8_SNORM: 36758; + readonly RGBA8_SNORM: 36759; + readonly SIGNED_NORMALIZED: 36764; + readonly COPY_READ_BUFFER: 36662; + readonly COPY_WRITE_BUFFER: 36663; + readonly COPY_READ_BUFFER_BINDING: 36662; + readonly COPY_WRITE_BUFFER_BINDING: 36663; + readonly UNIFORM_BUFFER: 35345; + readonly UNIFORM_BUFFER_BINDING: 35368; + readonly UNIFORM_BUFFER_START: 35369; + readonly UNIFORM_BUFFER_SIZE: 35370; + readonly MAX_VERTEX_UNIFORM_BLOCKS: 35371; + readonly MAX_FRAGMENT_UNIFORM_BLOCKS: 35373; + readonly MAX_COMBINED_UNIFORM_BLOCKS: 35374; + readonly MAX_UNIFORM_BUFFER_BINDINGS: 35375; + readonly MAX_UNIFORM_BLOCK_SIZE: 35376; + readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 35377; + readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 35379; + readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: 35380; + readonly ACTIVE_UNIFORM_BLOCKS: 35382; + readonly UNIFORM_TYPE: 35383; + readonly UNIFORM_SIZE: 35384; + readonly UNIFORM_BLOCK_INDEX: 35386; + readonly UNIFORM_OFFSET: 35387; + readonly UNIFORM_ARRAY_STRIDE: 35388; + readonly UNIFORM_MATRIX_STRIDE: 35389; + readonly UNIFORM_IS_ROW_MAJOR: 35390; + readonly UNIFORM_BLOCK_BINDING: 35391; + readonly UNIFORM_BLOCK_DATA_SIZE: 35392; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: 35394; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 35395; + readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 35396; + readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 35398; + readonly INVALID_INDEX: 4294967295; + readonly MAX_VERTEX_OUTPUT_COMPONENTS: 37154; + readonly MAX_FRAGMENT_INPUT_COMPONENTS: 37157; + readonly MAX_SERVER_WAIT_TIMEOUT: 37137; + readonly OBJECT_TYPE: 37138; + readonly SYNC_CONDITION: 37139; + readonly SYNC_STATUS: 37140; + readonly SYNC_FLAGS: 37141; + readonly SYNC_FENCE: 37142; + readonly SYNC_GPU_COMMANDS_COMPLETE: 37143; + readonly UNSIGNALED: 37144; + readonly SIGNALED: 37145; + readonly ALREADY_SIGNALED: 37146; + readonly TIMEOUT_EXPIRED: 37147; + readonly CONDITION_SATISFIED: 37148; + readonly WAIT_FAILED: 37149; + readonly SYNC_FLUSH_COMMANDS_BIT: 1; + readonly VERTEX_ATTRIB_ARRAY_DIVISOR: 35070; + readonly ANY_SAMPLES_PASSED: 35887; + readonly ANY_SAMPLES_PASSED_CONSERVATIVE: 36202; + readonly SAMPLER_BINDING: 35097; + readonly RGB10_A2UI: 36975; + readonly INT_2_10_10_10_REV: 36255; + readonly TRANSFORM_FEEDBACK: 36386; + readonly TRANSFORM_FEEDBACK_PAUSED: 36387; + readonly TRANSFORM_FEEDBACK_ACTIVE: 36388; + readonly TRANSFORM_FEEDBACK_BINDING: 36389; + readonly TEXTURE_IMMUTABLE_FORMAT: 37167; + readonly MAX_ELEMENT_INDEX: 36203; + readonly TEXTURE_IMMUTABLE_LEVELS: 33503; + readonly TIMEOUT_IGNORED: -1; + readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 37447; + readonly DEPTH_BUFFER_BIT: 256; + readonly STENCIL_BUFFER_BIT: 1024; + readonly COLOR_BUFFER_BIT: 16384; + readonly POINTS: 0; + readonly LINES: 1; + readonly LINE_LOOP: 2; + readonly LINE_STRIP: 3; + readonly TRIANGLES: 4; + readonly TRIANGLE_STRIP: 5; + readonly TRIANGLE_FAN: 6; + readonly ZERO: 0; + readonly ONE: 1; + readonly SRC_COLOR: 768; + readonly ONE_MINUS_SRC_COLOR: 769; + readonly SRC_ALPHA: 770; + readonly ONE_MINUS_SRC_ALPHA: 771; + readonly DST_ALPHA: 772; + readonly ONE_MINUS_DST_ALPHA: 773; + readonly DST_COLOR: 774; + readonly ONE_MINUS_DST_COLOR: 775; + readonly SRC_ALPHA_SATURATE: 776; + readonly FUNC_ADD: 32774; + readonly BLEND_EQUATION: 32777; + readonly BLEND_EQUATION_RGB: 32777; + readonly BLEND_EQUATION_ALPHA: 34877; + readonly FUNC_SUBTRACT: 32778; + readonly FUNC_REVERSE_SUBTRACT: 32779; + readonly BLEND_DST_RGB: 32968; + readonly BLEND_SRC_RGB: 32969; + readonly BLEND_DST_ALPHA: 32970; + readonly BLEND_SRC_ALPHA: 32971; + readonly CONSTANT_COLOR: 32769; + readonly ONE_MINUS_CONSTANT_COLOR: 32770; + readonly CONSTANT_ALPHA: 32771; + readonly ONE_MINUS_CONSTANT_ALPHA: 32772; + readonly BLEND_COLOR: 32773; + readonly ARRAY_BUFFER: 34962; + readonly ELEMENT_ARRAY_BUFFER: 34963; + readonly ARRAY_BUFFER_BINDING: 34964; + readonly ELEMENT_ARRAY_BUFFER_BINDING: 34965; + readonly STREAM_DRAW: 35040; + readonly STATIC_DRAW: 35044; + readonly DYNAMIC_DRAW: 35048; + readonly BUFFER_SIZE: 34660; + readonly BUFFER_USAGE: 34661; + readonly CURRENT_VERTEX_ATTRIB: 34342; + readonly FRONT: 1028; + readonly BACK: 1029; + readonly FRONT_AND_BACK: 1032; + readonly CULL_FACE: 2884; + readonly BLEND: 3042; + readonly DITHER: 3024; + readonly STENCIL_TEST: 2960; + readonly DEPTH_TEST: 2929; + readonly SCISSOR_TEST: 3089; + readonly POLYGON_OFFSET_FILL: 32823; + readonly SAMPLE_ALPHA_TO_COVERAGE: 32926; + readonly SAMPLE_COVERAGE: 32928; + readonly NO_ERROR: 0; + readonly INVALID_ENUM: 1280; + readonly INVALID_VALUE: 1281; + readonly INVALID_OPERATION: 1282; + readonly OUT_OF_MEMORY: 1285; + readonly CW: 2304; + readonly CCW: 2305; + readonly LINE_WIDTH: 2849; + readonly ALIASED_POINT_SIZE_RANGE: 33901; + readonly ALIASED_LINE_WIDTH_RANGE: 33902; + readonly CULL_FACE_MODE: 2885; + readonly FRONT_FACE: 2886; + readonly DEPTH_RANGE: 2928; + readonly DEPTH_WRITEMASK: 2930; + readonly DEPTH_CLEAR_VALUE: 2931; + readonly DEPTH_FUNC: 2932; + readonly STENCIL_CLEAR_VALUE: 2961; + readonly STENCIL_FUNC: 2962; + readonly STENCIL_FAIL: 2964; + readonly STENCIL_PASS_DEPTH_FAIL: 2965; + readonly STENCIL_PASS_DEPTH_PASS: 2966; + readonly STENCIL_REF: 2967; + readonly STENCIL_VALUE_MASK: 2963; + readonly STENCIL_WRITEMASK: 2968; + readonly STENCIL_BACK_FUNC: 34816; + readonly STENCIL_BACK_FAIL: 34817; + readonly STENCIL_BACK_PASS_DEPTH_FAIL: 34818; + readonly STENCIL_BACK_PASS_DEPTH_PASS: 34819; + readonly STENCIL_BACK_REF: 36003; + readonly STENCIL_BACK_VALUE_MASK: 36004; + readonly STENCIL_BACK_WRITEMASK: 36005; + readonly VIEWPORT: 2978; + readonly SCISSOR_BOX: 3088; + readonly COLOR_CLEAR_VALUE: 3106; + readonly COLOR_WRITEMASK: 3107; + readonly UNPACK_ALIGNMENT: 3317; + readonly PACK_ALIGNMENT: 3333; + readonly MAX_TEXTURE_SIZE: 3379; + readonly MAX_VIEWPORT_DIMS: 3386; + readonly SUBPIXEL_BITS: 3408; + readonly RED_BITS: 3410; + readonly GREEN_BITS: 3411; + readonly BLUE_BITS: 3412; + readonly ALPHA_BITS: 3413; + readonly DEPTH_BITS: 3414; + readonly STENCIL_BITS: 3415; + readonly POLYGON_OFFSET_UNITS: 10752; + readonly POLYGON_OFFSET_FACTOR: 32824; + readonly TEXTURE_BINDING_2D: 32873; + readonly SAMPLE_BUFFERS: 32936; + readonly SAMPLES: 32937; + readonly SAMPLE_COVERAGE_VALUE: 32938; + readonly SAMPLE_COVERAGE_INVERT: 32939; + readonly COMPRESSED_TEXTURE_FORMATS: 34467; + readonly DONT_CARE: 4352; + readonly FASTEST: 4353; + readonly NICEST: 4354; + readonly GENERATE_MIPMAP_HINT: 33170; + readonly BYTE: 5120; + readonly UNSIGNED_BYTE: 5121; + readonly SHORT: 5122; + readonly UNSIGNED_SHORT: 5123; + readonly INT: 5124; + readonly UNSIGNED_INT: 5125; + readonly FLOAT: 5126; + readonly DEPTH_COMPONENT: 6402; + readonly ALPHA: 6406; + readonly RGB: 6407; + readonly RGBA: 6408; + readonly LUMINANCE: 6409; + readonly LUMINANCE_ALPHA: 6410; + readonly UNSIGNED_SHORT_4_4_4_4: 32819; + readonly UNSIGNED_SHORT_5_5_5_1: 32820; + readonly UNSIGNED_SHORT_5_6_5: 33635; + readonly FRAGMENT_SHADER: 35632; + readonly VERTEX_SHADER: 35633; + readonly MAX_VERTEX_ATTRIBS: 34921; + readonly MAX_VERTEX_UNIFORM_VECTORS: 36347; + readonly MAX_VARYING_VECTORS: 36348; + readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661; + readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660; + readonly MAX_TEXTURE_IMAGE_UNITS: 34930; + readonly MAX_FRAGMENT_UNIFORM_VECTORS: 36349; + readonly SHADER_TYPE: 35663; + readonly DELETE_STATUS: 35712; + readonly LINK_STATUS: 35714; + readonly VALIDATE_STATUS: 35715; + readonly ATTACHED_SHADERS: 35717; + readonly ACTIVE_UNIFORMS: 35718; + readonly ACTIVE_ATTRIBUTES: 35721; + readonly SHADING_LANGUAGE_VERSION: 35724; + readonly CURRENT_PROGRAM: 35725; + readonly NEVER: 512; + readonly LESS: 513; + readonly EQUAL: 514; + readonly LEQUAL: 515; + readonly GREATER: 516; + readonly NOTEQUAL: 517; + readonly GEQUAL: 518; + readonly ALWAYS: 519; + readonly KEEP: 7680; + readonly REPLACE: 7681; + readonly INCR: 7682; + readonly DECR: 7683; + readonly INVERT: 5386; + readonly INCR_WRAP: 34055; + readonly DECR_WRAP: 34056; + readonly VENDOR: 7936; + readonly RENDERER: 7937; + readonly VERSION: 7938; + readonly NEAREST: 9728; + readonly LINEAR: 9729; + readonly NEAREST_MIPMAP_NEAREST: 9984; + readonly LINEAR_MIPMAP_NEAREST: 9985; + readonly NEAREST_MIPMAP_LINEAR: 9986; + readonly LINEAR_MIPMAP_LINEAR: 9987; + readonly TEXTURE_MAG_FILTER: 10240; + readonly TEXTURE_MIN_FILTER: 10241; + readonly TEXTURE_WRAP_S: 10242; + readonly TEXTURE_WRAP_T: 10243; + readonly TEXTURE_2D: 3553; + readonly TEXTURE: 5890; + readonly TEXTURE_CUBE_MAP: 34067; + readonly TEXTURE_BINDING_CUBE_MAP: 34068; + readonly TEXTURE_CUBE_MAP_POSITIVE_X: 34069; + readonly TEXTURE_CUBE_MAP_NEGATIVE_X: 34070; + readonly TEXTURE_CUBE_MAP_POSITIVE_Y: 34071; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072; + readonly TEXTURE_CUBE_MAP_POSITIVE_Z: 34073; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074; + readonly MAX_CUBE_MAP_TEXTURE_SIZE: 34076; + readonly TEXTURE0: 33984; + readonly TEXTURE1: 33985; + readonly TEXTURE2: 33986; + readonly TEXTURE3: 33987; + readonly TEXTURE4: 33988; + readonly TEXTURE5: 33989; + readonly TEXTURE6: 33990; + readonly TEXTURE7: 33991; + readonly TEXTURE8: 33992; + readonly TEXTURE9: 33993; + readonly TEXTURE10: 33994; + readonly TEXTURE11: 33995; + readonly TEXTURE12: 33996; + readonly TEXTURE13: 33997; + readonly TEXTURE14: 33998; + readonly TEXTURE15: 33999; + readonly TEXTURE16: 34000; + readonly TEXTURE17: 34001; + readonly TEXTURE18: 34002; + readonly TEXTURE19: 34003; + readonly TEXTURE20: 34004; + readonly TEXTURE21: 34005; + readonly TEXTURE22: 34006; + readonly TEXTURE23: 34007; + readonly TEXTURE24: 34008; + readonly TEXTURE25: 34009; + readonly TEXTURE26: 34010; + readonly TEXTURE27: 34011; + readonly TEXTURE28: 34012; + readonly TEXTURE29: 34013; + readonly TEXTURE30: 34014; + readonly TEXTURE31: 34015; + readonly ACTIVE_TEXTURE: 34016; + readonly REPEAT: 10497; + readonly CLAMP_TO_EDGE: 33071; + readonly MIRRORED_REPEAT: 33648; + readonly FLOAT_VEC2: 35664; + readonly FLOAT_VEC3: 35665; + readonly FLOAT_VEC4: 35666; + readonly INT_VEC2: 35667; + readonly INT_VEC3: 35668; + readonly INT_VEC4: 35669; + readonly BOOL: 35670; + readonly BOOL_VEC2: 35671; + readonly BOOL_VEC3: 35672; + readonly BOOL_VEC4: 35673; + readonly FLOAT_MAT2: 35674; + readonly FLOAT_MAT3: 35675; + readonly FLOAT_MAT4: 35676; + readonly SAMPLER_2D: 35678; + readonly SAMPLER_CUBE: 35680; + readonly VERTEX_ATTRIB_ARRAY_ENABLED: 34338; + readonly VERTEX_ATTRIB_ARRAY_SIZE: 34339; + readonly VERTEX_ATTRIB_ARRAY_STRIDE: 34340; + readonly VERTEX_ATTRIB_ARRAY_TYPE: 34341; + readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922; + readonly VERTEX_ATTRIB_ARRAY_POINTER: 34373; + readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975; + readonly IMPLEMENTATION_COLOR_READ_TYPE: 35738; + readonly IMPLEMENTATION_COLOR_READ_FORMAT: 35739; + readonly COMPILE_STATUS: 35713; + readonly LOW_FLOAT: 36336; + readonly MEDIUM_FLOAT: 36337; + readonly HIGH_FLOAT: 36338; + readonly LOW_INT: 36339; + readonly MEDIUM_INT: 36340; + readonly HIGH_INT: 36341; + readonly FRAMEBUFFER: 36160; + readonly RENDERBUFFER: 36161; + readonly RGBA4: 32854; + readonly RGB5_A1: 32855; + readonly RGBA8: 32856; + readonly RGB565: 36194; + readonly DEPTH_COMPONENT16: 33189; + readonly STENCIL_INDEX8: 36168; + readonly DEPTH_STENCIL: 34041; + readonly RENDERBUFFER_WIDTH: 36162; + readonly RENDERBUFFER_HEIGHT: 36163; + readonly RENDERBUFFER_INTERNAL_FORMAT: 36164; + readonly RENDERBUFFER_RED_SIZE: 36176; + readonly RENDERBUFFER_GREEN_SIZE: 36177; + readonly RENDERBUFFER_BLUE_SIZE: 36178; + readonly RENDERBUFFER_ALPHA_SIZE: 36179; + readonly RENDERBUFFER_DEPTH_SIZE: 36180; + readonly RENDERBUFFER_STENCIL_SIZE: 36181; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051; + readonly COLOR_ATTACHMENT0: 36064; + readonly DEPTH_ATTACHMENT: 36096; + readonly STENCIL_ATTACHMENT: 36128; + readonly DEPTH_STENCIL_ATTACHMENT: 33306; + readonly NONE: 0; + readonly FRAMEBUFFER_COMPLETE: 36053; + readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054; + readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055; + readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057; + readonly FRAMEBUFFER_UNSUPPORTED: 36061; + readonly FRAMEBUFFER_BINDING: 36006; + readonly RENDERBUFFER_BINDING: 36007; + readonly MAX_RENDERBUFFER_SIZE: 34024; + readonly INVALID_FRAMEBUFFER_OPERATION: 1286; + readonly UNPACK_FLIP_Y_WEBGL: 37440; + readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441; + readonly CONTEXT_LOST_WEBGL: 37442; + readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443; + readonly BROWSER_DEFAULT_WEBGL: 37444; + }; + function getNavigator(): Navigator; + function getBaseUrl(): string; + function getFontFaceSet(): FontFaceSet; + function fetch(r: any, t: any): Promise; + function parseXML(r: any): Document; +} +declare const _t_base: any; +declare class _t extends _t_base { + [x: string]: any; + constructor(t: any); + uid: number; + _resourceType: string; + _resourceId: number; + _touched: number; + _updateID: number; + shrinkToFit: any; + _data: any; + descriptor: { + size: any; + usage: any; + mappedAtCreation: boolean; + label: any; + }; + set data(t: any); + get data(): any; + set static(t: boolean); + get static(): boolean; + setDataWithSize(t: any, e: any, s: any): void; + _updateSize: any; + update(t: any): void; + destroy(): void; +} +declare const cs_base: { + new (t?: {}): { + [x: string]: any; + options: {}; + uid: number; + _resourceType: string; + _resourceId: number; + uploadMethodId: string; + _resolution: any; + pixelWidth: any; + pixelHeight: any; + width: number; + height: number; + sampleCount: any; + mipLevelCount: any; + autoGenerateMipmaps: any; + format: any; + dimension: any; + antialias: any; + _touched: number; + _batchTick: number; + _textureBindLocation: number; + label: any; + resource: any; + autoGarbageCollect: any; + alphaMode: any; + style: any; + destroyed: boolean; + readonly source: any; + _style: any; + addressMode: any; + repeatMode: any; + magFilter: any; + minFilter: any; + mipmapFilter: any; + lodMinClamp: any; + lodMaxClamp: any; + _onStyleChange(): void; + update(): void; + destroy(): void; + unload(): void; + readonly resourceWidth: any; + readonly resourceHeight: any; + resolution: any; + resize(t: any, e: any, s: any): boolean; + updateMipmaps(): void; + wrapMode: any; + scaleMode: any; + _refreshPOT(): void; + isPowerOfTwo: boolean | undefined; + }; + [x: string]: any; + test(t: any): void; + defaultOptions: { + resolution: number; + format: string; + alphaMode: string; + dimensions: string; + mipLevelCount: number; + autoGenerateMipmaps: boolean; + sampleCount: number; + antialias: boolean; + autoGarbageCollect: boolean; + }; +}; +declare class cs extends cs_base { + static test(t: any): boolean; + constructor(t: any); +} +declare namespace cs { + let extension_7: any; + export { extension_7 as extension }; +} +declare const yi_base: any; +declare class yi extends yi_base { + [x: string]: any; + constructor({ buffer: t, offset: e, size: s }: { + buffer: any; + offset: any; + size: any; + }); + uid: number; + _resourceType: string; + _touched: number; + _resourceId: number; + _bufferResource: boolean; + buffer: any; + offset: number; + size: any; + onBufferChange(): void; + destroy(t?: boolean): void; +} +declare var $: any; +declare var pt: any; +declare const Y: { + _parsers: any[]; + _cache: Map; + _cacheMap: Map; + reset(): void; + has(t: any): boolean; + get(t: any): any; + set(t: any, e: any): void; + remove(t: any): void; + readonly parsers: any[]; +}; +declare const jt: lc; +declare class lc { + constructor(t: any); + _canvasPool: any; + canvasOptions: any; + enableFullScreen: boolean; + _createCanvasAndContext(t: any, e: any): { + canvas: HTMLCanvasElement; + context: CanvasRenderingContext2D | null; + }; + getOptimalCanvasAndContext(t: any, e: any, s?: number): any; + returnCanvasAndContext(t: any): void; + clear(): void; +} +declare const Qt_base: { + new (t?: {}): { + [x: string]: any; + options: {}; + uid: number; + _resourceType: string; + _resourceId: number; + uploadMethodId: string; + _resolution: any; + pixelWidth: any; + pixelHeight: any; + width: number; + height: number; + sampleCount: any; + mipLevelCount: any; + autoGenerateMipmaps: any; + format: any; + dimension: any; + antialias: any; + _touched: number; + _batchTick: number; + _textureBindLocation: number; + label: any; + resource: any; + autoGarbageCollect: any; + alphaMode: any; + style: any; + destroyed: boolean; + readonly source: any; + _style: any; + addressMode: any; + repeatMode: any; + magFilter: any; + minFilter: any; + mipmapFilter: any; + lodMinClamp: any; + lodMaxClamp: any; + _onStyleChange(): void; + update(): void; + destroy(): void; + unload(): void; + readonly resourceWidth: any; + readonly resourceHeight: any; + resolution: any; + resize(t: any, e: any, s: any): boolean; + updateMipmaps(): void; + wrapMode: any; + scaleMode: any; + _refreshPOT(): void; + isPowerOfTwo: boolean | undefined; + }; + [x: string]: any; + test(t: any): void; + defaultOptions: { + resolution: number; + format: string; + alphaMode: string; + dimensions: string; + mipLevelCount: number; + autoGenerateMipmaps: boolean; + sampleCount: number; + antialias: boolean; + autoGarbageCollect: boolean; + }; +}; +declare class Qt extends Qt_base { + static test(t: any): boolean; + constructor(t: any); + autoDensity: any; + transparent: boolean; + resizeCanvas(): void; + resize(t?: number, e?: number, s?: any): boolean; +} +declare namespace Qt { + let extension_8: any; + export { extension_8 as extension }; +} +declare let It: { + new (t: any, e: any, s: any, i: any, n: any, o: any, a: any, u: any, l: any): { + text: any; + style: any; + width: any; + height: any; + lines: any; + lineWidths: any; + lineHeight: any; + maxLineWidth: any; + fontProperties: any; + }; + readonly experimentalLetterSpacingSupported: any; + measureText(t: string | undefined, e: any, s?: any, i?: any): any; + _measureText(t: any, e: any, s: any): any; + _wordWrap(t: any, e: any, s?: any): string; + _addLine(t: any, e?: boolean): any; + _getFromCache(t: any, e: any, s: any, i: any): any; + _collapseSpaces(t: any): boolean; + _collapseNewlines(t: any): boolean; + _trimRight(t: any): any; + _isNewline(t: any): boolean; + isBreakingSpace(t: any, e: any): boolean; + _tokenize(t: any): any[]; + canBreakWords(t: any, e: any): any; + canBreakChars(t: any, e: any, s: any, i: any, n: any): boolean; + wordWrapSplit(t: any): any[]; + measureFont(t: any): any; + clearMetrics(t?: string): void; + readonly _canvas: any; + readonly _context: any; + METRICS_STRING: string; + BASELINE_SYMBOL: string; + BASELINE_MULTIPLIER: number; + HEIGHT_MULTIPLIER: number; + graphemeSegmenter: (t: any) => any[]; + experimentalLetterSpacing: boolean; + _fonts: {}; + _newlines: number[]; + _breakingSpaces: number[]; + _measurementCache: {}; +}; +declare class qn { + constructor(t: any); + _gpuText: any; + _renderer: any; + validateRenderable(t: any): boolean; + addRenderable(t: any, e: any): void; + updateRenderable(t: any): void; + destroyRenderable(t: any): void; + _destroyRenderableById(t: any): void; + _updateText(t: any): void; + _updateGpuText(t: any): void; + _getGpuText(t: any): any; + initGpuText(t: any): { + texture: null; + currentKey: string; + batchableSprite: any; + }; + destroy(): void; +} +declare namespace qn { + export namespace extension_9 { + let type_6: any[]; + export { type_6 as type }; + let name_6: string; + export { name_6 as name }; + } + export { extension_9 as extension }; +} +declare class to { + _activeTextures: {}; + getTextureSize(t: any, e: any, s: any): { + width: number; + height: number; + }; + getTexture(t: any, e: any, s: any, i: any): any; + _increaseReferenceCount(t: any): void; + decreaseReferenceCount(t: any): void; + getReferenceCount(t: any): any; + renderTextToCanvas(t: any, e: any, s: any, i: any): void; + _drawLetterSpacing(t: any, e: any, s: any, i: any, n: any, o?: boolean): void; + destroy(): void; +} +declare namespace to { + export namespace extension_10 { + let type_7: any[]; + export { type_7 as type }; + let name_7: string; + export { name_7 as name }; + } + export { extension_10 as extension }; +} +declare class Ii { + constructor(t?: number, e?: number, s?: number); + type: string; + x: number; + y: number; + radius: number; + clone(): Ii; + contains(t: any, e: any): boolean; + strokeContains(t: any, e: any, s: any): boolean; + getBounds(t: any): any; + copyFrom(t: any): this; + copyTo(t: any): any; +} +declare let W: { + new (t?: number): { + _value: any; + _components: Float32Array; + _int: number; + value: any; + readonly red: number; + readonly green: number; + readonly blue: number; + readonly alpha: number; + setValue(t: any): any; + _cloneSource(t: any): any; + _isSourceEqual(t: any, e: any): any; + toRgba(): { + r: number; + g: number; + b: number; + a: number; + }; + toRgb(): { + r: number; + g: number; + b: number; + }; + toRgbaString(): string; + toUint8RgbArray(t: any): any; + _arrayRgb: any[] | undefined; + toArray(t: any): any; + _arrayRgba: any[] | undefined; + toRgbArray(t: any): any; + toNumber(): number; + toBgrNumber(): any; + toLittleEndianNumber(): number; + multiply(t: any): any; + premultiply(t: any, e?: boolean): any; + toPremultiplied(t: any, e?: boolean): number; + toHex(): string; + toHexa(): string; + setAlpha(t: any): any; + _normalize(t: any): void; + _refreshInt(): void; + _clamp(t: any, e?: number, s?: number): any; + }; + isColorLike(t: any): boolean; + shared: { + _value: any; + _components: Float32Array; + _int: number; + value: any; + readonly red: number; + readonly green: number; + readonly blue: number; + readonly alpha: number; + setValue(t: any): any; + _cloneSource(t: any): any; + _isSourceEqual(t: any, e: any): any; + toRgba(): { + r: number; + g: number; + b: number; + a: number; + }; + toRgb(): { + r: number; + g: number; + b: number; + }; + toRgbaString(): string; + toUint8RgbArray(t: any): any; + _arrayRgb: any[] | undefined; + toArray(t: any): any; + _arrayRgba: any[] | undefined; + toRgbArray(t: any): any; + toNumber(): number; + toBgrNumber(): any; + toLittleEndianNumber(): number; + multiply(t: any): any; + premultiply(t: any, e?: boolean): any; + toPremultiplied(t: any, e?: boolean): number; + toHex(): string; + toHexa(): string; + setAlpha(t: any): any; + _normalize(t: any): void; + _refreshInt(): void; + _clamp(t: any, e?: number, s?: number): any; + }; + _temp: { + _value: any; + _components: Float32Array; + _int: number; + value: any; + readonly red: number; + readonly green: number; + readonly blue: number; + readonly alpha: number; + setValue(t: any): any; + _cloneSource(t: any): any; + _isSourceEqual(t: any, e: any): any; + toRgba(): { + r: number; + g: number; + b: number; + a: number; + }; + toRgb(): { + r: number; + g: number; + b: number; + }; + toRgbaString(): string; + toUint8RgbArray(t: any): any; + _arrayRgb: any[] | undefined; + toArray(t: any): any; + _arrayRgba: any[] | undefined; + toRgbArray(t: any): any; + toNumber(): number; + toBgrNumber(): any; + toLittleEndianNumber(): number; + multiply(t: any): any; + premultiply(t: any, e?: boolean): any; + toPremultiplied(t: any, e?: boolean): number; + toHex(): string; + toHexa(): string; + setAlpha(t: any): any; + _normalize(t: any): void; + _refreshInt(): void; + _clamp(t: any, e?: number, s?: number): any; + }; + HEX_PATTERN: RegExp; +}; +declare class fn { + static test(t: any): boolean; + constructor(t: any); + priority: number; + pipe: string; + init(t: any): void; + mask: any; + destroy(): void; +} +declare namespace fn { + let extension_11: any; + export { extension_11 as extension }; +} +declare class wa { + constructor(t: any); + _colorStack: any[]; + _colorStackIndex: number; + _currentColor: number; + _renderer: any; + buildStart(): void; + push(t: any, e: any, s: any): void; + pop(t: any, e: any, s: any): void; + execute(t: any): void; + destroy(): void; +} +declare namespace wa { + export namespace extension_12 { + let type_8: any[]; + export { type_8 as type }; + let name_8: string; + export { name_8 as name }; + } + export { extension_12 as extension }; +} +declare const pS_base: { + new (t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + blendMode: string; + resolution: number; + padding: number; + antialias: string; + blendRequired: boolean; + }; +}; +declare class pS extends pS_base { + constructor(t?: {}); + set alpha(t: any); + get alpha(): any; + _loadMatrix(t: any, e?: boolean): void; + _multiply(t: any, e: any, s: any): any; + _colorMatrix(t: any): Float32Array; + brightness(t: any, e: any): void; + tint(t: any, e: any): void; + greyscale(t: any, e: any): void; + grayscale(t: any, e: any): void; + blackAndWhite(t: any): void; + hue(t: any, e: any): void; + contrast(t: any, e: any): void; + saturate(t: number | undefined, e: any): void; + desaturate(): void; + negative(t: any): void; + sepia(t: any): void; + technicolor(t: any): void; + polaroid(t: any): void; + toBGR(t: any): void; + kodachrome(t: any): void; + browni(t: any): void; + vintage(t: any): void; + colorTone(t: any, e: any, s: any, i: any, n: any): void; + night(t: any, e: any): void; + predator(t: any, e: any): void; + lsd(t: any): void; + reset(): void; + set matrix(t: any); + get matrix(): any; +} +declare const Fr_base: { + new (t?: {}): { + [x: string]: any; + options: {}; + uid: number; + _resourceType: string; + _resourceId: number; + uploadMethodId: string; + _resolution: any; + pixelWidth: any; + pixelHeight: any; + width: number; + height: number; + sampleCount: any; + mipLevelCount: any; + autoGenerateMipmaps: any; + format: any; + dimension: any; + antialias: any; + _touched: number; + _batchTick: number; + _textureBindLocation: number; + label: any; + resource: any; + autoGarbageCollect: any; + alphaMode: any; + style: any; + destroyed: boolean; + readonly source: any; + _style: any; + addressMode: any; + repeatMode: any; + magFilter: any; + minFilter: any; + mipmapFilter: any; + lodMinClamp: any; + lodMaxClamp: any; + _onStyleChange(): void; + update(): void; + destroy(): void; + unload(): void; + readonly resourceWidth: any; + readonly resourceHeight: any; + resolution: any; + resize(t: any, e: any, s: any): boolean; + updateMipmaps(): void; + wrapMode: any; + scaleMode: any; + _refreshPOT(): void; + isPowerOfTwo: boolean | undefined; + }; + [x: string]: any; + test(t: any): void; + defaultOptions: { + resolution: number; + format: string; + alphaMode: string; + dimensions: string; + mipLevelCount: number; + autoGenerateMipmaps: boolean; + sampleCount: number; + antialias: boolean; + autoGarbageCollect: boolean; + }; +}; +declare class Fr extends Fr_base { + constructor(t: any); +} +declare const V_base: any; +declare class V extends V_base { + [x: string]: any; + static mixin(t: any): void; + constructor(t?: {}); + uid: number; + _updateFlags: number; + isRenderGroupRoot: boolean; + renderGroup: Fl | null; + didChange: boolean; + didViewUpdate: boolean; + relativeRenderGroupDepth: number; + children: any[]; + parent: any; + includeInBuild: boolean; + measurable: boolean; + isSimple: boolean; + updateTick: number; + localTransform: G; + relativeGroupTransform: G; + groupTransform: G; + destroyed: boolean; + _position: rt; + _scale: rt; + _pivot: rt; + _skew: rt; + _cx: number; + _sx: number; + _cy: number; + _sy: number; + _rotation: number; + localColor: number; + localAlpha: number; + groupAlpha: number; + groupColor: number; + groupColorAlpha: number; + localBlendMode: string; + groupBlendMode: string; + localDisplayStatus: number; + globalDisplayStatus: number; + _didChangeId: number; + _didLocalTransformChangeId: number; + effects: any[]; + addChild(...t: any[]): any; + sortDirty: boolean | undefined; + removeChild(...t: any[]): any; + _onUpdate(t: any): void; + set isRenderGroup(t: boolean); + get isRenderGroup(): boolean; + enableRenderGroup(): void; + _updateIsSimple(): void; + get worldTransform(): G; + _worldTransform: G | undefined; + set x(t: any); + get x(): any; + set y(t: any); + get y(): any; + set position(t: rt); + get position(): rt; + set rotation(t: number); + get rotation(): number; + set angle(t: number); + get angle(): number; + set pivot(t: rt); + get pivot(): rt; + set skew(t: rt); + get skew(): rt; + set scale(t: rt); + get scale(): rt; + set width(t: number); + get width(): number; + set height(t: number); + get height(): number; + getSize(t: any): any; + setSize(t: any, e: any): void; + _updateSkew(): void; + updateTransform(t: any): this; + setFromMatrix(t: any): void; + updateLocalTransform(): void; + set alpha(t: number); + get alpha(): number; + set tint(t: number); + get tint(): number; + set blendMode(t: string); + get blendMode(): string; + set visible(t: boolean); + get visible(): boolean; + set culled(t: boolean); + get culled(): boolean; + set renderable(t: boolean); + get renderable(): boolean; + get isRenderable(): boolean; + destroy(t?: boolean): void; + _mask: any; + _filters: any; +} +declare let If: { + new (): { + cull(t: any, e: any, s?: boolean): void; + _cullRecursive(t: any, e: any, s?: boolean): void; + }; + shared: { + cull(t: any, e: any, s?: boolean): void; + _cullRecursive(t: any, e: any, s?: boolean): void; + }; +}; +declare class Bf { + static init(): void; + static destroy(): void; +} +declare namespace Bf { + export let _renderRef: any; + export let render: any; + export namespace extension_13 { + export let priority: number; + let type_9: any; + export { type_9 as type }; + let name_9: string; + export { name_9 as name }; + } + export { extension_13 as extension }; +} +declare class nu { + constructor(t: any); + _renderer: any; + addRenderable(t: any, e: any): void; + execute(t: any): void; + destroy(): void; +} +declare namespace nu { + export namespace extension_14 { + let type_10: any[]; + export { type_10 as type }; + let name_10: string; + export { name_10 as name }; + } + export { extension_14 as extension }; +} +declare const MA: RegExp; +declare namespace I { + export let MAGIC_VALUE: number; + export let MAGIC_SIZE: number; + export let HEADER_SIZE: number; + export let HEADER_DX10_SIZE: number; + export namespace PIXEL_FORMAT_FLAGS { + let ALPHAPIXELS: number; + let ALPHA: number; + let FOURCC: number; + let RGB: number; + let RGBA: number; + let YUV: number; + let LUMINANCE: number; + let LUMINANCEA: number; + } + export let RESOURCE_MISC_TEXTURECUBE: number; + export { Z1 as HEADER_FIELDS }; + export { Q1 as HEADER_DX10_FIELDS }; + export { yf as DXGI_FORMAT }; + export { Tf as D3D10_RESOURCE_DIMENSION }; + export { bt as D3DFMT }; +} +declare const Tl: number; +declare var Xu: any; +declare var Hu: any; +declare namespace X { + function get(): { + createCanvas: (r: any, t: any) => HTMLCanvasElement; + getCanvasRenderingContext2D: () => { + new (): CanvasRenderingContext2D; + prototype: CanvasRenderingContext2D; + }; + getWebGLRenderingContext: () => { + new (): WebGLRenderingContext; + prototype: WebGLRenderingContext; + readonly DEPTH_BUFFER_BIT: 256; + readonly STENCIL_BUFFER_BIT: 1024; + readonly COLOR_BUFFER_BIT: 16384; + readonly POINTS: 0; + readonly LINES: 1; + readonly LINE_LOOP: 2; + readonly LINE_STRIP: 3; + readonly TRIANGLES: 4; + readonly TRIANGLE_STRIP: 5; + readonly TRIANGLE_FAN: 6; + readonly ZERO: 0; + readonly ONE: 1; + readonly SRC_COLOR: 768; + readonly ONE_MINUS_SRC_COLOR: 769; + readonly SRC_ALPHA: 770; + readonly ONE_MINUS_SRC_ALPHA: 771; + readonly DST_ALPHA: 772; + readonly ONE_MINUS_DST_ALPHA: 773; + readonly DST_COLOR: 774; + readonly ONE_MINUS_DST_COLOR: 775; + readonly SRC_ALPHA_SATURATE: 776; + readonly FUNC_ADD: 32774; + readonly BLEND_EQUATION: 32777; + readonly BLEND_EQUATION_RGB: 32777; + readonly BLEND_EQUATION_ALPHA: 34877; + readonly FUNC_SUBTRACT: 32778; + readonly FUNC_REVERSE_SUBTRACT: 32779; + readonly BLEND_DST_RGB: 32968; + readonly BLEND_SRC_RGB: 32969; + readonly BLEND_DST_ALPHA: 32970; + readonly BLEND_SRC_ALPHA: 32971; + readonly CONSTANT_COLOR: 32769; + readonly ONE_MINUS_CONSTANT_COLOR: 32770; + readonly CONSTANT_ALPHA: 32771; + readonly ONE_MINUS_CONSTANT_ALPHA: 32772; + readonly BLEND_COLOR: 32773; + readonly ARRAY_BUFFER: 34962; + readonly ELEMENT_ARRAY_BUFFER: 34963; + readonly ARRAY_BUFFER_BINDING: 34964; + readonly ELEMENT_ARRAY_BUFFER_BINDING: 34965; + readonly STREAM_DRAW: 35040; + readonly STATIC_DRAW: 35044; + readonly DYNAMIC_DRAW: 35048; + readonly BUFFER_SIZE: 34660; + readonly BUFFER_USAGE: 34661; + readonly CURRENT_VERTEX_ATTRIB: 34342; + readonly FRONT: 1028; + readonly BACK: 1029; + readonly FRONT_AND_BACK: 1032; + readonly CULL_FACE: 2884; + readonly BLEND: 3042; + readonly DITHER: 3024; + readonly STENCIL_TEST: 2960; + readonly DEPTH_TEST: 2929; + readonly SCISSOR_TEST: 3089; + readonly POLYGON_OFFSET_FILL: 32823; + readonly SAMPLE_ALPHA_TO_COVERAGE: 32926; + readonly SAMPLE_COVERAGE: 32928; + readonly NO_ERROR: 0; + readonly INVALID_ENUM: 1280; + readonly INVALID_VALUE: 1281; + readonly INVALID_OPERATION: 1282; + readonly OUT_OF_MEMORY: 1285; + readonly CW: 2304; + readonly CCW: 2305; + readonly LINE_WIDTH: 2849; + readonly ALIASED_POINT_SIZE_RANGE: 33901; + readonly ALIASED_LINE_WIDTH_RANGE: 33902; + readonly CULL_FACE_MODE: 2885; + readonly FRONT_FACE: 2886; + readonly DEPTH_RANGE: 2928; + readonly DEPTH_WRITEMASK: 2930; + readonly DEPTH_CLEAR_VALUE: 2931; + readonly DEPTH_FUNC: 2932; + readonly STENCIL_CLEAR_VALUE: 2961; + readonly STENCIL_FUNC: 2962; + readonly STENCIL_FAIL: 2964; + readonly STENCIL_PASS_DEPTH_FAIL: 2965; + readonly STENCIL_PASS_DEPTH_PASS: 2966; + readonly STENCIL_REF: 2967; + readonly STENCIL_VALUE_MASK: 2963; + readonly STENCIL_WRITEMASK: 2968; + readonly STENCIL_BACK_FUNC: 34816; + readonly STENCIL_BACK_FAIL: 34817; + readonly STENCIL_BACK_PASS_DEPTH_FAIL: 34818; + readonly STENCIL_BACK_PASS_DEPTH_PASS: 34819; + readonly STENCIL_BACK_REF: 36003; + readonly STENCIL_BACK_VALUE_MASK: 36004; + readonly STENCIL_BACK_WRITEMASK: 36005; + readonly VIEWPORT: 2978; + readonly SCISSOR_BOX: 3088; + readonly COLOR_CLEAR_VALUE: 3106; + readonly COLOR_WRITEMASK: 3107; + readonly UNPACK_ALIGNMENT: 3317; + readonly PACK_ALIGNMENT: 3333; + readonly MAX_TEXTURE_SIZE: 3379; + readonly MAX_VIEWPORT_DIMS: 3386; + readonly SUBPIXEL_BITS: 3408; + readonly RED_BITS: 3410; + readonly GREEN_BITS: 3411; + readonly BLUE_BITS: 3412; + readonly ALPHA_BITS: 3413; + readonly DEPTH_BITS: 3414; + readonly STENCIL_BITS: 3415; + readonly POLYGON_OFFSET_UNITS: 10752; + readonly POLYGON_OFFSET_FACTOR: 32824; + readonly TEXTURE_BINDING_2D: 32873; + readonly SAMPLE_BUFFERS: 32936; + readonly SAMPLES: 32937; + readonly SAMPLE_COVERAGE_VALUE: 32938; + readonly SAMPLE_COVERAGE_INVERT: 32939; + readonly COMPRESSED_TEXTURE_FORMATS: 34467; + readonly DONT_CARE: 4352; + readonly FASTEST: 4353; + readonly NICEST: 4354; + readonly GENERATE_MIPMAP_HINT: 33170; + readonly BYTE: 5120; + readonly UNSIGNED_BYTE: 5121; + readonly SHORT: 5122; + readonly UNSIGNED_SHORT: 5123; + readonly INT: 5124; + readonly UNSIGNED_INT: 5125; + readonly FLOAT: 5126; + readonly DEPTH_COMPONENT: 6402; + readonly ALPHA: 6406; + readonly RGB: 6407; + readonly RGBA: 6408; + readonly LUMINANCE: 6409; + readonly LUMINANCE_ALPHA: 6410; + readonly UNSIGNED_SHORT_4_4_4_4: 32819; + readonly UNSIGNED_SHORT_5_5_5_1: 32820; + readonly UNSIGNED_SHORT_5_6_5: 33635; + readonly FRAGMENT_SHADER: 35632; + readonly VERTEX_SHADER: 35633; + readonly MAX_VERTEX_ATTRIBS: 34921; + readonly MAX_VERTEX_UNIFORM_VECTORS: 36347; + readonly MAX_VARYING_VECTORS: 36348; + readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661; + readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660; + readonly MAX_TEXTURE_IMAGE_UNITS: 34930; + readonly MAX_FRAGMENT_UNIFORM_VECTORS: 36349; + readonly SHADER_TYPE: 35663; + readonly DELETE_STATUS: 35712; + readonly LINK_STATUS: 35714; + readonly VALIDATE_STATUS: 35715; + readonly ATTACHED_SHADERS: 35717; + readonly ACTIVE_UNIFORMS: 35718; + readonly ACTIVE_ATTRIBUTES: 35721; + readonly SHADING_LANGUAGE_VERSION: 35724; + readonly CURRENT_PROGRAM: 35725; + readonly NEVER: 512; + readonly LESS: 513; + readonly EQUAL: 514; + readonly LEQUAL: 515; + readonly GREATER: 516; + readonly NOTEQUAL: 517; + readonly GEQUAL: 518; + readonly ALWAYS: 519; + readonly KEEP: 7680; + readonly REPLACE: 7681; + readonly INCR: 7682; + readonly DECR: 7683; + readonly INVERT: 5386; + readonly INCR_WRAP: 34055; + readonly DECR_WRAP: 34056; + readonly VENDOR: 7936; + readonly RENDERER: 7937; + readonly VERSION: 7938; + readonly NEAREST: 9728; + readonly LINEAR: 9729; + readonly NEAREST_MIPMAP_NEAREST: 9984; + readonly LINEAR_MIPMAP_NEAREST: 9985; + readonly NEAREST_MIPMAP_LINEAR: 9986; + readonly LINEAR_MIPMAP_LINEAR: 9987; + readonly TEXTURE_MAG_FILTER: 10240; + readonly TEXTURE_MIN_FILTER: 10241; + readonly TEXTURE_WRAP_S: 10242; + readonly TEXTURE_WRAP_T: 10243; + readonly TEXTURE_2D: 3553; + readonly TEXTURE: 5890; + readonly TEXTURE_CUBE_MAP: 34067; + readonly TEXTURE_BINDING_CUBE_MAP: 34068; + readonly TEXTURE_CUBE_MAP_POSITIVE_X: 34069; + readonly TEXTURE_CUBE_MAP_NEGATIVE_X: 34070; + readonly TEXTURE_CUBE_MAP_POSITIVE_Y: 34071; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072; + readonly TEXTURE_CUBE_MAP_POSITIVE_Z: 34073; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074; + readonly MAX_CUBE_MAP_TEXTURE_SIZE: 34076; + readonly TEXTURE0: 33984; + readonly TEXTURE1: 33985; + readonly TEXTURE2: 33986; + readonly TEXTURE3: 33987; + readonly TEXTURE4: 33988; + readonly TEXTURE5: 33989; + readonly TEXTURE6: 33990; + readonly TEXTURE7: 33991; + readonly TEXTURE8: 33992; + readonly TEXTURE9: 33993; + readonly TEXTURE10: 33994; + readonly TEXTURE11: 33995; + readonly TEXTURE12: 33996; + readonly TEXTURE13: 33997; + readonly TEXTURE14: 33998; + readonly TEXTURE15: 33999; + readonly TEXTURE16: 34000; + readonly TEXTURE17: 34001; + readonly TEXTURE18: 34002; + readonly TEXTURE19: 34003; + readonly TEXTURE20: 34004; + readonly TEXTURE21: 34005; + readonly TEXTURE22: 34006; + readonly TEXTURE23: 34007; + readonly TEXTURE24: 34008; + readonly TEXTURE25: 34009; + readonly TEXTURE26: 34010; + readonly TEXTURE27: 34011; + readonly TEXTURE28: 34012; + readonly TEXTURE29: 34013; + readonly TEXTURE30: 34014; + readonly TEXTURE31: 34015; + readonly ACTIVE_TEXTURE: 34016; + readonly REPEAT: 10497; + readonly CLAMP_TO_EDGE: 33071; + readonly MIRRORED_REPEAT: 33648; + readonly FLOAT_VEC2: 35664; + readonly FLOAT_VEC3: 35665; + readonly FLOAT_VEC4: 35666; + readonly INT_VEC2: 35667; + readonly INT_VEC3: 35668; + readonly INT_VEC4: 35669; + readonly BOOL: 35670; + readonly BOOL_VEC2: 35671; + readonly BOOL_VEC3: 35672; + readonly BOOL_VEC4: 35673; + readonly FLOAT_MAT2: 35674; + readonly FLOAT_MAT3: 35675; + readonly FLOAT_MAT4: 35676; + readonly SAMPLER_2D: 35678; + readonly SAMPLER_CUBE: 35680; + readonly VERTEX_ATTRIB_ARRAY_ENABLED: 34338; + readonly VERTEX_ATTRIB_ARRAY_SIZE: 34339; + readonly VERTEX_ATTRIB_ARRAY_STRIDE: 34340; + readonly VERTEX_ATTRIB_ARRAY_TYPE: 34341; + readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922; + readonly VERTEX_ATTRIB_ARRAY_POINTER: 34373; + readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975; + readonly IMPLEMENTATION_COLOR_READ_TYPE: 35738; + readonly IMPLEMENTATION_COLOR_READ_FORMAT: 35739; + readonly COMPILE_STATUS: 35713; + readonly LOW_FLOAT: 36336; + readonly MEDIUM_FLOAT: 36337; + readonly HIGH_FLOAT: 36338; + readonly LOW_INT: 36339; + readonly MEDIUM_INT: 36340; + readonly HIGH_INT: 36341; + readonly FRAMEBUFFER: 36160; + readonly RENDERBUFFER: 36161; + readonly RGBA4: 32854; + readonly RGB5_A1: 32855; + readonly RGBA8: 32856; + readonly RGB565: 36194; + readonly DEPTH_COMPONENT16: 33189; + readonly STENCIL_INDEX8: 36168; + readonly DEPTH_STENCIL: 34041; + readonly RENDERBUFFER_WIDTH: 36162; + readonly RENDERBUFFER_HEIGHT: 36163; + readonly RENDERBUFFER_INTERNAL_FORMAT: 36164; + readonly RENDERBUFFER_RED_SIZE: 36176; + readonly RENDERBUFFER_GREEN_SIZE: 36177; + readonly RENDERBUFFER_BLUE_SIZE: 36178; + readonly RENDERBUFFER_ALPHA_SIZE: 36179; + readonly RENDERBUFFER_DEPTH_SIZE: 36180; + readonly RENDERBUFFER_STENCIL_SIZE: 36181; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051; + readonly COLOR_ATTACHMENT0: 36064; + readonly DEPTH_ATTACHMENT: 36096; + readonly STENCIL_ATTACHMENT: 36128; + readonly DEPTH_STENCIL_ATTACHMENT: 33306; + readonly NONE: 0; + readonly FRAMEBUFFER_COMPLETE: 36053; + readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054; + readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055; + readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057; + readonly FRAMEBUFFER_UNSUPPORTED: 36061; + readonly FRAMEBUFFER_BINDING: 36006; + readonly RENDERBUFFER_BINDING: 36007; + readonly MAX_RENDERBUFFER_SIZE: 34024; + readonly INVALID_FRAMEBUFFER_OPERATION: 1286; + readonly UNPACK_FLIP_Y_WEBGL: 37440; + readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441; + readonly CONTEXT_LOST_WEBGL: 37442; + readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443; + readonly BROWSER_DEFAULT_WEBGL: 37444; + }; + getWebGL2RenderingContext: () => { + new (): WebGL2RenderingContext; + prototype: WebGL2RenderingContext; + readonly READ_BUFFER: 3074; + readonly UNPACK_ROW_LENGTH: 3314; + readonly UNPACK_SKIP_ROWS: 3315; + readonly UNPACK_SKIP_PIXELS: 3316; + readonly PACK_ROW_LENGTH: 3330; + readonly PACK_SKIP_ROWS: 3331; + readonly PACK_SKIP_PIXELS: 3332; + readonly COLOR: 6144; + readonly DEPTH: 6145; + readonly STENCIL: 6146; + readonly RED: 6403; + readonly RGB8: 32849; + readonly RGB10_A2: 32857; + readonly TEXTURE_BINDING_3D: 32874; + readonly UNPACK_SKIP_IMAGES: 32877; + readonly UNPACK_IMAGE_HEIGHT: 32878; + readonly TEXTURE_3D: 32879; + readonly TEXTURE_WRAP_R: 32882; + readonly MAX_3D_TEXTURE_SIZE: 32883; + readonly UNSIGNED_INT_2_10_10_10_REV: 33640; + readonly MAX_ELEMENTS_VERTICES: 33000; + readonly MAX_ELEMENTS_INDICES: 33001; + readonly TEXTURE_MIN_LOD: 33082; + readonly TEXTURE_MAX_LOD: 33083; + readonly TEXTURE_BASE_LEVEL: 33084; + readonly TEXTURE_MAX_LEVEL: 33085; + readonly MIN: 32775; + readonly MAX: 32776; + readonly DEPTH_COMPONENT24: 33190; + readonly MAX_TEXTURE_LOD_BIAS: 34045; + readonly TEXTURE_COMPARE_MODE: 34892; + readonly TEXTURE_COMPARE_FUNC: 34893; + readonly CURRENT_QUERY: 34917; + readonly QUERY_RESULT: 34918; + readonly QUERY_RESULT_AVAILABLE: 34919; + readonly STREAM_READ: 35041; + readonly STREAM_COPY: 35042; + readonly STATIC_READ: 35045; + readonly STATIC_COPY: 35046; + readonly DYNAMIC_READ: 35049; + readonly DYNAMIC_COPY: 35050; + readonly MAX_DRAW_BUFFERS: 34852; + readonly DRAW_BUFFER0: 34853; + readonly DRAW_BUFFER1: 34854; + readonly DRAW_BUFFER2: 34855; + readonly DRAW_BUFFER3: 34856; + readonly DRAW_BUFFER4: 34857; + readonly DRAW_BUFFER5: 34858; + readonly DRAW_BUFFER6: 34859; + readonly DRAW_BUFFER7: 34860; + readonly DRAW_BUFFER8: 34861; + readonly DRAW_BUFFER9: 34862; + readonly DRAW_BUFFER10: 34863; + readonly DRAW_BUFFER11: 34864; + readonly DRAW_BUFFER12: 34865; + readonly DRAW_BUFFER13: 34866; + readonly DRAW_BUFFER14: 34867; + readonly DRAW_BUFFER15: 34868; + readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: 35657; + readonly MAX_VERTEX_UNIFORM_COMPONENTS: 35658; + readonly SAMPLER_3D: 35679; + readonly SAMPLER_2D_SHADOW: 35682; + readonly FRAGMENT_SHADER_DERIVATIVE_HINT: 35723; + readonly PIXEL_PACK_BUFFER: 35051; + readonly PIXEL_UNPACK_BUFFER: 35052; + readonly PIXEL_PACK_BUFFER_BINDING: 35053; + readonly PIXEL_UNPACK_BUFFER_BINDING: 35055; + readonly FLOAT_MAT2x3: 35685; + readonly FLOAT_MAT2x4: 35686; + readonly FLOAT_MAT3x2: 35687; + readonly FLOAT_MAT3x4: 35688; + readonly FLOAT_MAT4x2: 35689; + readonly FLOAT_MAT4x3: 35690; + readonly SRGB: 35904; + readonly SRGB8: 35905; + readonly SRGB8_ALPHA8: 35907; + readonly COMPARE_REF_TO_TEXTURE: 34894; + readonly RGBA32F: 34836; + readonly RGB32F: 34837; + readonly RGBA16F: 34842; + readonly RGB16F: 34843; + readonly VERTEX_ATTRIB_ARRAY_INTEGER: 35069; + readonly MAX_ARRAY_TEXTURE_LAYERS: 35071; + readonly MIN_PROGRAM_TEXEL_OFFSET: 35076; + readonly MAX_PROGRAM_TEXEL_OFFSET: 35077; + readonly MAX_VARYING_COMPONENTS: 35659; + readonly TEXTURE_2D_ARRAY: 35866; + readonly TEXTURE_BINDING_2D_ARRAY: 35869; + readonly R11F_G11F_B10F: 35898; + readonly UNSIGNED_INT_10F_11F_11F_REV: 35899; + readonly RGB9_E5: 35901; + readonly UNSIGNED_INT_5_9_9_9_REV: 35902; + readonly TRANSFORM_FEEDBACK_BUFFER_MODE: 35967; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 35968; + readonly TRANSFORM_FEEDBACK_VARYINGS: 35971; + readonly TRANSFORM_FEEDBACK_BUFFER_START: 35972; + readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: 35973; + readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 35976; + readonly RASTERIZER_DISCARD: 35977; + readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 35978; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 35979; + readonly INTERLEAVED_ATTRIBS: 35980; + readonly SEPARATE_ATTRIBS: 35981; + readonly TRANSFORM_FEEDBACK_BUFFER: 35982; + readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: 35983; + readonly RGBA32UI: 36208; + readonly RGB32UI: 36209; + readonly RGBA16UI: 36214; + readonly RGB16UI: 36215; + readonly RGBA8UI: 36220; + readonly RGB8UI: 36221; + readonly RGBA32I: 36226; + readonly RGB32I: 36227; + readonly RGBA16I: 36232; + readonly RGB16I: 36233; + readonly RGBA8I: 36238; + readonly RGB8I: 36239; + readonly RED_INTEGER: 36244; + readonly RGB_INTEGER: 36248; + readonly RGBA_INTEGER: 36249; + readonly SAMPLER_2D_ARRAY: 36289; + readonly SAMPLER_2D_ARRAY_SHADOW: 36292; + readonly SAMPLER_CUBE_SHADOW: 36293; + readonly UNSIGNED_INT_VEC2: 36294; + readonly UNSIGNED_INT_VEC3: 36295; + readonly UNSIGNED_INT_VEC4: 36296; + readonly INT_SAMPLER_2D: 36298; + readonly INT_SAMPLER_3D: 36299; + readonly INT_SAMPLER_CUBE: 36300; + readonly INT_SAMPLER_2D_ARRAY: 36303; + readonly UNSIGNED_INT_SAMPLER_2D: 36306; + readonly UNSIGNED_INT_SAMPLER_3D: 36307; + readonly UNSIGNED_INT_SAMPLER_CUBE: 36308; + readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: 36311; + readonly DEPTH_COMPONENT32F: 36012; + readonly DEPTH32F_STENCIL8: 36013; + readonly FLOAT_32_UNSIGNED_INT_24_8_REV: 36269; + readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 33296; + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 33297; + readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: 33298; + readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 33299; + readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 33300; + readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 33301; + readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 33302; + readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 33303; + readonly FRAMEBUFFER_DEFAULT: 33304; + readonly UNSIGNED_INT_24_8: 34042; + readonly DEPTH24_STENCIL8: 35056; + readonly UNSIGNED_NORMALIZED: 35863; + readonly DRAW_FRAMEBUFFER_BINDING: 36006; + readonly READ_FRAMEBUFFER: 36008; + readonly DRAW_FRAMEBUFFER: 36009; + readonly READ_FRAMEBUFFER_BINDING: 36010; + readonly RENDERBUFFER_SAMPLES: 36011; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 36052; + readonly MAX_COLOR_ATTACHMENTS: 36063; + readonly COLOR_ATTACHMENT1: 36065; + readonly COLOR_ATTACHMENT2: 36066; + readonly COLOR_ATTACHMENT3: 36067; + readonly COLOR_ATTACHMENT4: 36068; + readonly COLOR_ATTACHMENT5: 36069; + readonly COLOR_ATTACHMENT6: 36070; + readonly COLOR_ATTACHMENT7: 36071; + readonly COLOR_ATTACHMENT8: 36072; + readonly COLOR_ATTACHMENT9: 36073; + readonly COLOR_ATTACHMENT10: 36074; + readonly COLOR_ATTACHMENT11: 36075; + readonly COLOR_ATTACHMENT12: 36076; + readonly COLOR_ATTACHMENT13: 36077; + readonly COLOR_ATTACHMENT14: 36078; + readonly COLOR_ATTACHMENT15: 36079; + readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 36182; + readonly MAX_SAMPLES: 36183; + readonly HALF_FLOAT: 5131; + readonly RG: 33319; + readonly RG_INTEGER: 33320; + readonly R8: 33321; + readonly RG8: 33323; + readonly R16F: 33325; + readonly R32F: 33326; + readonly RG16F: 33327; + readonly RG32F: 33328; + readonly R8I: 33329; + readonly R8UI: 33330; + readonly R16I: 33331; + readonly R16UI: 33332; + readonly R32I: 33333; + readonly R32UI: 33334; + readonly RG8I: 33335; + readonly RG8UI: 33336; + readonly RG16I: 33337; + readonly RG16UI: 33338; + readonly RG32I: 33339; + readonly RG32UI: 33340; + readonly VERTEX_ARRAY_BINDING: 34229; + readonly R8_SNORM: 36756; + readonly RG8_SNORM: 36757; + readonly RGB8_SNORM: 36758; + readonly RGBA8_SNORM: 36759; + readonly SIGNED_NORMALIZED: 36764; + readonly COPY_READ_BUFFER: 36662; + readonly COPY_WRITE_BUFFER: 36663; + readonly COPY_READ_BUFFER_BINDING: 36662; + readonly COPY_WRITE_BUFFER_BINDING: 36663; + readonly UNIFORM_BUFFER: 35345; + readonly UNIFORM_BUFFER_BINDING: 35368; + readonly UNIFORM_BUFFER_START: 35369; + readonly UNIFORM_BUFFER_SIZE: 35370; + readonly MAX_VERTEX_UNIFORM_BLOCKS: 35371; + readonly MAX_FRAGMENT_UNIFORM_BLOCKS: 35373; + readonly MAX_COMBINED_UNIFORM_BLOCKS: 35374; + readonly MAX_UNIFORM_BUFFER_BINDINGS: 35375; + readonly MAX_UNIFORM_BLOCK_SIZE: 35376; + readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 35377; + readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 35379; + readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: 35380; + readonly ACTIVE_UNIFORM_BLOCKS: 35382; + readonly UNIFORM_TYPE: 35383; + readonly UNIFORM_SIZE: 35384; + readonly UNIFORM_BLOCK_INDEX: 35386; + readonly UNIFORM_OFFSET: 35387; + readonly UNIFORM_ARRAY_STRIDE: 35388; + readonly UNIFORM_MATRIX_STRIDE: 35389; + readonly UNIFORM_IS_ROW_MAJOR: 35390; + readonly UNIFORM_BLOCK_BINDING: 35391; + readonly UNIFORM_BLOCK_DATA_SIZE: 35392; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: 35394; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 35395; + readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 35396; + readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 35398; + readonly INVALID_INDEX: 4294967295; + readonly MAX_VERTEX_OUTPUT_COMPONENTS: 37154; + readonly MAX_FRAGMENT_INPUT_COMPONENTS: 37157; + readonly MAX_SERVER_WAIT_TIMEOUT: 37137; + readonly OBJECT_TYPE: 37138; + readonly SYNC_CONDITION: 37139; + readonly SYNC_STATUS: 37140; + readonly SYNC_FLAGS: 37141; + readonly SYNC_FENCE: 37142; + readonly SYNC_GPU_COMMANDS_COMPLETE: 37143; + readonly UNSIGNALED: 37144; + readonly SIGNALED: 37145; + readonly ALREADY_SIGNALED: 37146; + readonly TIMEOUT_EXPIRED: 37147; + readonly CONDITION_SATISFIED: 37148; + readonly WAIT_FAILED: 37149; + readonly SYNC_FLUSH_COMMANDS_BIT: 1; + readonly VERTEX_ATTRIB_ARRAY_DIVISOR: 35070; + readonly ANY_SAMPLES_PASSED: 35887; + readonly ANY_SAMPLES_PASSED_CONSERVATIVE: 36202; + readonly SAMPLER_BINDING: 35097; + readonly RGB10_A2UI: 36975; + readonly INT_2_10_10_10_REV: 36255; + readonly TRANSFORM_FEEDBACK: 36386; + readonly TRANSFORM_FEEDBACK_PAUSED: 36387; + readonly TRANSFORM_FEEDBACK_ACTIVE: 36388; + readonly TRANSFORM_FEEDBACK_BINDING: 36389; + readonly TEXTURE_IMMUTABLE_FORMAT: 37167; + readonly MAX_ELEMENT_INDEX: 36203; + readonly TEXTURE_IMMUTABLE_LEVELS: 33503; + readonly TIMEOUT_IGNORED: -1; + readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 37447; + readonly DEPTH_BUFFER_BIT: 256; + readonly STENCIL_BUFFER_BIT: 1024; + readonly COLOR_BUFFER_BIT: 16384; + readonly POINTS: 0; + readonly LINES: 1; + readonly LINE_LOOP: 2; + readonly LINE_STRIP: 3; + readonly TRIANGLES: 4; + readonly TRIANGLE_STRIP: 5; + readonly TRIANGLE_FAN: 6; + readonly ZERO: 0; + readonly ONE: 1; + readonly SRC_COLOR: 768; + readonly ONE_MINUS_SRC_COLOR: 769; + readonly SRC_ALPHA: 770; + readonly ONE_MINUS_SRC_ALPHA: 771; + readonly DST_ALPHA: 772; + readonly ONE_MINUS_DST_ALPHA: 773; + readonly DST_COLOR: 774; + readonly ONE_MINUS_DST_COLOR: 775; + readonly SRC_ALPHA_SATURATE: 776; + readonly FUNC_ADD: 32774; + readonly BLEND_EQUATION: 32777; + readonly BLEND_EQUATION_RGB: 32777; + readonly BLEND_EQUATION_ALPHA: 34877; + readonly FUNC_SUBTRACT: 32778; + readonly FUNC_REVERSE_SUBTRACT: 32779; + readonly BLEND_DST_RGB: 32968; + readonly BLEND_SRC_RGB: 32969; + readonly BLEND_DST_ALPHA: 32970; + readonly BLEND_SRC_ALPHA: 32971; + readonly CONSTANT_COLOR: 32769; + readonly ONE_MINUS_CONSTANT_COLOR: 32770; + readonly CONSTANT_ALPHA: 32771; + readonly ONE_MINUS_CONSTANT_ALPHA: 32772; + readonly BLEND_COLOR: 32773; + readonly ARRAY_BUFFER: 34962; + readonly ELEMENT_ARRAY_BUFFER: 34963; + readonly ARRAY_BUFFER_BINDING: 34964; + readonly ELEMENT_ARRAY_BUFFER_BINDING: 34965; + readonly STREAM_DRAW: 35040; + readonly STATIC_DRAW: 35044; + readonly DYNAMIC_DRAW: 35048; + readonly BUFFER_SIZE: 34660; + readonly BUFFER_USAGE: 34661; + readonly CURRENT_VERTEX_ATTRIB: 34342; + readonly FRONT: 1028; + readonly BACK: 1029; + readonly FRONT_AND_BACK: 1032; + readonly CULL_FACE: 2884; + readonly BLEND: 3042; + readonly DITHER: 3024; + readonly STENCIL_TEST: 2960; + readonly DEPTH_TEST: 2929; + readonly SCISSOR_TEST: 3089; + readonly POLYGON_OFFSET_FILL: 32823; + readonly SAMPLE_ALPHA_TO_COVERAGE: 32926; + readonly SAMPLE_COVERAGE: 32928; + readonly NO_ERROR: 0; + readonly INVALID_ENUM: 1280; + readonly INVALID_VALUE: 1281; + readonly INVALID_OPERATION: 1282; + readonly OUT_OF_MEMORY: 1285; + readonly CW: 2304; + readonly CCW: 2305; + readonly LINE_WIDTH: 2849; + readonly ALIASED_POINT_SIZE_RANGE: 33901; + readonly ALIASED_LINE_WIDTH_RANGE: 33902; + readonly CULL_FACE_MODE: 2885; + readonly FRONT_FACE: 2886; + readonly DEPTH_RANGE: 2928; + readonly DEPTH_WRITEMASK: 2930; + readonly DEPTH_CLEAR_VALUE: 2931; + readonly DEPTH_FUNC: 2932; + readonly STENCIL_CLEAR_VALUE: 2961; + readonly STENCIL_FUNC: 2962; + readonly STENCIL_FAIL: 2964; + readonly STENCIL_PASS_DEPTH_FAIL: 2965; + readonly STENCIL_PASS_DEPTH_PASS: 2966; + readonly STENCIL_REF: 2967; + readonly STENCIL_VALUE_MASK: 2963; + readonly STENCIL_WRITEMASK: 2968; + readonly STENCIL_BACK_FUNC: 34816; + readonly STENCIL_BACK_FAIL: 34817; + readonly STENCIL_BACK_PASS_DEPTH_FAIL: 34818; + readonly STENCIL_BACK_PASS_DEPTH_PASS: 34819; + readonly STENCIL_BACK_REF: 36003; + readonly STENCIL_BACK_VALUE_MASK: 36004; + readonly STENCIL_BACK_WRITEMASK: 36005; + readonly VIEWPORT: 2978; + readonly SCISSOR_BOX: 3088; + readonly COLOR_CLEAR_VALUE: 3106; + readonly COLOR_WRITEMASK: 3107; + readonly UNPACK_ALIGNMENT: 3317; + readonly PACK_ALIGNMENT: 3333; + readonly MAX_TEXTURE_SIZE: 3379; + readonly MAX_VIEWPORT_DIMS: 3386; + readonly SUBPIXEL_BITS: 3408; + readonly RED_BITS: 3410; + readonly GREEN_BITS: 3411; + readonly BLUE_BITS: 3412; + readonly ALPHA_BITS: 3413; + readonly DEPTH_BITS: 3414; + readonly STENCIL_BITS: 3415; + readonly POLYGON_OFFSET_UNITS: 10752; + readonly POLYGON_OFFSET_FACTOR: 32824; + readonly TEXTURE_BINDING_2D: 32873; + readonly SAMPLE_BUFFERS: 32936; + readonly SAMPLES: 32937; + readonly SAMPLE_COVERAGE_VALUE: 32938; + readonly SAMPLE_COVERAGE_INVERT: 32939; + readonly COMPRESSED_TEXTURE_FORMATS: 34467; + readonly DONT_CARE: 4352; + readonly FASTEST: 4353; + readonly NICEST: 4354; + readonly GENERATE_MIPMAP_HINT: 33170; + readonly BYTE: 5120; + readonly UNSIGNED_BYTE: 5121; + readonly SHORT: 5122; + readonly UNSIGNED_SHORT: 5123; + readonly INT: 5124; + readonly UNSIGNED_INT: 5125; + readonly FLOAT: 5126; + readonly DEPTH_COMPONENT: 6402; + readonly ALPHA: 6406; + readonly RGB: 6407; + readonly RGBA: 6408; + readonly LUMINANCE: 6409; + readonly LUMINANCE_ALPHA: 6410; + readonly UNSIGNED_SHORT_4_4_4_4: 32819; + readonly UNSIGNED_SHORT_5_5_5_1: 32820; + readonly UNSIGNED_SHORT_5_6_5: 33635; + readonly FRAGMENT_SHADER: 35632; + readonly VERTEX_SHADER: 35633; + readonly MAX_VERTEX_ATTRIBS: 34921; + readonly MAX_VERTEX_UNIFORM_VECTORS: 36347; + readonly MAX_VARYING_VECTORS: 36348; + readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661; + readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660; + readonly MAX_TEXTURE_IMAGE_UNITS: 34930; + readonly MAX_FRAGMENT_UNIFORM_VECTORS: 36349; + readonly SHADER_TYPE: 35663; + readonly DELETE_STATUS: 35712; + readonly LINK_STATUS: 35714; + readonly VALIDATE_STATUS: 35715; + readonly ATTACHED_SHADERS: 35717; + readonly ACTIVE_UNIFORMS: 35718; + readonly ACTIVE_ATTRIBUTES: 35721; + readonly SHADING_LANGUAGE_VERSION: 35724; + readonly CURRENT_PROGRAM: 35725; + readonly NEVER: 512; + readonly LESS: 513; + readonly EQUAL: 514; + readonly LEQUAL: 515; + readonly GREATER: 516; + readonly NOTEQUAL: 517; + readonly GEQUAL: 518; + readonly ALWAYS: 519; + readonly KEEP: 7680; + readonly REPLACE: 7681; + readonly INCR: 7682; + readonly DECR: 7683; + readonly INVERT: 5386; + readonly INCR_WRAP: 34055; + readonly DECR_WRAP: 34056; + readonly VENDOR: 7936; + readonly RENDERER: 7937; + readonly VERSION: 7938; + readonly NEAREST: 9728; + readonly LINEAR: 9729; + readonly NEAREST_MIPMAP_NEAREST: 9984; + readonly LINEAR_MIPMAP_NEAREST: 9985; + readonly NEAREST_MIPMAP_LINEAR: 9986; + readonly LINEAR_MIPMAP_LINEAR: 9987; + readonly TEXTURE_MAG_FILTER: 10240; + readonly TEXTURE_MIN_FILTER: 10241; + readonly TEXTURE_WRAP_S: 10242; + readonly TEXTURE_WRAP_T: 10243; + readonly TEXTURE_2D: 3553; + readonly TEXTURE: 5890; + readonly TEXTURE_CUBE_MAP: 34067; + readonly TEXTURE_BINDING_CUBE_MAP: 34068; + readonly TEXTURE_CUBE_MAP_POSITIVE_X: 34069; + readonly TEXTURE_CUBE_MAP_NEGATIVE_X: 34070; + readonly TEXTURE_CUBE_MAP_POSITIVE_Y: 34071; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072; + readonly TEXTURE_CUBE_MAP_POSITIVE_Z: 34073; + readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074; + readonly MAX_CUBE_MAP_TEXTURE_SIZE: 34076; + readonly TEXTURE0: 33984; + readonly TEXTURE1: 33985; + readonly TEXTURE2: 33986; + readonly TEXTURE3: 33987; + readonly TEXTURE4: 33988; + readonly TEXTURE5: 33989; + readonly TEXTURE6: 33990; + readonly TEXTURE7: 33991; + readonly TEXTURE8: 33992; + readonly TEXTURE9: 33993; + readonly TEXTURE10: 33994; + readonly TEXTURE11: 33995; + readonly TEXTURE12: 33996; + readonly TEXTURE13: 33997; + readonly TEXTURE14: 33998; + readonly TEXTURE15: 33999; + readonly TEXTURE16: 34000; + readonly TEXTURE17: 34001; + readonly TEXTURE18: 34002; + readonly TEXTURE19: 34003; + readonly TEXTURE20: 34004; + readonly TEXTURE21: 34005; + readonly TEXTURE22: 34006; + readonly TEXTURE23: 34007; + readonly TEXTURE24: 34008; + readonly TEXTURE25: 34009; + readonly TEXTURE26: 34010; + readonly TEXTURE27: 34011; + readonly TEXTURE28: 34012; + readonly TEXTURE29: 34013; + readonly TEXTURE30: 34014; + readonly TEXTURE31: 34015; + readonly ACTIVE_TEXTURE: 34016; + readonly REPEAT: 10497; + readonly CLAMP_TO_EDGE: 33071; + readonly MIRRORED_REPEAT: 33648; + readonly FLOAT_VEC2: 35664; + readonly FLOAT_VEC3: 35665; + readonly FLOAT_VEC4: 35666; + readonly INT_VEC2: 35667; + readonly INT_VEC3: 35668; + readonly INT_VEC4: 35669; + readonly BOOL: 35670; + readonly BOOL_VEC2: 35671; + readonly BOOL_VEC3: 35672; + readonly BOOL_VEC4: 35673; + readonly FLOAT_MAT2: 35674; + readonly FLOAT_MAT3: 35675; + readonly FLOAT_MAT4: 35676; + readonly SAMPLER_2D: 35678; + readonly SAMPLER_CUBE: 35680; + readonly VERTEX_ATTRIB_ARRAY_ENABLED: 34338; + readonly VERTEX_ATTRIB_ARRAY_SIZE: 34339; + readonly VERTEX_ATTRIB_ARRAY_STRIDE: 34340; + readonly VERTEX_ATTRIB_ARRAY_TYPE: 34341; + readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922; + readonly VERTEX_ATTRIB_ARRAY_POINTER: 34373; + readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975; + readonly IMPLEMENTATION_COLOR_READ_TYPE: 35738; + readonly IMPLEMENTATION_COLOR_READ_FORMAT: 35739; + readonly COMPILE_STATUS: 35713; + readonly LOW_FLOAT: 36336; + readonly MEDIUM_FLOAT: 36337; + readonly HIGH_FLOAT: 36338; + readonly LOW_INT: 36339; + readonly MEDIUM_INT: 36340; + readonly HIGH_INT: 36341; + readonly FRAMEBUFFER: 36160; + readonly RENDERBUFFER: 36161; + readonly RGBA4: 32854; + readonly RGB5_A1: 32855; + readonly RGBA8: 32856; + readonly RGB565: 36194; + readonly DEPTH_COMPONENT16: 33189; + readonly STENCIL_INDEX8: 36168; + readonly DEPTH_STENCIL: 34041; + readonly RENDERBUFFER_WIDTH: 36162; + readonly RENDERBUFFER_HEIGHT: 36163; + readonly RENDERBUFFER_INTERNAL_FORMAT: 36164; + readonly RENDERBUFFER_RED_SIZE: 36176; + readonly RENDERBUFFER_GREEN_SIZE: 36177; + readonly RENDERBUFFER_BLUE_SIZE: 36178; + readonly RENDERBUFFER_ALPHA_SIZE: 36179; + readonly RENDERBUFFER_DEPTH_SIZE: 36180; + readonly RENDERBUFFER_STENCIL_SIZE: 36181; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048; + readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051; + readonly COLOR_ATTACHMENT0: 36064; + readonly DEPTH_ATTACHMENT: 36096; + readonly STENCIL_ATTACHMENT: 36128; + readonly DEPTH_STENCIL_ATTACHMENT: 33306; + readonly NONE: 0; + readonly FRAMEBUFFER_COMPLETE: 36053; + readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054; + readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055; + readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057; + readonly FRAMEBUFFER_UNSUPPORTED: 36061; + readonly FRAMEBUFFER_BINDING: 36006; + readonly RENDERBUFFER_BINDING: 36007; + readonly MAX_RENDERBUFFER_SIZE: 34024; + readonly INVALID_FRAMEBUFFER_OPERATION: 1286; + readonly UNPACK_FLIP_Y_WEBGL: 37440; + readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441; + readonly CONTEXT_LOST_WEBGL: 37442; + readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443; + readonly BROWSER_DEFAULT_WEBGL: 37444; + }; + getNavigator: () => Navigator; + getBaseUrl: () => string; + getFontFaceSet: () => FontFaceSet; + fetch: (r: any, t: any) => Promise; + parseXML: (r: any) => Document; + }; + function set(r: any): void; +} +declare namespace DE { + let POINTS: string; + let LINES: string; + let LINE_STRIP: string; + let TRIANGLES: string; + let TRIANGLE_STRIP: string; +} +declare const ft: { + 70: string; + 71: string; + 72: string; + 73: string; + 74: string; + 75: string; + 76: string; + 77: string; + 78: string; + 79: string; + 80: string; + 81: string; + 82: string; + 83: string; + 84: string; + 94: string; + 95: string; + 96: string; + 97: string; + 98: string; + 99: string; + 28: string; + 29: string; + 87: string; + 91: string; + 41: string; + 49: string; + 56: string; + 61: string; + 24: string; + 11: string; + 13: string; + 10: string; + 54: string; + 34: string; + 16: string; + 2: string; +}; +declare const vS_base: { + new (t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + blendMode: string; + resolution: number; + padding: number; + antialias: string; + blendRequired: boolean; + }; +}; +declare class vS extends vS_base { + constructor(...t: any[]); + _sprite: any; + get scale(): any; +} +declare class go extends eo { + constructor(t: any); + resolution: any; + _padding: any; + _measureCache: any; + _currentChars: any[]; + _currentX: number; + _currentY: number; + _currentPageIndex: number; + _skipKerning: any; + baseRenderedFontSize: any; + _style: any; + fontMetrics: any; + lineHeight: any; + ensureCharacters(t: any): void; + _applyKerning(t: any, e: any): void; + _nextPage(): { + canvasAndContext: any; + texture: A; + }; + _setupContext(t: any, e: any, s: any): void; + _drawGlyph(t: any, e: any, s: any, i: any, n: any, o: any): void; + destroy(): void; +} +declare class Bi { + constructor(t?: number, e?: number, s?: number, i?: number); + type: string; + x: number; + y: number; + halfWidth: number; + halfHeight: number; + clone(): Bi; + contains(t: any, e: any): boolean; + strokeContains(t: any, e: any, s: any): boolean; + getBounds(): z; + copyFrom(t: any): this; + copyTo(t: any): any; +} +declare class eh { + constructor(t: any); + dispatch: any; + moveOnAll: boolean; + enableGlobalMoveEvents: boolean; + mappingState: { + trackingData: {}; + }; + eventPool: Map; + _allInteractiveElements: any[]; + _hitElements: any[]; + _isPointerMoveEvent: boolean; + rootTarget: any; + hitPruneFn(t: any, e: any): boolean; + hitTestFn(t: any, e: any): any; + mapPointerDown(t: any): void; + mapPointerMove(t: any): void; + mapPointerOut(t: any): void; + mapPointerOver(t: any): void; + mapPointerUp(t: any): void; + mapPointerUpOutside(t: any): void; + mapWheel(t: any): void; + mappingTable: {}; + addEventMapping(t: any, e: any): void; + dispatchEvent(t: any, e: any): void; + mapEvent(t: any): void; + hitTest(t: any, e: any): any; + propagate(t: any, e: any): void; + all(t: any, e: any, s?: any[]): void; + propagationPath(t: any): any[]; + hitTestMoveRecursive(t: any, e: any, s: any, i: any, n: any, o?: boolean): any[] | null; + hitTestRecursive(t: any, e: any, s: any, i: any, n: any): any; + _isInteractive(t: any): boolean; + _interactivePrune(t: any): boolean; + notifyTarget(t: any, e: any): void; + cursor: any; + findMountedTarget(t: any): any; + createPointerEvent(t: any, e: any, s: any): any; + createWheelEvent(t: any): any; + clonePointerEvent(t: any, e: any): any; + copyWheelData(t: any, e: any): void; + copyPointerData(t: any, e: any): void; + copyMouseData(t: any, e: any): void; + copyData(t: any, e: any): void; + trackingData(t: any): any; + allocateEvent(t: any): any; + freeEvent(t: any): void; + _notifyListeners(t: any, e: any): void; +} +declare var ct: any; +declare let on: { + new (t: any): { + supportsTouchEvents: boolean; + supportsPointerEvents: boolean; + domElement: any; + resolution: number; + renderer: any; + rootBoundary: eh; + autoPreventDefault: boolean; + _eventsAdded: boolean; + _rootPointerEvent: At; + _rootWheelEvent: he; + cursorStyles: { + default: string; + pointer: string; + }; + features: any; + _onPointerDown(t: any): void; + _onPointerMove(t: any): void; + _onPointerUp(t: any): void; + _onPointerOverOut(t: any): void; + onWheel(t: any): void; + init(t: any): void; + resolutionChange(t: any): void; + destroy(): void; + _currentCursor: any; + setCursor(t: any): void; + readonly pointer: At; + setTargetElement(t: any): void; + _addEvents(): void; + _removeEvents(): void; + mapPositionToPoint(t: any, e: any, s: any): void; + _normalizeToPointerData(t: any): any[]; + normalizeWheelEvent(t: any): he; + _bootstrapEvent(t: any, e: any): any; + _transferMouseData(t: any, e: any): void; + }; + readonly defaultEventMode: any; + extension: { + name: string; + type: any[]; + priority: number; + }; + defaultEventFeatures: { + move: boolean; + globalMove: boolean; + click: boolean; + wheel: boolean; + }; +}; +declare const zt: { + interactionFrequency: number; + _deltaTime: number; + _didMove: boolean; + _tickerAdded: boolean; + _pauseUpdate: boolean; + init(t: any): void; + events: any; + pauseUpdate: boolean; + addTickerListener(): void; + removeTickerListener(): void; + pointerMoved(): void; + _update(): void; + _tickerUpdate(t: any): void; +}; +declare var v: any; +declare let l_: { + new (t: any): { + _renderer: any; + _normalizeOptions(t: any, e?: {}): any; + image(t: any): Promise; + base64(t: any): Promise; + canvas(t: any): any; + pixels(t: any): any; + texture(t: any): any; + download(t: any): void; + log(t: any): void; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + }; + defaultImageOptions: { + format: string; + quality: number; + }; +}; +declare const la: { + [x: number]: string; + 36: string; + 110: string; + 111: string; + 112: string; + 113: string; + 114: string; + 115: string; + 116: string; +}; +declare namespace ih { + let onclick: null; + let onmousedown: null; + let onmouseenter: null; + let onmouseleave: null; + let onmousemove: null; + let onglobalmousemove: null; + let onmouseout: null; + let onmouseover: null; + let onmouseup: null; + let onmouseupoutside: null; + let onpointercancel: null; + let onpointerdown: null; + let onpointerenter: null; + let onpointerleave: null; + let onpointermove: null; + let onglobalpointermove: null; + let onpointerout: null; + let onpointerover: null; + let onpointertap: null; + let onpointerup: null; + let onpointerupoutside: null; + let onrightclick: null; + let onrightdown: null; + let onrightup: null; + let onrightupoutside: null; + let ontap: null; + let ontouchcancel: null; + let ontouchend: null; + let ontouchendoutside: null; + let ontouchmove: null; + let onglobaltouchmove: null; + let ontouchstart: null; + let onwheel: null; + let interactive: boolean; + let _internalEventMode: undefined; + let eventMode: any; + function isInteractive(): boolean; + let interactiveChildren: boolean; + let hitArea: null; + function addEventListener(r: any, t: any, e: any): void; + function removeEventListener(r: any, t: any, e: any): void; + function dispatchEvent(r: any): boolean; +} +declare class Ke { + constructor(t: any); + bubbles: boolean; + cancelBubble: boolean; + cancelable: boolean; + composed: boolean; + defaultPrevented: boolean; + eventPhase: any; + propagationStopped: boolean; + propagationImmediatelyStopped: boolean; + layer: j; + page: j; + NONE: number; + CAPTURING_PHASE: number; + AT_TARGET: number; + BUBBLING_PHASE: number; + manager: any; + get layerX(): number; + get layerY(): number; + get pageX(): number; + get pageY(): number; + get data(): this; + composedPath(): any; + path: any; + initEvent(t: any, e: any, s: any): void; + initUIEvent(t: any, e: any, s: any, i: any, n: any): void; + preventDefault(): void; + stopImmediatePropagation(): void; + stopPropagation(): void; +} +declare class ur extends Ke { + constructor(...args: any[]); + client: j; + movement: j; + offset: j; + global: j; + screen: j; + get clientX(): number; + get clientY(): number; + get x(): number; + get y(): number; + get movementX(): number; + get movementY(): number; + get offsetX(): number; + get offsetY(): number; + get globalX(): number; + get globalY(): number; + get screenX(): number; + get screenY(): number; + getLocalPosition(t: any, e: any, s: any): any; + getModifierState(t: any): any; + initMouseEvent(t: any, e: any, s: any, i: any, n: any, o: any, a: any, u: any, l: any, h: any, c: any, d: any, p: any, f: any, g: any): void; +} +declare class At extends ur { + width: number; + height: number; + isPrimary: boolean; + getCoalescedEvents(): this[]; + getPredictedEvents(): void; +} +declare class he extends ur { + DOM_DELTA_PIXEL: number; + DOM_DELTA_LINE: number; + DOM_DELTA_PAGE: number; +} +declare namespace he { + let DOM_DELTA_PIXEL: number; + let DOM_DELTA_LINE: number; + let DOM_DELTA_PAGE: number; +} +declare let Ms: { + new (t: any, e: any, s: any, i: any): { + uid: number; + type: string; + gradientStops: any[]; + x0: any; + y0: any; + x1: any; + y1: any; + addColorStop(t: any, e: any): any; + buildLinearGradient(): void; + texture: A | undefined; + transform: G | undefined; + }; + defaultTextureSize: number; +}; +declare class Jn { + constructor(t: any, e: any); + uid: number; + transform: G; + texture: any; + setTransform(t: any): void; +} +declare let Yt: { + new (t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + blendMode: string; + resolution: number; + padding: number; + antialias: string; + blendRequired: boolean; + }; +}; +declare class ts { + constructor(t: any); + pipe: string; + priority: number; + filters: any; + filterArea: any; + destroy(): void; +} +declare class zo { + constructor(t: any); + _renderer: any; + push(t: any, e: any, s: any): void; + pop(t: any, e: any, s: any): void; + execute(t: any): void; + destroy(): void; +} +declare namespace zo { + export namespace extension_15 { + let type_11: any[]; + export { type_11 as type }; + let name_11: string; + export { name_11 as name }; + } + export { extension_15 as extension }; +} +declare class Vo { + constructor(t: any); + _filterStackIndex: number; + _filterStack: any[]; + _filterGlobalUniforms: { + _touched: number; + uid: number; + _resourceType: string; + _resourceId: number; + isUniformGroup: boolean; + _dirtyId: number; + uniformStructures: any; + uniforms: {}; + ubo: any; + isStatic: any; + _signature: any; + update(): void; + }; + _globalFilterBindGroup: Lt; + renderer: any; + get activeBackTexture(): any; + push(t: any): void; + pop(): void; + _activeFilterData: any; + getBackTexture(t: any, e: any, s: any): any; + applyFilter(t: any, e: any, s: any, i: any): void; + _getFilterData(): { + skip: boolean; + inputTexture: null; + bounds: lt; + container: null; + filterEffect: null; + blendRequired: boolean; + previousRenderSurface: null; + }; + calculateSpriteMatrix(t: any, e: any): any; +} +declare namespace Vo { + export namespace extension_16 { + let type_12: any[]; + export { type_12 as type }; + let name_12: string; + export { name_12 as name }; + } + export { extension_16 as extension }; +} +declare const Rr: Map; +declare const ma: { + 5: number[]; + 7: number[]; + 9: number[]; + 11: number[]; + 13: number[]; + 15: number[]; +}; +declare var bi: any; +declare var Af: any; +declare var Ia: any; +declare var N: any; +declare var ig: any; +declare class xu { + constructor(t: any); + _renderer: any; + generateTexture(t: any): A; + destroy(): void; +} +declare namespace xu { + export namespace extension_17 { + let type_13: any[]; + export { type_13 as type }; + let name_13: string; + export { name_13 as name }; + } + export { extension_17 as extension }; +} +declare const Oe_base: any; +declare class Oe extends Oe_base { + [x: string]: any; + constructor(t: any); + uid: number; + _layoutKey: number; + instanceCount: any; + _bounds: lt; + _boundsDirty: boolean; + attributes: any; + buffers: any[]; + indexBuffer: any; + topology: any; + onBufferUpdate(): void; + getAttribute(t: any): any; + getIndex(): any; + getBuffer(t: any): any; + getSize(): number; + get bounds(): any; + destroy(t?: boolean): void; +} +declare let hg: { + new (t: any): { + useBackBuffer: boolean; + _useBackBufferThisRender: boolean; + _renderer: any; + init(t?: {}): void; + _antialias: any; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + } | undefined; + _bigTriangleShader: St | undefined; + renderStart(t: any): void; + _targetTexture: any; + renderEnd(): void; + _presentBackBuffer(): void; + _getBackBufferTexture(t: any): any; + _backBufferTexture: any; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + priority: number; + }; + defaultOptions: { + useBackBuffer: boolean; + }; +}; +declare class Sa { + _didUpload: boolean; + _tempState: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + init(t: any): void; + _shader: St | null | undefined; + contextChange(): void; + start(t: any, e: any): void; + execute(t: any, e: any): void; + destroy(): void; +} +declare namespace Sa { + export namespace extension_18 { + let type_14: any[]; + export { type_14 as type }; + let name_14: string; + export { name_14 as name }; + } + export { extension_18 as extension }; +} +declare class Qm { + constructor(t: any, e: any); + buffer: any; + updateID: number; + byteLength: number; + type: any; +} +declare class Ma { + constructor(t: any); + _gpuBuffers: any; + _boundBufferBases: any; + _renderer: any; + destroy(): void; + _gl: any; + contextChange(): void; + getGlBuffer(t: any): any; + bind(t: any): void; + bindBufferBase(t: any, e: any): void; + bindBufferRange(t: any, e: any, s: any): void; + updateBuffer(t: any): any; + destroyAll(): void; + onBufferDestroy(t: any, e: any): void; + createGLBuffer(t: any): Qm; +} +declare namespace Ma { + export namespace extension_19 { + let type_15: any[]; + export { type_15 as type }; + let name_15: string; + export { name_15 as name }; + } + export { extension_19 as extension }; +} +declare class Da { + constructor(t: any); + _colorMaskCache: number; + _renderer: any; + setMask(t: any): void; +} +declare namespace Da { + export namespace extension_20 { + let type_16: any[]; + export { type_16 as type }; + let name_16: string; + export { name_16 as name }; + } + export { extension_20 as extension }; +} +declare let rg: { + new (t: any): { + supports: { + uint32Indices: boolean; + uniformBufferObject: boolean; + vertexArrayObject: boolean; + srgbTextures: boolean; + nonPowOf2wrapping: boolean; + msaa: boolean; + nonPowOf2mipmaps: boolean; + }; + _renderer: any; + extensions: any; + handleContextLost(t: any): void; + handleContextRestored(): void; + readonly isLost: any; + contextChange(t: any): void; + gl: any; + init(t: any): void; + initFromContext(t: any): void; + webGLVersion: number | undefined; + createContext(t: any, e: any): void; + getExtensions(): void; + _contextLossForced: boolean | undefined; + destroy(): void; + forceContextLoss(): void; + validateContext(t: any): void; + }; + extension: { + type: any[]; + name: string; + }; + defaultOptions: { + context: null; + premultipliedAlpha: boolean; + preserveDrawingBuffer: boolean; + powerPreference: undefined; + preferWebGLVersion: number; + }; +}; +declare class Ua { + constructor(t: any); + commandFinished: Promise; + _renderer: any; + setGeometry(t: any, e: any): void; + finishRenderPass(): void; + draw(t: any): void; + destroy(): void; +} +declare namespace Ua { + export namespace extension_21 { + let type_17: any[]; + export { type_17 as type }; + let name_17: string; + export { name_17 as name }; + } + export { extension_21 as extension }; +} +declare class Ba { + constructor(t: any); + _geometryVaoHash: any; + _renderer: any; + _activeGeometry: any; + _activeVao: any; + hasVao: boolean; + hasInstance: boolean; + contextChange(): void; + gl: any; + bind(t: any, e: any): void; + reset(): void; + updateBuffers(): void; + checkCompatibility(t: any, e: any): void; + getSignature(t: any, e: any): string; + getVao(t: any, e: any): any; + initGeometryVao(t: any, e: any, s?: boolean): any; + onGeometryDestroy(t: any, e: any): void; + destroyAll(t?: boolean): void; + activateVao(t: any, e: any): void; + draw(t: any, e: any, s: any, i: any): this; + unbind(): void; + destroy(): void; +} +declare namespace Ba { + export namespace extension_22 { + let type_18: any[]; + export { type_18 as type }; + let name_18: string; + export { name_18 as name }; + } + export { extension_22 as extension }; +} +declare class su { + init(): void; + shader: St | null | undefined; + execute(t: any, e: any): void; + destroy(): void; +} +declare namespace su { + export namespace extension_23 { + let type_19: any[]; + export { type_19 as type }; + let name_19: string; + export { name_19 as name }; + } + export { extension_23 as extension }; +} +declare class iu { + init(): void; + _shader: St | null | undefined; + execute(t: any, e: any): void; + destroy(): void; +} +declare namespace iu { + export namespace extension_24 { + let type_20: any[]; + export { type_20 as type }; + let name_20: string; + export { name_20 as name }; + } + export { extension_24 as extension }; +} +declare let Rt: { + new (t: any): { + fragment: any; + vertex: any; + _key: any; + destroy(): void; + _attributeData: any; + _uniformData: any; + _uniformBlockData: any; + transformFeedbackVaryings: any; + }; + from(t: any): any; + defaultOptions: { + preferredVertexPrecision: string; + preferredFragmentPrecision: string; + }; +}; +declare class Rg { + constructor(t: any, e: any); + program: any; + uniformData: any; + uniformGroups: {}; + uniformDirtyGroups: {}; + uniformBlockBindings: {}; + destroy(): void; +} +declare class cg { + width: number; + height: number; + msaa: boolean; + msaaRenderBuffer: any[]; +} +declare class xg { + _clearColorCache: number[]; + _viewPortCache: z; + init(t: any, e: any): void; + _renderer: any; + _renderTargetSystem: any; + contextChange(): void; + copyToTexture(t: any, e: any, s: any, i: any, n: any): any; + startRenderPass(t: any, e: boolean | undefined, s: any, i: any): void; + finishRenderPass(t: any): void; + initGpuRenderTarget(t: any): cg; + clear(t: any, e: any, s: any): void; + resizeGpuRenderTarget(t: any): void; + _initColor(t: any, e: any): void; + _resizeColor(t: any, e: any): void; + _initStencil(t: any): void; + _resizeStencil(t: any): void; +} +declare class Va extends ja { + adaptor: xg; +} +declare namespace Va { + export namespace extension_25 { + let type_21: any[]; + export { type_21 as type }; + let name_21: string; + export { name_21 as name }; + } + export { extension_25 as extension }; +} +declare class Za { + constructor(t: any); + _activeProgram: any; + _programDataHash: any; + _nextIndex: number; + _boundUniformsIdsToIndexHash: any; + _boundIndexToUniformsHash: any; + _shaderSyncFunctions: any; + _renderer: any; + contextChange(t: any): void; + _gl: any; + _maxBindings: any; + bind(t: any, e: any): void; + updateUniformGroup(t: any): void; + bindUniformBlock(t: any, e: any, s?: number): void; + _setProgram(t: any): void; + _getProgramData(t: any): any; + _createProgramData(t: any): any; + destroy(): void; + _generateShaderSync(t: any, e: any): Function; +} +declare namespace Za { + export namespace extension_26 { + let type_22: any[]; + export { type_22 as type }; + let name_22: string; + export { name_22 as name }; + } + export { extension_26 as extension }; +} +declare let Hg: { + new (): { + gl: any; + stateId: number; + polygonOffset: number; + blendMode: string; + _blendEq: boolean; + map: ((t: any) => void)[]; + checks: any[]; + defaultState: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + contextChange(t: any): void; + blendModesMap: { + normal: any[]; + add: any[]; + multiply: any[]; + screen: any[]; + none: number[]; + "normal-npm": any[]; + "add-npm": any[]; + "screen-npm": any[]; + erase: any[]; + } | undefined; + set(t: any): void; + forceState(t: any): void; + setBlend(t: any): void; + setOffset(t: any): void; + setDepthTest(t: any): void; + setDepthMask(t: any): void; + setCullFace(t: any): void; + setFrontFace(t: any): void; + setBlendMode(t: any): void; + setPolygonOffset(t: any, e: any): void; + reset(): void; + _updateCheck(t: any, e: any): void; + destroy(): void; + }; + _checkBlendMode(t: any, e: any): void; + _checkPolygonOffset(t: any, e: any): void; + extension: { + type: any[]; + name: string; + }; +}; +declare class ka { + constructor(t: any); + _stencilCache: { + enabled: boolean; + stencilReference: number; + stencilMode: any; + }; + _renderTargetStencilState: any; + contextChange(t: any): void; + _gl: any; + _comparisonFuncMapping: { + always: any; + never: any; + equal: any; + "not-equal": any; + less: any; + "less-equal": any; + greater: any; + "greater-equal": any; + } | undefined; + _stencilOpsMapping: { + keep: any; + zero: any; + replace: any; + invert: any; + "increment-clamp": any; + "decrement-clamp": any; + "increment-wrap": any; + "decrement-wrap": any; + } | undefined; + onRenderTargetChange(t: any): void; + _activeRenderTarget: any; + setStencilMode(t: any, e: any): void; +} +declare namespace ka { + export namespace extension_27 { + let type_23: any[]; + export { type_23 as type }; + let name_23: string; + export { name_23 as name }; + } + export { extension_27 as extension }; +} +declare class Xg { + constructor(t: any); + target: any; + texture: any; + width: number; + height: number; + type: any; + internalFormat: any; + format: any; + samplerType: number; +} +declare class ru { + constructor(t: any); + managedTextures: any[]; + _glTextures: any; + _glSamplers: any; + _boundTextures: any[]; + _activeTextureLocation: number; + _boundSamplers: any; + _uploads: { + image: { + id: string; + upload(r: any, t: any, e: any, s: any): void; + }; + buffer: { + id: string; + upload(r: any, t: any, e: any): void; + }; + video: { + id: string; + upload(r: any, t: any, e: any, s: any): void; + }; + compressed: { + id: string; + upload(r: any, t: any, e: any): void; + }; + }; + _useSeparateSamplers: boolean; + _renderer: any; + contextChange(t: any): void; + _gl: any; + _mapFormatToInternalFormat: any; + _mapFormatToType: { + r8unorm: any; + r8snorm: any; + r8uint: any; + r8sint: any; + r16uint: any; + r16sint: any; + r16float: any; + rg8unorm: any; + rg8snorm: any; + rg8uint: any; + rg8sint: any; + r32uint: any; + r32sint: any; + r32float: any; + rg16uint: any; + rg16sint: any; + rg16float: any; + rgba8unorm: any; + "rgba8unorm-srgb": any; + rgba8snorm: any; + rgba8uint: any; + rgba8sint: any; + bgra8unorm: any; + "bgra8unorm-srgb": any; + rgb9e5ufloat: any; + rgb10a2unorm: any; + rg11b10ufloat: any; + rg32uint: any; + rg32sint: any; + rg32float: any; + rgba16uint: any; + rgba16sint: any; + rgba16float: any; + rgba32uint: any; + rgba32sint: any; + rgba32float: any; + stencil8: any; + depth16unorm: any; + depth24plus: any; + "depth24plus-stencil8": any; + depth32float: any; + "depth32float-stencil8": any; + } | undefined; + _mapFormatToFormat: { + r8unorm: any; + r8snorm: any; + r8uint: any; + r8sint: any; + r16uint: any; + r16sint: any; + r16float: any; + rg8unorm: any; + rg8snorm: any; + rg8uint: any; + rg8sint: any; + r32uint: any; + r32sint: any; + r32float: any; + rg16uint: any; + rg16sint: any; + rg16float: any; + rgba8unorm: any; + "rgba8unorm-srgb": any; + rgba8snorm: any; + rgba8uint: any; + rgba8sint: any; + bgra8unorm: any; + "bgra8unorm-srgb": any; + rgb9e5ufloat: any; + rgb10a2unorm: any; + rg11b10ufloat: any; + rg32uint: any; + rg32sint: any; + rg32float: any; + rgba16uint: any; + rgba16sint: any; + rgba16float: any; + rgba32uint: any; + rgba32sint: any; + rgba32float: any; + stencil8: any; + depth16unorm: any; + depth24plus: any; + "depth24plus-stencil8": any; + depth32float: any; + "depth32float-stencil8": any; + } | undefined; + initSource(t: any): void; + bind(t: any, e?: number): void; + bindSource(t: any, e?: number): void; + _bindSampler(t: any, e?: number): void; + unbind(t: any): void; + _activateLocation(t: any): void; + _initSource(t: any): Xg; + onStyleChange(t: any): void; + updateStyle(t: any, e: any): void; + onSourceUnload(t: any): void; + onSourceUpdate(t: any): void; + onUpdateMipmaps(t: any, e?: boolean): void; + onSourceDestroy(t: any): void; + _initSampler(t: any): any; + _getGlSampler(t: any): any; + getGlSource(t: any): any; + generateCanvas(t: any): HTMLCanvasElement; + getPixels(t: any): { + pixels: Uint8ClampedArray; + width: number; + height: number; + }; + destroy(): void; +} +declare namespace ru { + export namespace extension_28 { + let type_24: any[]; + export { type_24 as type }; + let name_24: string; + export { name_24 as name }; + } + export { extension_28 as extension }; +} +declare class Xa extends La { + constructor(); +} +declare namespace Xa { + export namespace extension_29 { + let type_25: any[]; + export { type_25 as type }; + let name_25: string; + export { name_25 as name }; + } + export { extension_29 as extension }; +} +declare class Qa { + constructor(t: any); + _cache: {}; + _uniformGroupSyncHash: {}; + _renderer: any; + gl: any; + contextChange(t: any): void; + updateUniformGroup(t: any, e: any, s: any): void; + _getUniformSyncFunction(t: any, e: any): any; + _createUniformSyncFunction(t: any, e: any): any; + _generateUniformsSync(t: any, e: any): Function; + _getSignature(t: any, e: any, s: any): string; + destroy(): void; +} +declare namespace Qa { + export namespace extension_30 { + let type_26: any[]; + export { type_26 as type }; + let name_26: string; + export { name_26 as name }; + } + export { extension_30 as extension }; +} +declare class bu { + constructor(t: any); + _stackIndex: number; + _globalUniformDataStack: any[]; + _uniformsPool: any[]; + _activeUniforms: any[]; + _bindGroupPool: any[]; + _activeBindGroups: any[]; + _renderer: any; + reset(): void; + start(t: any): void; + bind({ size: t, projectionMatrix: e, worldTransformMatrix: s, worldColor: i, offset: n }: { + size: any; + projectionMatrix: any; + worldTransformMatrix: any; + worldColor: any; + offset: any; + }): void; + _currentGlobalUniformData: any; + push(t: any): void; + pop(): void; + get bindGroup(): any; + get uniformGroup(): any; + _createUniforms(): { + _touched: number; + uid: number; + _resourceType: string; + _resourceId: number; + isUniformGroup: boolean; + _dirtyId: number; + uniformStructures: any; + uniforms: {}; + ubo: any; + isStatic: any; + _signature: any; + update(): void; + }; + destroy(): void; +} +declare namespace bu { + export namespace extension_31 { + let type_27: any[]; + export { type_27 as type }; + let name_27: string; + export { name_27 as name }; + } + export { extension_31 as extension }; +} +declare class Ea { + init(): void; + _shader: St | null | undefined; + start(t: any, e: any): void; + _geometry: any; + execute(t: any, e: any): void; + destroy(): void; +} +declare namespace Ea { + export namespace extension_32 { + let type_28: any[]; + export { type_28 as type }; + let name_28: string; + export { name_28 as name }; + } + export { extension_32 as extension }; +} +declare const vt: typeof vt; +declare class wu { + _gpuBuffers: any; + _managedBuffers: any[]; + contextChange(t: any): void; + _gpu: any; + getGPUBuffer(t: any): any; + updateBuffer(t: any): any; + destroyAll(): void; + createGPUBuffer(t: any): any; + onBufferChange(t: any): void; + onBufferDestroy(t: any): void; + destroy(): void; + _destroyBuffer(t: any): void; +} +declare namespace wu { + export namespace extension_33 { + let type_29: any[]; + export { type_29 as type }; + let name_29: string; + export { name_29 as name }; + } + export { extension_33 as extension }; +} +declare class Ru { + constructor(t: any); + _colorMaskCache: number; + _renderer: any; + setMask(t: any): void; + destroy(): void; +} +declare namespace Ru { + export namespace extension_34 { + let type_30: any[]; + export { type_30 as type }; + let name_30: string; + export { name_30 as name }; + } + export { extension_34 as extension }; +} +declare class Pi { + constructor(t: any); + _renderer: any; + init(t: any): Promise; + _initPromise: Promise | undefined; + gpu: { + adapter: any; + device: any; + } | null | undefined; + contextChange(t: any): void; + _createDeviceAndAdaptor(t: any): Promise<{ + adapter: any; + device: any; + }>; + destroy(): void; +} +declare namespace Pi { + export namespace extension_35 { + let type_31: any[]; + export { type_31 as type }; + let name_31: string; + export { name_31 as name }; + } + export { extension_35 as extension }; + export namespace defaultOptions_1 { + let powerPreference: undefined; + let forceFallbackAdapter: boolean; + } + export { defaultOptions_1 as defaultOptions }; +} +declare class Mu { + constructor(t: any); + _boundBindGroup: any; + _boundVertexBuffer: any; + _renderer: any; + renderStart(): void; + commandFinished: Promise | undefined; + _resolveCommandFinished: ((value: any) => void) | undefined; + commandEncoder: any; + beginRenderPass(t: any): void; + renderPassEncoder: any; + endRenderPass(): void; + setViewport(t: any): void; + setPipelineFromGeometryProgramAndState(t: any, e: any, s: any, i: any): void; + setPipeline(t: any): void; + _boundPipeline: any; + _setVertexBuffer(t: any, e: any): void; + _setIndexBuffer(t: any): void; + _boundIndexBuffer: any; + resetBindGroup(t: any): void; + setBindGroup(t: any, e: any, s: any): void; + setGeometry(t: any): void; + _setShaderBindGroups(t: any, e: any): void; + _syncBindGroup(t: any): void; + draw(t: any): void; + finishRenderPass(): void; + postrender(): void; + restoreRenderPass(): void; + _clearCache(): void; + destroy(): void; + _gpu: any; + contextChange(t: any): void; +} +declare namespace Mu { + export namespace extension_36 { + let type_32: any[]; + export { type_32 as type }; + let name_32: string; + export { name_32 as name }; + let priority_1: number; + export { priority_1 as priority }; + } + export { extension_36 as extension }; +} +declare class $u { + init(): void; + shader: St | null | undefined; + execute(t: any, e: any): void; + destroy(): void; +} +declare namespace $u { + export namespace extension_37 { + let type_33: any[]; + export { type_33 as type }; + let name_33: string; + export { name_33 as name }; + } + export { extension_37 as extension }; +} +declare class ec { + batches: any[]; + geometryData: { + vertices: never[]; + uvs: never[]; + indices: never[]; + }; +} +declare class Nu { + init(): void; + _shader: St | null | undefined; + execute(t: any, e: any): void; + destroy(): void; +} +declare namespace Nu { + export namespace extension_38 { + let type_34: any[]; + export { type_34 as type }; + let name_34: string; + export { name_34 as name }; + } + export { extension_38 as extension }; +} +declare class $_ { + constructor(t: any); + device: any; + sampler: any; + pipelines: {}; + _getMipmapPipeline(t: any): any; + mipmapShaderModule: any; + generateMipmap(t: any): any; +} +declare class Tt { + static from(t: any): any; + constructor(t: any); + _layoutKey: number; + name: any; + fragment: any; + vertex: any; + structsAndGroups: { + groups: any; + structs: any; + }; + layout: any; + gpuLayout: any; + autoAssignGlobalUniforms: boolean; + autoAssignLocalUniforms: boolean; + _generateProgramKey(): void; + get attributeData(): {} | undefined; + _attributeData: {} | undefined; + destroy(): void; +} +declare function gE(r: any, t: any): void; +declare class F_ { + contexts: any[]; + msaaTextures: any[]; + msaaSamples: number; +} +declare class D_ { + init(t: any, e: any): void; + _renderer: any; + _renderTargetSystem: any; + copyToTexture(t: any, e: any, s: any, i: any, n: any): any; + startRenderPass(t: any, e: boolean | undefined, s: any, i: any): void; + finishRenderPass(): void; + _getGpuColorTexture(t: any): any; + getDescriptor(t: any, e: any, s: any): { + colorAttachments: any; + depthStencilAttachment: { + view: any; + stencilStoreOp: string; + stencilLoadOp: string; + depthClearValue: number; + depthLoadOp: string; + depthStoreOp: string; + } | undefined; + }; + clear(t: any, e: boolean | undefined, s: any, i: any): void; + initGpuRenderTarget(t: any): F_; + ensureDepthStencilTexture(t: any): void; + resizeGpuRenderTarget(t: any): void; +} +declare class Bu extends ja { + adaptor: D_; +} +declare namespace Bu { + export namespace extension_39 { + let type_35: any[]; + export { type_35 as type }; + let name_35: string; + export { name_35 as name }; + } + export { extension_39 as extension }; +} +declare class Fu { + _gpuProgramData: any; + contextChange(t: any): void; + _gpu: any; + getProgramData(t: any): any; + _createGPUProgramData(t: any): any; + destroy(): void; +} +declare namespace Fu { + export namespace extension_40 { + let type_36: any[]; + export { type_36 as type }; + let name_36: string; + export { name_36 as name }; + } + export { extension_40 as extension }; +} +declare class Du { + defaultState: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + contextChange(t: any): void; + gpu: any; + getColorTargets(t: any): { + format: string; + writeMask: number; + blend: any; + }[]; + destroy(): void; +} +declare namespace Du { + export namespace extension_41 { + let type_37: any[]; + export { type_37 as type }; + let name_37: string; + export { name_37 as name }; + } + export { extension_41 as extension }; +} +declare const re: any[]; +declare class Ou { + constructor(t: any); + _renderTargetStencilState: any; + _renderer: any; + onRenderTargetChange(t: any): void; + _activeRenderTarget: any; + setStencilMode(t: any, e: any): void; + destroy(): void; +} +declare namespace Ou { + export namespace extension_42 { + let type_38: any[]; + export { type_38 as type }; + let name_38: string; + export { name_38 as name }; + } + export { extension_42 as extension }; +} +declare class Lu { + constructor(t: any); + managedTextures: any[]; + _gpuSources: any; + _gpuSamplers: any; + _bindGroupHash: any; + _textureViewHash: any; + _uploads: { + image: { + type: string; + upload(r: any, t: any, e: any): void; + }; + buffer: { + type: string; + upload(r: any, t: any, e: any): void; + }; + video: { + type: string; + upload(r: any, t: any, e: any): void; + }; + compressed: { + type: string; + upload(r: any, t: any, e: any): void; + }; + }; + _renderer: any; + contextChange(t: any): void; + _gpu: any; + initSource(t: any): any; + onSourceUpdate(t: any): void; + onSourceUnload(t: any): void; + onUpdateMipmaps(t: any): void; + _mipmapGenerator: $_ | null | undefined; + onSourceDestroy(t: any): void; + onSourceResize(t: any): void; + _initSampler(t: any): any; + getGpuSampler(t: any): any; + getGpuSource(t: any): any; + getTextureBindGroup(t: any): any; + _createTextureBindGroup(t: any): any; + getTextureView(t: any): any; + _createTextureView(t: any): any; + generateCanvas(t: any): HTMLCanvasElement; + getPixels(t: any): { + pixels: Uint8ClampedArray; + width: number; + height: number; + }; + destroy(): void; +} +declare namespace Lu { + export namespace extension_43 { + let type_39: any[]; + export { type_39 as type }; + let name_39: string; + export { name_39 as name }; + } + export { extension_43 as extension }; +} +declare class Cu extends La { + constructor(); +} +declare namespace Cu { + export namespace extension_44 { + let type_40: any[]; + export { type_40 as type }; + let name_40: string; + export { name_40 as name }; + } + export { extension_44 as extension }; +} +declare class Gu { + constructor(t: any); + _bindGroupHash: any; + _buffers: _t[]; + _bindGroups: any[]; + _bufferResources: any[]; + _renderer: any; + _batchBuffer: P_; + renderEnd(): void; + _resetBindGroups(): void; + getUniformBindGroup(t: any, e: any): any; + getUboResource(t: any): any; + getArrayBindGroup(t: any): any; + getArrayBufferResource(t: any): any; + _getBufferResource(t: any): any; + _getBindGroup(t: any): any; + _uploadBindGroups(): void; + destroy(): void; +} +declare namespace Gu { + export namespace extension_45 { + let type_41: any[]; + export { type_41 as type }; + let name_41: string; + export { name_41 as name }; + } + export { extension_45 as extension }; +} +declare class qe extends V { + constructor(t: any); + canBundle: boolean; + renderPipeId: string; + _roundPixels: number; + _context: any; + _ownedContext: { + [x: string]: any; + uid: number; + dirty: boolean; + batchMode: string; + instructions: any[]; + _activePath: ne; + _transform: G; + _fillStyle: any; + _strokeStyle: any; + _stateStack: any[]; + _tick: number; + _bounds: lt; + _boundsDirty: boolean; + clone(): any; + fillStyle: any; + strokeStyle: any; + setFillStyle(t: any): any; + setStrokeStyle(t: any): any; + texture(t: any, e: any, s: any, i: any, n: any, o: any): any; + beginPath(): any; + fill(t: any, e: any): any; + _initNextPathLocation(): void; + stroke(t: any): any; + cut(): any; + arc(t: any, e: any, s: any, i: any, n: any, o: any): any; + arcTo(t: any, e: any, s: any, i: any, n: any): any; + arcToSvg(t: any, e: any, s: any, i: any, n: any, o: any, a: any): any; + bezierCurveTo(t: any, e: any, s: any, i: any, n: any, o: any, a: any): any; + closePath(): any; + ellipse(t: any, e: any, s: any, i: any): any; + circle(t: any, e: any, s: any): any; + path(t: any): any; + lineTo(t: any, e: any): any; + moveTo(t: any, e: any): any; + quadraticCurveTo(t: any, e: any, s: any, i: any, n: any): any; + rect(t: any, e: any, s: any, i: any): any; + roundRect(t: any, e: any, s: any, i: any, n: any): any; + poly(t: any, e: any): any; + regularPoly(t: any, e: any, s: any, i: any, n: number | undefined, o: any): any; + roundPoly(t: any, e: any, s: any, i: any, n: any, o: any): any; + roundShape(t: any, e: any, s: any, i: any): any; + filletRect(t: any, e: any, s: any, i: any, n: any): any; + chamferRect(t: any, e: any, s: any, i: any, n: any, o: any): any; + star(t: any, e: any, s: any, i: any, n?: number, o?: number): any; + svg(t: any): any; + restore(): any; + save(): any; + getTransform(): G; + resetTransform(): any; + rotate(t: any): any; + scale(t: any, e?: any): any; + setTransform(t: any, e: any, s: any, i: any, n: any, o: any): any; + transform(t: any, e: any, s: any, i: any, n: any, o: any): any; + translate(t: any, e?: any): any; + clear(): any; + onUpdate(): void; + readonly bounds: lt; + containsPoint(t: any): boolean; + destroy(t?: boolean): void; + customShader: any; + } | undefined; + allowChildren: boolean; + set roundPixels(t: boolean); + get roundPixels(): boolean; + set context(t: any); + get context(): any; + get bounds(): any; + addBounds(t: any): void; + containsPoint(t: any): any; + onViewUpdate(): void; + _didGraphicsUpdate: boolean | undefined; + destroy(t: any): void; + _callContextMethod(t: any, e: any): this; + setFillStyle(...t: any[]): this; + setStrokeStyle(...t: any[]): this; + fill(...t: any[]): this; + stroke(...t: any[]): this; + texture(...t: any[]): this; + beginPath(): this; + cut(): this; + arc(...t: any[]): this; + arcTo(...t: any[]): this; + arcToSvg(...t: any[]): this; + bezierCurveTo(...t: any[]): this; + closePath(): this; + ellipse(...t: any[]): this; + circle(...t: any[]): this; + path(...t: any[]): this; + lineTo(...t: any[]): this; + moveTo(...t: any[]): this; + quadraticCurveTo(...t: any[]): this; + rect(...t: any[]): this; + roundRect(...t: any[]): this; + poly(...t: any[]): this; + regularPoly(...t: any[]): this; + roundPoly(...t: any[]): this; + roundShape(...t: any[]): this; + filletRect(...t: any[]): this; + chamferRect(...t: any[]): this; + star(...t: any[]): this; + svg(...t: any[]): this; + restore(...t: any[]): this; + save(): this; + getTransform(): any; + resetTransform(): this; + rotateTransform(...t: any[]): this; + scaleTransform(...t: any[]): this; + setTransform(...t: any[]): this; + transform(...t: any[]): this; + translateTransform(...t: any[]): this; + clear(): this; + set fillStyle(t: any); + get fillStyle(): any; + set strokeStyle(t: any); + get strokeStyle(): any; + clone(t?: boolean): qe; + lineStyle(t: any, e: any, s: any): this; + beginFill(t: any, e: any): this; + endFill(): this; + drawCircle(...t: any[]): this; + drawEllipse(...t: any[]): this; + drawPolygon(...t: any[]): this; + drawRect(...t: any[]): this; + drawRoundedRect(...t: any[]): this; + drawStar(...t: any[]): this; +} +declare let Bt: { + new (...args: any[]): { + [x: string]: any; + uid: number; + dirty: boolean; + batchMode: string; + instructions: any[]; + _activePath: ne; + _transform: G; + _fillStyle: any; + _strokeStyle: any; + _stateStack: any[]; + _tick: number; + _bounds: lt; + _boundsDirty: boolean; + clone(): any; + fillStyle: any; + strokeStyle: any; + setFillStyle(t: any): any; + setStrokeStyle(t: any): any; + texture(t: any, e: any, s: any, i: any, n: any, o: any): any; + beginPath(): any; + fill(t: any, e: any): any; + _initNextPathLocation(): void; + stroke(t: any): any; + cut(): any; + arc(t: any, e: any, s: any, i: any, n: any, o: any): any; + arcTo(t: any, e: any, s: any, i: any, n: any): any; + arcToSvg(t: any, e: any, s: any, i: any, n: any, o: any, a: any): any; + bezierCurveTo(t: any, e: any, s: any, i: any, n: any, o: any, a: any): any; + closePath(): any; + ellipse(t: any, e: any, s: any, i: any): any; + circle(t: any, e: any, s: any): any; + path(t: any): any; + lineTo(t: any, e: any): any; + moveTo(t: any, e: any): any; + quadraticCurveTo(t: any, e: any, s: any, i: any, n: any): any; + rect(t: any, e: any, s: any, i: any): any; + roundRect(t: any, e: any, s: any, i: any, n: any): any; + poly(t: any, e: any): any; + regularPoly(t: any, e: any, s: any, i: any, n: number | undefined, o: any): any; + roundPoly(t: any, e: any, s: any, i: any, n: any, o: any): any; + roundShape(t: any, e: any, s: any, i: any): any; + filletRect(t: any, e: any, s: any, i: any, n: any): any; + chamferRect(t: any, e: any, s: any, i: any, n: any, o: any): any; + star(t: any, e: any, s: any, i: any, n?: number, o?: number): any; + svg(t: any): any; + restore(): any; + save(): any; + getTransform(): G; + resetTransform(): any; + rotate(t: any): any; + scale(t: any, e?: any): any; + setTransform(t: any, e: any, s: any, i: any, n: any, o: any): any; + transform(t: any, e: any, s: any, i: any, n: any, o: any): any; + translate(t: any, e?: any): any; + clear(): any; + onUpdate(): void; + readonly bounds: lt; + containsPoint(t: any): boolean; + destroy(t?: boolean): void; + customShader: any; + }; + [x: string]: any; + defaultFillStyle: { + color: number; + alpha: number; + texture: A; + matrix: null; + fill: null; + }; + defaultStrokeStyle: { + width: number; + color: number; + alpha: number; + alignment: number; + miterLimit: number; + cap: string; + join: string; + texture: A; + matrix: null; + fill: null; + }; +}; +declare class rc { + geometry: yn; + instructions: Yi; + init(): void; +} +declare let Ps: { + new (): { + _activeBatchers: any[]; + _gpuContextHash: {}; + _graphicsDataContextHash: any; + _needsContextNeedsRebuild: any[]; + init(t: any): void; + prerender(): void; + getContextRenderData(t: any): any; + updateGpuContext(t: any): any; + getGpuContext(t: any): any; + _returnActiveBatchers(): void; + _initContextRenderData(t: any): any; + _initContext(t: any): any; + onGraphicsContextUpdate(t: any): void; + onGraphicsContextDestroy(t: any): void; + _cleanGraphicsContextData(t: any): void; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + }; + defaultOptions: { + bezierSmoothness: number; + }; +}; +declare class ne { + constructor(t: any); + instructions: any; + uid: number; + _dirty: boolean; + get shapePath(): Pc; + _shapePath: Pc | undefined; + addPath(t: any, e: any): this; + arc(...t: any[]): this; + arcTo(...t: any[]): this; + arcToSvg(...t: any[]): this; + bezierCurveTo(...t: any[]): this; + bezierCurveToShort(t: any, e: any, s: any, i: any, n: any): this; + closePath(): this; + ellipse(...t: any[]): this; + lineTo(...t: any[]): this; + moveTo(...t: any[]): this; + quadraticCurveTo(...t: any[]): this; + quadraticCurveToShort(t: any, e: any, s: any): this; + rect(t: any, e: any, s: any, i: any, n: any): this; + circle(t: any, e: any, s: any, i: any): this; + roundRect(...t: any[]): this; + poly(...t: any[]): this; + regularPoly(...t: any[]): this; + roundPoly(...t: any[]): this; + roundShape(...t: any[]): this; + filletRect(...t: any[]): this; + chamferRect(...t: any[]): this; + star(t: any, e: any, s: any, i: any, n: any, o: any, a: any): this; + clone(t?: boolean): ne; + clear(): this; + transform(t: any): this; + get bounds(): lt; + getLastPoint(t: any): any; +} +declare class Wn { + constructor(t: any, e: any); + state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + _graphicsBatchesHash: any; + renderer: any; + _adaptor: any; + validateRenderable(t: any): boolean; + addRenderable(t: any, e: any): void; + updateRenderable(t: any): void; + destroyRenderable(t: any): void; + execute(t: any): void; + _rebuild(t: any): void; + _addToBatcher(t: any, e: any): void; + _getBatchesForRenderable(t: any): any; + _initBatchesForRenderable(t: any): any; + _removeBatchForRenderable(t: any): void; + destroy(): void; +} +declare namespace Wn { + export namespace extension_46 { + let type_42: any[]; + export { type_42 as type }; + let name_42: string; + export { name_42 as name }; + } + export { extension_46 as extension }; +} +declare class jm extends fi { + constructor(...t: any[]); + renderPipeId: string; + _updateBounds(): void; +} +declare class Io { + constructor(t: any); + _gpuText: any; + _renderer: any; + validateRenderable(t: any): boolean; + addRenderable(t: any): void; + updateRenderable(t: any): void; + destroyRenderable(t: any): void; + _destroyRenderableById(t: any): void; + _updateText(t: any): void; + _updateGpuText(t: any): Promise; + _getGpuText(t: any): any; + initGpuText(t: any): { + texture: A; + currentKey: string; + batchableSprite: any; + textureNeedsUploading: boolean; + generatingTexture: boolean; + }; + destroy(): void; +} +declare namespace Io { + export namespace extension_47 { + let type_43: any[]; + export { type_43 as type }; + let name_43: string; + export { name_43 as name }; + } + export { extension_47 as extension }; +} +declare class Do { + svgRoot: any; + foreignObject: any; + domElement: HTMLElement; + styleElement: HTMLElement; + image: HTMLImageElement; +} +declare const Pe_base: { + new (t?: {}): { + [x: string]: any; + align: any; + _align: any; + breakWords: any; + _breakWords: any; + dropShadow: any; + _dropShadow: any; + fontFamily: any; + _fontFamily: any; + fontSize: any; + _fontSize: any; + fontStyle: any; + _fontStyle: any; + fontVariant: any; + _fontVariant: any; + fontWeight: any; + _fontWeight: any; + leading: any; + _leading: any; + letterSpacing: any; + _letterSpacing: any; + lineHeight: any; + _lineHeight: any; + padding: any; + _padding: any; + trim: any; + _trim: any; + textBaseline: any; + _textBaseline: any; + whiteSpace: any; + _whiteSpace: any; + wordWrap: any; + _wordWrap: any; + wordWrapWidth: any; + _wordWrapWidth: any; + fill: any; + _originalFill: any; + _fill: any; + stroke: any; + _originalStroke: any; + _stroke: any; + _generateKey(): string; + _styleKey: string | null | undefined; + update(): void; + reset(): void; + readonly styleKey: string; + clone(): any; + destroy(t?: boolean): void; + }; + [x: string]: any; + defaultDropShadow: { + alpha: number; + angle: number; + blur: number; + color: string; + distance: number; + }; + defaultTextStyle: { + align: string; + breakWords: boolean; + dropShadow: null; + fill: string; + fontFamily: string; + fontSize: number; + fontStyle: string; + fontVariant: string; + fontWeight: string; + leading: number; + letterSpacing: number; + lineHeight: number; + padding: number; + stroke: null; + textBaseline: string; + trim: boolean; + whiteSpace: string; + wordWrap: boolean; + wordWrapWidth: number; + }; +}; +declare class Pe extends Pe_base { + _cssOverrides: any[]; + set cssOverrides(t: any[]); + get cssOverrides(): any[]; + tagStyles: any; + _cssStyle: string | null | undefined; + clone(): Pe; + get cssStyle(): string; + addOverride(...t: any[]): void; + removeOverride(...t: any[]): void; +} +declare class Xs { + constructor(t: any); + _activeTextures: {}; + _renderer: any; + _createCanvas: boolean; + getTexture(t: any): Promise; + getManagedTexture(t: any, e: any, s: any, i: any): any; + _buildTexturePromise(t: any, e: any, s: any): Promise; + _increaseReferenceCount(t: any): void; + decreaseReferenceCount(t: any): void; + _cleanUp(t: any): void; + getReferenceCount(t: any): any; + destroy(): void; +} +declare namespace Xs { + export namespace extension_48 { + let type_44: any[]; + export { type_44 as type }; + let name_44: string; + export { name_44 as name }; + } + export { extension_48 as extension }; + export namespace defaultFontOptions { + let fontFamily: string; + let fontStyle: string; + let fontWeight: string; + } +} +declare class Ai { + constructor(t: any); + _renderer: any; + init(t: any): void; +} +declare namespace Ai { + export namespace extension_49 { + let type_45: any[]; + export { type_45 as type }; + let name_45: string; + export { name_45 as name }; + let priority_2: number; + export { priority_2 as priority }; + } + export { extension_49 as extension }; + export namespace defaultOptions_2 { + let hello: boolean; + } + export { defaultOptions_2 as defaultOptions }; +} +declare class y2 { +} +declare const ge_base: { + new (t?: {}): { + [x: string]: any; + options: {}; + uid: number; + _resourceType: string; + _resourceId: number; + uploadMethodId: string; + _resolution: any; + pixelWidth: any; + pixelHeight: any; + width: number; + height: number; + sampleCount: any; + mipLevelCount: any; + autoGenerateMipmaps: any; + format: any; + dimension: any; + antialias: any; + _touched: number; + _batchTick: number; + _textureBindLocation: number; + label: any; + resource: any; + autoGarbageCollect: any; + alphaMode: any; + style: any; + destroyed: boolean; + readonly source: any; + _style: any; + addressMode: any; + repeatMode: any; + magFilter: any; + minFilter: any; + mipmapFilter: any; + lodMinClamp: any; + lodMaxClamp: any; + _onStyleChange(): void; + update(): void; + destroy(): void; + unload(): void; + readonly resourceWidth: any; + readonly resourceHeight: any; + resolution: any; + resize(t: any, e: any, s: any): boolean; + updateMipmaps(): void; + wrapMode: any; + scaleMode: any; + _refreshPOT(): void; + isPowerOfTwo: boolean | undefined; + }; + [x: string]: any; + test(t: any): void; + defaultOptions: { + resolution: number; + format: string; + alphaMode: string; + dimensions: string; + mipLevelCount: number; + autoGenerateMipmaps: boolean; + sampleCount: number; + antialias: boolean; + autoGarbageCollect: boolean; + }; +}; +declare class ge extends ge_base { + static test(t: any): boolean; + constructor(t: any); + autoGarbageCollect: boolean; +} +declare namespace ge { + let extension_50: any; + export { extension_50 as extension }; +} +declare class Yi { + uid: number; + instructions: any[]; + instructionSize: number; + reset(): void; + add(t: any): void; + log(): void; +} +declare namespace tt { + export { lT as FILE_HEADER_SIZE }; + export { aT as FILE_IDENTIFIER }; + export { dT as FORMATS_TO_COMPONENTS }; + export { fT as INTERNAL_FORMAT_TO_BYTES_PER_PIXEL }; + export { oT as INTERNAL_FORMAT_TO_TEXTURE_FORMATS }; + export { uT as FIELDS }; + export { cT as TYPES_TO_BYTES_PER_COMPONENT }; + export { pT as TYPES_TO_BYTES_PER_PIXEL }; + export { hT as ENDIANNESS }; +} +declare class Xp { + _parsers: any[]; + _parsersValidated: boolean; + parsers: object; + promiseCache: {}; + reset(): void; + _getLoadPromiseAndParser(t: any, e: any): { + promise: null; + parser: null; + }; + load(t: any, e: any): Promise; + unload(t: any): Promise; + _validateParsers(): void; + _parserHash: any; +} +declare var gt: any; +declare const wt: 16; +declare var j_: any; +declare const rs: Al; +declare class Al { + _effectClasses: any[]; + _tests: any[]; + _initialized: boolean; + init(): void; + add(t: any): void; + getMaskEffect(t: any): any; + returnMaskEffect(t: any): void; +} +declare const wm_base: { + new (t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + blendMode: string; + resolution: number; + padding: number; + antialias: string; + blendRequired: boolean; + }; +}; +declare class wm extends wm_base { + sprite: any; + _textureMatrix: hn; +} +declare class G { + static get IDENTITY(): G; + static get shared(): G; + constructor(t?: number, e?: number, s?: number, i?: number, n?: number, o?: number); + array: Float32Array | null; + a: number; + b: number; + c: number; + d: number; + tx: number; + ty: number; + fromArray(t: any): void; + set(t: any, e: any, s: any, i: any, n: any, o: any): this; + toArray(t: any, e: any): any; + apply(t: any, e: any): any; + applyInverse(t: any, e: any): any; + translate(t: any, e: any): this; + scale(t: any, e: any): this; + rotate(t: any): this; + append(t: any): this; + appendFrom(t: any, e: any): this; + setTransform(t: any, e: any, s: any, i: any, n: any, o: any, a: any, u: any, l: any): this; + prepend(t: any): this; + decompose(t: any): any; + invert(): this; + isIdentity(): boolean; + identity(): this; + clone(): G; + copyTo(t: any): any; + copyFrom(t: any): this; + equals(t: any): boolean; +} +declare class $r extends V { + constructor(...t: any[]); + renderPipeId: string; + canBundle: boolean; + _roundPixels: number; + allowChildren: boolean; + set shader(t: any); + get shader(): any; + set texture(t: any); + get texture(): any; + state: any; + _geometry: any; + set roundPixels(t: boolean); + get roundPixels(): boolean; + get material(): any; + _shader: any; + set geometry(t: any); + get geometry(): any; + _texture: any; + get batched(): boolean; + get bounds(): any; + addBounds(t: any): void; + containsPoint(t: any): boolean; + onViewUpdate(): void; + destroy(t: any): void; +} +declare let Jt: { + new (...t: any[]): { + [x: string]: any; + batchMode: string; + positions: any; + uvs: any; + indices: any; + uid: number; + _layoutKey: number; + instanceCount: any; + _bounds: lt; + _boundsDirty: boolean; + attributes: any; + buffers: any[]; + indexBuffer: any; + topology: any; + onBufferUpdate(): void; + getAttribute(t: any): any; + getIndex(): any; + getBuffer(t: any): any; + getSize(): number; + readonly bounds: any; + destroy(t?: boolean): void; + }; + defaultOptions: { + topology: string; + shrinkBuffersToFit: boolean; + }; +}; +declare class Kn { + constructor(t: any, e: any); + localUniforms: { + _touched: number; + uid: number; + _resourceType: string; + _resourceId: number; + isUniformGroup: boolean; + _dirtyId: number; + uniformStructures: any; + uniforms: {}; + ubo: any; + isStatic: any; + _signature: any; + update(): void; + }; + localUniformsBindGroup: Lt; + _meshDataHash: any; + _gpuBatchableMeshHash: any; + renderer: any; + _adaptor: any; + validateRenderable(t: any): boolean; + addRenderable(t: any, e: any): void; + updateRenderable(t: any): void; + destroyRenderable(t: any): void; + execute({ mesh: t }: { + mesh: any; + }): void; + _getMeshData(t: any): any; + _initMeshData(t: any): any; + _getBatchableMesh(t: any): any; + _initBatchableMesh(t: any): any; + destroy(): void; +} +declare namespace Kn { + export namespace extension_51 { + let type_46: any[]; + export { type_46 as type }; + let name_46: string; + export { name_46 as name }; + } + export { extension_51 as extension }; +} +declare class oA extends $r { + constructor(t: any); + autoResize: boolean; + textureUpdated(): void; +} +declare let mA: { + new (t: any): { + [x: string]: any; + autoUpdate: boolean; + onRender: () => void; + _render(): void; + renderPipeId: string; + canBundle: boolean; + _roundPixels: number; + allowChildren: boolean; + shader: any; + texture: any; + state: any; + _geometry: any; + roundPixels: boolean; + readonly material: any; + _shader: any; + geometry: any; + _texture: any; + readonly batched: boolean; + readonly bounds: any; + addBounds(t: any): void; + containsPoint(t: any): boolean; + onViewUpdate(): void; + didViewUpdate: boolean; + destroy(t: any): void; + uid: number; + _updateFlags: number; + isRenderGroupRoot: boolean; + renderGroup: Fl | null; + didChange: boolean; + relativeRenderGroupDepth: number; + children: any[]; + parent: any; + includeInBuild: boolean; + measurable: boolean; + isSimple: boolean; + updateTick: number; + localTransform: G; + relativeGroupTransform: G; + groupTransform: G; + destroyed: boolean; + _position: rt; + _scale: rt; + _pivot: rt; + _skew: rt; + _cx: number; + _sx: number; + _cy: number; + _sy: number; + _rotation: number; + localColor: number; + localAlpha: number; + groupAlpha: number; + groupColor: number; + groupColorAlpha: number; + localBlendMode: string; + groupBlendMode: string; + localDisplayStatus: number; + globalDisplayStatus: number; + _didChangeId: number; + _didLocalTransformChangeId: number; + effects: any[]; + addChild(...t: any[]): any; + sortDirty: boolean | undefined; + removeChild(...t: any[]): any; + _onUpdate(t: any): void; + isRenderGroup: boolean; + enableRenderGroup(): void; + _updateIsSimple(): void; + readonly worldTransform: G; + _worldTransform: G | undefined; + x: any; + y: any; + position: rt; + rotation: number; + angle: number; + pivot: rt; + skew: rt; + scale: rt; + width: number; + height: number; + getSize(t: any): any; + setSize(t: any, e: any): void; + _updateSkew(): void; + updateTransform(t: any): any; + setFromMatrix(t: any): void; + updateLocalTransform(): void; + alpha: number; + tint: number; + blendMode: string; + visible: boolean; + culled: boolean; + renderable: boolean; + readonly isRenderable: boolean; + _mask: any; + _filters: any; + }; + defaultOptions: { + textureScale: number; + }; + mixin(t: any): void; +}; +declare class TA extends $r { + constructor(t: any); + autoUpdate: boolean; + onRender: () => void; + set vertices(t: any); + get vertices(): any; + _render(): void; +} +declare function un(): void; +declare let te: { + new (t?: {}): { + [x: string]: any; + update(t: any): void; + width: any; + height: any; + _originalWidth: any; + _originalHeight: any; + _leftWidth: any; + _rightWidth: any; + _topHeight: any; + _bottomHeight: any; + updatePositions(): void; + updateUvs(): void; + build(t: any): void; + verticesX: any; + verticesY: any; + batchMode: string; + positions: any; + uvs: any; + indices: any; + uid: number; + _layoutKey: number; + instanceCount: any; + _bounds: lt; + _boundsDirty: boolean; + attributes: any; + buffers: any[]; + indexBuffer: any; + topology: any; + onBufferUpdate(): void; + getAttribute(t: any): any; + getIndex(): any; + getBuffer(t: any): any; + getSize(): number; + readonly bounds: any; + destroy(t?: boolean): void; + }; + defaultOptions: { + width: number; + height: number; + leftWidth: number; + topHeight: number; + rightWidth: number; + bottomHeight: number; + originalWidth: number; + originalHeight: number; + }; +}; +declare const wA_base: { + new (t: any): { + [x: string]: any; + _roundPixels: number; + renderPipeId: string; + batched: boolean; + _didSpriteUpdate: boolean; + bounds: { + minX: number; + minY: number; + maxX: number; + maxY: number; + }; + _leftWidth: any; + _topHeight: any; + _rightWidth: any; + _bottomHeight: any; + _width: any; + _height: any; + allowChildren: boolean; + texture: any; + roundPixels: boolean; + width: any; + height: any; + leftWidth: any; + topHeight: any; + rightWidth: any; + bottomHeight: any; + _texture: any; + readonly originalWidth: any; + readonly originalHeight: any; + onViewUpdate(): void; + didViewUpdate: boolean; + addBounds(t: any): void; + containsPoint(t: any): boolean; + destroy(t: any): void; + uid: number; + _updateFlags: number; + isRenderGroupRoot: boolean; + renderGroup: Fl | null; + didChange: boolean; + relativeRenderGroupDepth: number; + children: any[]; + parent: any; + includeInBuild: boolean; + measurable: boolean; + isSimple: boolean; + updateTick: number; + localTransform: G; + relativeGroupTransform: G; + groupTransform: G; + destroyed: boolean; + _position: rt; + _scale: rt; + _pivot: rt; + _skew: rt; + _cx: number; + _sx: number; + _cy: number; + _sy: number; + _rotation: number; + localColor: number; + localAlpha: number; + groupAlpha: number; + groupColor: number; + groupColorAlpha: number; + localBlendMode: string; + groupBlendMode: string; + localDisplayStatus: number; + globalDisplayStatus: number; + _didChangeId: number; + _didLocalTransformChangeId: number; + effects: any[]; + addChild(...t: any[]): any; + sortDirty: boolean | undefined; + removeChild(...t: any[]): any; + _onUpdate(t: any): void; + isRenderGroup: boolean; + enableRenderGroup(): void; + _updateIsSimple(): void; + readonly worldTransform: G; + _worldTransform: G | undefined; + x: any; + y: any; + position: rt; + rotation: number; + angle: number; + pivot: rt; + skew: rt; + scale: rt; + getSize(t: any): any; + setSize(t: any, e: any): void; + _updateSkew(): void; + updateTransform(t: any): any; + setFromMatrix(t: any): void; + updateLocalTransform(): void; + alpha: number; + tint: number; + blendMode: string; + visible: boolean; + culled: boolean; + renderable: boolean; + readonly isRenderable: boolean; + _mask: any; + _filters: any; + }; + defaultOptions: { + texture: A; + }; + mixin(t: any): void; +}; +declare class wA extends wA_base { + constructor(...t: any[]); +} +declare let fx: { + new (t: any): { + [x: string]: any; + _roundPixels: number; + renderPipeId: string; + batched: boolean; + _didSpriteUpdate: boolean; + bounds: { + minX: number; + minY: number; + maxX: number; + maxY: number; + }; + _leftWidth: any; + _topHeight: any; + _rightWidth: any; + _bottomHeight: any; + _width: any; + _height: any; + allowChildren: boolean; + texture: any; + roundPixels: boolean; + width: any; + height: any; + leftWidth: any; + topHeight: any; + rightWidth: any; + bottomHeight: any; + _texture: any; + readonly originalWidth: any; + readonly originalHeight: any; + onViewUpdate(): void; + didViewUpdate: boolean; + addBounds(t: any): void; + containsPoint(t: any): boolean; + destroy(t: any): void; + uid: number; + _updateFlags: number; + isRenderGroupRoot: boolean; + renderGroup: Fl | null; + didChange: boolean; + relativeRenderGroupDepth: number; + children: any[]; + parent: any; + includeInBuild: boolean; + measurable: boolean; + isSimple: boolean; + updateTick: number; + localTransform: G; + relativeGroupTransform: G; + groupTransform: G; + destroyed: boolean; + _position: rt; + _scale: rt; + _pivot: rt; + _skew: rt; + _cx: number; + _sx: number; + _cy: number; + _sy: number; + _rotation: number; + localColor: number; + localAlpha: number; + groupAlpha: number; + groupColor: number; + groupColorAlpha: number; + localBlendMode: string; + groupBlendMode: string; + localDisplayStatus: number; + globalDisplayStatus: number; + _didChangeId: number; + _didLocalTransformChangeId: number; + effects: any[]; + addChild(...t: any[]): any; + sortDirty: boolean | undefined; + removeChild(...t: any[]): any; + _onUpdate(t: any): void; + isRenderGroup: boolean; + enableRenderGroup(): void; + _updateIsSimple(): void; + readonly worldTransform: G; + _worldTransform: G | undefined; + x: any; + y: any; + position: rt; + rotation: number; + angle: number; + pivot: rt; + skew: rt; + scale: rt; + getSize(t: any): any; + setSize(t: any, e: any): void; + _updateSkew(): void; + updateTransform(t: any): any; + setFromMatrix(t: any): void; + updateLocalTransform(): void; + alpha: number; + tint: number; + blendMode: string; + visible: boolean; + culled: boolean; + renderable: boolean; + readonly isRenderable: boolean; + _mask: any; + _filters: any; + }; + defaultOptions: { + texture: A; + }; + mixin(t: any): void; +}; +declare class Xo { + constructor(t: any); + _gpuSpriteHash: any; + _renderer: any; + addRenderable(t: any, e: any): void; + updateRenderable(t: any): void; + validateRenderable(t: any): boolean; + destroyRenderable(t: any): void; + _updateBatchableSprite(t: any, e: any): void; + _getGpuSprite(t: any): any; + _initGPUSprite(t: any): ws; + destroy(): void; +} +declare namespace Xo { + export namespace extension_52 { + let type_47: any[]; + export { type_47 as type }; + let name_47: string; + export { name_47 as name }; + } + export { extension_52 as extension }; +} +declare let PS: { + new (t?: {}): { + [x: string]: any; + noise: any; + seed: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; + defaultOptions: { + noise: number; + }; + from(t: any): { + [x: string]: any; + enabled: boolean; + _state: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + padding: any; + antialias: any; + resolution: any; + blendRequired: any; + apply(t: any, e: any, s: any, i: any): void; + blendMode: any; + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; + }; +}; +declare class rt { + constructor(t: any, e: any, s: any); + _x: any; + _y: any; + _observer: any; + clone(t: any): rt; + set(t?: number, e?: number): this; + copyFrom(t: any): this; + copyTo(t: any): any; + equals(t: any): boolean; + set x(t: any); + get x(): any; + set y(t: any); + get y(): any; +} +declare const vl: number; +declare class Iu { + constructor(t: any); + _moduleCache: any; + _bufferLayoutsCache: any; + _pipeCache: any; + _pipeStateCaches: any; + _colorMask: number; + _multisampleCount: number; + _renderer: any; + contextChange(t: any): void; + _gpu: any; + setMultisampleCount(t: any): void; + setRenderTarget(t: any): void; + _depthStencilAttachment: number | undefined; + setColorMask(t: any): void; + setStencilMode(t: any): void; + _stencilMode: any; + _stencilState: any; + setPipeline(t: any, e: any, s: any, i: any): void; + getPipeline(t: any, e: any, s: any, i: any): any; + _createPipeline(t: any, e: any, s: any, i: any): any; + _getModule(t: any): any; + _createModule(t: any): any; + _generateBufferKey(t: any): any; + _createVertexBufferLayouts(t: any): any; + _updatePipeHash(): void; + destroy(): void; +} +declare namespace Iu { + export namespace extension_53 { + let type_48: any[]; + export { type_48 as type }; + let name_48: string; + export { name_48 as name }; + } + export { extension_53 as extension }; +} +declare let Ho: { + new (...t: any[]): { + [x: string]: any; + build(t: any): void; + verticesX: any; + verticesY: any; + width: any; + height: any; + batchMode: string; + positions: any; + uvs: any; + indices: any; + uid: number; + _layoutKey: number; + instanceCount: any; + _bounds: lt; + _boundsDirty: boolean; + attributes: any; + buffers: any[]; + indexBuffer: any; + topology: any; + onBufferUpdate(): void; + getAttribute(t: any): any; + getIndex(): any; + getBuffer(t: any): any; + getSize(): number; + readonly bounds: any; + destroy(t?: boolean): void; + }; + defaultOptions: { + width: number; + height: number; + verticesX: number; + verticesY: number; + }; +}; +declare class j { + static get shared(): j; + constructor(t?: number, e?: number); + x: number; + y: number; + clone(): j; + copyFrom(t: any): this; + copyTo(t: any): any; + equals(t: any): boolean; + set(t?: number, e?: number): this; +} +declare class Ae { + constructor(...t: any[]); + type: string; + points: any[]; + closePath: boolean; + clone(): Ae; + contains(t: any, e: any): boolean; + strokeContains(t: any, e: any, s: any): boolean; + getBounds(t: any): any; + copyFrom(t: any): this; + copyTo(t: any): any; + get lastX(): any; + get lastY(): any; + get x(): any; + get y(): any; +} +declare class es { + constructor(t: any, e: any); + _pool: any[]; + _count: number; + _index: number; + _classType: any; + prepopulate(t: any): void; + get(t: any): any; + return(t: any): void; + get totalSize(): number; + get totalFree(): number; + get totalUsed(): number; +} +declare class El { + _poolsByClass: Map; + prepopulate(t: any, e: any): void; + get(t: any, e: any): any; + return(t: any): void; + getPool(t: any): any; + stats(): {}; +} +declare let Mm: { + new (t: any): { + _tick: () => void; + timeout: number; + _processQueue: () => void; + renderer: any; + queue: any[]; + resolves: any[]; + getQueue(): any[]; + add(t: any): any; + _addContainer(t: any): void; + upload(t: any): Promise; + dedupeQueue(): void; + _resolve(): void; + }; + uploadsPerFrame: number; +}; +declare const Xm_base: { + new (t: any): { + _tick: () => void; + timeout: number; + _processQueue: () => void; + renderer: any; + queue: any[]; + resolves: any[]; + getQueue(): any[]; + add(t: any): any; + _addContainer(t: any): void; + upload(t: any): Promise; + dedupeQueue(): void; + _resolve(): void; + }; + uploadsPerFrame: number; +}; +declare class Xm extends Xm_base { + resolveQueueItem(t: any, e: any): null; + resolveContainerQueueItem(t: any, e: any): void; + resolveGraphicsContextQueueItem(t: any): any; +} +declare class Wm extends Vm { + destroy(): void; +} +declare namespace Wm { + export namespace extension_54 { + let type_49: any[]; + export { type_49 as type }; + let name_49: string; + export { name_49 as name }; + } + export { extension_54 as extension }; +} +declare class Vm extends Xm { + uploadQueueItem(t: any): void; + uploadTextureSource(t: any): void; + uploadText(t: any): void; + uploadBitmapText(t: any): void; + uploadHTMLText(t: any): void; + uploadGraphicsContext(t: any): null; +} +declare const op_base: { + new (...t: any[]): { + [x: string]: any; + batchMode: string; + positions: any; + uvs: any; + indices: any; + uid: number; + _layoutKey: number; + instanceCount: any; + _bounds: lt; + _boundsDirty: boolean; + attributes: any; + buffers: any[]; + indexBuffer: any; + topology: any; + onBufferUpdate(): void; + getAttribute(t: any): any; + getIndex(): any; + getBuffer(t: any): any; + getSize(): number; + readonly bounds: any; + destroy(t?: boolean): void; + }; + defaultOptions: { + topology: string; + shrinkBuffersToFit: boolean; + }; +}; +declare class op extends op_base { + constructor(); +} +declare const yl: number; +declare class z { + static get EMPTY(): z; + constructor(t?: number, e?: number, s?: number, i?: number); + type: string; + x: number; + y: number; + width: number; + height: number; + get left(): number; + get right(): number; + get top(): number; + get bottom(): number; + isEmpty(): boolean; + clone(): z; + copyFromBounds(t: any): this; + copyFrom(t: any): this; + copyTo(t: any): any; + contains(t: any, e: any): boolean; + strokeContains(t: any, e: any, s: any): boolean; + intersects(t: any, e: any): boolean; + pad(t?: number, e?: number): this; + fit(t: any): this; + ceil(t?: number, e?: number): this; + enlarge(t: any): this; + getBounds(t: any): any; +} +declare class YE extends V { + constructor(t: any); + batched: boolean; + bounds: lt; + canBundle: boolean; + renderPipeId: string; + render(t: any): void; + containsPoint: any; + addBounds: any; +} +declare class Fl { + constructor(t: any); + renderPipeId: string; + root: any; + canBundle: boolean; + renderGroupParent: any; + renderGroupChildren: any[]; + _children: any[]; + worldTransform: G; + worldColorAlpha: number; + worldColor: number; + worldAlpha: number; + childrenToUpdate: any; + updateTick: number; + childrenRenderablesToUpdate: { + list: never[]; + index: number; + }; + structureDidChange: boolean; + instructionSet: Yi; + _onRenderContainers: any[]; + get localTransform(): any; + addRenderGroupChild(t: any): void; + _removeRenderGroupChild(t: any): void; + addChild(t: any): void; + removeChild(t: any): void; + onChildUpdate(t: any): void; + updateRenderable(t: any): void; + onChildViewUpdate(t: any): void; + _removeChildFromUpdate(t: any): void; + get isRenderable(): boolean; + addOnRender(t: any): void; + removeOnRender(t: any): void; + runOnRender(): void; +} +declare class au { + constructor(t: any); + _renderer: any; + addRenderGroup(t: any, e: any): void; + execute(t: any): void; + destroy(): void; +} +declare namespace au { + export namespace extension_55 { + let type_50: any[]; + export { type_50 as type }; + let name_50: string; + export { name_50 as name }; + } + export { extension_55 as extension }; +} +declare class cu { + constructor(t: any); + _renderer: any; + render({ container: t, transform: e }: { + container: any; + transform: any; + }): void; + destroy(): void; +} +declare namespace cu { + export namespace extension_56 { + let type_51: any[]; + export { type_51 as type }; + let name_51: string; + export { name_51 as name }; + } + export { extension_56 as extension }; +} +declare let vi: { + new (t?: {}): { + uid: number; + colorTextures: any; + dirtyId: number; + isRoot: any; + _size: Float32Array; + stencil: any; + depth: any; + depthStencilTexture: any; + readonly size: Float32Array; + readonly width: any; + readonly height: any; + readonly pixelWidth: any; + readonly pixelHeight: any; + readonly resolution: any; + readonly colorTexture: any; + onSourceResize(t: any): void; + ensureDepthStencilTexture(): void; + resize(t: any, e: any, s?: any, i?: boolean): void; + destroy(): void; + }; + defaultOptions: { + width: number; + height: number; + resolution: number; + colorTextures: number; + stencil: boolean; + depth: boolean; + antialias: boolean; + isRoot: boolean; + }; +}; +declare class ja { + constructor(t: any); + rootViewPort: z; + viewport: z; + onRenderTargetChange: Ko; + projectionMatrix: G; + defaultClearColor: number[]; + _renderSurfaceToRenderTargetHash: Map; + _gpuRenderTargetHash: any; + _renderTargetStack: any[]; + _renderer: any; + finishRenderPass(): void; + renderStart({ target: t, clear: e, clearColor: s, frame: i }: { + target: any; + clear: any; + clearColor: any; + frame: any; + }): void; + rootRenderTarget: any; + renderingToScreen: boolean | undefined; + bind(t: any, e: boolean | undefined, s: any, i: any): any; + renderTarget: any; + renderSurface: any; + clear(t: any, e: any, s: any): void; + contextChange(): void; + push(t: any, e: any, s: any, i: any): any; + pop(): void; + getRenderTarget(t: any): any; + copyToTexture(t: any, e: any, s: any, i: any, n: any): any; + ensureDepthStencil(): void; + destroy(): void; + _initRenderTarget(t: any): { + uid: number; + colorTextures: any; + dirtyId: number; + isRoot: any; + _size: Float32Array; + stencil: any; + depth: any; + depthStencilTexture: any; + readonly size: Float32Array; + readonly width: any; + readonly height: any; + readonly pixelWidth: any; + readonly pixelHeight: any; + readonly resolution: any; + readonly colorTexture: any; + onSourceResize(t: any): void; + ensureDepthStencilTexture(): void; + resize(t: any, e: any, s?: any, i?: boolean): void; + destroy(): void; + } | null; + getGpuRenderTarget(t: any): any; +} +declare class h_ extends A { + static create(t: any): A; + resize(t: any, e: any, s: any): this; +} +declare var xt: any; +declare class rn { + static init(t: any): void; + static destroy(): void; +} +declare namespace rn { + export let queueResize: (() => void) | null | undefined; + export let _resizeId: number | null | undefined; + export let _cancelResize: (() => void) | null | undefined; + export let resize: (() => void) | null | undefined; + export let _resizeTo: any; + export let resizeTo: any; + let extension_57: any; + export { extension_57 as extension }; +} +declare class qt { + _defaultBundleIdentifierOptions: { + connector: string; + createBundleAssetId: (t: any, e: any) => string; + extractAssetIdFromBundle: (t: any, e: any) => any; + }; + _bundleIdConnector: string; + _createBundleAssetId: (t: any, e: any) => string; + _extractAssetIdFromBundle: (t: any, e: any) => any; + _assetMap: {}; + _preferredOrder: any[]; + _parsers: any[]; + _resolverHash: {}; + _bundles: {}; + setBundleIdentifier(t: any): void; + prefer(...t: any[]): void; + set basePath(t: any); + get basePath(): any; + _basePath: any; + set rootPath(t: any); + get rootPath(): any; + _rootPath: any; + get parsers(): any[]; + reset(): void; + _manifest: any; + _defaultSearchParams: string | null | undefined; + setDefaultSearchParams(t: any): void; + getAlias(t: any): any; + addManifest(t: any): void; + addBundle(t: any, e: any): void; + add(t: any): void; + resolveBundle(t: any): any; + resolveUrl(t: any): any; + resolve(t: any): any; + hasKey(t: any): boolean; + hasBundle(t: any): boolean; + _getPreferredOrder(t: any): any; + _appendDefaultSearchParams(t: any): any; + _buildResolvedAsset(t: any, e: any): any; +} +declare namespace qt { + let RETINA_PREFIX: RegExp; +} +declare let rx: { + new (t: any): { + [x: string]: any; + points: any; + _width: any; + textureScale: any; + readonly width: any; + _build(): void; + updateVertices(): void; + update(): void; + batchMode: string; + positions: any; + uvs: any; + indices: any; + uid: number; + _layoutKey: number; + instanceCount: any; + _bounds: lt; + _boundsDirty: boolean; + attributes: any; + buffers: any[]; + indexBuffer: any; + topology: any; + onBufferUpdate(): void; + getAttribute(t: any): any; + getIndex(): any; + getBuffer(t: any): any; + getSize(): number; + readonly bounds: any; + destroy(t?: boolean): void; + }; + defaultOptions: { + width: number; + points: never[]; + textureScale: number; + }; +}; +declare class Fi { + constructor(t?: number, e?: number, s?: number, i?: number, n?: number); + type: string; + x: number; + y: number; + width: number; + height: number; + radius: number; + getBounds(t: any): any; + clone(): Fi; + copyFrom(t: any): this; + copyTo(t: any): any; + contains(t: any, e: any): boolean; + strokeContains(t: any, e: any, s: any): boolean; +} +declare const $E: any; +declare var st: any; +declare function Mc(r: any, t: any): any; +declare function xc(r: any, t: any): any; +declare class YS { + constructor(t: any); + priority: number; + pipe: string; + mask: any; + addBounds(t: any, e: any): void; + addLocalBounds(t: any, e: any): void; + containsPoint(t: any, e: any): any; + reset(): void; + destroy(): void; +} +declare class Id extends St { + constructor(); +} +declare const St_base: any; +declare class St extends St_base { + [x: string]: any; + static from(t: any): St; + constructor(t: any); + _uniformBindMap: any; + _ownedBindGroups: any[]; + gpuProgram: any; + glProgram: any; + compatibleRenderers: any; + groups: any; + resources: {}; + addResource(t: any, e: any, s: any): void; + _buildResourceAccessor(t: any, e: any): {}; + destroy(t?: boolean): void; +} +declare var De: any; +declare class Pc { + constructor(t: any); + shapePrimitives: any[]; + _currentPoly: any; + _bounds: lt; + _graphicsPath2D: any; + moveTo(t: any, e: any): this; + lineTo(t: any, e: any): this; + arc(t: any, e: any, s: any, i: any, n: any, o: any): this; + arcTo(t: any, e: any, s: any, i: any, n: any): this; + arcToSvg(t: any, e: any, s: any, i: any, n: any, o: any, a: any): this; + bezierCurveTo(t: any, e: any, s: any, i: any, n: any, o: any, a: any): this; + quadraticCurveTo(t: any, e: any, s: any, i: any, n: any): this; + closePath(): this; + addPath(t: any, e: any): this; + finish(t?: boolean): void; + rect(t: any, e: any, s: any, i: any, n: any): this; + circle(t: any, e: any, s: any, i: any): this; + poly(t: any, e: any, s: any): this; + regularPoly(t: any, e: any, s: any, i: any, n: number | undefined, o: any): this; + roundPoly(t: any, e: any, s: any, i: any, n: any, o: number | undefined, a: any): this; + roundShape(t: any, e: any, s: boolean | undefined, i: any): this; + filletRect(t: any, e: any, s: any, i: any, n: any): this; + chamferRect(t: any, e: any, s: any, i: any, n: any, o: any): this; + ellipse(t: any, e: any, s: any, i: any, n: any): this; + roundRect(t: any, e: any, s: any, i: any, n: any, o: any): this; + drawShape(t: any, e: any): this; + startPoly(t: any, e: any): this; + endPoly(t?: boolean): this; + _ensurePoly(t?: boolean): void; + buildPath(): void; + get bounds(): lt; +} +declare const Au: (typeof Aa | typeof Pa | typeof wa | typeof Ra | typeof nu | typeof au | typeof du | typeof fu)[]; +declare const Eu: (typeof cu | { + new (): { + clearBeforeRender: boolean; + _backgroundColor: { + _value: any; + _components: Float32Array; + _int: number; + value: any; + readonly red: number; + readonly green: number; + readonly blue: number; + readonly alpha: number; + setValue(t: any): any; + _cloneSource(t: any): any; + _isSourceEqual(t: any, e: any): any; + toRgba(): { + r: number; + g: number; + b: number; + a: number; + }; + toRgb(): { + r: number; + g: number; + b: number; + }; + toRgbaString(): string; + toUint8RgbArray(t: any): any; + _arrayRgb: any[] | undefined; + toArray(t: any): any; + _arrayRgba: any[] | undefined; + toRgbArray(t: any): any; + toNumber(): number; + toBgrNumber(): any; + toLittleEndianNumber(): number; + multiply(t: any): any; + premultiply(t: any, e?: boolean): any; + toPremultiplied(t: any, e?: boolean): number; + toHex(): string; + toHexa(): string; + setAlpha(t: any): any; + _normalize(t: any): void; + _refreshInt(): void; + _clamp(t: any, e?: number, s?: number): any; + }; + color: { + _value: any; + _components: Float32Array; + _int: number; + value: any; + readonly red: number; + readonly green: number; + readonly blue: number; + readonly alpha: number; + setValue(t: any): any; + _cloneSource(t: any): any; + _isSourceEqual(t: any, e: any): any; + toRgba(): { + r: number; + g: number; + b: number; + a: number; + }; + toRgb(): { + r: number; + g: number; + b: number; + }; + toRgbaString(): string; + toUint8RgbArray(t: any): any; + _arrayRgb: any[] | undefined; + toArray(t: any): any; + _arrayRgba: any[] | undefined; + toRgbArray(t: any): any; + toNumber(): number; + toBgrNumber(): any; + toLittleEndianNumber(): number; + multiply(t: any): any; + premultiply(t: any, e?: boolean): any; + toPremultiplied(t: any, e?: boolean): number; + toHex(): string; + toHexa(): string; + setAlpha(t: any): any; + _normalize(t: any): void; + _refreshInt(): void; + _clamp(t: any, e?: number, s?: number): any; + }; + alpha: number; + init(t: any): void; + readonly colorRgba: any; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + priority: number; + }; + defaultOptions: { + backgroundAlpha: number; + backgroundColor: number; + clearBeforeRender: boolean; + }; +} | { + new (t: any): { + _renderer: any; + _normalizeOptions(t: any, e?: {}): any; + image(t: any): Promise; + base64(t: any): Promise; + canvas(t: any): any; + pixels(t: any): any; + texture(t: any): any; + download(t: any): void; + log(t: any): void; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + }; + defaultImageOptions: { + format: string; + quality: number; + }; +} | typeof xu | typeof bu | typeof Ai | { + new (t: any): { + _renderer: any; + count: number; + checkCount: number; + init(t: any): void; + checkCountMax: any; + maxIdle: any; + active: any; + postrender(): void; + run(): void; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + }; + defaultOptions: { + textureGCActive: boolean; + textureGCAMaxIdle: number; + textureGCCheckCountMax: number; + }; +} | { + new (): { + resolution: any; + init(t: any): void; + screen: z | undefined; + canvas: any; + antialias: boolean | undefined; + texture: any; + renderTarget: { + uid: number; + colorTextures: any; + dirtyId: number; + isRoot: any; + _size: Float32Array; + stencil: any; + depth: any; + depthStencilTexture: any; + readonly size: Float32Array; + readonly width: any; + readonly height: any; + readonly pixelWidth: any; + readonly pixelHeight: any; + readonly resolution: any; + readonly colorTexture: any; + onSourceResize(t: any): void; + ensureDepthStencilTexture(): void; + resize(t: any, e: any, s?: any, i?: boolean): void; + destroy(): void; + } | undefined; + multiView: boolean | undefined; + resize(t: any, e: any, s: any): void; + destroy(t?: boolean): void; + }; + extension: { + type: any[]; + name: string; + priority: number; + }; + defaultOptions: { + width: number; + height: number; + autoDensity: boolean; + antialias: boolean; + }; +})[]; +declare class Ft extends V { + static from(t: any, e?: boolean): Ft; + constructor(t?: A); + renderPipeId: string; + batched: boolean; + _didSpriteUpdate: boolean; + _bounds: { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + _sourceBounds: { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + _boundsDirty: boolean; + _sourceBoundsDirty: boolean; + _roundPixels: number; + _anchor: rt; + set anchor(t: rt); + get anchor(): rt; + set texture(t: any); + get texture(): any; + allowChildren: boolean; + set roundPixels(t: boolean); + get roundPixels(): boolean; + _texture: any; + get bounds(): { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + get sourceBounds(): { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + containsPoint(t: any): boolean; + addBounds(t: any): void; + onViewUpdate(): void; + _updateBounds(): void; + _updateSourceBounds(): void; +} +declare class du { + constructor(t: any); + _gpuSpriteHash: any; + _renderer: any; + addRenderable(t: any, e: any): void; + updateRenderable(t: any): void; + validateRenderable(t: any): boolean; + destroyRenderable(t: any): void; + _updateBatchableSprite(t: any, e: any): void; + _getGpuSprite(t: any): any; + _initGPUSprite(t: any): any; + destroy(): void; +} +declare namespace du { + export namespace extension_58 { + let type_52: any[]; + export { type_52 as type }; + let name_52: string; + export { name_52 as name }; + } + export { extension_58 as extension }; +} +declare let cn: { + new (t: any, e: any): { + linkedSheets: any[]; + _texture: A | null; + textureSource: any; + textures: {}; + animations: {}; + data: any; + resolution: any; + _frames: any; + _frameKeys: string[]; + _batchIndex: number; + _callback: ((value: any) => void) | null; + parse(): Promise; + _processFrames(t: any): void; + _processAnimations(): void; + _parseComplete(): void; + _nextBatch(): void; + destroy(t?: boolean): void; + }; + BATCH_SIZE: number; +}; +declare let Ct: { + new (): { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + for2d(): { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; + default2d: { + data: number; + blendMode: any; + polygonOffset: any; + blend: boolean; + depthMask: boolean; + offsets: boolean; + cullMode: "none" | "front" | "back"; + culling: boolean; + clockwiseFrontFace: boolean; + depthTest: boolean; + _blendMode: any; + _blendModeId: any; + _polygonOffset: any; + }; +}; +declare class mn { + static test(t: any): boolean; + constructor(t: any); + priority: number; + pipe: string; + init(t: any): void; + mask: any; + reset(): void; + addBounds(t: any, e: any): void; + addLocalBounds(t: any, e: any): void; + containsPoint(t: any, e: any): any; + destroy(): void; +} +declare namespace mn { + let extension_59: any; + export { extension_59 as extension }; +} +declare class Ra { + constructor(t: any); + _maskStackHash: {}; + _maskHash: WeakMap; + _renderer: any; + push(t: any, e: any, s: any): void; + pop(t: any, e: any, s: any): void; + execute(t: any): void; + destroy(): void; +} +declare namespace Ra { + export namespace extension_60 { + let type_53: any[]; + export { type_53 as type }; + let name_53: string; + export { name_53 as name }; + } + export { extension_60 as extension }; +} +declare class Ko { + constructor(t: any); + items: any[]; + _name: any; + emit(t: any, e: any, s: any, i: any, n: any, o: any, a: any, u: any): this; + add(t: any): this; + remove(t: any): this; + contains(t: any): boolean; + removeAll(): this; + destroy(): void; + get empty(): boolean; + get name(): any; +} +declare const Sf: { + "bc1-rgba-unorm": number; + "bc1-rgba-unorm-srgb": number; + "bc2-rgba-unorm": number; + "bc2-rgba-unorm-srgb": number; + "bc3-rgba-unorm": number; + "bc3-rgba-unorm-srgb": number; + "bc4-r-unorm": number; + "bc4-r-snorm": number; + "bc5-rg-unorm": number; + "bc5-rg-snorm": number; + "bc6h-rgb-ufloat": number; + "bc6h-rgb-float": number; + "bc7-rgba-unorm": number; + "bc7-rgba-unorm-srgb": number; +}; +declare class Ta extends fi { + constructor(...t: any[]); + renderPipeId: string; + _updateBounds(): void; +} +declare let Wt: { + new (t?: {}): { + [x: string]: any; + align: any; + _align: any; + breakWords: any; + _breakWords: any; + dropShadow: any; + _dropShadow: any; + fontFamily: any; + _fontFamily: any; + fontSize: any; + _fontSize: any; + fontStyle: any; + _fontStyle: any; + fontVariant: any; + _fontVariant: any; + fontWeight: any; + _fontWeight: any; + leading: any; + _leading: any; + letterSpacing: any; + _letterSpacing: any; + lineHeight: any; + _lineHeight: any; + padding: any; + _padding: any; + trim: any; + _trim: any; + textBaseline: any; + _textBaseline: any; + whiteSpace: any; + _whiteSpace: any; + wordWrap: any; + _wordWrap: any; + wordWrapWidth: any; + _wordWrapWidth: any; + fill: any; + _originalFill: any; + _fill: any; + stroke: any; + _originalStroke: any; + _stroke: any; + _generateKey(): string; + _styleKey: string | null | undefined; + update(): void; + reset(): void; + readonly styleKey: string; + clone(): any; + destroy(t?: boolean): void; + }; + [x: string]: any; + defaultDropShadow: { + alpha: number; + angle: number; + blur: number; + color: string; + distance: number; + }; + defaultTextStyle: { + align: string; + breakWords: boolean; + dropShadow: null; + fill: string; + fontFamily: string; + fontSize: number; + fontStyle: string; + fontVariant: string; + fontWeight: string; + leading: number; + letterSpacing: number; + lineHeight: number; + padding: number; + stroke: null; + textBaseline: string; + trim: boolean; + whiteSpace: string; + wordWrap: boolean; + wordWrapWidth: number; + }; +}; +declare const A_base: any; +declare class A extends A_base { + [x: string]: any; + constructor({ source: t, label: e, frame: s, orig: i, trim: n, defaultAnchor: o, defaultBorders: a, rotate: u, dynamic: l }?: { + source: any; + label: any; + frame: any; + orig: any; + trim: any; + defaultAnchor: any; + defaultBorders: any; + rotate: any; + dynamic: any; + }); + uid: number; + uvs: { + x0: number; + y0: number; + x1: number; + y1: number; + x2: number; + y2: number; + x3: number; + y3: number; + }; + frame: z; + noFrame: boolean; + dynamic: any; + isTexture: boolean; + label: any; + set source(t: any); + get source(): any; + orig: any; + trim: any; + rotate: any; + defaultAnchor: any; + defaultBorders: any; + destroyed: boolean; + _source: any; + get textureMatrix(): hn; + _textureMatrix: hn | null | undefined; + get width(): any; + get height(): any; + updateUvs(): void; + destroy(t?: boolean): void; + update(): void; + get baseTexture(): any; +} +declare namespace A { + export let EMPTY: A; + export let WHITE: A; + export { Dh as from }; +} +declare let Tu: { + new (t: any): { + _renderer: any; + count: number; + checkCount: number; + init(t: any): void; + checkCountMax: any; + maxIdle: any; + active: any; + postrender(): void; + run(): void; + destroy(): void; + }; + extension: { + type: any[]; + name: string; + }; + defaultOptions: { + textureGCActive: boolean; + textureGCAMaxIdle: number; + textureGCCheckCountMax: number; + }; +}; +declare class hn { + constructor(t: any, e: any); + mapCoord: G; + uClampFrame: Float32Array; + uClampOffset: Float32Array; + _textureID: number; + _updateID: number; + clampOffset: number; + clampMargin: any; + isSimple: boolean; + set texture(t: any); + get texture(): any; + _texture: any; + multiplyUvs(t: any, e: any): any; + update(): boolean; +} +declare const ut: dc; +declare class dc { + constructor(t: any); + _poolKeyHash: any; + _texturePool: {}; + textureOptions: any; + enableFullScreen: boolean; + createTexture(t: any, e: any, s: any): A; + getOptimalTexture(t: any, e: any, s: number | undefined, i: any): any; + getSameSizeTexture(t: any, e?: boolean): any; + returnTexture(t: any): void; + clear(t: any): void; +} +declare let et: { + new (t?: {}): { + [x: string]: any; + options: {}; + uid: number; + _resourceType: string; + _resourceId: number; + uploadMethodId: string; + _resolution: any; + pixelWidth: any; + pixelHeight: any; + width: number; + height: number; + sampleCount: any; + mipLevelCount: any; + autoGenerateMipmaps: any; + format: any; + dimension: any; + antialias: any; + _touched: number; + _batchTick: number; + _textureBindLocation: number; + label: any; + resource: any; + autoGarbageCollect: any; + alphaMode: any; + style: any; + destroyed: boolean; + readonly source: any; + _style: any; + addressMode: any; + repeatMode: any; + magFilter: any; + minFilter: any; + mipmapFilter: any; + lodMinClamp: any; + lodMaxClamp: any; + _onStyleChange(): void; + update(): void; + destroy(): void; + unload(): void; + readonly resourceWidth: any; + readonly resourceHeight: any; + resolution: any; + resize(t: any, e: any, s: any): boolean; + updateMipmaps(): void; + wrapMode: any; + scaleMode: any; + _refreshPOT(): void; + isPowerOfTwo: boolean | undefined; + }; + [x: string]: any; + test(t: any): void; + defaultOptions: { + resolution: number; + format: string; + alphaMode: string; + dimensions: string; + mipLevelCount: number; + autoGenerateMipmaps: boolean; + sampleCount: number; + antialias: boolean; + autoGarbageCollect: boolean; + }; +}; +declare let xh: { + new (t?: {}): { + [x: string]: any; + _resourceType: string; + _touched: number; + _maxAnisotropy: number; + addressMode: any; + addressModeU: any; + addressModeV: any; + addressModeW: any; + scaleMode: any; + magFilter: any; + minFilter: any; + mipmapFilter: any; + lodMinClamp: any; + lodMaxClamp: any; + compare: any; + maxAnisotropy: number; + wrapMode: any; + readonly _resourceId: any; + update(): void; + _sharedResourceId: any; + _generateResourceId(): any; + destroy(): void; + }; + [x: string]: any; + defaultOptions: { + addressMode: string; + scaleMode: string; + }; +}; +declare class NE { + x0: number; + y0: number; + x1: number; + y1: number; + x2: number; + y2: number; + x3: number; + y3: number; + uvsFloat32: Float32Array; + set(t: any, e: any, s: any): void; +} +declare let ht: { + new (): { + autoStart: boolean; + deltaTime: number; + lastTime: number; + speed: number; + started: boolean; + _requestId: number | null; + _maxElapsedMS: number; + _minElapsedMS: number; + _protected: boolean; + _lastFrame: number; + _head: us; + deltaMS: number; + elapsedMS: number; + _tick: (t: any) => void; + _requestIfNeeded(): void; + _cancelIfNeeded(): void; + _startIfPossible(): void; + add(t: any, e: any, s?: any): any; + addOnce(t: any, e: any, s?: any): any; + _addListener(t: any): any; + remove(t: any, e: any): any; + readonly count: number; + start(): void; + stop(): void; + destroy(): void; + update(t?: number): void; + readonly FPS: number; + minFPS: number; + maxFPS: number; + }; + readonly shared: any; + readonly system: any; + targetFPMS: number; +}; +declare class us { + constructor(t: any, e?: null, s?: number, i?: boolean); + next: any; + previous: any; + _destroyed: boolean; + _fn: any; + _context: any; + priority: number; + _once: boolean; + match(t: any, e?: null): boolean; + emit(t: any): any; + connect(t: any): void; + destroy(t?: boolean): any; +} +declare class sn { + static init(t: any): void; + static destroy(): void; +} +declare namespace sn { + export let stop: (() => void) | undefined; + export let start: (() => void) | undefined; + export let _ticker: any; + export let ticker: any; + let extension_61: any; + export { extension_61 as extension }; +} +declare let Lm: { + new (...t: any[]): { + [x: string]: any; + renderPipeId: string; + canBundle: boolean; + batched: boolean; + _roundPixels: number; + _bounds: { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + _boundsDirty: boolean; + allowChildren: boolean; + _anchor: rt; + _applyAnchorToTexture: any; + texture: any; + _width: any; + _height: any; + _tileTransform: Bm; + anchor: rt; + tilePosition: rt; + tileScale: rt; + tileRotation: number; + roundPixels: boolean; + clampMargin: any; + readonly tileTransform: Bm; + readonly bounds: { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + _texture: any; + width: any; + height: any; + _updateBounds(): void; + addBounds(t: any): void; + containsPoint(t: any): boolean; + onViewUpdate(): void; + _didTilingSpriteUpdate: boolean | undefined; + didViewUpdate: boolean; + destroy(t?: boolean): void; + uid: number; + _updateFlags: number; + isRenderGroupRoot: boolean; + renderGroup: Fl | null; + didChange: boolean; + relativeRenderGroupDepth: number; + children: any[]; + parent: any; + includeInBuild: boolean; + measurable: boolean; + isSimple: boolean; + updateTick: number; + localTransform: G; + relativeGroupTransform: G; + groupTransform: G; + destroyed: boolean; + _position: rt; + _scale: rt; + _pivot: rt; + _skew: rt; + _cx: number; + _sx: number; + _cy: number; + _sy: number; + _rotation: number; + localColor: number; + localAlpha: number; + groupAlpha: number; + groupColor: number; + groupColorAlpha: number; + localBlendMode: string; + groupBlendMode: string; + localDisplayStatus: number; + globalDisplayStatus: number; + _didChangeId: number; + _didLocalTransformChangeId: number; + effects: any[]; + addChild(...t: any[]): any; + sortDirty: boolean | undefined; + removeChild(...t: any[]): any; + _onUpdate(t: any): void; + isRenderGroup: boolean; + enableRenderGroup(): void; + _updateIsSimple(): void; + readonly worldTransform: G; + _worldTransform: G | undefined; + x: any; + y: any; + position: rt; + rotation: number; + angle: number; + pivot: rt; + skew: rt; + scale: rt; + getSize(t: any): any; + setSize(t: any, e: any): void; + _updateSkew(): void; + updateTransform(t: any): any; + setFromMatrix(t: any): void; + updateLocalTransform(): void; + alpha: number; + tint: number; + blendMode: string; + visible: boolean; + culled: boolean; + renderable: boolean; + readonly isRenderable: boolean; + _mask: any; + _filters: any; + }; + from(t: any, e?: {}): { + [x: string]: any; + renderPipeId: string; + canBundle: boolean; + batched: boolean; + _roundPixels: number; + _bounds: { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + _boundsDirty: boolean; + allowChildren: boolean; + _anchor: rt; + _applyAnchorToTexture: any; + texture: any; + _width: any; + _height: any; + _tileTransform: Bm; + anchor: rt; + tilePosition: rt; + tileScale: rt; + tileRotation: number; + roundPixels: boolean; + clampMargin: any; + readonly tileTransform: Bm; + readonly bounds: { + minX: number; + maxX: number; + minY: number; + maxY: number; + }; + _texture: any; + width: any; + height: any; + _updateBounds(): void; + addBounds(t: any): void; + containsPoint(t: any): boolean; + onViewUpdate(): void; + _didTilingSpriteUpdate: boolean | undefined; + didViewUpdate: boolean; + destroy(t?: boolean): void; + uid: number; + _updateFlags: number; + isRenderGroupRoot: boolean; + renderGroup: Fl | null; + didChange: boolean; + relativeRenderGroupDepth: number; + children: any[]; + parent: any; + includeInBuild: boolean; + measurable: boolean; + isSimple: boolean; + updateTick: number; + localTransform: G; + relativeGroupTransform: G; + groupTransform: G; + destroyed: boolean; + _position: rt; + _scale: rt; + _pivot: rt; + _skew: rt; + _cx: number; + _sx: number; + _cy: number; + _sy: number; + _rotation: number; + localColor: number; + localAlpha: number; + groupAlpha: number; + groupColor: number; + groupColorAlpha: number; + localBlendMode: string; + groupBlendMode: string; + localDisplayStatus: number; + globalDisplayStatus: number; + _didChangeId: number; + _didLocalTransformChangeId: number; + effects: any[]; + addChild(...t: any[]): any; + sortDirty: boolean | undefined; + removeChild(...t: any[]): any; + _onUpdate(t: any): void; + isRenderGroup: boolean; + enableRenderGroup(): void; + _updateIsSimple(): void; + readonly worldTransform: G; + _worldTransform: G | undefined; + x: any; + y: any; + position: rt; + rotation: number; + angle: number; + pivot: rt; + skew: rt; + scale: rt; + getSize(t: any): any; + setSize(t: any, e: any): void; + _updateSkew(): void; + updateTransform(t: any): any; + setFromMatrix(t: any): void; + updateLocalTransform(): void; + alpha: number; + tint: number; + blendMode: string; + visible: boolean; + culled: boolean; + renderable: boolean; + readonly isRenderable: boolean; + _mask: any; + _filters: any; + }; + defaultOptions: { + texture: A; + anchor: { + x: number; + y: number; + }; + tilePosition: { + x: number; + y: number; + }; + tileScale: { + x: number; + y: number; + }; + tileRotation: number; + applyAnchorToTexture: boolean; + }; + mixin(t: any): void; +}; +declare class No { + constructor(t: any); + _tilingSpriteDataHash: any; + _renderer: any; + validateRenderable(t: any): boolean; + addRenderable(t: any, e: any): void; + execute(t: any): void; + updateRenderable(t: any): void; + destroyRenderable(t: any): void; + _getTilingSpriteData(t: any): any; + _initTilingSpriteData(t: any): any; + _updateBatchableMesh(t: any): void; + destroy(): void; + _updateCanBatch(t: any): any; +} +declare namespace No { + export namespace extension_62 { + let type_54: any[]; + export { type_54 as type }; + let name_54: string; + export { name_54 as name }; + } + export { extension_62 as extension }; +} +declare class np extends St { + constructor(); + updateUniforms(t: any, e: any, s: any, i: any, n: any, o: any): void; +} +declare class Bm { + constructor({ matrix: t, observer: e }?: { + matrix: any; + observer: any; + }); + dirty: boolean; + _matrix: any; + observer: any; + position: rt; + scale: rt; + pivot: rt; + skew: rt; + _rotation: number; + _cx: number; + _sx: number; + _cy: number; + _sy: number; + get matrix(): any; + _onUpdate(t: any): void; + updateSkew(): void; + setFromMatrix(t: any): void; + set rotation(t: number); + get rotation(): number; +} +declare class Qu { + constructor(t?: number, e?: number, s?: number, i?: number, n?: number, o?: number); + type: string; + x: number; + y: number; + x2: number; + y2: number; + x3: number; + y3: number; + contains(t: any, e: any): boolean; + strokeContains(t: any, e: any, s: any): boolean; + clone(): Qu; + copyFrom(t: any): this; + copyTo(t: any): any; + getBounds(t: any): any; +} +declare const kg: { + f32: string; + "vec2": string; + "vec3": string; + "vec4": string; + "mat2x2": string; + "mat3x3": string; + "mat4x4": string; + i32: string; + "vec2": string; + "vec3": string; + "vec4": string; + u32: string; + "vec2": string; + "vec3": string; + "vec4": string; + bool: string; + "vec2": string; + "vec3": string; + "vec4": string; +}; +declare const Ug: { + f32: string; + "vec2": string; + "vec3": string; + "vec4": string; + i32: string; + "vec2": string; + "vec3": string; + "vec4": string; + u32: string; + "vec2": string; + "vec3": string; + "vec4": string; + bool: string; + "vec2": string; + "vec3": string; + "vec4": string; + "mat2x2": string; + "mat3x3": string; + "mat4x4": string; +}; +declare const Qi: 2; +declare const ns: 1; +declare var Xt: any; +declare const xb: 8; +declare const ar: 4; +declare class P_ { + constructor({ minUniformOffsetAlignment: t }: { + minUniformOffsetAlignment: any; + }); + _minUniformOffsetAlignment: any; + byteIndex: number; + data: Float32Array; + clear(): void; + addEmptyGroup(t: any): number; + addGroup(t: any): number; + destroy(): void; + _buffer: any; +} +declare class La { + constructor(t: any); + _syncFunctionHash: any; + _adaptor: any; + _systemCheck(): void; + ensureUniformGroup(t: any): void; + getUniformGroupData(t: any): any; + _initUniformGroup(t: any): any; + _generateUboSync(t: any): any; + syncUniformGroup(t: any, e: any, s: any): boolean; + updateUniformGroup(t: any): boolean; + destroy(): void; +} +declare let it: { + new (t: any, e: any): { + _touched: number; + uid: number; + _resourceType: string; + _resourceId: number; + isUniformGroup: boolean; + _dirtyId: number; + uniformStructures: any; + uniforms: {}; + ubo: any; + isStatic: any; + _signature: any; + update(): void; + }; + defaultOptions: { + ubo: boolean; + isStatic: boolean; + }; +}; +declare const vu: "8.0.5"; +declare let pr: { + new (t: any): { + [x: string]: any; + isReady: boolean; + uploadMethodId: string; + _autoUpdate: boolean; + _isConnectedToTicker: boolean; + _updateFPS: any; + _msToNextUpdate: number; + autoPlay: boolean; + alphaMode: any; + _videoFrameRequestCallback(): void; + _videoFrameRequestCallbackHandle: any; + _load: Promise | null; + _resolve: ((value: any) => void) | null; + _reject: ((reason?: any) => void) | null; + _onCanPlay(): void; + _onCanPlayThrough(): void; + _onError(t: any): void; + _onPlayStart(): void; + _onPlayStop(): void; + _onSeeked(): void; + updateFrame(): void; + readonly isValid: boolean; + load(): Promise; + _preloadTimeout: number | undefined; + _isSourcePlaying(): boolean; + _isSourceReady(): boolean; + _mediaReady(): void; + destroy(): void; + autoUpdate: boolean; + updateFPS: any; + _configureAutoUpdate(): void; + options: {}; + uid: number; + _resourceType: string; + _resourceId: number; + _resolution: any; + pixelWidth: any; + pixelHeight: any; + width: number; + height: number; + sampleCount: any; + mipLevelCount: any; + autoGenerateMipmaps: any; + format: any; + dimension: any; + antialias: any; + _touched: number; + _batchTick: number; + _textureBindLocation: number; + label: any; + resource: any; + autoGarbageCollect: any; + style: any; + destroyed: boolean; + readonly source: any; + _style: any; + addressMode: any; + repeatMode: any; + magFilter: any; + minFilter: any; + mipmapFilter: any; + lodMinClamp: any; + lodMaxClamp: any; + _onStyleChange(): void; + update(): void; + unload(): void; + readonly resourceWidth: any; + readonly resourceHeight: any; + resolution: any; + resize(t: any, e: any, s: any): boolean; + updateMipmaps(): void; + wrapMode: any; + scaleMode: any; + _refreshPOT(): void; + isPowerOfTwo: boolean | undefined; + }; + test(t: any): boolean; + extension: any; + defaultOptions: any; + MIME_TYPES: { + ogv: string; + mov: string; + m4v: string; + }; +}; +declare let y_: { + new (): { + resolution: any; + init(t: any): void; + screen: z | undefined; + canvas: any; + antialias: boolean | undefined; + texture: any; + renderTarget: { + uid: number; + colorTextures: any; + dirtyId: number; + isRoot: any; + _size: Float32Array; + stencil: any; + depth: any; + depthStencilTexture: any; + readonly size: Float32Array; + readonly width: any; + readonly height: any; + readonly pixelWidth: any; + readonly pixelHeight: any; + readonly resolution: any; + readonly colorTexture: any; + onSourceResize(t: any): void; + ensureDepthStencilTexture(): void; + resize(t: any, e: any, s?: any, i?: boolean): void; + destroy(): void; + } | undefined; + multiView: boolean | undefined; + resize(t: any, e: any, s: any): void; + destroy(t?: boolean): void; + }; + extension: { + type: any[]; + name: string; + priority: number; + }; + defaultOptions: { + width: number; + height: number; + autoDensity: boolean; + antialias: boolean; + }; +}; +declare class Tn { + static sizeOf(t: any): 1 | 2 | 4; + constructor(t: any); + rawBinaryData: any; + uint32View: Uint32Array; + float32View: Float32Array; + size: any; + get int8View(): Int8Array; + _int8View: Int8Array | null | undefined; + get uint8View(): Uint8Array; + _uint8View: Uint8Array | null | undefined; + get int16View(): Int16Array; + _int16View: Int16Array | null | undefined; + get int32View(): Int32Array; + _int32View: Int32Array | null | undefined; + get float64View(): Float64Array; + _float64Array: Float64Array | undefined; + get bigUint64View(): any; + _bigUint64Array: any; + view(t: any): any; + destroy(): void; + uint16View: any; +} +declare const jr: { + i32: { + align: number; + size: number; + }; + u32: { + align: number; + size: number; + }; + f32: { + align: number; + size: number; + }; + f16: { + align: number; + size: number; + }; + "vec2": { + align: number; + size: number; + }; + "vec2": { + align: number; + size: number; + }; + "vec2": { + align: number; + size: number; + }; + "vec2": { + align: number; + size: number; + }; + "vec3": { + align: number; + size: number; + }; + "vec3": { + align: number; + size: number; + }; + "vec3": { + align: number; + size: number; + }; + "vec3": { + align: number; + size: number; + }; + "vec4": { + align: number; + size: number; + }; + "vec4": { + align: number; + size: number; + }; + "vec4": { + align: number; + size: number; + }; + "vec4": { + align: number; + size: number; + }; + "mat2x2": { + align: number; + size: number; + }; + "mat2x2": { + align: number; + size: number; + }; + "mat3x2": { + align: number; + size: number; + }; + "mat3x2": { + align: number; + size: number; + }; + "mat4x2": { + align: number; + size: number; + }; + "mat4x2": { + align: number; + size: number; + }; + "mat2x3": { + align: number; + size: number; + }; + "mat2x3": { + align: number; + size: number; + }; + "mat3x3": { + align: number; + size: number; + }; + "mat3x3": { + align: number; + size: number; + }; + "mat4x3": { + align: number; + size: number; + }; + "mat4x3": { + align: number; + size: number; + }; + "mat2x4": { + align: number; + size: number; + }; + "mat2x4": { + align: number; + size: number; + }; + "mat3x4": { + align: number; + size: number; + }; + "mat3x4": { + align: number; + size: number; + }; + "mat4x4": { + align: number; + size: number; + }; + "mat4x4": { + align: number; + size: number; + }; +}; +declare const $a: { + f32: number; + "vec2": number; + "vec3": number; + "vec4": number; + "mat2x2": number; + "mat3x3": number; + "mat4x4": number; +}; +declare const LE: any; +declare const A__base: { + new (t: any): { + [x: string]: any; + runners: any; + renderPipes: any; + _initOptions: {}; + _systemsHash: any; + type: any; + name: any; + init(t?: {}): Promise; + _roundPixels: number | undefined; + render(t: any, e: any): void; + _lastObjectRendered: any; + resize(t: any, e: any, s: any): void; + clear(t?: {}): void; + resolution: any; + readonly width: any; + readonly height: any; + readonly canvas: any; + readonly lastObjectRendered: any; + readonly renderingToScreen: any; + readonly screen: any; + _addRunners(...t: any[]): void; + _addSystems(t: any): void; + _addSystem(t: any, e: any): any; + _addPipes(t: any, e: any): void; + destroy(t?: boolean): void; + generateTexture(t: any): any; + readonly roundPixels: boolean; + _unsafeEvalCheck(): void; + }; + [x: string]: any; + defaultOptions: { + resolution: number; + failIfMajorPerformanceCaveat: boolean; + roundPixels: boolean; + }; +}; +declare class A_ extends A__base { + constructor(); +} +declare const z__base: { + new (t: any): { + [x: string]: any; + runners: any; + renderPipes: any; + _initOptions: {}; + _systemsHash: any; + type: any; + name: any; + init(t?: {}): Promise; + _roundPixels: number | undefined; + render(t: any, e: any): void; + _lastObjectRendered: any; + resize(t: any, e: any, s: any): void; + clear(t?: {}): void; + resolution: any; + readonly width: any; + readonly height: any; + readonly canvas: any; + readonly lastObjectRendered: any; + readonly renderingToScreen: any; + readonly screen: any; + _addRunners(...t: any[]): void; + _addSystems(t: any): void; + _addSystem(t: any, e: any): any; + _addPipes(t: any, e: any): void; + destroy(t?: boolean): void; + generateTexture(t: any): any; + readonly roundPixels: boolean; + _unsafeEvalCheck(): void; + }; + [x: string]: any; + defaultOptions: { + resolution: number; + failIfMajorPerformanceCaveat: boolean; + roundPixels: boolean; + }; +}; +declare class z_ extends z__base { + constructor(); +} +declare const ea: { + _initialized: boolean; + _createdWorkers: number; + _workerPool: any[]; + _queue: any[]; + _resolveHash: {}; + isImageBitmapSupported(): Promise; + _isImageBitmapSupported: Promise | undefined; + loadImageBitmap(t: any): Promise; + _initWorkers(): Promise; + _getWorker(): any; + _returnWorker(t: any): void; + _complete(t: any): void; + _run(t: any, e: any): Promise; + _next(): void; +}; +declare function Vi(r: any, t: any, e: any, s: any): void; +declare function jo(r: any, t: any): void; +declare namespace Jl { + let accessible: boolean; + let accessibleTitle: null; + let accessibleHint: null; + let tabIndex: number; + let _accessibleActive: boolean; + let _accessibleDiv: null; + let accessibleType: string; + let accessiblePointerEvents: string; + let accessibleChildren: boolean; + let _renderId: number; +} +declare function Ao(r: any, t: any, e: any): void; +declare function ps(r: any, t: any, e: any): void; +declare function fs(r: any, t: any, e: any): void; +declare function Kc(r: any, t: any, e: any): any; +declare var Vf: string; +declare var pa: string; +declare function up(r: any, t: any, e: any, s: any): void; +declare function eu(r: any, t: any, e: any, s: any, i: any, n: any, o: any, a: any): void; +declare function Dl(r: any, t: any, e?: {}): void; +declare function vp(r: any): Promise; +declare function wp(r: any): Promise; +declare function Bh(r?: {}): any; +declare namespace Js { + let jsUrl: string; + let wasmUrl: string; +} +declare const Ns: { + _touched: number; + uid: number; + _resourceType: string; + _resourceId: number; + isUniformGroup: boolean; + _dirtyId: number; + uniformStructures: any; + uniforms: {}; + ubo: any; + isStatic: any; + _signature: any; + update(): void; +}; +declare namespace Hc { + let extension_63: any; + export { extension_63 as extension }; + export function test(r: any): boolean; + export function getCacheableAssets(r: any, t: any): {}; +} +declare namespace Is { + function test(r: any): boolean; + function parse(r: any): { + chars: {}; + pages: never[]; + lineHeight: number; + fontSize: number; + fontFamily: string; + distanceField: null; + baseLineOffset: number; + }; +} +declare namespace vo { + function test(r: any): any; + function parse(r: any): { + chars: {}; + pages: never[]; + lineHeight: number; + fontSize: number; + fontFamily: string; + distanceField: null; + baseLineOffset: number; + }; +} +declare namespace yo { + function test(r: any): any; + function parse(r: any): { + chars: {}; + pages: never[]; + lineHeight: number; + fontSize: number; + fontFamily: string; + distanceField: null; + baseLineOffset: number; + }; +} +declare var Lf: string; +declare var $f: string; +declare var Nf: string; +declare const Uu: { + "bc1-rgba-unorm": { + blockBytes: number; + blockWidth: number; + blockHeight: number; + }; + "bc2-rgba-unorm": { + blockBytes: number; + blockWidth: number; + blockHeight: number; + }; + "bc3-rgba-unorm": { + blockBytes: number; + blockWidth: number; + blockHeight: number; + }; + "bc7-rgba-unorm": { + blockBytes: number; + blockWidth: number; + blockHeight: number; + }; + "etc1-rgb-unorm": { + blockBytes: number; + blockWidth: number; + blockHeight: number; + }; + "etc2-rgba8unorm": { + blockBytes: number; + blockWidth: number; + blockHeight: number; + }; + "astc-4x4-unorm": { + blockBytes: number; + blockWidth: number; + blockHeight: number; + }; +}; +declare var tm: string; +declare const kt: es; +declare namespace FT { + export namespace extension_64 { + let type_55: any; + export { type_55 as type }; + let name_55: string; + export { name_55 as name }; + let priority_3: number; + export { priority_3 as priority }; + } + export { extension_64 as extension }; + export function test_1(): boolean; + export { test_1 as test }; + export function load(): Promise; +} +declare function io(r: any, t: any, e: any, s: any, i: any, n: any, o: any, a: any, u: any, l: any): any; +declare function vc(r: any, t: any, e: any, s: any, i: any, n: any, o: any, a: any): any; +declare function ao(r: any, t: any, e: any, s: any, i: any, n: any, o: any, a: any): void; +declare function yc(r: any, t: any, e: any, s: any, i: any, n: any): void; +declare function Sc(r: any, t: any, e: any, s: any, i: any, n: any, o: any, a?: number, u?: number, l?: number): void; +declare namespace _e { + function build(r: any, t: any): any; + function triangulate(r: any, t: any, e: any, s: any, i: any, n: any): void; +} +declare function Jh(r: any, t: any): void; +declare function JE(r: any): any; +declare function qm(r: any, t: any): void; +declare function Wh(r: any, t: any, e: any, s: any, i: any, n: any, o: any, a: any, u: any): void; +declare namespace Fn { + function build(r: any, t: any): any; + function triangulate(r: any, t: any, e: any, s: any, i: any, n: any): void; +} +declare namespace Dn { + function build(r: any, t: any): any; + function triangulate(r: any, t: any, e: any, s: any, i: any, n: any): void; +} +declare function Rn(r: any, t: any, e: any, s: any): void; +declare namespace Un { + function build(r: any, t: any): any; + function triangulate(r: any, t: any, e: any, s: any, i: any, n: any): void; +} +declare function wn(r: any, t: any, e: any, s: any, i: any, n: any, o: any, a?: null): void; +declare namespace Ip { + let extension_65: any; + export { extension_65 as extension }; + export function test_2(r: any): boolean; + export { test_2 as test }; + export function getCacheableAssets(r: any, t: any): {}; +} +declare function bg(r: any, t: any, e: any, s: any, i: any, n: any): any; +declare function Wi(r: any, t: any): any; +declare function Se(r: any, t: any): any; +declare function Mt(r: any, t: any): boolean; +declare namespace Sl { + let allowChildren: boolean; + function removeChildren(r: number | undefined, t: any): any; + function removeChildAt(r: any): any; + function getChildAt(r: any): any; + function setChildIndex(r: any, t: any): void; + function getChildIndex(r: any): any; + function addChildAt(r: any, t: any): any; + function swapChildren(r: any, t: any): void; + function removeFromParent(): void; +} +declare const zh: 0.0001; +declare function Hr(r: any, t: any, e: any): void; +declare function uu(r: any, t?: any[]): any[]; +declare function xr(r: any, t: any, e: any): void; +declare namespace Us { + let name_56: string; + export { name_56 as name }; + export namespace vertex { + let header: string; + let main: string; + } +} +declare namespace ks { + let name_57: string; + export { name_57 as name }; + export namespace vertex_1 { + let header_1: string; + export { header_1 as header }; + let main_1: string; + export { main_1 as main }; + } + export { vertex_1 as vertex }; +} +declare var lm: string; +declare var _a: string; +declare function Yv(r: any, t: any, e: any, s: any): void; +declare const Yg: { + never: number; + less: number; + equal: number; + "less-equal": number; + greater: number; + "not-equal": number; + "greater-equal": number; + always: number; +}; +declare function pd({ template: r, bits: t }: { + template: any; + bits: any; +}): any; +declare function fd({ template: r, bits: t }: { + template: any; + bits: any; +}): any; +declare function ke({ bits: r, name: t }: { + bits: any; + name: any; +}): { + fragment: any; + vertex: any; + _key: any; + destroy(): void; + _attributeData: any; + _uniformData: any; + _uniformBlockData: any; + transformFeedbackVaryings: any; +}; +declare function Ue({ bits: r, name: t }: { + bits: any; + name: any; +}): any; +declare function Po(r: any): {}; +declare function wo(r: any, t: any, e?: boolean): any; +declare function dd(r: any, t: any): any; +declare function Wa(r: any, t: any, e: any): any; +declare function Vt(r: any, t: any): any; +declare function ET(r: any): void; +declare function Pt(r: any, t: any, e?: boolean): any; +declare function ls(r: any, t: any): any; +declare function br(r: any, t: any): any; +declare function Y1(r: any, t: any): Uint8Array[]; +declare function AT(r: any): Uint8Array[]; +declare function uh(r: any): any[]; +declare function ee(r: any, t: any, e: any): A; +declare function dg(r: any): { + uboElements: any; + size: number; +}; +declare function O_(r: any): { + uboElements: any; + size: number; +}; +declare function Na(r: any, t: any, e: any, s: any): Function; +declare function _g(r: any): Function; +declare function G_(r: any): Function; +declare function hf(r: any, t: any, e: any): void; +declare namespace bl { + let cullArea: null; + let cullable: boolean; + let cullableChildren: boolean; +} +declare const On: 0.0001; +declare var ii: string; +declare function Ka(r: any, t: any): false | any[] | 0 | Float32Array | Int32Array | Uint32Array | null; +declare function Zt(r: any): {}; +declare function CA(r: any, t: any, e?: number): void; +declare namespace Bp { + export namespace extension_66 { + let type_56: any; + export { type_56 as type }; + let priority_4: number; + export { priority_4 as priority }; + } + export { extension_66 as extension }; + export function test_3(): Promise; + export { test_3 as test }; + export function add_1(r: any): Promise; + export { add_1 as add }; + export function remove(r: any): Promise; +} +declare namespace X1 { + export namespace extension_67 { + let type_57: any; + export { type_57 as type }; + let priority_5: number; + export { priority_5 as priority }; + } + export { extension_67 as extension }; + export function test_4(): Promise; + export { test_4 as test }; + export function add_2(r: any): Promise; + export { add_2 as add }; + export function remove_1(r: any): Promise; + export { remove_1 as remove }; +} +declare namespace GT { + export namespace extension_68 { + let type_58: any; + export { type_58 as type }; + let priority_6: number; + export { priority_6 as priority }; + } + export { extension_68 as extension }; + export function test_5(): Promise; + export { test_5 as test }; + export function add_3(r: any): Promise; + export { add_3 as add }; + export function remove_2(r: any): Promise; + export { remove_2 as remove }; +} +declare namespace Dp { + export namespace extension_69 { + let type_59: any; + export { type_59 as type }; + let priority_7: number; + export { priority_7 as priority }; + } + export { extension_69 as extension }; + export function test_6(): Promise; + export { test_6 as test }; + export function add_4(r: any): Promise; + export { add_4 as add }; + export function remove_3(r: any): Promise; + export { remove_3 as remove }; +} +declare namespace Up { + export namespace extension_70 { + let type_60: any; + export { type_60 as type }; + let priority_8: number; + export { priority_8 as priority }; + } + export { extension_70 as extension }; + export function test_7(): Promise; + export { test_7 as test }; + export function add_5(r: any): Promise; + export { add_5 as add }; + export function remove_4(r: any): Promise; + export { remove_4 as remove }; +} +declare namespace kp { + export namespace extension_71 { + let type_61: any; + export { type_61 as type }; + let priority_9: number; + export { priority_9 as priority }; + } + export { extension_71 as extension }; + export function test_8(): Promise; + export { test_8 as test }; + export function add_6(r: any): Promise; + export { add_6 as add }; + export function remove_5(r: any): Promise; + export { remove_5 as remove }; +} +declare function _n(): Promise; +declare namespace Lp { + export namespace extension_72 { + let type_62: any; + export { type_62 as type }; + let priority_10: number; + export { priority_10 as priority }; + } + export { extension_72 as extension }; + export function test_9(): Promise; + export { test_9 as test }; + export function add_7(r: any): Promise; + export { add_7 as add }; + export function remove_6(r: any): Promise; + export { remove_6 as remove }; +} +declare namespace $p { + export namespace extension_73 { + let type_63: any; + export { type_63 as type }; + let priority_11: number; + export { priority_11 as priority }; + } + export { extension_73 as extension }; + export function test_10(): Promise; + export { test_10 as test }; + export function add_8(r: any): Promise; + export { add_8 as add }; + export function remove_7(r: any): Promise; + export { remove_7 as remove }; +} +declare function df(r: any, t?: Location): "" | "anonymous"; +declare var dm: string; +declare var pm: string; +declare var xa: string; +declare var Qh: any; +declare namespace Pl { + let _mask: null; + let _filters: null; + let effects: never[]; + function addEffect(r: any): void; + function removeEffect(r: any): void; + let mask: any; + let filters: any; + let filterArea: any; +} +declare function Ga(r: any, t: any): void; +declare function vn(r: any, t: any): any; +declare function mi(r: any, t: any): any; +declare function qc(r: any, t: any, e: any): any; +declare function RA(r: any, t: any): { + [x: string]: any; + align: any; + _align: any; + breakWords: any; + _breakWords: any; + dropShadow: any; + _dropShadow: any; + fontFamily: any; + _fontFamily: any; + fontSize: any; + _fontSize: any; + fontStyle: any; + _fontStyle: any; + fontVariant: any; + _fontVariant: any; + fontWeight: any; + _fontWeight: any; + leading: any; + _leading: any; + letterSpacing: any; + _letterSpacing: any; + lineHeight: any; + _lineHeight: any; + padding: any; + _padding: any; + trim: any; + _trim: any; + textBaseline: any; + _textBaseline: any; + whiteSpace: any; + _whiteSpace: any; + wordWrap: any; + _wordWrap: any; + wordWrapWidth: any; + _wordWrapWidth: any; + fill: any; + _originalFill: any; + _fill: any; + stroke: any; + _originalStroke: any; + _stroke: any; + _generateKey(): string; + _styleKey: string | null | undefined; + update(): void; + reset(): void; + readonly styleKey: string; + clone(): any; + destroy(t?: boolean): void; +}; +declare function ou(r: any, t: any): void; +declare namespace D { + let _addHandlers: {}; + let _removeHandlers: {}; + let _queue: {}; + function remove(...r: any[]): { + _addHandlers: {}; + _removeHandlers: {}; + _queue: {}; + remove(...r: any[]): any; + add(...r: any[]): any; + handle(r: any, t: any, e: any): any; + handleByMap(r: any, t: any): any; + handleByNamedList(r: any, t: any, e?: number): any; + handleByList(r: any, t: any, e?: number): any; + }; + function add(...r: any[]): { + _addHandlers: {}; + _removeHandlers: {}; + _queue: {}; + remove(...r: any[]): any; + add(...r: any[]): any; + handle(r: any, t: any, e: any): any; + handleByMap(r: any, t: any): any; + handleByNamedList(r: any, t: any, e?: number): any; + handleByList(r: any, t: any, e?: number): any; + }; + function handle(r: any, t: any, e: any): { + _addHandlers: {}; + _removeHandlers: {}; + _queue: {}; + remove(...r: any[]): any; + add(...r: any[]): any; + handle(r: any, t: any, e: any): any; + handleByMap(r: any, t: any): any; + handleByNamedList(r: any, t: any, e?: number): any; + handleByList(r: any, t: any, e?: number): any; + }; + function handleByMap(r: any, t: any): { + _addHandlers: {}; + _removeHandlers: {}; + _queue: {}; + remove(...r: any[]): any; + add(...r: any[]): any; + handle(r: any, t: any, e: any): any; + handleByMap(r: any, t: any): any; + handleByNamedList(r: any, t: any, e?: number): any; + handleByList(r: any, t: any, e?: number): any; + }; + function handleByNamedList(r: any, t: any, e?: number): { + _addHandlers: {}; + _removeHandlers: {}; + _queue: {}; + remove(...r: any[]): any; + add(...r: any[]): any; + handle(r: any, t: any, e: any): any; + handleByMap(r: any, t: any): any; + handleByNamedList(r: any, t: any, e?: number): any; + handleByList(r: any, t: any, e?: number): any; + }; + function handleByList(r: any, t: any, e?: number): { + _addHandlers: {}; + _removeHandlers: {}; + _queue: {}; + remove(...r: any[]): any; + add(...r: any[]): any; + handle(r: any, t: any, e: any): any; + handleByMap(r: any, t: any): any; + handleByNamedList(r: any, t: any, e?: number): any; + handleByList(r: any, t: any, e?: number): any; + }; +} +declare function Cg(r: any, t: any, e?: boolean): {}; +declare function nd({ source: r, entryPoint: t }: { + source: any; + entryPoint: any; +}): {}; +declare function Nd(r: any, t: any): any[]; +declare function Ds(r: any): { + groups: any; + structs: any; +}; +declare function _s(r: any, t: any): void; +declare const ld: RegExp; +declare namespace wl { + export let label: null; + let name_58: null; + export { name_58 as name }; + export function getChildByName(r: any, t?: boolean): any; + export function getChildByLabel(r: any, t?: boolean): any; + export function getChildrenByLabel(r: any, t?: boolean, e?: any[]): any[]; +} +declare function vr(r: any): string; +declare function zS(r: any): any; +declare const xd: "\n @in vUV : vec2;\n @in vColor : vec4;\n \n {{header}}\n\n @fragment\n fn main(\n {{in}}\n ) -> @location(0) vec4 {\n \n {{start}}\n\n var outColor:vec4;\n \n {{main}}\n \n return outColor * vColor;\n };\n"; +declare const vd: "\n \n in vec4 vColor;\n in vec2 vUV;\n\n out vec4 finalColor;\n\n {{header}}\n\n void main(void) {\n \n {{start}}\n\n vec4 outColor;\n \n {{main}}\n \n finalColor = outColor * vColor;\n }\n"; +declare function gg(r: any, t: any): string; +declare function C_(r: any, t: any): string; +declare function Zf(r: any): string; +declare function Jf(r: any, t: any): any; +declare function em(r: any, t: any): any; +declare function Qf(r: any, t: any): string; +declare function HS(r: any): ({ + texture: { + sampleType: string; + viewDimension: string; + multisampled: boolean; + }; + binding: number; + visibility: any; + sampler?: undefined; +} | { + sampler: { + type: string; + }; + binding: number; + visibility: any; + texture?: undefined; +})[]; +declare function od({ groups: r }: { + groups: any; +}): never[][]; +declare function XS(r: any): {}; +declare function ad({ groups: r }: { + groups: any; +}): {}[]; +declare function Dg(r: any, t: any): Rg; +declare function wg(r: any, t: any): Function; +declare function po(r: any): string; +declare function Ls(r: any): any; +declare function $s(r: any): any; +declare function XE(): number; +declare function Lg(r: any, t: any): Function; +declare function Sn(r: any, t: any): any; +declare function Fe(r: any): any; +declare function _o(r: any, t: any, e: any): { + width: number; + height: number; + offsetY: number; + scale: number; + lines: { + width: number; + charPositions: never[]; + spaceWidth: number; + spacesIndex: never[]; + chars: never[]; + }[]; +}; +declare function mc(r: any, t?: number): z; +declare function yr(r: any, t: any): any; +declare function za(r: any, t: any): any; +declare function ic(r: any, t: any): 0 | Float32Array | null; +declare function xp(r: any, t: any): any; +declare function Xd(r: any, t: any, e: any): Promise; +declare function Yp(r: any): any; +declare function Uh(r: any, t: any, e: any): any; +declare function og(r: any): any; +declare function nr(r: any, t: any, e: any): any; +declare function bp(r: any, t: any): any; +declare function is(r: any, t: any, e: any): any; +declare function dn(r: any, t: any, e: any): any; +declare function Yc(): any; +declare function jh(r: any): 1 | -1; +declare function Ol(r: any, t: any, e: any): void; +declare function Zn(r: any, t: any, e: any, s: any): any; +declare function Ys(r: any, t?: number): number; +declare function zd(r: any, t: any, e: any, s: any, i: any): string; +declare function ua(): Promise; +declare function oa(): Promise; +declare function na(): any; +declare function Dr(): Promise; +declare function jd(r: any, t: any): any; +declare function Wc(): any; +declare function gs(r: any, t: any): any; +declare function SA(r: any, t: any): any; +declare function RT(r: any): any; +declare function Gg(r: any, t: any): {}; +declare function Ig(r: any, t: any): {}; +declare function ch(r: any): any; +declare function Cf(r: any): any; +declare namespace zg { + let id: string; + function upload(r: any, t: any, e: any): void; +} +declare namespace jg { + let id_1: string; + export { id_1 as id }; + export function upload(r: any, t: any, e: any): void; +} +declare namespace Ja { + let id_2: string; + export { id_2 as id }; + export function upload(r: any, t: any, e: any, s: any): void; +} +declare namespace Vg { + let id_3: string; + export { id_3 as id }; + export function upload(r: any, t: any, e: any, s: any): void; +} +declare namespace yd { + let name_59: string; + export { name_59 as name }; + export namespace vertex_2 { + let header_2: string; + export { header_2 as header }; + } + export { vertex_2 as vertex }; +} +declare namespace Td { + let name_60: string; + export { name_60 as name }; + export namespace vertex_3 { + let header_3: string; + export { header_3 as header }; + } + export { vertex_3 as vertex }; +} +declare namespace hy { + let name_61: string; + export { name_61 as name }; + export namespace vertex_4 { + let header_4: string; + export { header_4 as header }; + } + export { vertex_4 as vertex }; +} +declare function q1(r: any): any; +declare function OT(r: any): any; +declare namespace U_ { + let type_64: string; + export { type_64 as type }; + export function upload(r: any, t: any, e: any): void; +} +declare namespace k_ { + let type_65: string; + export { type_65 as type }; + export function upload(r: any, t: any, e: any): void; +} +declare namespace ku { + let type_66: string; + export { type_66 as type }; + export function upload(r: any, t: any, e: any): void; +} +declare namespace L_ { + let type_67: string; + export { type_67 as type }; + export function upload(r: any, t: any, e: any): void; +} +declare namespace U { + export let E: number; + export let SE: number; + export let S: number; + export let SW: number; + export let W: number; + export let NW: number; + export let N: number; + export let NE: number; + export let MIRROR_VERTICAL: number; + export let MAIN_DIAGONAL: number; + export let MIRROR_HORIZONTAL: number; + export let REVERSE_DIAGONAL: number; + export function uX(r: any): number; + export function uY(r: any): number; + export function vX(r: any): number; + export function vY(r: any): number; + export function inv(r: any): number; + export function add_9(r: any, t: any): any; + export { add_9 as add }; + export function sub(r: any, t: any): any; + export function rotate180(r: any): number; + export function isVertical(r: any): boolean; + export function byDirection(r: any, t: any): number; + export function matrixAppendRotationInv(r: any, t: any, e?: number, s?: number): void; +} +declare function _2(r: any): boolean; +declare var IS: string; +declare const HT: "\n\tfloat getLuminosity(vec3 c) {\n\t\treturn 0.3 * c.r + 0.59 * c.g + 0.11 * c.b;\n\t}\n\n\tvec3 setLuminosity(vec3 c, float lum) {\n\t\tfloat modLum = lum - getLuminosity(c);\n\t\tvec3 color = c.rgb + vec3(modLum);\n\n\t\t// clip back into legal range\n\t\tmodLum = getLuminosity(color);\n\t\tvec3 modLumVec = vec3(modLum);\n\n\t\tfloat cMin = min(color.r, min(color.g, color.b));\n\t\tfloat cMax = max(color.r, max(color.g, color.b));\n\n\t\tif(cMin < 0.0) {\n\t\t\tcolor = mix(modLumVec, color, modLum / (modLum - cMin));\n\t\t}\n\n\t\tif(cMax > 1.0) {\n\t\t\tcolor = mix(modLumVec, color, (1.0 - modLum) / (cMax - modLum));\n\t\t}\n\n\t\treturn color;\n\t}\n\n\tfloat getSaturation(vec3 c) {\n\t\treturn max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b));\n\t}\n\n\tvec3 setSaturationMinMidMax(vec3 cSorted, float s) {\n\t\tvec3 colorSorted = cSorted;\n\n\t\tif(colorSorted.z > colorSorted.x) {\n\t\t\tcolorSorted.y = (((colorSorted.y - colorSorted.x) * s) / (colorSorted.z - colorSorted.x));\n\t\t\tcolorSorted.z = s;\n\t\t}\n\t\telse {\n\t\t\tcolorSorted.y = 0.0;\n\t\t\tcolorSorted.z = 0.0;\n\t\t}\n\n\t\tcolorSorted.x = 0.0;\n\n\t\treturn colorSorted;\n\t}\n\n\tvec3 setSaturation(vec3 c, float s) {\n\t\tvec3 color = c;\n\n\t\tif(color.r <= color.g && color.r <= color.b) {\n\t\t\tif(color.g <= color.b) {\n\t\t\t\tcolor = setSaturationMinMidMax(color.rgb, s).rgb;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcolor = setSaturationMinMidMax(color.rbg, s).rbg;\n\t\t\t}\n\t\t}\n\t\telse if(color.g <= color.r && color.g <= color.b) {\n\t\t\tif(color.r <= color.b) {\n\t\t\t\tcolor = setSaturationMinMidMax(color.grb, s).grb;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcolor = setSaturationMinMidMax(color.gbr, s).gbr;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Using bgr for both fixes part of hue\n\t\t\tif(color.r <= color.g) {\n\t\t\t\tcolor = setSaturationMinMidMax(color.brg, s).brg;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcolor = setSaturationMinMidMax(color.bgr, s).bgr;\n\t\t\t}\n\t\t}\n\n\t\treturn color;\n\t}\n "; +declare const XT: "\n\tfn getLuminosity(c: vec3) -> f32\n\t{\n\t\treturn 0.3*c.r + 0.59*c.g + 0.11*c.b;\n\t}\n\n\tfn setLuminosity(c: vec3, lum: f32) -> vec3\n\t{\n\t\tvar modLum: f32 = lum - getLuminosity(c);\n\t\tvar color: vec3 = c.rgb + modLum;\n\n\t\t// clip back into legal range\n\t\tmodLum = getLuminosity(color);\n\t\tlet modLumVec = vec3(modLum);\n\n\t\tlet cMin: f32 = min(color.r, min(color.g, color.b));\n\t\tlet cMax: f32 = max(color.r, max(color.g, color.b));\n\n\t\tif(cMin < 0.0)\n\t\t{\n\t\t\tcolor = mix(modLumVec, color, modLum / (modLum - cMin));\n\t\t}\n\n\t\tif(cMax > 1.0)\n\t\t{\n\t\t\tcolor = mix(modLumVec, color, (1 - modLum) / (cMax - modLum));\n\t\t}\n\n\t\treturn color;\n\t}\n\n\tfn getSaturation(c: vec3) -> f32\n\t{\n\t\treturn max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b));\n\t}\n\n\tfn setSaturationMinMidMax(cSorted: vec3, s: f32) -> vec3\n\t{\n\t\tvar colorSorted = cSorted;\n\n\t\tif(colorSorted.z > colorSorted.x)\n\t\t{\n\t\t\tcolorSorted.y = (((colorSorted.y - colorSorted.x) * s) / (colorSorted.z - colorSorted.x));\n\t\t\tcolorSorted.z = s;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcolorSorted.y = 0;\n\t\t\tcolorSorted.z = 0;\n\t\t}\n\n\t\tcolorSorted.x = 0;\n\n\t\treturn colorSorted;\n\t}\n\n\tfn setSaturation(c: vec3, s: f32) -> vec3\n\t{\n\t\tvar color = c;\n\n\t\tif (color.r <= color.g && color.r <= color.b)\n\t\t{\n\t\t\tif (color.g <= color.b)\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.rgb, s)).rgb;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.rbg, s)).rbg;\n\t\t\t}\n\t\t}\n\t\telse if (color.g <= color.r && color.g <= color.b)\n\t\t{\n\t\t\tif (color.r <= color.b)\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.grb, s)).grb;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.gbr, s)).gbr;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Using bgr for both fixes part of hue\n\t\t\tif (color.r <= color.g)\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.brg, s)).brg;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = vec3(setSaturationMinMidMax(color.bgr, s)).bgr;\n\t\t\t}\n\t\t}\n\n\t\treturn color;\n\t}\n\t"; +declare function Ro(r: any, t: any): any; +declare function Zc(r: any, t: any): any; +declare const ql: any; +declare function ln(r: any): boolean; +declare function Tg(r: any): boolean; +declare function Fd(): boolean; +declare function cr(r: any): boolean; +declare function Cr(r: any): any; +declare function Gr(r?: {}): Promise; +declare namespace ti { + let jsUrl_1: string; + export { jsUrl_1 as jsUrl }; + let wasmUrl_1: string; + export { wasmUrl_1 as wasmUrl }; +} +declare namespace W1 { + export namespace extension_74 { + let type_68: any; + export { type_68 as type }; + let priority_12: any; + export { priority_12 as priority }; + } + export { extension_74 as extension }; + let name_62: string; + export { name_62 as name }; + export function test(r: any): boolean; + export function load(r: any, t: any, e: any): Promise; + export function unload(r: any): void; +} +declare function vf(r: any, t: any): Promise; +declare namespace Xc { + export namespace extension_75 { + let type_69: any; + export { type_69 as type }; + let priority_13: any; + export { priority_13 as priority }; + } + export { extension_75 as extension }; + export function test(r: any): boolean; + export function testParse(r: any): Promise; + export function parse(r: any, t: any, e: any): Promise; + export function load(r: any, t: any): Promise; + export function unload(r: any, t: any, e: any): Promise; +} +declare namespace sT { + export namespace extension_76 { + let type_70: any; + export { type_70 as type }; + let priority_14: any; + export { priority_14 as priority }; + } + export { extension_76 as extension }; + let name_63: string; + export { name_63 as name }; + export function test(r: any): boolean; + export function load(r: any, t: any, e: any): Promise; + export function unload(r: any): void; +} +declare function Hd(r: any): Promise; +declare function Uo(r: any, t: any): Promise; +declare function nf(r: any): Promise; +declare namespace zp { + export namespace extension_77 { + let type_71: any; + export { type_71 as type }; + let priority_15: any; + export { priority_15 as priority }; + } + export { extension_77 as extension }; + let name_64: string; + export { name_64 as name }; + export function test(r: any): any; + export function load(r: any): Promise; +} +declare namespace bT { + export namespace extension_78 { + let type_72: any; + export { type_72 as type }; + let priority_16: any; + export { priority_16 as priority }; + } + export { extension_78 as extension }; + let name_65: string; + export { name_65 as name }; + export function test(r: any): boolean; + export function load(r: any, t: any, e: any): Promise; + export function unload(r: any): void; +} +declare namespace ST { + export namespace extension_79 { + let type_73: any; + export { type_73 as type }; + let priority_17: any; + export { priority_17 as priority }; + } + export { extension_79 as extension }; + let name_66: string; + export { name_66 as name }; + export function test(r: any): boolean; + export function load(r: any, t: any, e: any): Promise; + export function unload(r: any): void; +} +declare function Mf(r: any, t: any): Promise; +declare function Vd(r: any, t: any, e: any): Promise; +declare namespace Jp { + export namespace extension_80 { + let type_74: any; + export { type_74 as type }; + let priority_18: any; + export { priority_18 as priority }; + } + export { extension_80 as extension }; + let name_67: string; + export { name_67 as name }; + export namespace config { + let crossOrigin: string; + let parseAsGraphicsContext: boolean; + } + export function test(r: any): any; + export function load(r: any, t: any, e: any): Promise; + export function unload(r: any): void; +} +declare namespace ra { + let name_68: string; + export { name_68 as name }; + export namespace extension_81 { + let type_75: any; + export { type_75 as type }; + let priority_19: any; + export { priority_19 as priority }; + } + export { extension_81 as extension }; + export namespace config_1 { + export let preferWorkers: boolean; + export let preferCreateImageBitmap: boolean; + let crossOrigin_1: string; + export { crossOrigin_1 as crossOrigin }; + } + export { config_1 as config }; + export function test(r: any): any; + export function load(r: any, t: any, e: any): Promise; + export function unload(r: any): void; +} +declare namespace jp { + let name_69: string; + export { name_69 as name }; + export namespace extension_82 { + let type_76: any; + export { type_76 as type }; + let priority_20: any; + export { priority_20 as priority }; + } + export { extension_82 as extension }; + export function test(r: any): any; + export function load(r: any): Promise; +} +declare namespace pf { + let name_70: string; + export { name_70 as name }; + export namespace extension_83 { + let type_77: any; + export { type_77 as type }; + } + export { extension_83 as extension }; + let config_2: null; + export { config_2 as config }; + export function test(r: any): any; + export function load(r: any, t: any, e: any): Promise; + export function unload(r: any): void; +} +declare namespace Kp { + export namespace extension_84 { + let type_78: any; + export { type_78 as type }; + let priority_21: any; + export { priority_21 as priority }; + } + export { extension_84 as extension }; + let name_71: string; + export { name_71 as name }; + export function test(r: any): any; + export function load(r: any, t: any): Promise; + export function unload(r: any): void; +} +declare namespace Ne { + let name_72: string; + export { name_72 as name }; + export namespace vertex_5 { + let header_5: string; + export { header_5 as header }; + let main_2: string; + export { main_2 as main }; + export let end: string; + } + export { vertex_5 as vertex }; +} +declare namespace zs { + let name_73: string; + export { name_73 as name }; + export namespace vertex_6 { + let header_6: string; + export { header_6 as header }; + let main_3: string; + export { main_3 as main }; + let end_1: string; + export { end_1 as end }; + } + export { vertex_6 as vertex }; +} +declare const rp: any; +declare namespace Md { + let name_74: string; + export { name_74 as name }; + export namespace vertex_7 { + let header_7: string; + export { header_7 as header }; + let main_4: string; + export { main_4 as main }; + let end_2: string; + export { end_2 as end }; + } + export { vertex_7 as vertex }; + export namespace fragment { + let header_8: string; + export { header_8 as header }; + let main_5: string; + export { main_5 as main }; + } +} +declare namespace Od { + let name_75: string; + export { name_75 as name }; + export namespace vertex_8 { + let header_9: string; + export { header_9 as header }; + let main_6: string; + export { main_6 as main }; + let end_3: string; + export { end_3 as end }; + } + export { vertex_8 as vertex }; + export namespace fragment_1 { + let header_10: string; + export { header_10 as header }; + let main_7: string; + export { main_7 as main }; + } + export { fragment_1 as fragment }; +} +declare function Vb(r: any): number; +declare function GA(r: any, t: any, e?: number): Promise; +declare function Fg(r: any, t: any, e: any, s: any): void; +declare function vx(r: any, t?: number, e?: { + index: number; + color: string; +}): void; +declare function bx(r: any, t?: number, e?: { + color: string; +}): void; +declare namespace Cd { + let name_76: string; + export { name_76 as name }; + export namespace fragment_2 { + let header_11: string; + export { header_11 as header }; + } + export { fragment_2 as fragment }; +} +declare namespace Gd { + let name_77: string; + export { name_77 as name }; + export namespace fragment_3 { + let header_12: string; + export { header_12 as header }; + } + export { fragment_3 as fragment }; +} +declare function Kg(r: any): { + r8unorm: any; + r8snorm: any; + r8uint: any; + r8sint: any; + r16uint: any; + r16sint: any; + r16float: any; + rg8unorm: any; + rg8snorm: any; + rg8uint: any; + rg8sint: any; + r32uint: any; + r32sint: any; + r32float: any; + rg16uint: any; + rg16sint: any; + rg16float: any; + rgba8unorm: any; + "rgba8unorm-srgb": any; + rgba8snorm: any; + rgba8uint: any; + rgba8sint: any; + bgra8unorm: any; + "bgra8unorm-srgb": any; + rgb9e5ufloat: any; + rgb10a2unorm: any; + rg11b10ufloat: any; + rg32uint: any; + rg32sint: any; + rg32float: any; + rgba16uint: any; + rgba16sint: any; + rgba16float: any; + rgba32uint: any; + rgba32sint: any; + rgba32float: any; + stencil8: any; + depth16unorm: any; + depth24plus: any; + "depth24plus-stencil8": any; + depth32float: any; + "depth32float-stencil8": any; +}; +declare function Qg(r: any, t: any): any; +declare function Jg(r: any): { + r8unorm: any; + r8snorm: any; + r8uint: any; + r8sint: any; + r16uint: any; + r16sint: any; + r16float: any; + rg8unorm: any; + rg8snorm: any; + rg8uint: any; + rg8sint: any; + r32uint: any; + r32sint: any; + r32float: any; + rg16uint: any; + rg16sint: any; + rg16float: any; + rgba8unorm: any; + "rgba8unorm-srgb": any; + rgba8snorm: any; + rgba8uint: any; + rgba8sint: any; + bgra8unorm: any; + "bgra8unorm-srgb": any; + rgb9e5ufloat: any; + rgb10a2unorm: any; + rg11b10ufloat: any; + rg32uint: any; + rg32sint: any; + rg32float: any; + rgba16uint: any; + rgba16sint: any; + rgba16float: any; + rgba32uint: any; + rgba32sint: any; + rgba32float: any; + stencil8: any; + depth16unorm: any; + depth24plus: any; + "depth24plus-stencil8": any; + depth32float: any; + "depth32float-stencil8": any; +}; +declare function Og(r: any, t: any): any; +declare function A2(r: any): any; +declare function qa(r: any, t: any): any; +declare function $g(r: any): { + normal: any[]; + add: any[]; + multiply: any[]; + screen: any[]; + none: number[]; + "normal-npm": any[]; + "add-npm": any[]; + "screen-npm": any[]; + erase: any[]; +}; +declare var Tm: string; +declare var Sm: string; +declare var ya: string; +declare const Ut: es; +declare function ko(r: any, t: any, e: any, s: any): { + width: any; + height: any; +}; +declare namespace Cl { + let _localBoundsCacheId: number; + let _localBoundsCacheData: null; + function _setWidth(r: any, t: any): void; + function _setHeight(r: any, t: any): void; + function getLocalBounds(): any; + function getBounds(r: any, t: any): any; +} +declare function S2(r: any): any; +declare namespace Wg { + export namespace linear { + let linear_1: number; + export { linear_1 as linear }; + export let nearest: number; + } + export namespace nearest_1 { + let linear_2: number; + export { linear_2 as linear }; + let nearest_2: number; + export { nearest_2 as nearest }; + } + export { nearest_1 as nearest }; +} +declare function bs(r: any, t: any): number; +declare function Mn(r: any, t: any, e: any): number; +declare function Pv(r: any, t: any, e: any): number; +declare function KE(r: any, t: any): any; +declare function me(r: any): any; +declare var _m: string; +declare var ba: string; +declare const _f: string[]; +declare function rr(r: any, t: any): any; +declare const Bo: "http://www.w3.org/2000/svg"; +declare const Fo: "http://www.w3.org/1999/xhtml"; +declare namespace Gl { + let _onRender: null; + let onRender: null; +} +declare function Ef(r: any, t: any): { + format: any; + width: number; + height: number; + resource: Uint8Array[]; + alphaMode: string; +}; +declare function zE(r: any): any; +declare function Pf(r: any, t: any): { + format: any; + width: any; + height: any; + resource: any[]; + alphaMode: string; +}; +declare namespace dt { + function toPosix(r: any): any; + function isUrl(r: any): boolean; + function isDataUrl(r: any): boolean; + function isBlobUrl(r: any): any; + function hasProtocol(r: any): boolean; + function getProtocol(r: any): string; + function toAbsolute(r: any, t: any, e: any): any; + function normalize(r: any): any; + function isAbsolute(r: any): any; + function join(...r: any[]): any; + function dirname(r: any): string; + function rootname(r: any): string; + function basename(r: any, t: any): any; + function extname(r: any): any; + function parse(r: any): { + root: string; + dir: string; + base: string; + ext: string; + name: string; + }; + let sep: string; + let delimiter: string; + let joinExtensions: string[]; +} +declare function cf(r: any): Promise; +declare function ji(r: any, t: any, e: any): void; +declare function ud(r: any, t: any): { + structs: any[]; + groups: any[]; +}; +declare function mb(): void; +declare function mo(r: any): any[]; +declare namespace CT { + let extension_85: any; + export { extension_85 as extension }; + export function test_11(r: any): boolean; + export { test_11 as test }; + export function parse(r: any): { + resolution: number; + format: any; + src: any; + }; +} +declare namespace ff { + let extension_86: any; + export { extension_86 as extension }; + export function test_12(r: any): any; + export { test_12 as test }; + import parse_1 = ia.parse; + export { parse_1 as parse }; +} +declare namespace ia { + let extension_87: any; + export { extension_87 as extension }; + import test_13 = ra.test; + export { test_13 as test }; + export function parse_2(r: any): { + resolution: number; + format: any; + src: any; + }; + export { parse_2 as parse }; +} +declare function Fh(r?: {}, t?: boolean): any; +declare namespace Le { + let name_78: string; + export { name_78 as name }; + export namespace vertex_9 { + let header_13: string; + export { header_13 as header }; + } + export { vertex_9 as vertex }; +} +declare namespace $e { + let name_79: string; + export { name_79 as name }; + export namespace vertex_10 { + let header_14: string; + export { header_14 as header }; + } + export { vertex_10 as vertex }; +} +declare function Ec(r: any, t: any, e: any): void; +declare function Ac(r: any, t: any, e: any, s: any): void; +declare function f_(r: any): void; +declare namespace tu { + let linear_3: number; + export { linear_3 as linear }; + let nearest_3: number; + export { nearest_3 as nearest }; +} +declare function j1(r: any): void; +declare function yT(r: any): void; +declare function ap(r: any, t: any): void; +declare function Qc(r: any, { name: t }: { + name?: string | undefined; +}, e?: boolean): any; +declare function lp(r: any, t: any): void; +declare namespace Il { + let _zIndex: number; + let sortDirty: boolean; + let sortableChildren: boolean; + let zIndex: number; + function depthOfChildModified(): void; + function sortChildren(): void; +} +declare namespace Rh { + let extension_88: any; + export { extension_88 as extension }; + export namespace cache { + export function test_14(r: any): boolean; + export { test_14 as test }; + export function getCacheableAssets_1(r: any, t: any): {}; + export { getCacheableAssets_1 as getCacheableAssets }; + } + export namespace resolver { + export function test_15(r: any): boolean; + export { test_15 as test }; + export function parse_3(r: any): { + resolution: number; + format: any; + src: any; + }; + export { parse_3 as parse }; + } + export namespace loader { + let name_80: string; + export { name_80 as name }; + export namespace extension_89 { + let type_79: any; + export { type_79 as type }; + let priority_22: any; + export { priority_22 as priority }; + } + export { extension_89 as extension }; + export function testParse(r: any, t: any): Promise; + export function parse(r: any, t: any, e: any): Promise<{ + linkedSheets: any[]; + _texture: A | null; + textureSource: any; + textures: {}; + animations: {}; + data: any; + resolution: any; + _frames: any; + _frameKeys: string[]; + _batchIndex: number; + _callback: ((value: any) => void) | null; + parse(): Promise; + _processFrames(t: any): void; + _processAnimations(): void; + _parseComplete(): void; + _nextBatch(): void; + destroy(t?: boolean): void; + }>; + export function unload(r: any, t: any, e: any): Promise; + } +} +declare function Tr(r: any, t: any, e: any, s: any, i: any, n: any): number; +declare function Jc(r: any, t: any): any; +declare function Qo(r: any): Promise; +declare function Ws(r: any): boolean; +declare function Dd(r: any): string; +declare namespace Ym { + let name_81: string; + export { name_81 as name }; + export namespace vertex_11 { + let header_15: string; + export { header_15 as header }; + let main_8: string; + export { main_8 as main }; + } + export { vertex_11 as vertex }; + export namespace fragment_4 { + let header_16: string; + export { header_16 as header }; + let main_9: string; + export { main_9 as main }; + } + export { fragment_4 as fragment }; +} +declare namespace Km { + let name_82: string; + export { name_82 as name }; + export namespace vertex_12 { + let header_17: string; + export { header_17 as header }; + let main_10: string; + export { main_10 as main }; + } + export { vertex_12 as vertex }; + export namespace fragment_5 { + let header_18: string; + export { header_18 as header }; + let main_11: string; + export { main_11 as main }; + } + export { fragment_5 as fragment }; +} +declare function Dh(r: any, t?: boolean): any; +declare namespace sp { + let name_83: string; + export { name_83 as name }; + export namespace vertex_13 { + let header_19: string; + export { header_19 as header }; + let main_12: string; + export { main_12 as main }; + } + export { vertex_13 as vertex }; + export namespace fragment_6 { + let header_20: string; + export { header_20 as header }; + let main_13: string; + export { main_13 as main }; + } + export { fragment_6 as fragment }; +} +declare namespace ip { + let name_84: string; + export { name_84 as name }; + export namespace vertex_14 { + let header_21: string; + export { header_21 as header }; + let main_14: string; + export { main_14 as main }; + } + export { vertex_14 as vertex }; + export namespace fragment_7 { + let header_22: string; + export { header_22 as header }; + let main_15: string; + export { main_15 as main }; + } + export { fragment_7 as fragment }; +} +declare namespace Bl { + function getGlobalPosition(r?: j, t?: boolean): any; + function toGlobal(r: any, t: any, e?: boolean): any; + function toLocal(r: any, t: any, e: any, s: any): any; +} +declare function xs(r: any, t: any, e: any, s: any, i: any): void; +declare function Bn(r: any, t: any, e: any, s: any, i: any, n: any, o: any): void; +declare const Ha: { + f32: string; + i32: string; + "vec2": string; + "vec3": string; + "vec4": string; + "mat2x2": string; + "mat3x3": string; + "mat4x4": string; + "mat3x2": string; + "mat4x2": string; + "mat2x3": string; + "mat4x3": string; + "mat2x4": string; + "mat3x4": string; +}; +declare const mg: any; +declare function Z(r?: string): number; +declare const se: { + type: string; + test: (r: any) => boolean; + ubo: string; + uniform: string; +}[]; +declare function L2(r: any): void; +declare function Yo(): boolean; +declare function qE(r: any, t: any): void; +declare function dr(r: any, t: any, e: any, s: any): void; +declare function t_(r: any): void; +declare function lu(r: any, t?: boolean): void; +declare function hu(r: any, t: any, e: any): void; +declare function or(r: any, t: any): any; +declare function ZE(r: any, t: any, e: any): void; +declare const OA: "8.0.0"; +declare const ei: string[]; +declare function r_(r: any, t: any): boolean; +declare const _d: "\n @in aPosition: vec2;\n @in aUV: vec2;\n\n @out @builtin(position) vPosition: vec4;\n @out vUV : vec2;\n @out vColor : vec4;\n\n {{header}}\n\n struct VSOutput {\n {{struct}}\n };\n\n @vertex\n fn main( {{in}} ) -> VSOutput {\n\n var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;\n var modelMatrix = mat3x3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n var position = aPosition;\n var uv = aUV;\n\n {{start}}\n \n vColor = vec4(1., 1., 1., 1.);\n\n {{main}}\n\n vUV = uv;\n\n var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n vPosition = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n \n vColor *= globalUniforms.uWorldColorAlpha;\n\n {{end}}\n\n {{return}}\n };\n"; +declare const bd: "\n in vec2 aPosition;\n in vec2 aUV;\n\n out vec4 vColor;\n out vec2 vUV;\n\n {{header}}\n\n void main(void){\n\n mat3 worldTransformMatrix = uWorldTransformMatrix;\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n vec2 position = aPosition;\n vec2 uv = aUV;\n \n {{start}}\n \n vColor = vec4(1.);\n \n {{main}}\n \n vUV = uv;\n \n mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n\n vColor *= uWorldColorAlpha;\n\n {{end}}\n }\n"; +declare function kE(r: any, t: any, e: any): any; +declare function Gf(r: any): any; +declare function xi(...r: any[]): void; +declare const Ei: { + "clamp-to-edge": number; + repeat: number; + "mirror-repeat": number; +}; +declare namespace Z1 { + export let MAGIC: number; + export let SIZE: number; + export let FLAGS: number; + export let HEIGHT: number; + export let WIDTH: number; + export let MIPMAP_COUNT: number; + export let PIXEL_FORMAT: number; + export let PF_FLAGS: number; + let FOURCC_1: number; + export { FOURCC_1 as FOURCC }; + export let RGB_BITCOUNT: number; + export let R_BIT_MASK: number; + export let G_BIT_MASK: number; + export let B_BIT_MASK: number; + export let A_BIT_MASK: number; +} +declare namespace Q1 { + let DXGI_FORMAT: number; + let RESOURCE_DIMENSION: number; + let MISC_FLAG: number; + let ARRAY_SIZE: number; + let MISC_FLAGS2: number; +} +declare var yf: any; +declare var Tf: any; +declare var bt: any; +declare const lT: 64; +declare const aT: number[]; +declare const dT: { + 6408: number; + 6407: number; + 33319: number; + 6403: number; + 6409: number; + 6410: number; + 6406: number; +}; +declare const fT: { + 33776: number; + 33777: number; + 33778: number; + 33779: number; + 35916: number; + 35917: number; + 35918: number; + 35919: number; + 36283: number; + 36284: number; + 36285: number; + 36286: number; + 37488: number; + 37489: number; + 37490: number; + 37491: number; + 37492: number; + 37496: number; + 37493: number; + 37497: number; + 37494: number; + 37495: number; + 37808: number; + 37840: number; + 37809: number; + 37841: number; + 37810: number; + 37842: number; + 37811: number; + 37843: number; + 37812: number; + 37844: number; + 37813: number; + 37845: number; + 37814: number; + 37846: number; + 37815: number; + 37847: number; + 37816: number; + 37848: number; + 37817: number; + 37849: number; + 37818: number; + 37850: number; + 37819: number; + 37851: number; + 37820: number; + 37852: number; + 37821: number; + 37853: number; + 36492: number; + 36493: number; + 36494: number; + 36495: number; +}; +declare const oT: { + 33776: string; + 33777: string; + 33778: string; + 33779: string; + 35916: string; + 35917: string; + 35918: string; + 35919: string; + 36283: string; + 36284: string; + 36285: string; + 36286: string; + 37488: string; + 37490: string; + 37492: string; + 37496: string; + 37493: string; + 37497: string; + 37494: string; + 37495: string; + 37808: string; + 37840: string; + 37809: string; + 37841: string; + 37810: string; + 37842: string; + 37811: string; + 37843: string; + 37812: string; + 37844: string; + 37813: string; + 37845: string; + 37814: string; + 37846: string; + 37815: string; + 37847: string; + 37816: string; + 37848: string; + 37817: string; + 37849: string; + 37818: string; + 37850: string; + 37819: string; + 37851: string; + 37820: string; + 37852: string; + 37821: string; + 37853: string; + 36492: string; + 36493: string; + 36494: string; + 36495: string; + 35907: string; + 36759: string; + 36220: string; + 36238: string; + 6408: string; +}; +declare namespace uT { + let FILE_IDENTIFIER: number; + let ENDIANNESS: number; + let GL_TYPE: number; + let GL_TYPE_SIZE: number; + let GL_FORMAT: number; + let GL_INTERNAL_FORMAT: number; + let GL_BASE_INTERNAL_FORMAT: number; + let PIXEL_WIDTH: number; + let PIXEL_HEIGHT: number; + let PIXEL_DEPTH: number; + let NUMBER_OF_ARRAY_ELEMENTS: number; + let NUMBER_OF_FACES: number; + let NUMBER_OF_MIPMAP_LEVELS: number; + let BYTES_OF_KEY_VALUE_DATA: number; +} +declare const cT: { + 5121: number; + 5123: number; + 5124: number; + 5125: number; + 5126: number; + 36193: number; +}; +declare const pT: { + 32819: number; + 32820: number; + 33635: number; +}; +declare const hT: 67305985; +export { eo as AbstractBitmapFont, Or as AbstractRenderer, fi as AbstractText, en as AccessibilitySystem, KT as AlphaFilter, pn as AlphaMask, Pa as AlphaMaskPipe, Yr as AnimatedSprite, Cp as Application, Br as Assets, mf as AssetsClass, Lh as BLEND_TO_NPM, Xr as BUFFER_TYPE, Gp as BackgroundLoader, o_ as BackgroundSystem, An as Batch, yn as BatchGeometry, En as BatchTextureArray, vs as BatchableGraphics, ws as BatchableMesh, Rs as BatchableSprite, Pn as Batcher, Aa as BatcherPipe, H as BigPool, Lt as BindGroup, Pu as BindGroupSystem, bo as BitmapFont, Pr as BitmapFontManager, zm as BitmapText, Go as BitmapTextPipe, NT as BlendModeFilter, fu as BlendModePipe, um as BlurFilter, oi as BlurFilterPass, lt as Bounds, nh as BrowserAdapter, _t as Buffer, cs as BufferImageSource, yi as BufferResource, $ as BufferUsage, pt as CLEAR, Y as Cache, jt as CanvasPool, lc as CanvasPoolClass, Qt as CanvasSource, It as CanvasTextMetrics, qn as CanvasTextPipe, to as CanvasTextSystem, Ii as Circle, W as Color, fn as ColorMask, wa as ColorMaskPipe, pS as ColorMatrixFilter, Fr as CompressedSource, V as Container, If as Culler, Bf as CullerPlugin, nu as CustomRenderPipe, MA as DATA_URI, I as DDS, Tl as DEG_TO_RAD, Xu as DEPRECATED_SCALE_MODES, Hu as DEPRECATED_WRAP_MODES, X as DOMAdapter, DE as DRAW_MODES, ft as DXGI_TO_TEXTURE_FORMAT, vS as DisplacementFilter, go as DynamicBitmapFont, Bi as Ellipse, eh as EventBoundary, ct as EventEmitter, on as EventSystem, zt as EventsTicker, v as ExtensionType, l_ as ExtractSystem, la as FOURCC_TO_TEXTURE_FORMAT, ih as FederatedContainer, Ke as FederatedEvent, ur as FederatedMouseEvent, At as FederatedPointerEvent, he as FederatedWheelEvent, Ms as FillGradient, Jn as FillPattern, Yt as Filter, ts as FilterEffect, zo as FilterPipe, Vo as FilterSystem, Rr as FontStylePromiseCache, ma as GAUSSIAN_VALUES, bi as GL_FORMATS, Af as GL_INTERNAL_FORMAT, Ia as GL_TARGETS, N as GL_TYPES, ig as GL_WRAP_MODES, xu as GenerateTextureSystem, Oe as Geometry, hg as GlBackBufferSystem, Sa as GlBatchAdaptor, Qm as GlBuffer, Ma as GlBufferSystem, Da as GlColorMaskSystem, rg as GlContextSystem, Ua as GlEncoderSystem, Ba as GlGeometrySystem, su as GlGraphicsAdaptor, iu as GlMeshAdaptor, Rt as GlProgram, Rg as GlProgramData, cg as GlRenderTarget, xg as GlRenderTargetAdaptor, Va as GlRenderTargetSystem, Za as GlShaderSystem, Hg as GlStateSystem, ka as GlStencilSystem, Xg as GlTexture, ru as GlTextureSystem, Xa as GlUboSystem, Qa as GlUniformGroupSystem, bu as GlobalUniformSystem, Ea as GpuBatchAdaptor, vt as GpuBlendModesToPixi, wu as GpuBufferSystem, Ru as GpuColorMaskSystem, Pi as GpuDeviceSystem, Mu as GpuEncoderSystem, $u as GpuGraphicsAdaptor, ec as GpuGraphicsContext, Nu as GpuMeshAdapter, $_ as GpuMipmapGenerator, Tt as GpuProgram, gE as GpuReadBuffer, F_ as GpuRenderTarget, D_ as GpuRenderTargetAdaptor, Bu as GpuRenderTargetSystem, Fu as GpuShaderSystem, Du as GpuStateSystem, re as GpuStencilModesToPixi, Ou as GpuStencilSystem, Lu as GpuTextureSystem, Cu as GpuUboSystem, Gu as GpuUniformBatchPipe, qe as Graphics, Bt as GraphicsContext, rc as GraphicsContextRenderData, Ps as GraphicsContextSystem, ne as GraphicsPath, Wn as GraphicsPipe, jm as HTMLText, Io as HTMLTextPipe, Do as HTMLTextRenderData, Pe as HTMLTextStyle, Xs as HTMLTextSystem, Ai as HelloSystem, y2 as IGLUniformData, ge as ImageSource, Yi as InstructionSet, tt as KTX, Xp as Loader, gt as LoaderParserPriority, wt as MAX_TEXTURES, j_ as MSAA_QUALITY, rs as MaskEffectManager, Al as MaskEffectManagerClass, wm as MaskFilter, G as Matrix, $r as Mesh, Jt as MeshGeometry, Kn as MeshPipe, oA as MeshPlane, mA as MeshRope, TA as MeshSimple, un as NOOP, te as NineSliceGeometry, wA as NineSlicePlane, fx as NineSliceSprite, Xo as NineSliceSpritePipe, PS as NoiseFilter, rt as ObservablePoint, vl as PI_2, Iu as PipelineSystem, Ho as PlaneGeometry, j as Point, Ae as Polygon, es as Pool, El as PoolGroupClass, Mm as PrepareBase, Xm as PrepareQueue, Wm as PrepareSystem, Vm as PrepareUpload, op as QuadGeometry, yl as RAD_TO_DEG, z as Rectangle, YE as RenderContainer, Fl as RenderGroup, au as RenderGroupPipe, cu as RenderGroupSystem, vi as RenderTarget, ja as RenderTargetSystem, h_ as RenderTexture, xt as RendererType, rn as ResizePlugin, qt as Resolver, rx as RopeGeometry, Fi as RoundedRectangle, $E as SCALE_MODES, st as STENCIL_MODES, Mc as SVGParser, xc as SVGToGraphicsPath, YS as ScissorMask, Id as SdfShader, St as Shader, De as ShaderStage, Pc as ShapePath, Au as SharedRenderPipes, Eu as SharedSystems, Ft as Sprite, du as SpritePipe, cn as Spritesheet, Ct as State, mn as StencilMask, Ra as StencilMaskPipe, Ko as SystemRunner, Sf as TEXTURE_FORMAT_BLOCK_SIZE, Ta as Text, Wt as TextStyle, A as Texture, Tu as TextureGCSystem, hn as TextureMatrix, ut as TexturePool, dc as TexturePoolClass, et as TextureSource, xh as TextureStyle, NE as TextureUvs, ht as Ticker, us as TickerListener, sn as TickerPlugin, Lm as TilingSprite, No as TilingSpritePipe, np as TilingSpriteShader, Bm as Transform, Qu as Triangle, kg as UNIFORM_TO_ARRAY_SETTERS, Ug as UNIFORM_TO_SINGLE_SETTERS, Qi as UPDATE_BLEND, ns as UPDATE_COLOR, Xt as UPDATE_PRIORITY, xb as UPDATE_TRANSFORM, ar as UPDATE_VISIBLE, P_ as UboBatch, La as UboSystem, it as UniformGroup, vu as VERSION, pr as VideoSource, y_ as ViewSystem, Tn as ViewableBuffer, jr as WGSL_ALIGN_SIZE_DATA, $a as WGSL_TO_STD40_SIZE, LE as WRAP_MODES, A_ as WebGLRenderer, z_ as WebGPURenderer, ea as WorkerManager, Vi as _getGlobalBounds, jo as _getGlobalBoundsRecursive, Jl as accessibilityTarget, Ao as addBits, ps as addMaskBounds, fs as addMaskLocalBounds, Kc as addProgramDefines, Vf as alphaFrag, pa as alphaWgsl, up as applyMatrix, eu as applyStyleParams, Dl as assignWithIgnore, vp as autoDetectEnvironment, wp as autoDetectRenderer, Bh as autoDetectSource, Js as basisTranscoderUrls, Ns as batchSamplersUniformGroup, Hc as bitmapFontCachePlugin, Is as bitmapFontTextParser, vo as bitmapFontXMLParser, yo as bitmapFontXMLStringParser, Lf as blendTemplateFrag, $f as blendTemplateVert, Nf as blendTemplateWgsl, Uu as blockDataMap, tm as blurTemplateWgsl, kt as boundsPool, FT as browserExt, io as buildAdaptiveBezier, vc as buildAdaptiveQuadratic, ao as buildArc, yc as buildArcTo, Sc as buildArcToSvg, _e as buildCircle, Jh as buildContextBatches, JE as buildGeometryFromPath, qm as buildInstructions, Wh as buildLine, Fn as buildPolygon, Dn as buildRectangle, Rn as buildSimpleUvs, Un as buildTriangle, wn as buildUvs, Ip as cacheTextureArray, bg as calculateProjection, Wi as checkChildrenDidChange, Se as checkDataUrl, Mt as checkExtension, Sl as childrenHelperMixin, zh as closePointEps, Hr as collectAllRenderables, uu as collectRenderGroups, xr as color32BitToUniform, Us as colorBit, ks as colorBitGl, lm as colorMatrixFilterFrag, _a as colorMatrixFilterWgsl, Yv as colorToUniform, Yg as compareModeToGlCompare, pd as compileHighShader, fd as compileHighShaderGl, ke as compileHighShaderGlProgram, Ue as compileHighShaderGpuProgram, Po as compileHooks, wo as compileInputs, dd as compileOutputs, Wa as compileShader, Vt as convertFillInputToFillStyle, ET as convertFormatIfRequired, Pt as convertToList, ls as copySearchParams, br as createIdFromString, Y1 as createLevelBuffers, AT as createLevelBuffersFromKTX, uh as createStringVariations, ee as createTexture, dg as createUboElementsSTD40, O_ as createUboElementsWGSL, Na as createUboSyncFunction, _g as createUboSyncFunctionSTD40, G_ as createUboSyncFunctionWGSL, hf as crossOrigin, bl as cullingMixin, On as curveEps, ii as defaultFilterVert, Ka as defaultValue, Zt as definedProps, CA as deprecation, Bp as detectAvif, X1 as detectBasis, GT as detectCompressed, Dp as detectDefaults, Up as detectMp4, kp as detectOgv, _n as detectVideoAlphaMode, Lp as detectWebm, $p as detectWebp, df as determineCrossOrigin, dm as displacementFrag, pm as displacementVert, xa as displacementWgsl, Qh as earcut, Pl as effectsMixin, Ga as ensureAttributes, vn as ensureIsBuffer, mi as ensureOptions, qc as ensurePrecision, RA as ensureTextStyle, ou as executeInstructions, D as extensions, Cg as extractAttributesFromGlProgram, nd as extractAttributesFromGpuProgram, Nd as extractFontFamilies, Ds as extractStructAndGroups, _s as fastCopy, ld as findHooksRx, wl as findMixin, vr as fontStringFromTextStyle, zS as formatShader, xd as fragmentGPUTemplate, vd as fragmentGlTemplate, gg as generateArraySyncSTD40, C_ as generateArraySyncWGSL, Zf as generateBlurFragSource, Jf as generateBlurGlProgram, em as generateBlurProgram, Qf as generateBlurVertSource, HS as generateGPULayout, od as generateGpuLayoutGroups, XS as generateLayout, ad as generateLayoutHash, Dg as generateProgram, wg as generateShaderSyncCode, po as generateTextStyleKey, Ls as generateTextureBatchBit, $s as generateTextureBatchBitGl, XE as generateUID, Lg as generateUniformsSync, Sn as getAdjustedBlendModeBlend, Fe as getAttributeInfoFromFormat, _o as getBitmapTextLayout, mc as getCanvasBoundingBox, yr as getCanvasFillStyle, za as getCanvasTexture, ic as getDefaultUniformValue, xp as getFastGlobalBounds, Xd as getFontCss, Yp as getFontFamilyName, Uh as getGeometryBounds, og as getGlTypeFromFormat, nr as getGlobalBounds, bp as getGlobalRenderableBounds, is as getLocalBounds, dn as getMatrixRelativeToParent, Yc as getMaxFragmentPrecision, jh as getOrientationOfPoints, Ol as getParent, Zn as getPo2TextureFromSource, Ys as getResolutionOfUrl, zd as getSVGUrl, ua as getSupportedCompressedTextureFormats, oa as getSupportedGPUCompressedTextureFormats, na as getSupportedGlCompressedTextureFormats, Dr as getSupportedTextureFormats, jd as getTemporaryCanvasFromImage, Wc as getTestContext, gs as getTextureBatchBindGroup, SA as getTextureDefaultMatrix, RT as getTextureFormatFromKTXTexture, Gg as getUboData, Ig as getUniformData, ch as getUrlExtension, Cf as glFormatToGPUFormat, zg as glUploadBufferImageResource, jg as glUploadCompressedTextureResource, Ja as glUploadImageResource, Vg as glUploadVideoResource, yd as globalUniformsBit, Td as globalUniformsBitGl, hy as globalUniformsUBOBitGl, q1 as gpuFormatToBasisTranscoderFormat, OT as gpuFormatToKTXBasisTranscoderFormat, U_ as gpuUploadBufferImageResource, k_ as gpuUploadCompressedTextureResource, ku as gpuUploadImageResource, L_ as gpuUploadVideoResource, U as groupD8, _2 as hasCachedCanvasTexture, IS as hslWgsl, HT as hslgl, XT as hslgpu, Ro as injectBits, Zc as insertVersion, ql as isMobile, ln as isPow2, Tg as isRenderingToScreen, Fd as isSafari, cr as isSingleItem, Cr as isWebGLSupported, Gr as isWebGPUSupported, ti as ktxTranscoderUrls, W1 as loadBasis, vf as loadBasisOnWorker, Xc as loadBitmapFont, sT as loadDDS, Hd as loadFontAsBase64, Uo as loadFontCSS, nf as loadImageBitmap, zp as loadJson, bT as loadKTX, ST as loadKTX2, Mf as loadKTX2onWorker, Vd as loadSVGImage, Jp as loadSvg, ra as loadTextures, jp as loadTxt, pf as loadVideoTextures, Kp as loadWebFont, Ne as localUniformBit, zs as localUniformBitGl, rp as localUniformBitGroup2, Md as localUniformMSDFBit, Od as localUniformMSDFBitGl, Vb as log2, GA as logDebugTexture, Fg as logProgramError, vx as logRenderGroupScene, bx as logScene, Cd as mSDFBit, Gd as mSDFBitGl, Kg as mapFormatToGlFormat, Qg as mapFormatToGlInternalFormat, Jg as mapFormatToGlType, Og as mapGlToVertexFormat, A2 as mapSize, qa as mapType, $g as mapWebGLBlendModesToPixi, Tm as maskFrag, Sm as maskVert, ya as maskWgsl, Ut as matrixPool, ko as measureHtmlText, Cl as measureMixin, S2 as migrateFragmentFromV7toV8, Wg as mipmapScaleModeToGlFilter, bs as mixColors, Mn as mixHexColors, Pv as mixStandardAnd32BitColors, KE as multiplyHexColors, me as nextPow2, _m as noiseFrag, ba as noiseWgsl, _f as nonCompressedFormats, rr as normalizeExtensionPriority, Bo as nssvg, Fo as nsxhtml, Gl as onRenderMixin, Ef as parseDDS, zE as parseFunctionBody, Pf as parseKTX, dt as path, cf as preloadVideo, ji as removeItems, ud as removeStructAndGroupDuplicates, mb as resetUids, mo as resolveCharacters, CT as resolveCompressedTextureUrl, ff as resolveJsonUrl, ia as resolveTextureUrl, Fh as resourceToTexture, Le as roundPixelsBit, $e as roundPixelsBitGl, Ec as roundedShapeArc, Ac as roundedShapeQuadraticCurve, f_ as sayHello, tu as scaleModeToGlFilter, j1 as setBasisTranscoderPath, yT as setKTXTranscoderPath, ap as setPositions, Qc as setProgramName, lp as setUvs, Il as sortMixin, Rh as spritesheetAsset, Tr as squaredDistanceToLineSegment, Jc as stripVersion, Qo as testImageFormat, Ws as testVideoFormat, Dd as textStyleToCSS, Ym as textureBit, Km as textureBitGl, Dh as textureFrom, sp as tilingBit, ip as tilingBitGl, Bl as toLocalGlobalMixin, xs as transformVertices, Bn as triangulateWithHoles, Ha as uboSyncFunctionsSTD40, mg as uboSyncFunctionsWGSL, Z as uid, se as uniformParsers, L2 as unpremultiplyAlpha, Yo as unsafeEvalSupported, qE as updateLocalTransform, dr as updateQuadBounds, t_ as updateRenderGroupTransform, lu as updateRenderGroupTransforms, hu as updateTransformAndChildren, or as updateTransformBackwards, ZE as updateWorldTransform, OA as v8_0_0, ei as validFormats, r_ as validateRenderables, _d as vertexGPUTemplate, bd as vertexGlTemplate, kE as viewportFromFrame, Gf as vkFormatToGPUFormat, xi as warn, Ei as wrapModeToGlAddress }; diff --git a/src/pixi/pixi.mjs b/src/pixi/pixi.mjs new file mode 100644 index 0000000..df8f568 --- /dev/null +++ b/src/pixi/pixi.mjs @@ -0,0 +1,1996 @@ +/*! + * PixiJS - v8.0.5 + * Compiled Tue, 02 Apr 2024 16:14:29 UTC + * + * PixiJS is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */var Yx=Object.defineProperty,Kx=Object.defineProperties,qx=Object.getOwnPropertyDescriptors,sl=Object.getOwnPropertySymbols,Zx=Object.prototype.hasOwnProperty,Qx=Object.prototype.propertyIsEnumerable,il=(r,t,e)=>t in r?Yx(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,nl=(r,t)=>{for(var e in t||(t={}))Zx.call(t,e)&&il(r,e,t[e]);if(sl)for(var e of sl(t))Qx.call(t,e)&&il(r,e,t[e]);return r},Jx=(r,t)=>Kx(r,qx(t)),v=(r=>(r.Application="application",r.WebGLPipes="webgl-pipes",r.WebGLPipesAdaptor="webgl-pipes-adaptor",r.WebGLSystem="webgl-system",r.WebGPUPipes="webgpu-pipes",r.WebGPUPipesAdaptor="webgpu-pipes-adaptor",r.WebGPUSystem="webgpu-system",r.CanvasSystem="canvas-system",r.CanvasPipesAdaptor="canvas-pipes-adaptor",r.CanvasPipes="canvas-pipes",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r.MaskEffect="mask-effect",r.BlendMode="blend-mode",r.TextureSource="texture-source",r.Environment="environment",r))(v||{});const Ui=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){const t=typeof r.extension!="object"?{type:r.extension}:r.extension;r=Jx(nl({},t),{ref:r})}if(typeof r=="object")r=nl({},r);else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},rr=(r,t)=>{var e;return(e=Ui(r).priority)!=null?e:t},D={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Ui).forEach(t=>{t.type.forEach(e=>{var s,i;return(i=(s=this._removeHandlers)[e])==null?void 0:i.call(s,t)})}),this},add(...r){return r.map(Ui).forEach(t=>{t.type.forEach(e=>{var s,i;const n=this._addHandlers,o=this._queue;n[e]?(i=n[e])==null||i.call(n,t):(o[e]=o[e]||[],(s=o[e])==null||s.push(t))})}),this},handle(r,t,e){var s;const i=this._addHandlers,n=this._removeHandlers;i[r]=t,n[r]=e;const o=this._queue;return o[r]&&((s=o[r])==null||s.forEach(a=>t(a)),delete o[r]),this},handleByMap(r,t){return this.handle(r,e=>{e.name&&(t[e.name]=e.ref)},e=>{e.name&&delete t[e.name]})},handleByNamedList(r,t,e=-1){return this.handle(r,s=>{t.findIndex(i=>i.name===s.name)>=0||(t.push({name:s.name,value:s.ref}),t.sort((i,n)=>rr(n.value,e)-rr(i.value,e)))},s=>{const i=t.findIndex(n=>n.name===s.name);i!==-1&&t.splice(i,1)})},handleByList(r,t,e=-1){return this.handle(r,s=>{t.includes(s.ref)||(t.push(s.ref),t.sort((i,n)=>rr(n,e)-rr(i,e)))},s=>{const i=t.indexOf(s.ref);i!==-1&&t.splice(i,1)})}};var NA=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ki(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function HA(r){return r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function XA(r){return r&&Object.prototype.hasOwnProperty.call(r,"default")&&Object.keys(r).length===1?r.default:r}function zA(r){if(r.__esModule)return r;var t=r.default;if(typeof t=="function"){var e=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),e}var Li={exports:{}},jA=Li.exports;(function(r){"use strict";var t=Object.prototype.hasOwnProperty,e="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(e=!1));function i(u,l,h){this.fn=u,this.context=l,this.once=h||!1}function n(u,l,h,c,d){if(typeof h!="function")throw new TypeError("The listener must be a function");var p=new i(h,c||u,d),f=e?e+l:l;return u._events[f]?u._events[f].fn?u._events[f]=[u._events[f],p]:u._events[f].push(p):(u._events[f]=p,u._eventsCount++),u}function o(u,l){--u._eventsCount===0?u._events=new s:delete u._events[l]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],h,c;if(this._eventsCount===0)return l;for(c in h=this._events)t.call(h,c)&&l.push(e?c.slice(1):c);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(h)):l},a.prototype.listeners=function(l){var h=e?e+l:l,c=this._events[h];if(!c)return[];if(c.fn)return[c.fn];for(var d=0,p=c.length,f=new Array(p);d0:typeof r=="number"},nt=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*r)/e+0},Et=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),r>e?e:r>t?r:t},ol=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},al=function(r){return{r:Et(r.r,0,255),g:Et(r.g,0,255),b:Et(r.b,0,255),a:Et(r.a)}},$i=function(r){return{r:nt(r.r),g:nt(r.g),b:nt(r.b),a:nt(r.a,3)}},rb=/^#([0-9a-f]{3,8})$/i,Qr=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},ul=function(r){var t=r.r,e=r.g,s=r.b,i=r.a,n=Math.max(t,e,s),o=n-Math.min(t,e,s),a=o?n===t?(e-s)/o:n===e?2+(s-t)/o:4+(t-e)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:i}},ll=function(r){var t=r.h,e=r.s,s=r.v,i=r.a;t=t/360*6,e/=100,s/=100;var n=Math.floor(t),o=s*(1-e),a=s*(1-(t-n)*e),u=s*(1-(1-t+n)*e),l=n%6;return{r:255*[s,a,o,o,u,s][l],g:255*[u,s,s,a,o,o][l],b:255*[o,o,u,s,s,a][l],a:i}},hl=function(r){return{h:ol(r.h),s:Et(r.s,0,100),l:Et(r.l,0,100),a:Et(r.a)}},cl=function(r){return{h:nt(r.h),s:nt(r.s),l:nt(r.l),a:nt(r.a,3)}},dl=function(r){return ll((e=(t=r).s,{h:t.h,s:(e*=((s=t.l)<50?s:100-s)/100)>0?2*e/(s+e)*100:0,v:s+e,a:t.a}));var t,e,s},sr=function(r){return{h:(t=ul(r)).h,s:(i=(200-(e=t.s))*(s=t.v)/100)>0&&i<200?e*s/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,e,s,i},sb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ib=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ob=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ni={string:[[function(r){var t=rb.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?nt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?nt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=nb.exec(r)||ob.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:al({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(r){var t=sb.exec(r)||ib.exec(r);if(!t)return null;var e,s,i=hl({h:(e=t[1],s=t[2],s===void 0&&(s="deg"),Number(e)*(eb[s]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return dl(i)},"hsl"]],object:[[function(r){var t=r.r,e=r.g,s=r.b,i=r.a,n=i===void 0?1:i;return Nt(t)&&Nt(e)&&Nt(s)?al({r:Number(t),g:Number(e),b:Number(s),a:Number(n)}):null},"rgb"],[function(r){var t=r.h,e=r.s,s=r.l,i=r.a,n=i===void 0?1:i;if(!Nt(t)||!Nt(e)||!Nt(s))return null;var o=hl({h:Number(t),s:Number(e),l:Number(s),a:Number(n)});return dl(o)},"hsl"],[function(r){var t=r.h,e=r.s,s=r.v,i=r.a,n=i===void 0?1:i;if(!Nt(t)||!Nt(e)||!Nt(s))return null;var o=function(a){return{h:ol(a.h),s:Et(a.s,0,100),v:Et(a.v,0,100),a:Et(a.a)}}({h:Number(t),s:Number(e),v:Number(s),a:Number(n)});return ll(o)},"hsv"]]},pl=function(r,t){for(var e=0;e=.5},r.prototype.toHex=function(){return t=$i(this.rgba),e=t.r,s=t.g,i=t.b,o=(n=t.a)<1?Qr(nt(255*n)):"","#"+Qr(e)+Qr(s)+Qr(i)+o;var t,e,s,i,n,o},r.prototype.toRgb=function(){return $i(this.rgba)},r.prototype.toRgbString=function(){return t=$i(this.rgba),e=t.r,s=t.g,i=t.b,(n=t.a)<1?"rgba("+e+", "+s+", "+i+", "+n+")":"rgb("+e+", "+s+", "+i+")";var t,e,s,i,n},r.prototype.toHsl=function(){return cl(sr(this.rgba))},r.prototype.toHslString=function(){return t=cl(sr(this.rgba)),e=t.h,s=t.s,i=t.l,(n=t.a)<1?"hsla("+e+", "+s+"%, "+i+"%, "+n+")":"hsl("+e+", "+s+"%, "+i+"%)";var t,e,s,i,n},r.prototype.toHsv=function(){return t=ul(this.rgba),{h:nt(t.h),s:nt(t.s),v:nt(t.v),a:nt(t.a,3)};var t},r.prototype.invert=function(){return Dt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},r.prototype.saturate=function(t){return t===void 0&&(t=.1),Dt(Hi(this.rgba,t))},r.prototype.desaturate=function(t){return t===void 0&&(t=.1),Dt(Hi(this.rgba,-t))},r.prototype.grayscale=function(){return Dt(Hi(this.rgba,-1))},r.prototype.lighten=function(t){return t===void 0&&(t=.1),Dt(ml(this.rgba,t))},r.prototype.darken=function(t){return t===void 0&&(t=.1),Dt(ml(this.rgba,-t))},r.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},r.prototype.alpha=function(t){return typeof t=="number"?Dt({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):nt(this.rgba.a,3);var e},r.prototype.hue=function(t){var e=sr(this.rgba);return typeof t=="number"?Dt({h:t,s:e.s,l:e.l,a:e.a}):nt(e.h)},r.prototype.isEqual=function(t){return this.toHex()===Dt(t).toHex()},r}(),Dt=function(r){return r instanceof Jr?r:new Jr(r)},gl=[],ab=function(r){r.forEach(function(t){gl.indexOf(t)<0&&(t(Jr,Ni),gl.push(t))})},WA=function(){return new Jr({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};function ub(r,t){var e={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},s={};for(var i in e)s[e[i]]=i;var n={};r.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,u,l=s[this.toHex()];if(l)return l;if(o!=null&&o.closest){var h=this.toRgb(),c=1/0,d="black";if(!n.length)for(var p in e)n[p]=new r(e[p]).toRgb();for(var f in e){var g=(a=h,u=n[f],Math.pow(a.r-u.r,2)+Math.pow(a.g-u.g,2)+Math.pow(a.b-u.b,2));gt in r?lb(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,db=(r,t)=>{for(var e in t||(t={}))hb.call(t,e)&&xl(r,e,t[e]);if(_l)for(var e of _l(t))cb.call(t,e)&&xl(r,e,t[e]);return r};ab([ub]);const we=class Vr{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof Vr)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._normalize(t),this._value=this._cloneSource(t))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?db({},t):t}_isSourceEqual(t,e){const s=typeof t;if(s!==typeof e)return!1;if(s==="number"||s==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?!1:t.every((i,n)=>i===e[n]);if(t!==null&&e!==null){const i=Object.keys(t),n=Object.keys(e);return i.length!==n.length?!1:i.every(o=>t[o]===e[o])}return t===e}toRgba(){const[t,e,s,i]=this._components;return{r:t,g:e,b:s,a:i}}toRgb(){const[t,e,s]=this._components;return{r:t,g:e,b:s}}toRgbaString(){const[t,e,s]=this.toUint8RgbArray();return`rgba(${t},${e},${s},${this.alpha})`}toUint8RgbArray(t){const[e,s,i]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t=t||this._arrayRgb,t[0]=Math.round(e*255),t[1]=Math.round(s*255),t[2]=Math.round(i*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t=t||this._arrayRgba;const[e,s,i,n]=this._components;return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t=t||this._arrayRgb;const[e,s,i]=this._components;return t[0]=e,t[1]=s,t[2]=i,t}toNumber(){return this._int}toBgrNumber(){const[t,e,s]=this.toUint8RgbArray();return(s<<16)+(e<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[e,s,i,n]=Vr._temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=s,this._components[2]*=i,this._components[3]*=n,this._refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=!0){if(t===1)return(255<<24)+this._int;if(t===0)return e?0:this._int;let s=this._int>>16&255,i=this._int>>8&255,n=this._int&255;return e&&(s=s*t+.5|0,i=i*t+.5|0,n=n*t+.5|0),(t*255<<24)+(s<<16)+(i<<8)+n}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(t){return this._components[3]=this._clamp(t),this}_normalize(t){let e,s,i,n;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const o=t;e=(o>>16&255)/255,s=(o>>8&255)/255,i=(o&255)/255,n=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[e,s,i,n=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[e,s,i,n=255]=t,e/=255,s/=255,i/=255,n/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const a=Vr.HEX_PATTERN.exec(t);a&&(t=`#${a[2]}`)}const o=Dt(t);o.isValid()&&({r:e,g:s,b:i,a:n}=o.rgba,e/=255,s/=255,i/=255)}if(e!==void 0)this._components[0]=e,this._components[1]=s,this._components[2]=i,this._components[3]=n,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,e,s]=this._components;this._int=(t*255<<16)+(e*255<<8)+(s*255|0)}_clamp(t,e=0,s=1){return typeof t=="number"?Math.min(Math.max(t,e),s):(t.forEach((i,n)=>{t[n]=Math.min(Math.max(i,e),s)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Vr||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};we.shared=new we,we._temp=new we,we.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let W=we;const bl={cullArea:null,cullable:!1,cullableChildren:!0},vl=Math.PI*2,yl=180/Math.PI,Tl=Math.PI/180;class j{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e}clone(){return new j(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}static get shared(){return zi.x=0,zi.y=0,zi}}const zi=new j;class G{constructor(t=1,e=0,s=0,i=1,n=0,o=0){this.array=null,this.a=t,this.b=e,this.c=s,this.d=i,this.tx=n,this.ty=o}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,e,s,i,n,o){return this.a=t,this.b=e,this.c=s,this.d=i,this.tx=n,this.ty=o,this}toArray(t,e){this.array||(this.array=new Float32Array(9));const s=e||this.array;return t?(s[0]=this.a,s[1]=this.b,s[2]=0,s[3]=this.c,s[4]=this.d,s[5]=0,s[6]=this.tx,s[7]=this.ty,s[8]=1):(s[0]=this.a,s[1]=this.c,s[2]=this.tx,s[3]=this.b,s[4]=this.d,s[5]=this.ty,s[6]=0,s[7]=0,s[8]=1),s}apply(t,e){e=e||new j;const s=t.x,i=t.y;return e.x=this.a*s+this.c*i+this.tx,e.y=this.b*s+this.d*i+this.ty,e}applyInverse(t,e){e=e||new j;const s=this.a,i=this.b,n=this.c,o=this.d,a=this.tx,u=this.ty,l=1/(s*o+n*-i),h=t.x,c=t.y;return e.x=o*l*h+-n*l*c+(u*n-a*o)*l,e.y=s*l*c+-i*l*h+(-u*s+a*i)*l,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){const e=Math.cos(t),s=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*s,this.b=i*s+this.b*e,this.c=n*e-this.d*s,this.d=n*s+this.d*e,this.tx=o*e-this.ty*s,this.ty=o*s+this.ty*e,this}append(t){const e=this.a,s=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*s+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*s+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*s+t.ty*n+this.ty,this}appendFrom(t,e){const s=t.a,i=t.b,n=t.c,o=t.d,a=t.tx,u=t.ty,l=e.a,h=e.b,c=e.c,d=e.d;return this.a=s*l+i*c,this.b=s*h+i*d,this.c=n*l+o*c,this.d=n*h+o*d,this.tx=a*l+u*c+e.tx,this.ty=a*h+u*d+e.ty,this}setTransform(t,e,s,i,n,o,a,u,l){return this.a=Math.cos(a+l)*n,this.b=Math.sin(a+l)*n,this.c=-Math.sin(a-u)*o,this.d=Math.cos(a-u)*o,this.tx=t-(s*this.a+i*this.c),this.ty=e-(s*this.b+i*this.d),this}prepend(t){const e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const s=this.a,i=this.c;this.a=s*t.a+this.b*t.c,this.b=s*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this}decompose(t){const e=this.a,s=this.b,i=this.c,n=this.d,o=t.pivot,a=-Math.atan2(-i,n),u=Math.atan2(s,e),l=Math.abs(a+u);return l<1e-5||Math.abs(vl-l)<1e-5?(t.rotation=u,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=u),t.scale.x=Math.sqrt(e*e+s*s),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx+(o.x*e+o.y*i),t.position.y=this.ty+(o.x*s+o.y*n),t}invert(){const t=this.a,e=this.b,s=this.c,i=this.d,n=this.tx,o=t*i-e*s;return this.a=i/o,this.b=-e/o,this.c=-s/o,this.d=t/o,this.tx=(s*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new G;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}static get IDENTITY(){return fb.identity()}static get shared(){return pb.identity()}}const pb=new G,fb=new G;class rt{constructor(t,e,s){this._x=e||0,this._y=s||0,this._observer=t}clone(t){return new rt(t!=null?t:this._observer,this._x,this._y)}set(t=0,e=t){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}const ir={default:-1};function Z(r="default"){return ir[r]===void 0&&(ir[r]=-1),++ir[r]}function mb(){for(const r in ir)delete ir[r]}function ji(r,t,e){const s=r.length;let i;if(t>=s||e===0)return;e=t+e>s?s-t:e;const n=s-e;for(i=t;i0&&s<=e){for(let n=e-1;n>=r;n--){const o=this.children[n];o&&(this.renderGroup&&this.renderGroup.removeChild(o),i.push(o),o.parent=null)}ji(this.children,r,e);for(let n=0;n=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]},setChildIndex(r,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(r),this.addChildAt(r,t)},getChildIndex(r){const t=this.children.indexOf(r);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(r,t){const{children:e}=this;if(t<0||t>e.length)throw new Error(`${r}addChildAt: The index ${t} supplied is out of bounds ${e.length}`);if(r.parent){const s=r.parent.children.indexOf(r);if(r.parent===this&&s===t)return r;s!==-1&&r.parent.children.splice(s,1)}return t===e.length?e.push(r):e.splice(t,0,r),r.parent=this,r.didChange=!0,r.didViewUpdate=!1,r._updateFlags=15,this.renderGroup&&this.renderGroup.addChild(r),this.sortableChildren&&(this.sortDirty=!0),this.emit("childAdded",r,this,t),r.emit("added",this),r},swapChildren(r,t){if(r===t)return;const e=this.getChildIndex(r),s=this.getChildIndex(t);this.children[e]=t,this.children[s]=r},removeFromParent(){var r;(r=this.parent)==null||r.removeChild(this)}};class ts{constructor(t){this.pipe="filter",this.priority=1,this.filters=t==null?void 0:t.filters,this.filterArea=t==null?void 0:t.filterArea}destroy(){for(let t=0;t0?s=this._pool[--this._index]:s=new this._classType,(e=s.init)==null||e.call(s,t),s}return(t){var e;(e=t.reset)==null||e.call(t),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}}class El{constructor(){this._poolsByClass=new Map}prepopulate(t,e){this.getPool(t).prepopulate(e)}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new es(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(e=>{const s=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[s]={free:e.totalFree,used:e.totalUsed,size:e.totalSize}}),t}}const H=new El;class Al{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let e=0;et.priority-e.priority),this.renderGroup&&(this.renderGroup.structureDidChange=!0),this._updateIsSimple())},removeEffect(r){const t=this.effects.indexOf(r);t!==-1&&(this.effects.splice(t,1),!this.isRenderGroupRoot&&this.renderGroup&&(this.renderGroup.structureDidChange=!0),this._updateIsSimple())},set mask(r){if(this._mask||(this._mask={mask:null,effect:null}),this._mask.mask===r||(this._mask.effect&&(this.removeEffect(this._mask.effect),rs.returnMaskEffect(this._mask.effect),this._mask.effect=null),this._mask.mask=r,r==null))return;const t=rs.getMaskEffect(r);this._mask.effect=t,this.addEffect(t)},get mask(){var r;return(r=this._mask)==null?void 0:r.mask},set filters(r){!Array.isArray(r)&&r&&(r=[r]),r=r,this._filters||(this._filters={filters:null,effect:null,filterArea:null});const t=(r==null?void 0:r.length)>0,e=this._filters.effect&&!t||!this._filters.effect&&t;if(r=Array.isArray(r)?r.slice(0):r,this._filters.filters=Object.freeze(r),e)if(t){const s=H.get(ts);this._filters.effect=s,this.addEffect(s)}else{const s=this._filters.effect;this.removeEffect(s),s.filterArea=null,s.filters=null,this._filters.effect=null,H.return(s)}t&&(this._filters.effect.filters=r,this._filters.effect.filterArea=this.filterArea)},get filters(){var r;return(r=this._filters)==null?void 0:r.filters},set filterArea(r){this._filters||(this._filters={filters:null,effect:null,filterArea:null}),this._filters.filterArea=r},get filterArea(){var r;return(r=this._filters)==null?void 0:r.filterArea}},wl={label:null,get name(){return this.label},set name(r){this.label=r},getChildByName(r,t=!1){return this.getChildByLabel(r,t)},getChildByLabel(r,t=!1){const e=this.children;for(let s=0;s=this.x&&t=this.y&&e=u&&t<=l&&e>=h&&e<=c&&!(t>d&&tf&&et.right?t.right:this.right)<=w)return!1;const T=this.yt.bottom?t.bottom:this.bottom)>T}const s=this.left,i=this.right,n=this.top,o=this.bottom;if(i<=s||o<=n)return!1;const a=ss[0].set(t.left,t.top),u=ss[1].set(t.left,t.bottom),l=ss[2].set(t.right,t.top),h=ss[3].set(t.right,t.bottom);if(l.x<=a.x||u.y<=a.y)return!1;const c=Math.sign(e.a*e.d-e.b*e.c);if(c===0||(e.apply(a,a),e.apply(u,u),e.apply(l,l),e.apply(h,h),Math.max(a.x,u.x,l.x,h.x)<=s||Math.min(a.x,u.x,l.x,h.x)>=i||Math.max(a.y,u.y,l.y,h.y)<=n||Math.min(a.y,u.y,l.y,h.y)>=o))return!1;const d=c*(u.y-a.y),p=c*(a.x-u.x),f=d*s+p*n,g=d*i+p*n,m=d*s+p*o,_=d*i+p*o;if(Math.max(f,g,m,_)<=d*a.x+p*a.y||Math.min(f,g,m,_)>=d*h.x+p*h.y)return!1;const x=c*(a.y-l.y),b=c*(l.x-a.x),y=x*s+b*n,S=x*i+b*n,P=x*s+b*o,R=x*i+b*o;return!(Math.max(y,S,P,R)<=x*a.x+b*a.y||Math.min(y,S,P,R)>=x*h.x+b*h.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this}fit(t){const e=Math.max(this.x,t.x),s=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(s-e,0),this.y=i,this.height=Math.max(n-i,0),this}ceil(t=1,e=.001){const s=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=s-this.x,this.height=i-this.y,this}enlarge(t){const e=Math.min(this.x,t.x),s=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=s-e,this.y=i,this.height=n-i,this}getBounds(t){return t=t||new z,t.copyFrom(this),t}}const Rl=new G;class lt{constructor(t=1/0,e=1/0,s=-1/0,i=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Rl,this.minX=t,this.minY=e,this.maxX=s,this.maxY=i}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new z);const t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Rl,this}set(t,e,s,i){this.minX=t,this.minY=e,this.maxX=s,this.maxY=i}addFrame(t,e,s,i,n){n||(n=this.matrix);const o=n.a,a=n.b,u=n.c,l=n.d,h=n.tx,c=n.ty;let d=this.minX,p=this.minY,f=this.maxX,g=this.maxY,m=o*t+u*e+h,_=a*t+l*e+c;mf&&(f=m),_>g&&(g=_),m=o*s+u*e+h,_=a*s+l*e+c,mf&&(f=m),_>g&&(g=_),m=o*t+u*i+h,_=a*t+l*i+c,mf&&(f=m),_>g&&(g=_),m=o*s+u*i+h,_=a*s+l*i+c,mf&&(f=m),_>g&&(g=_),this.minX=d,this.minY=p,this.maxX=f,this.maxY=g}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e)}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxXthis.maxX?d:this.maxX,this.maxY=p>this.maxY?p:this.maxY,d=o*e+u*n+h,p=a*e+l*n+c,this.minX=dthis.maxX?d:this.maxX,this.maxY=p>this.maxY?p:this.maxY,d=o*i+u*n+h,p=a*i+l*n+c,this.minX=dthis.maxX?d:this.maxX,this.maxY=p>this.maxY?p:this.maxY}fit(t){return this.minXt.right&&(this.maxX=t.right),this.minYt.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,s,i){return this.minXe&&(this.maxX=e),this.minYi&&(this.maxY=i),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new lt(this.minX,this.minY,this.maxX,this.maxY)}scale(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){const e=this.maxX-this.minX;this.minX=t,this.maxX=t+e}get y(){return this.minY}set y(t){const e=this.maxY-this.minY;this.minY=t,this.maxY=t+e}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,e,s,i){let n=this.minX,o=this.minY,a=this.maxX,u=this.maxY;i||(i=this.matrix);const l=i.a,h=i.b,c=i.c,d=i.d,p=i.tx,f=i.ty;for(let g=e;ga?x:a,u=b>u?b:u}this.minX=n,this.minY=o,this.maxX=a,this.maxY=u}containsPoint(t,e){return this.minX<=t&&this.minY<=e&&this.maxX>=t&&this.maxY>=e}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}}const Ut=new es(G),kt=new es(lt);function nr(r,t,e){e.clear();let s,i;return r.parent?t?s=r.parent.worldTransform:(i=Ut.get().identity(),s=or(r,i)):s=G.IDENTITY,Vi(r,e,s,t),i&&Ut.return(i),e.isValid||e.set(0,0,0,0),e}function Vi(r,t,e,s){var i,n;if(!r.visible||!r.measurable)return;let o;s?o=r.worldTransform:(r.updateLocalTransform(),o=Ut.get(),o.appendFrom(r.localTransform,e));const a=t,u=!!r.effects.length;if(u&&(t=kt.get().clear()),r.boundsArea)t.addRect(r.boundsArea,o);else{r.addBounds&&(t.matrix=o,r.addBounds(t));for(let l=0;l>12&&(r.didChange=!0,r.data[0]=this._didChangeId>>12),Wi(this,r),r.didChange&&is(this,r.localBounds,gb),r.localBounds},getBounds(r,t){return nr(this,r,t||new lt)}},Gl={_onRender:null,set onRender(r){const t=this.renderGroup;if(!r){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=r},get onRender(){return this._onRender}},Il={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(r){this._zIndex!==r&&(this._zIndex=r,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.renderGroup&&!this.isRenderGroupRoot&&(this.renderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(_b))}};function _b(r,t){return r._zIndex-t._zIndex}const Bl={getGlobalPosition(r=new j,t=!1){return this.parent?this.parent.toGlobal(this._position,r,t):(r.x=this._position.x,r.y=this._position.y),r},toGlobal(r,t,e=!1){if(!e){this.updateLocalTransform();const s=or(this,new G);return s.append(this.localTransform),s.apply(r,t)}return this.worldTransform.apply(r,t)},toLocal(r,t,e,s){if(t&&(r=t.toGlobal(r,e,s)),!s){this.updateLocalTransform();const i=or(this,new G);return i.append(this.localTransform),i.applyInverse(r,e)}return this.worldTransform.applyInverse(r,e)}};class Yi{constructor(){this.uid=Z("instructionSet"),this.instructions=[],this.instructionSize=0}reset(){this.instructionSize=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}class Fl{constructor(t){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this._children=[],this.worldTransform=new G,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new Yi,this._onRenderContainers=[],this.root=t,this.addChild(t)}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.onChildUpdate(t.root),this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){t.root.didChange&&this._removeChildFromUpdate(t.root);const e=this.renderGroupChildren.indexOf(t);e>-1&&this.renderGroupChildren.splice(e,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t!==this.root&&(this._children.push(t),t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t._onRender&&this.addOnRender(t)),t.renderGroup){if(t.renderGroup.root===t){this.addRenderGroupChild(t.renderGroup);return}}else t.renderGroup=this,t.didChange=!0;const e=t.children;t.isRenderGroupRoot||this.onChildUpdate(t);for(let s=0;s-1&&this._children.splice(e,1)}onChildUpdate(t){let e=this.childrenToUpdate[t.relativeRenderGroupDepth];e||(e=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),e.list[e.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(t.didViewUpdate=!1,this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t))}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}_removeChildFromUpdate(t){const e=this.childrenToUpdate[t.relativeRenderGroupDepth];if(!e)return;const s=e.list.indexOf(t);s>-1&&e.list.splice(s,1),e.index--}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(){for(let t=0;tthis.addChild(i)),this.effects=[],(s=t.parent)==null||s.addChild(this)}static mixin(t){Object.defineProperties(V.prototype,Object.getOwnPropertyDescriptors(t))}addChild(...t){if(t.length>1){for(let s=0;s1){for(let i=0;i-1&&(this.children.splice(s,1),this.renderGroup&&this.renderGroup.removeChild(e),e.parent=null,this.emit("childRemoved",e,this,s),e.emit("removed",this)),e}_onUpdate(t){if(t&&t===this._skew&&this._updateSkew(),this._didChangeId++,!this.didChange)if(this.didChange=!0,this.isRenderGroupRoot){const e=this.renderGroup.renderGroupParent;e&&e.onChildUpdate(this)}else this.renderGroup&&this.renderGroup.onChildUpdate(this)}set isRenderGroup(t){if(this.isRenderGroupRoot&&t===!1)throw new Error("[Pixi] cannot undo a render group just yet");t&&this.enableRenderGroup()}get isRenderGroup(){return this.isRenderGroupRoot}enableRenderGroup(){if(this.renderGroup&&this.renderGroup.root===this)return;this.isRenderGroupRoot=!0;const t=this.renderGroup;if(t&&t.removeChild(this),this.renderGroup=new Fl(this),t){for(let e=0;e>16&255)}set blendMode(t){this.localBlendMode!==t&&(this.renderGroup&&!this.isRenderGroupRoot&&(this.renderGroup.structureDidChange=!0),this._updateFlags|=Qi,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){const e=t?1:0;(this.localDisplayStatus&2)>>1!==e&&(this.renderGroup&&!this.isRenderGroupRoot&&(this.renderGroup.structureDidChange=!0),this._updateFlags|=ar,this.localDisplayStatus^=2,this._onUpdate())}get culled(){return!(this.localDisplayStatus&4)}set culled(t){const e=t?1:0;(this.localDisplayStatus&4)>>2!==e&&(this.renderGroup&&!this.isRenderGroupRoot&&(this.renderGroup.structureDidChange=!0),this._updateFlags|=ar,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){const e=t?1:0;(this.localDisplayStatus&1)!==e&&(this._updateFlags|=ar,this.localDisplayStatus^=1,this.renderGroup&&!this.isRenderGroupRoot&&(this.renderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){if(this.destroyed)return;this.destroyed=!0,this.removeFromParent(),this.parent=null,this._mask=null,this._filters=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners();const e=typeof t=="boolean"?t:t==null?void 0:t.children,s=this.removeChildren(0,this.children.length);if(e)for(let i=0;i1&&typeof MSStream=="undefined"};function bb(r){return function(t){return t.test(r)}}function Yl(r){var t={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator!="undefined"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?t.userAgent=r:r&&r.userAgent&&(t={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var e=t.userAgent,s=e.split("[FBAN");typeof s[1]!="undefined"&&(e=s[0]),s=e.split("Twitter"),typeof s[1]!="undefined"&&(e=s[0]);var i=bb(e),n={apple:{phone:i(Ji)&&!i(Ht),ipod:i(Ul),tablet:!i(Ji)&&(i(kl)||Wl(t))&&!i(Ht),universal:i(Ll),device:(i(Ji)||i(Ul)||i(kl)||i(Ll)||Wl(t))&&!i(Ht)},amazon:{phone:i(Re),tablet:!i(Re)&&i(os),device:i(Re)||i(os)},android:{phone:!i(Ht)&&i(Re)||!i(Ht)&&i(tn),tablet:!i(Ht)&&!i(Re)&&!i(tn)&&(i(os)||i($l)),device:!i(Ht)&&(i(Re)||i(os)||i(tn)||i($l))||i(/\bokhttp\b/i)},windows:{phone:i(Ht),tablet:i(Nl),device:i(Ht)||i(Nl)},other:{blackberry:i(Hl),blackberry10:i(Xl),opera:i(zl),firefox:i(Vl),chrome:i(jl),device:i(Hl)||i(Xl)||i(zl)||i(Vl)||i(jl)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}var Kl;const vb=(Kl=Yl.default)!=null?Kl:Yl,ql=vb(globalThis.navigator),yb=9,as=100,Tb=0,Sb=0,Zl=2,Ql=1,Eb=-1e3,Ab=-1e3,Pb=2;class en{constructor(t,e=ql){this._mobileInfo=e,this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this._pool=[],this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._hookDiv=null,(e.tablet||e.phone)&&this._createTouchHook();const s=document.createElement("div");s.style.width=`${as}px`,s.style.height=`${as}px`,s.style.position="absolute",s.style.top=`${Tb}px`,s.style.left=`${Sb}px`,s.style.zIndex=Zl.toString(),this._div=s,this._renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}_createTouchHook(){const t=document.createElement("button");t.style.width=`${Ql}px`,t.style.height=`${Ql}px`,t.style.position="absolute",t.style.top=`${Eb}px`,t.style.left=`${Ab}px`,t.style.zIndex=Pb.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){var t;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.add(this),(t=this._renderer.view.canvas.parentNode)==null||t.appendChild(this._div))}_deactivate(){var t;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.remove(this),(t=this._div.parentNode)==null||t.removeChild(this._div))}_updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&t.isInteractive()&&(t._accessibleActive||this._addChild(t),t._renderId=this._renderId);const e=t.children;if(e)for(let s=0;s title : ${t.title}
tabIndex: ${t.tabIndex}`}_capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);const{width:e,height:s}=this._renderer;t.x+t.width>e&&(t.width=e-t.x),t.y+t.height>s&&(t.height=s-t.y)}_addChild(t){let e=this._pool.pop();e||(e=document.createElement("button"),e.style.width=`${as}px`,e.style.height=`${as}px`,e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=Zl.toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?e.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(e.title=`container ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this._updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.container=t,this._children.push(t),this._div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,e){const{container:s}=t.target,i=this._renderer.events.rootBoundary,n=Object.assign(new Ke(i),{target:s});i.rootTarget=this._renderer.lastObjectRendered,e.forEach(o=>i.dispatchEvent(n,o))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode===yb&&this._activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this._deactivate()}destroy(){this._destroyTouchHook(),this._div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this._pool=null,this._children=null,this._renderer=null}}en.extension={type:[v.WebGLSystem,v.WebGPUSystem],name:"accessibility"};const Jl={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,_renderId:-1};D.add(en),V.mixin(Jl);class rn{static init(t){Object.defineProperty(this,"resizeTo",{set(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let e,s;if(this._resizeTo===globalThis.window)e=globalThis.innerWidth,s=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:n}=this._resizeTo;e=i,s=n}this.renderer.resize(e,s),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}rn.extension=v.Application;var Xt=(r=>(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(Xt||{});class us{constructor(t,e=null,s=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=e,this.priority=s,this._once=i}match(t,e=null){return this._fn===t&&this._context===e}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));const e=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),e}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const e=this.next;return this.next=t?null:e,this.previous=null,e}}const th=class yt{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new us(null,null,1/0),this.deltaMS=1/yt.targetFPMS,this.elapsedMS=1/yt.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,s=Xt.NORMAL){return this._addListener(new us(t,e,s))}addOnce(t,e,s=Xt.NORMAL){return this._addListener(new us(t,e,s,!0))}_addListener(t){let e=this._head.next,s=this._head;if(!e)t.connect(s);else{for(;e;){if(t.priority>e.priority){t.connect(s);break}s=e,e=e.next}t.previous||t.connect(s)}return this._startIfPossible(),this}remove(t,e){let s=this._head.next;for(;s;)s.match(t,e)?s=s.destroy():s=s.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){const n=t-this._lastFrame|0;if(n{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?ht.shared:new ht,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}sn.extension=v.Application,D.add(rn),D.add(sn);let wb=class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this._tickerAdded||!this.domElement||(ht.system.add(this._tickerUpdate,this,Xt.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&(ht.system.remove(this._tickerUpdate,this),this._tickerAdded=!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events._rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}_tickerUpdate(t){this._deltaTime+=t.deltaTime,!(this._deltaTimes.priority-i.priority)}dispatchEvent(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.dispatch.emit(e||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const e=this.mappingTable[t.type];if(e)for(let s=0,i=e.length;s=0;i--)if(t.currentTarget=s[i],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,e,s=this._allInteractiveElements){if(s.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const i=Array.isArray(e)?e:[e];for(let n=s.length-1;n>=0;n--)i.forEach(o=>{t.currentTarget=s[n],this.notifyTarget(t,o)})}propagationPath(t){const e=[t];for(let s=0;s=0;c--){const d=h[c],p=this.hitTestMoveRecursive(d,this._isInteractive(e)?e:d.eventMode,s,i,n,o||n(t,s));if(p){if(p.length>0&&!p[p.length-1].parent)continue;const f=t.isInteractive();(p.length>0||f)&&(f&&this._allInteractiveElements.push(t),p.push(t)),this._hitElements.length===0&&(this._hitElements=p),a=!0}}}const u=this._isInteractive(e),l=t.isInteractive();return l&&l&&this._allInteractiveElements.push(t),o||this._hitElements.length>0?null:a?this._hitElements:u&&!n(t,s)&&i(t,s)?l?[t]:[]:null}hitTestRecursive(t,e,s,i,n){if(this._interactivePrune(t)||n(t,s))return null;if((t.eventMode==="dynamic"||e==="dynamic")&&(zt.pauseUpdate=!1),t.interactiveChildren&&t.children){const u=t.children,l=s;for(let h=u.length-1;h>=0;h--){const c=u[h],d=this.hitTestRecursive(c,this._isInteractive(e)?e:c.eventMode,l,i,n);if(d){if(d.length>0&&!d[d.length-1].parent)continue;const p=t.isInteractive();return(d.length>0||p)&&d.push(t),d}}}const o=this._isInteractive(e),a=t.isInteractive();return o&&i(t,s)?a?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!t||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren}hitPruneFn(t,e){if(t.hitArea&&(t.worldTransform.applyInverse(e,lr),!t.hitArea.contains(lr.x,lr.y)))return!0;if(t.effects&&t.effects.length)for(let s=0;s0&&u!==n.target){const c=t.type==="mousemove"?"mouseout":"pointerout",d=this.createPointerEvent(t,c,u);if(this.dispatchEvent(d,"pointerout"),o&&this.dispatchEvent(d,"mouseout"),!n.composedPath().includes(u)){const p=this.createPointerEvent(t,"pointerleave",u);for(p.eventPhase=p.AT_TARGET;p.target&&!n.composedPath().includes(p.target);)p.currentTarget=p.target,this.notifyTarget(p),o&&this.notifyTarget(p,"mouseleave"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(d)}if(u!==n.target){const c=t.type==="mousemove"?"mouseover":"pointerover",d=this.clonePointerEvent(n,c);this.dispatchEvent(d,"pointerover"),o&&this.dispatchEvent(d,"mouseover");let p=u==null?void 0:u.parent;for(;p&&p!==this.rootTarget.parent&&p!==n.target;)p=p.parent;if(!p||p===this.rootTarget.parent){const f=this.clonePointerEvent(n,"pointerenter");for(f.eventPhase=f.AT_TARGET;f.target&&f.target!==u&&f.target!==this.rootTarget.parent;)f.currentTarget=f.target,this.notifyTarget(f),o&&this.notifyTarget(f,"mouseenter"),f.target=f.target.parent;this.freeEvent(f)}this.freeEvent(d)}const l=[],h=(s=this.enableGlobalMoveEvents)!=null?s:!0;this.moveOnAll?l.push("pointermove"):this.dispatchEvent(n,"pointermove"),h&&l.push("globalpointermove"),n.pointerType==="touch"&&(this.moveOnAll?l.splice(1,0,"touchmove"):this.dispatchEvent(n,"touchmove"),h&&l.push("globaltouchmove")),o&&(this.moveOnAll?l.splice(1,0,"mousemove"):this.dispatchEvent(n,"mousemove"),h&&l.push("globalmousemove"),this.cursor=(i=n.target)==null?void 0:i.cursor),l.length>0&&this.all(n,l),this._allInteractiveElements.length=0,this._hitElements.length=0,a.overTargets=n.composedPath(),this.freeEvent(n)}mapPointerOver(t){var e;if(!(t instanceof At))return;const s=this.trackingData(t.pointerId),i=this.createPointerEvent(t),n=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),n&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=(e=i.target)==null?void 0:e.cursor);const o=this.clonePointerEvent(i,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),n&&this.notifyTarget(o,"mouseenter"),o.target=o.target.parent;s.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(o)}mapPointerOut(t){if(!(t instanceof At))return;const e=this.trackingData(t.pointerId);if(e.overTargets){const s=t.pointerType==="mouse"||t.pointerType==="pen",i=this.findMountedTarget(e.overTargets),n=this.createPointerEvent(t,"pointerout",i);this.dispatchEvent(n),s&&this.dispatchEvent(n,"mouseout");const o=this.createPointerEvent(t,"pointerleave",i);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),s&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;e.overTargets=null,this.freeEvent(n),this.freeEvent(o)}this.cursor=null}mapPointerUp(t){if(!(t instanceof At))return;const e=performance.now(),s=this.createPointerEvent(t);if(this.dispatchEvent(s,"pointerup"),s.pointerType==="touch")this.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){const a=s.button===2;this.dispatchEvent(s,a?"rightup":"mouseup")}const i=this.trackingData(t.pointerId),n=this.findMountedTarget(i.pressTargetsByButton[t.button]);let o=n;if(n&&!s.composedPath().includes(n)){let a=n;for(;a&&!s.composedPath().includes(a);){if(s.currentTarget=a,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")this.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){const u=s.button===2;this.notifyTarget(s,u?"rightupoutside":"mouseupoutside")}a=a.parent}delete i.pressTargetsByButton[t.button],o=a}if(o){const a=this.clonePointerEvent(s,"click");a.target=o,a.path=null,i.clicksByButton[t.button]||(i.clicksByButton[t.button]={clickCount:0,target:a.target,timeStamp:e});const u=i.clicksByButton[t.button];if(u.target===a.target&&e-u.timeStamp<200?++u.clickCount:u.clickCount=1,u.target=a.target,u.timeStamp=e,a.detail=u.clickCount,a.pointerType==="mouse"){const l=a.button===2;this.dispatchEvent(a,l?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(s)}mapPointerUpOutside(t){if(!(t instanceof At))return;const e=this.trackingData(t.pointerId),s=this.findMountedTarget(e.pressTargetsByButton[t.button]),i=this.createPointerEvent(t);if(s){let n=s;for(;n;)i.currentTarget=n,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch"?this.notifyTarget(i,"touchendoutside"):(i.pointerType==="mouse"||i.pointerType==="pen")&&this.notifyTarget(i,i.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete e.pressTargetsByButton[t.button]}this.freeEvent(i)}mapWheel(t){if(!(t instanceof he))return;const e=this.createWheelEvent(t);this.dispatchEvent(e),this.freeEvent(e)}findMountedTarget(t){if(!t)return null;let e=t[0];for(let s=1;st in r?Ob(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ib=(r,t)=>{for(var e in t||(t={}))Cb.call(t,e)&&sh(r,e,t[e]);if(rh)for(var e of rh(t))Gb.call(t,e)&&sh(r,e,t[e]);return r};const Bb=1,Fb={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},nn=class ju{constructor(t){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=t,this.rootBoundary=new eh(null),zt.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new At(null),this._rootWheelEvent=new he(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy(Ib({},ju.defaultEventFeatures),{set:(e,s,i)=>(s==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=i),e[s]=i,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(t){var e,s;const{canvas:i,resolution:n}=this.renderer;this.setTargetElement(i),this.resolution=n,ju._defaultEventMode=(e=t.eventMode)!=null?e:"passive",Object.assign(this.features,(s=t.eventFeatures)!=null?s:{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(t){this.resolution=t}destroy(){this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(t){t=t||"default";let e=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(e=!1),this._currentCursor===t)return;this._currentCursor=t;const s=this.cursorStyles[t];if(s)switch(typeof s){case"string":e&&(this.domElement.style.cursor=s);break;case"function":s(t);break;case"object":e&&Object.assign(this.domElement.style,s);break}else e&&typeof t=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,t)&&(this.domElement.style.cursor=t)}get pointer(){return this._rootPointerEvent}_onPointerDown(t){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const e=this._normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(let s=0,i=e.length;s0&&(e=t.composedPath()[0]);const s=e!==this.domElement?"outside":"",i=this._normalizeToPointerData(t);for(let n=0,o=i.length;n{u.off(r,a,o)}),n?u.once(r,a,o):u.on(r,a,o)},removeEventListener(r,t,e){const s=typeof e=="boolean"&&e||typeof e=="object"&&e.capture,i=typeof t=="function"?void 0:t;r=s?`${r}capture`:r,t=typeof t=="function"?t:t.handleEvent,this.off(r,t,i)},dispatchEvent(r){if(!(r instanceof Ke))throw new Error("Container cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}};D.add(on),V.mixin(ih);var gt=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(gt||{});const nh={createCanvas:(r,t)=>{const e=document.createElement("canvas");return e.width=r,e.height=t,e},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getWebGL2RenderingContext:()=>WebGL2RenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>{var r;return(r=document.baseURI)!=null?r:window.location.href},getFontFaceSet:()=>document.fonts,fetch:(r,t)=>fetch(r,t),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")};let oh=nh;const X={get(){return oh},set(r){oh=r}};function Ot(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function hr(r){return r.split("?")[0].split("#")[0]}function Db(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ub(r,t,e){return r.replace(new RegExp(Db(t),"g"),e)}function kb(r,t){let e="",s=0,i=-1,n=0,o=-1;for(let a=0;a<=r.length;++a){if(a2){const u=e.lastIndexOf("/");if(u!==e.length-1){u===-1?(e="",s=0):(e=e.slice(0,u),s=e.length-1-e.lastIndexOf("/")),i=a,n=0;continue}}else if(e.length===2||e.length===1){e="",s=0,i=a,n=0;continue}}t&&(e.length>0?e+="/..":e="..",s=2)}else e.length>0?e+=`/${r.slice(i+1,a)}`:e=r.slice(i+1,a),s=a-i-1;i=a,n=0}else o===46&&n!==-1?++n:n=-1}return e}const dt={toPosix(r){return Ub(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){Ot(r),r=this.toPosix(r);const t=/^file:\/\/\//.exec(r);if(t)return t[0];const e=/^[^/:]+:\/{0,2}/.exec(r);return e?e[0]:""},toAbsolute(r,t,e){if(Ot(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;const s=hr(this.toPosix(t!=null?t:X.get().getBaseUrl())),i=hr(this.toPosix(e!=null?e:this.rootname(s)));return r=this.toPosix(r),r.startsWith("/")?dt.join(i,r.slice(1)):this.isAbsolute(r)?r:this.join(s,r)},normalize(r){if(Ot(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let t="";const e=r.startsWith("/");this.hasProtocol(r)&&(t=this.rootname(r),r=r.slice(t.length));const s=r.endsWith("/");return r=kb(r,!1),r.length>0&&s&&(r+="/"),e?`/${r}`:t+r},isAbsolute(r){return Ot(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){var t;if(r.length===0)return".";let e;for(let s=0;s0)if(e===void 0)e=i;else{const n=(t=r[s-1])!=null?t:"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(Ot(r),r.length===0)return".";r=this.toPosix(r);let t=r.charCodeAt(0);const e=t===47;let s=-1,i=!0;const n=this.getProtocol(r),o=r;r=r.slice(n.length);for(let a=r.length-1;a>=1;--a)if(t=r.charCodeAt(a),t===47){if(!i){s=a;break}}else i=!1;return s===-1?e?"/":this.isUrl(o)?n+r:n:e&&s===1?"//":n+r.slice(0,s)},rootname(r){Ot(r),r=this.toPosix(r);let t="";if(r.startsWith("/")?t="/":t=this.getProtocol(r),this.isUrl(r)){const e=r.indexOf("/",t.length);e!==-1?t=r.slice(0,e):t=r,t.endsWith("/")||(t+="/")}return t},basename(r,t){Ot(r),t&&Ot(t),r=hr(this.toPosix(r));let e=0,s=-1,i=!0,n;if(t!==void 0&&t.length>0&&t.length<=r.length){if(t.length===r.length&&t===r)return"";let o=t.length-1,a=-1;for(n=r.length-1;n>=0;--n){const u=r.charCodeAt(n);if(u===47){if(!i){e=n+1;break}}else a===-1&&(i=!1,a=n+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(s=n):(o=-1,s=a))}return e===s?s=a:s===-1&&(s=r.length),r.slice(e,s)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!i){e=n+1;break}}else s===-1&&(i=!1,s=n+1);return s===-1?"":r.slice(e,s)},extname(r){Ot(r),r=hr(this.toPosix(r));let t=-1,e=0,s=-1,i=!0,n=0;for(let o=r.length-1;o>=0;--o){const a=r.charCodeAt(o);if(a===47){if(!i){e=o+1;break}continue}s===-1&&(i=!1,s=o+1),a===46?t===-1?t=o:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||s===-1||n===0||n===1&&t===s-1&&t===e+1?"":r.slice(t,s)},parse(r){Ot(r);const t={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return t;r=hr(this.toPosix(r));let e=r.charCodeAt(0);const s=this.isAbsolute(r);let i;const n="";t.root=this.rootname(r),s||this.hasProtocol(r)?i=1:i=0;let o=-1,a=0,u=-1,l=!0,h=r.length-1,c=0;for(;h>=i;--h){if(e=r.charCodeAt(h),e===47){if(!l){a=h+1;break}continue}u===-1&&(l=!1,u=h+1),e===46?o===-1?o=h:c!==1&&(c=1):o!==-1&&(c=-1)}return o===-1||u===-1||c===0||c===1&&o===u-1&&o===a+1?u!==-1&&(a===0&&s?t.base=t.name=r.slice(1,u):t.base=t.name=r.slice(a,u)):(a===0&&s?(t.name=r.slice(1,o),t.base=r.slice(1,u)):(t.name=r.slice(a,o),t.base=r.slice(a,u)),t.ext=r.slice(o,u)),t.dir=this.dirname(r),n&&(t.dir=n+t.dir),t},sep:"/",delimiter:":",joinExtensions:[".html"]},Pt=(r,t,e=!1)=>(Array.isArray(r)||(r=[r]),t?r.map(s=>typeof s=="string"||e?t(s):s):r);function ah(r,t,e,s,i){const n=t[e];for(let o=0;o{const o=n.substring(1,n.length-1).split(",");i.push(o)}),ah(r,i,0,e,s)}else s.push(r);return s}const cr=r=>!Array.isArray(r);var Lb=Object.defineProperty,$b=Object.defineProperties,Nb=Object.getOwnPropertyDescriptors,lh=Object.getOwnPropertySymbols,Hb=Object.prototype.hasOwnProperty,Xb=Object.prototype.propertyIsEnumerable,hh=(r,t,e)=>t in r?Lb(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Me=(r,t)=>{for(var e in t||(t={}))Hb.call(t,e)&&hh(r,e,t[e]);if(lh)for(var e of lh(t))Xb.call(t,e)&&hh(r,e,t[e]);return r},zb=(r,t)=>$b(r,Nb(t));class qt{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,e)=>`${t}${this._bundleIdConnector}${e}`,extractAssetIdFromBundle:(t,e)=>e.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){var e,s,i;if(this._bundleIdConnector=(e=t.connector)!=null?e:this._bundleIdConnector,this._createBundleAssetId=(s=t.createBundleAssetId)!=null?s:this._createBundleAssetId,this._extractAssetIdFromBundle=(i=t.extractAssetIdFromBundle)!=null?i:this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(e=>{this._preferredOrder.push(e),e.priority||(e.priority=Object.keys(e.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const e=t;this._defaultSearchParams=Object.keys(e).map(s=>`${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`).join("&")}}getAlias(t){const{alias:e,src:s}=t;return Pt(e||s,i=>typeof i=="string"?i:Array.isArray(i)?i.map(n=>{var o;return(o=n==null?void 0:n.src)!=null?o:n}):i!=null&&i.src?i.src:i,!0)}addManifest(t){this._manifest,this._manifest=t,t.bundles.forEach(e=>{this.addBundle(e.name,e.assets)})}addBundle(t,e){const s=[];let i=e;Array.isArray(e)||(i=Object.entries(e).map(([n,o])=>typeof o=="string"||Array.isArray(o)?{alias:n,src:o}:Me({alias:n},o))),i.forEach(n=>{const o=n.src,a=n.alias;let u;if(typeof a=="string"){const l=this._createBundleAssetId(t,a);s.push(l),u=[a,l]}else{const l=a.map(h=>this._createBundleAssetId(t,h));s.push(...l),u=[...a,...l]}this.add(zb(Me({},n),{alias:u,src:o}))}),this._bundles[t]=s}add(t){const e=[];Array.isArray(t)?e.push(...t):e.push(t);let s;Pt(e).forEach(i=>{const{src:n}=i;let{data:o,format:a,loadParser:u}=i;const l=Pt(n).map(d=>typeof d=="string"?uh(d):Array.isArray(d)?d:[d]),h=this.getAlias(i),c=[];l.forEach(d=>{d.forEach(p=>{var f,g,m;let _={};if(typeof p!="object"){_.src=p;for(let x=0;x{this._assetMap[d]=c})})}resolveBundle(t){const e=cr(t);t=Pt(t);const s={};return t.forEach(i=>{const n=this._bundles[i];if(n){const o=this.resolve(n),a={};for(const u in o){const l=o[u];a[this._extractAssetIdFromBundle(i,u)]=l}s[i]=a}}),e?s[t[0]]:s}resolveUrl(t){const e=this.resolve(t);if(typeof t!="string"){const s={};for(const i in e)s[i]=e[i].src;return s}return e.src}resolve(t){const e=cr(t);t=Pt(t);const s={};return t.forEach(i=>{if(!this._resolverHash[i])if(this._assetMap[i]){let n=this._assetMap[i];const o=this._getPreferredOrder(n);o==null||o.priority.forEach(a=>{o.params[a].forEach(u=>{const l=n.filter(h=>h[a]?h[a]===u:!1);l.length&&(n=l)})}),this._resolverHash[i]=n[0]}else this._resolverHash[i]=this._buildResolvedAsset({alias:[i],src:i},{});s[i]=this._resolverHash[i]}),e?s[t[0]]:s}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let e=0;en.params.format.includes(s.format));if(i)return i}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const e=/\?/.test(t)?"&":"?";return`${t}${e}${this._defaultSearchParams}`}_buildResolvedAsset(t,e){var s,i;const{aliases:n,data:o,loadParser:a,format:u}=e;return(this._basePath||this._rootPath)&&(t.src=dt.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=(s=n!=null?n:t.alias)!=null?s:[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data=Me(Me({},o||{}),t.data),t.loadParser=a!=null?a:t.loadParser,t.format=(i=u!=null?u:t.format)!=null?i:ch(t.src),t}}qt.RETINA_PREFIX=/@([0-9\.]+)x/;function ch(r){return r.split(".").pop().split("?").shift().split("#").shift()}const ls=(r,t)=>{const e=t.split("?")[1];return e&&(r+=`?${e}`),r},ce=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],de=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],pe=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],fe=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],an=[],dh=[],hs=Math.sign;function jb(){for(let r=0;r<16;r++){const t=[];an.push(t);for(let e=0;e<16;e++){const s=hs(ce[r]*ce[e]+pe[r]*de[e]),i=hs(de[r]*ce[e]+fe[r]*de[e]),n=hs(ce[r]*pe[e]+pe[r]*fe[e]),o=hs(de[r]*pe[e]+fe[r]*fe[e]);for(let a=0;a<16;a++)if(ce[a]===s&&de[a]===i&&pe[a]===n&&fe[a]===o){t.push(a);break}}}for(let r=0;r<16;r++){const t=new G;t.set(ce[r],de[r],pe[r],fe[r],0,0),dh.push(t)}}jb();const U={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:r=>ce[r],uY:r=>de[r],vX:r=>pe[r],vY:r=>fe[r],inv:r=>r&8?r&15:-r&7,add:(r,t)=>an[r][t],sub:(r,t)=>an[r][U.inv(t)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,t)=>Math.abs(r)*2<=Math.abs(t)?t>=0?U.S:U.N:Math.abs(t)*2<=Math.abs(r)?r>0?U.E:U.W:t>0?r>0?U.SE:U.SW:r>0?U.NE:U.NW,matrixAppendRotationInv:(r,t,e=0,s=0)=>{const i=dh[U.inv(t)];i.tx=e,i.ty=s,r.append(i)}},un=()=>{};function me(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function ln(r){return!(r&r-1)&&!!r}function Vb(r){let t=(r>65535?1:0)<<4;r>>>=t;let e=(r>255?1:0)<<3;return r>>>=e,t|=e,e=(r>15?1:0)<<2,r>>>=e,t|=e,e=(r>3?1:0)<<1,r>>>=e,t|=e,t|r>>1}function Zt(r){const t={};for(const e in r)r[e]!==void 0&&(t[e]=r[e]);return t}var Wb=Object.defineProperty,ph=Object.getOwnPropertySymbols,Yb=Object.prototype.hasOwnProperty,Kb=Object.prototype.propertyIsEnumerable,fh=(r,t,e)=>t in r?Wb(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,mh=(r,t)=>{for(var e in t||(t={}))Yb.call(t,e)&&fh(r,e,t[e]);if(ph)for(var e of ph(t))Kb.call(t,e)&&fh(r,e,t[e]);return r};const gh=Object.create(null);function qb(r){const t=gh[r];return t===void 0&&(gh[r]=Z("resource")),t}const _h=class yx extends ct{constructor(t={}){var e,s,i,n,o,a,u;super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,t=mh(mh({},yx.defaultOptions),t),this.addressMode=t.addressMode,this.addressModeU=(e=t.addressModeU)!=null?e:this.addressModeU,this.addressModeV=(s=t.addressModeV)!=null?s:this.addressModeV,this.addressModeW=(i=t.addressModeW)!=null?i:this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=(n=t.magFilter)!=null?n:this.magFilter,this.minFilter=(o=t.minFilter)!=null?o:this.minFilter,this.mipmapFilter=(a=t.mipmapFilter)!=null?a:this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=(u=t.maxAnisotropy)!=null?u:1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null}_generateResourceId(){const t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=qb(t),this._resourceId}destroy(){this.emit("destroy",this),this.removeAllListeners()}};_h.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let xh=_h;var Zb=Object.defineProperty,bh=Object.getOwnPropertySymbols,Qb=Object.prototype.hasOwnProperty,Jb=Object.prototype.propertyIsEnumerable,vh=(r,t,e)=>t in r?Zb(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,yh=(r,t)=>{for(var e in t||(t={}))Qb.call(t,e)&&vh(r,e,t[e]);if(bh)for(var e of bh(t))Jb.call(t,e)&&vh(r,e,t[e]);return r};const Th=class Tx extends ct{constructor(t={}){var e,s,i;super(),this.options=t,this.uid=Z("textureSource"),this._resourceType="textureSource",this._resourceId=Z("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t=yh(yh({},Tx.defaultOptions),t),this.label=(e=t.label)!=null?e:"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource&&(s=this.resourceWidth)!=null?s:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource&&(i=this.resourceHeight)!=null?i:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new xh(Zt(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var e,s;this.style!==t&&((e=this._style)==null||e.off("change",this._onStyleChange,this),this._style=t,(s=this._style)==null||s.on("change",this._onStyleChange,this),this._onStyleChange())}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){this._resourceId=Z("resource"),this.emit("change",this),this.emit("unload",this)}get resourceWidth(){const{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){const{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,e,s){s=s||this._resolution,t=t||this.width,e=e||this.height;const i=Math.round(t*s),n=Math.round(e*s);return this.width=i/s,this.height=n/s,this._resolution=s,this.pixelWidth===i&&this.pixelHeight===n?!1:(this._refreshPOT(),this.pixelWidth=i,this.pixelHeight=n,this.emit("resize",this),this._resourceId=Z("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=ln(this.pixelWidth)&&ln(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};Th.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let et=Th;var tv=Object.defineProperty,ev=Object.defineProperties,rv=Object.getOwnPropertyDescriptors,Sh=Object.getOwnPropertySymbols,sv=Object.prototype.hasOwnProperty,iv=Object.prototype.propertyIsEnumerable,Eh=(r,t,e)=>t in r?tv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,nv=(r,t)=>{for(var e in t||(t={}))sv.call(t,e)&&Eh(r,e,t[e]);if(Sh)for(var e of Sh(t))iv.call(t,e)&&Eh(r,e,t[e]);return r},ov=(r,t)=>ev(r,rv(t));class cs extends et{constructor(t){const e=t.resource||new Float32Array(t.width*t.height*4);let s=t.format;s||(e instanceof Float32Array?s="rgba32float":e instanceof Int32Array||e instanceof Uint32Array?s="rgba32uint":e instanceof Int16Array||e instanceof Uint16Array?s="rgba16uint":(e instanceof Int8Array,s="bgra8unorm")),super(ov(nv({},t),{resource:e,format:s})),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}cs.extension=v.TextureSource;const Ah=new G;class hn{constructor(t,e){this.mapCoord=new G,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof e=="undefined"?this.clampMargin=t.width<10?0:.5:this.clampMargin=e,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){var e;this.texture!==t&&((e=this._texture)==null||e.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,e){e===void 0&&(e=t);const s=this.mapCoord;for(let i=0;i{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Wr.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(t){let e=t;const s=Wr.BATCH_SIZE;for(;e-t{this._batchIndex*Wr.BATCH_SIZE{s[i]=t}),Object.keys(t.textures).forEach(i=>{s[i]=t.textures[i]}),!e){const i=dt.dirname(r[0]);t.linkedSheets.forEach((n,o)=>{const a=wh([`${i}/${t.data.meta.related_multi_packs[o]}`],n,!0);Object.assign(s,a)})}return s}const Rh={extension:v.Asset,cache:{test:r=>r instanceof cn,getCacheableAssets:(r,t)=>wh(r,t,!1)},resolver:{test:r=>{const t=r.split("?")[0].split("."),e=t.pop(),s=t.pop();return e==="json"&&av.includes(s)},parse:r=>{var t,e;const s=r.split(".");return{resolution:parseFloat((e=(t=qt.RETINA_PREFIX.exec(r))==null?void 0:t[1])!=null?e:"1"),format:s[s.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:v.LoadParser,priority:gt.Normal},async testParse(r,t){return dt.extname(t.src).toLowerCase()===".json"&&!!r.frames},async parse(r,t,e){var s,i,n;const{texture:o,imageFilename:a}=(s=t==null?void 0:t.data)!=null?s:{};let u=dt.dirname(t.src);u&&u.lastIndexOf("/")!==u.length-1&&(u+="/");let l;if(o instanceof A)l=o;else{const d=ls(u+(a!=null?a:r.meta.image),t.src);l=(await e.load([d]))[d]}const h=new cn(l.source,r);await h.parse();const c=(i=r==null?void 0:r.meta)==null?void 0:i.related_multi_packs;if(Array.isArray(c)){const d=[];for(const f of c){if(typeof f!="string")continue;let g=u+f;(n=t.data)!=null&&n.ignoreMultiPack||(g=ls(g,t.src),d.push(e.load({src:g,data:{ignoreMultiPack:!0}})))}const p=await Promise.all(d);h.linkedSheets=p,p.forEach(f=>{f.linkedSheets=[h].concat(h.linkedSheets.filter(g=>g!==f))})}return h},async unload(r,t,e){await e.unload(r.textureSource._sourceOrigin),r.destroy(!1)}}};D.add(Rh);function dr(r,t,e,s){const{width:i,height:n}=e.orig,o=e.trim;if(o){const a=o.width,u=o.height;r.minX=o.x-t._x*i-s,r.maxX=r.minX+a,r.minY=o.y-t._y*n-s,r.maxY=r.minY+u}else r.minX=-t._x*i-s,r.maxX=r.minX+i,r.minY=-t._y*n-s,r.maxY=r.minY+n}var uv=Object.defineProperty,ds=Object.getOwnPropertySymbols,Mh=Object.prototype.hasOwnProperty,Oh=Object.prototype.propertyIsEnumerable,Ch=(r,t,e)=>t in r?uv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,lv=(r,t)=>{for(var e in t||(t={}))Mh.call(t,e)&&Ch(r,e,t[e]);if(ds)for(var e of ds(t))Oh.call(t,e)&&Ch(r,e,t[e]);return r},hv=(r,t)=>{var e={};for(var s in r)Mh.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&ds)for(var s of ds(r))t.indexOf(s)<0&&Oh.call(r,s)&&(e[s]=r[s]);return e};class Ft extends V{constructor(t=A.EMPTY){t instanceof A&&(t={texture:t});const e=t,{texture:s,anchor:i,roundPixels:n,width:o,height:a}=e,u=hv(e,["texture","anchor","roundPixels","width","height"]);super(lv({label:"Sprite"},u)),this.renderPipeId="sprite",this.batched=!0,this._didSpriteUpdate=!1,this._bounds={minX:0,maxX:1,minY:0,maxY:0},this._sourceBounds={minX:0,maxX:1,minY:0,maxY:0},this._boundsDirty=!0,this._sourceBoundsDirty=!0,this._roundPixels=0,this._anchor=new rt({_onUpdate:()=>{this.onViewUpdate()}}),i&&(this.anchor=i),this.texture=s,this.allowChildren=!1,this.roundPixels=n!=null?n:!1,o&&(this.width=o),a&&(this.height=a)}static from(t,e=!1){return t instanceof A?new Ft(t):new Ft(A.from(t,e))}set texture(t){t||(t=A.EMPTY);const e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this.onViewUpdate())}get texture(){return this._texture}get bounds(){return this._boundsDirty&&(this._updateBounds(),this._boundsDirty=!1),this._bounds}get sourceBounds(){return this._sourceBoundsDirty&&(this._updateSourceBounds(),this._sourceBoundsDirty=!1),this._sourceBounds}containsPoint(t){const e=this.sourceBounds;return t.x>=e.maxX&&t.x<=e.minX&&t.y>=e.maxY&&t.y<=e.minY}addBounds(t){const e=this._texture.trim?this.sourceBounds:this.bounds;t.addFrame(e.minX,e.minY,e.maxX,e.maxY)}onViewUpdate(){this._didChangeId+=4096,this._didSpriteUpdate=!0,this._sourceBoundsDirty=this._boundsDirty=!0,!this.didViewUpdate&&(this.didViewUpdate=!0,this.renderGroup&&this.renderGroup.onChildViewUpdate(this))}_updateBounds(){dr(this._bounds,this._anchor,this._texture,0)}_updateSourceBounds(){const t=this._anchor,e=this._texture,s=this._sourceBounds,{width:i,height:n}=e.orig;s.maxX=-t._x*i,s.minX=s.maxX+i,s.maxY=-t._y*n,s.minY=s.maxY+n}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const e=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(e)}this._texture=null,this._bounds=null,this._sourceBounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width)}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,e){var s;let i,n;typeof t!="object"?(i=t,n=e!=null?e:t):(i=t.width,n=(s=t.height)!=null?s:t.width),i!==void 0&&this._setWidth(i,this._texture.orig.width),n!==void 0&&this._setHeight(n,this._texture.orig.height)}}const cv=new lt;function ps(r,t,e){const s=cv;r.measurable=!0,nr(r,e,s),t.addBoundsMask(s),r.measurable=!1}function fs(r,t,e){const s=kt.get();r.measurable=!0;const i=Ut.get().identity(),n=dn(r,e,i);is(r,s,n),r.measurable=!1,t.addBoundsMask(s),Ut.return(i),kt.return(s)}function dn(r,t,e){return r&&r!==t&&(dn(r.parent,t,e),r.updateLocalTransform(),e.append(r.localTransform)),e}class pn{constructor(t){this.priority=0,this.pipe="alphaMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof Ft),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask=null}addBounds(t,e){ps(this.mask,t,e)}addLocalBounds(t,e){fs(this.mask,t,e)}containsPoint(t,e){const s=this.mask;return e(s,t)}destroy(){this.reset()}static test(t){return t instanceof Ft}}pn.extension=v.MaskEffect;class fn{constructor(t){this.priority=0,this.pipe="colorMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return typeof t=="number"}}fn.extension=v.MaskEffect;class mn{constructor(t){this.priority=0,this.pipe="stencilMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null}addBounds(t,e){ps(this.mask,t,e)}addLocalBounds(t,e){fs(this.mask,t,e)}containsPoint(t,e){const s=this.mask;return e(s,t)}destroy(){this.reset()}static test(t){return t instanceof V}}mn.extension=v.MaskEffect;class Qt extends et{constructor(t){t.resource||(t.resource=X.get().createCanvas()),t.width||(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),t.height||(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity;const e=t.resource;(this.pixelWidth!==e.width||this.pixelWidth!==e.height)&&this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,e=this.height,s=this._resolution){const i=super.resize(t,e,s);return i&&this.resizeCanvas(),i}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}}Qt.extension=v.TextureSource;class ge extends et{constructor(t){if(t.resource&&globalThis.HTMLImageElement&&t.resource instanceof HTMLImageElement){const e=X.get().createCanvas(t.resource.width,t.resource.height);e.getContext("2d").drawImage(t.resource,0,0),t.resource=e}super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap}}ge.extension=v.TextureSource;let gn;async function _n(){return gn!=null||(gn=(async()=>{var r;const t=document.createElement("canvas").getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const e=await new Promise(o=>{const a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return"premultiply-alpha-on-upload";const s=t.createTexture();t.bindTexture(t.TEXTURE_2D,s);const i=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,i),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,s,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e);const n=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,n),t.deleteFramebuffer(i),t.deleteTexture(s),(r=t.getExtension("WEBGL_lose_context"))==null||r.loseContext(),n[0]<=n[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),gn}var dv=Object.defineProperty,pv=Object.defineProperties,fv=Object.getOwnPropertyDescriptors,Gh=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,gv=Object.prototype.propertyIsEnumerable,Ih=(r,t,e)=>t in r?dv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,xn=(r,t)=>{for(var e in t||(t={}))mv.call(t,e)&&Ih(r,e,t[e]);if(Gh)for(var e of Gh(t))gv.call(t,e)&&Ih(r,e,t[e]);return r},_v=(r,t)=>pv(r,fv(t));const ms=class Sx extends et{constructor(t){var e;super(t),this.isReady=!1,this.uploadMethodId="video",t=xn(xn({},Sx.defaultOptions),t),this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=(e=t.alphaMode)!=null?e:"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const t=ht.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const t=this.resource,e=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(e.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await _n(),this._load=new Promise((s,i)=>{this.isValid?s(this):(this._resolve=s,this._reject=i,e.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${e.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){const t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(ht.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(ht.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(ht.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement||globalThis.VideoFrame&&t instanceof VideoFrame}};ms.extension=v.TextureSource,ms.defaultOptions=_v(xn({},et.defaultOptions),{autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1}),ms.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let pr=ms,xv=class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){return this._cache.get(t)}set(t,e){const s=Pt(t);let i;for(let u=0;u{n.set(u,e)});const o=[...n.keys()],a={cacheKeys:o,keys:s};s.forEach(u=>{this._cacheMap.set(u,a)}),o.forEach(u=>{const l=i?i[u]:e;this._cache.has(u)&&this._cache.get(u),this._cache.set(u,n.get(u))})}remove(t){if(!this._cacheMap.has(t))return;const e=this._cacheMap.get(t);e.cacheKeys.forEach(s=>{this._cache.delete(s)}),e.keys.forEach(s=>{this._cacheMap.delete(s)})}get parsers(){return this._parsers}};const Y=new xv,bn=[];D.handleByList(v.TextureSource,bn);function Bh(r={}){const t=r&&r.resource,e=t?r.resource:r,s=t?r:{resource:r};for(let i=0;i{Y.has(s)&&Y.remove(s)}),t||Y.set(s,n),n}function Dh(r,t=!1){return typeof r=="string"?Y.get(r):r instanceof et?new A({source:r}):Fh(r,t)}A.from=Dh,D.add(pn,fn,mn,pr,ge,Qt,cs);var $=(r=>(r[r.MAP_READ=1]="MAP_READ",r[r.MAP_WRITE=2]="MAP_WRITE",r[r.COPY_SRC=4]="COPY_SRC",r[r.COPY_DST=8]="COPY_DST",r[r.INDEX=16]="INDEX",r[r.VERTEX=32]="VERTEX",r[r.UNIFORM=64]="UNIFORM",r[r.STORAGE=128]="STORAGE",r[r.INDIRECT=256]="INDIRECT",r[r.QUERY_RESOLVE=512]="QUERY_RESOLVE",r[r.STATIC=1024]="STATIC",r))($||{});class _t extends ct{constructor(t){let{data:e,size:s}=t;const{usage:i,label:n,shrinkToFit:o}=t;super(),this.uid=Z("buffer"),this._resourceType="buffer",this._resourceId=Z("resource"),this._touched=0,this._updateID=1,this.shrinkToFit=!0,e instanceof Array&&(e=new Float32Array(e)),this._data=e,s=s!=null?s:e==null?void 0:e.byteLength;const a=!!e;this.descriptor={size:s,usage:i,mappedAtCreation:a,label:n},this.shrinkToFit=o!=null?o:!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get static(){return!!(this.descriptor.usage&$.STATIC)}set static(t){t?this.descriptor.usage|=$.STATIC:this.descriptor.usage&=~$.STATIC}setDataWithSize(t,e,s){if(this._updateID++,this._updateSize=e*t.BYTES_PER_ELEMENT,this._data===t){s&&this.emit("update",this);return}const i=this._data;if(this._data=t,i.length!==t.length){!this.shrinkToFit&&t.byteLengtha&&(a=p),f>u&&(u=f),pe.destroy()),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const vv=new Float32Array(1),yv=new Uint32Array(1);class yn extends Oe{constructor(){const t=new _t({data:vv,label:"attribute-batch-buffer",usage:$.VERTEX|$.COPY_DST,shrinkToFit:!1}),e=new _t({data:yv,label:"index-batch-buffer",usage:$.INDEX|$.COPY_DST,shrinkToFit:!1}),s=6*4;super({attributes:{aPosition:{buffer:t,format:"float32x2",stride:s,offset:0,location:1},aUV:{buffer:t,format:"float32x2",stride:s,offset:2*4,location:3},aColor:{buffer:t,format:"unorm8x4",stride:s,offset:4*4,location:0},aTextureIdAndRound:{buffer:t,format:"uint16x2",stride:s,offset:5*4,location:2}},indexBuffer:e})}}class Lt{constructor(t){this.resources=Object.create(null),this._dirty=!0;let e=0;for(const s in t){const i=t[s];this.setResource(i,e++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let e=0;for(const s in this.resources)t[e++]=this.resources[s]._resourceId;this._key=t.join("|")}setResource(t,e){var s,i;const n=this.resources[e];t!==n&&(n&&((s=t.off)==null||s.call(t,"change",this.onResourceChange,this)),(i=t.on)==null||i.call(t,"change",this.onResourceChange,this),this.resources[e]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t){const e=this.resources;for(const s in e)e[s]._touched=t}destroy(){var t;const e=this.resources;for(const s in e){const i=e[s];(t=i.off)==null||t.call(i,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(){this._dirty=!0,this._updateKey()}}const wt=16,kh={};function gs(r,t){let e=0;for(let s=0;s>>0;return kh[e]||Tv(r,e)}function Tv(r,t){const e={};let s=0;for(let n=0;n0){const n=new Uint8Array(r,e*8,i);new Uint8Array(t,e*8,i).set(n)}}const Lh={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var st=(r=>(r[r.DISABLED=0]="DISABLED",r[r.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",r[r.MASK_ACTIVE=2]="MASK_ACTIVE",r[r.RENDERING_MASK_REMOVE=3]="RENDERING_MASK_REMOVE",r[r.NONE=4]="NONE",r))(st||{});function Sn(r,t){return t.alphaMode==="no-premultiply-alpha"&&Lh[r]||r}class En{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;tt in r?Sv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Hh=(r,t)=>{for(var e in t||(t={}))Ev.call(t,e)&&Nh(r,e,t[e]);if($h)for(var e of $h(t))Av.call(t,e)&&Nh(r,e,t[e]);return r};class An{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.blendMode="normal",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null}}let fr=0;const Xh=class Ex{constructor(t={}){this.uid=Z("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._vertexSize=6,this._elements=[],this._batchPool=[],this._batchPoolIndex=0,this._textureBatchPool=[],this._textureBatchPoolIndex=0,t=Hh(Hh({},Ex.defaultOptions),t);const{vertexSize:e,indexSize:s}=t;this.attributeBuffer=new Tn(e*this._vertexSize*4),this.indexBuffer=new Uint16Array(s)}begin(){this.batchIndex=0,this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0,this._batchPoolIndex=0,this._textureBatchPoolIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t.indexStart=this.indexSize,t.location=this.attributeSize,t.batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.vertexSize*this._vertexSize}checkAndUpdateTexture(t,e){const s=t.batch.textures.ids[e._source.uid];return!s&&s!==0?!1:(t.textureId=s,t.texture=e,!0)}updateElement(t){this.dirty=!0,t.packAttributes(this.attributeBuffer.float32View,this.attributeBuffer.uint32View,t.location,t.textureId)}break(t){const e=this._elements;let s=this._textureBatchPool[this._textureBatchPoolIndex++]||new En;if(s.clear(),!e[this.elementStart])return;const i=e[this.elementStart];let n=Sn(i.blendMode,i.texture._source);this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const o=this.attributeBuffer.float32View,a=this.attributeBuffer.uint32View,u=this.indexBuffer;let l=this._batchIndexSize,h=this._batchIndexStart,c="startBatch",d=this._batchPool[this._batchPoolIndex++]||new An;for(let p=this.elementStart;p=wt||_)&&(this._finishBatch(d,h,l-h,s,n,t,c),c="renderBatch",h=l,n=m,s=this._textureBatchPool[this._textureBatchPoolIndex++]||new En,s.clear(),d=this._batchPool[this._batchPoolIndex++]||new An,++fr),f.textureId=g._textureBindLocation=s.count,s.ids[g.uid]=s.count,s.textures[s.count++]=g,f.batch=d,l+=f.indexSize,f.packAttributes(o,a,f.location,f.textureId),f.packIndex(u,f.indexStart,f.location/this._vertexSize)}s.count>0&&(this._finishBatch(d,h,l-h,s,n,t,c),h=l,++fr),this.elementStart=this.elementSize,this._batchIndexStart=h,this._batchIndexSize=l}_finishBatch(t,e,s,i,n,o,a){t.gpuBindGroup=null,t.action=a,t.batcher=this,t.textures=i,t.blendMode=n,t.start=e,t.size=s,++fr,o.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){t*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(t*4)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){const e=Math.max(t,this.attributeBuffer.size*2),s=new Tn(e);_s(this.attributeBuffer.rawBinaryData,s.rawBinaryData),this.attributeBuffer=s}_resizeIndexBuffer(t){const e=this.indexBuffer;let s=Math.max(t,e.length*1.5);s+=s%2;const i=s>65535?new Uint32Array(s):new Uint16Array(s);if(i.BYTES_PER_ELEMENT!==e.BYTES_PER_ELEMENT)for(let n=0;n>16&255,i=r>>8&255,n=r&255,o=t>>16&255,a=t>>8&255,u=t&255,l=s+(o-s)*e,h=i+(a-i)*e,c=n+(u-n)*e;return(l<<16)+(h<<8)+c}const Ce=16777215;function bs(r,t){return r===Ce||t===Ce?r+t-Ce:Mn(r,t,.5)}function Pv(r,t,e){const s=(e>>24&255)/255,i=t*s*255,n=((r&255)<<16)+(r&65280)+(r>>16&255),o=e&16777215;let a;return n===Ce||o===Ce?a=n+o-Ce:a=Mn(n,o,.5),a+(i<<24)}class vs{constructor(){this.batcher=null,this.batch=null,this.applyTransform=!0,this.roundPixels=0}get blendMode(){return this.applyTransform?this.renderable.groupBlendMode:"normal"}packIndex(t,e,s){const i=this.geometryData.indices;for(let n=0;n>16|c&65280|(c&255)<<16;if(this.applyTransform){const p=bs(d,o.groupColor)+(this.alpha*o.groupAlpha*255<<24),f=o.groupTransform,g=i<<16|this.roundPixels&65535,m=f.a,_=f.b,x=f.c,b=f.d,y=f.tx,S=f.ty;for(let P=l;P=0&&a>=0&&i>=0&&n>=0))return t;const u=Math.ceil(2.3*Math.sqrt(o+a)),l=u*8+(i?4:0)+(n?4:0);if(l===0)return t;if(u===0)return t[0]=t[6]=e+i,t[1]=t[3]=s+n,t[2]=t[4]=e-i,t[5]=t[7]=s-n,t;let h=0,c=u*4+(i?2:0)+2,d=c,p=l,f=i+o,g=n,m=e+f,_=e-f,x=s+g;if(t[h++]=m,t[h++]=x,t[--c]=x,t[--c]=_,n){const y=s-g;t[d++]=_,t[d++]=y,t[--p]=y,t[--p]=m}for(let y=1;y0&&(i[n++]=u,i[n++]=l,i[n++]=u-1),u++;i[n++]=l+1,i[n++]=l,i[n++]=u-1}},zh=1e-4,On=1e-4;function jh(r){const t=r.length;if(t<6)return 1;let e=0;for(let s=0,i=r[t-2],n=r[t-1];sc&&(c+=Math.PI*2);let d=h;const p=c-h,f=Math.abs(p),g=Math.sqrt(u*u+l*l),m=(15*f*Math.sqrt(g)/Math.PI>>0)+1,_=p/m;if(d+=_,a){o.push(r,t),o.push(e,s);for(let x=1,b=d;x=0&&(h.join==="round"?x+=xe(T,E,T-C*B,E-M*B,T-q*B,E-J*B,m,!1)+4:x+=2,m.push(T-q*F,E-J*F),m.push(T+q*B,E+J*B));continue}const tl=(-C+R)*(-M+E)-(-C+T)*(-M+w),el=(-q+L)*(-J+E)-(-q+T)*(-J+k),qr=(Kt*el-Je*tl)/Kr,Zr=(tr*tl-Qe*el)/Kr,Di=(qr-T)*(qr-T)+(Zr-E)*(Zr-E),oe=T+(qr-T)*B,ae=E+(Zr-E)*B,ue=T-(qr-T)*F,le=E-(Zr-E)*F,Vx=Math.min(Kt*Kt+Qe*Qe,Je*Je+tr*tr),rl=er?B:F,Wx=Vx+rl*rl*S;Di<=Wx?h.join==="bevel"||Di/S>P?(er?(m.push(oe,ae),m.push(T+C*F,E+M*F),m.push(oe,ae),m.push(T+q*F,E+J*F)):(m.push(T-C*B,E-M*B),m.push(ue,le),m.push(T-q*B,E-J*B),m.push(ue,le)),x+=2):h.join==="round"?er?(m.push(oe,ae),m.push(T+C*F,E+M*F),x+=xe(T,E,T+C*F,E+M*F,T+q*F,E+J*F,m,!0)+4,m.push(oe,ae),m.push(T+q*F,E+J*F)):(m.push(T-C*B,E-M*B),m.push(ue,le),x+=xe(T,E,T-C*B,E-M*B,T-q*B,E-J*B,m,!1)+4,m.push(T-q*B,E-J*B),m.push(ue,le)):(m.push(oe,ae),m.push(ue,le)):(m.push(T-C*B,E-M*B),m.push(T+C*F,E+M*F),h.join==="round"?er?x+=xe(T,E,T+C*F,E+M*F,T+q*F,E+J*F,m,!0)+2:x+=xe(T,E,T-C*B,E-M*B,T-q*B,E-J*B,m,!1)+2:h.join==="miter"&&Di/S<=P&&(er?(m.push(ue,le),m.push(ue,le)):(m.push(oe,ae),m.push(oe,ae)),x+=2),m.push(T-q*B,E-J*B),m.push(T+q*F,E+J*F),x+=2)}R=r[(_-2)*2],w=r[(_-2)*2+1],T=r[(_-1)*2],E=r[(_-1)*2+1],C=-(w-E),M=R-T,mt=Math.sqrt(C*C+M*M),C/=mt,M/=mt,C*=y,M*=y,m.push(T-C*B,E-M*B),m.push(T+C*F,E+M*F),f||(h.cap==="round"?x+=xe(T-C*(B-F)*.5,E-M*(B-F)*.5,T-C*B,E-M*B,T+C*F,E+M*F,m,!1)+2:h.cap==="square"&&(x+=Vh(T,E,C,M,B,F,!1,m)));const jx=On*On;for(let K=b;K80*e){a=l=r[0],u=h=r[1];for(var f=e;fl&&(l=c),d>h&&(h=d);p=Math.max(l-a,h-u),p=p!==0?32767/p:0}return mr(n,o,e,a,u,p,0),o}function Yh(r,t,e,s,i){var n,o;if(i===In(r,t,e,s)>0)for(n=t;n=t;n-=s)o=Zh(n,r[n],r[n+1],o);return o&&Ss(o,o.next)&&(_r(o),o=o.next),o}function be(r,t){if(!r)return r;t||(t=r);var e=r,s;do if(s=!1,!e.steiner&&(Ss(e,e.next)||Q(e.prev,e,e.next)===0)){if(_r(e),e=t=e.prev,e===e.next)break;s=!0}else e=e.next;while(s||e!==t);return t}function mr(r,t,e,s,i,n,o){if(r){!o&&n&&Dv(r,s,i,n);for(var a=r,u,l;r.prev!==r.next;){if(u=r.prev,l=r.next,n?Rv(r,s,i,n):wv(r)){t.push(u.i/e|0),t.push(r.i/e|0),t.push(l.i/e|0),_r(r),r=l.next,a=l.next;continue}if(r=l,r===a){o?o===1?(r=Mv(be(r),t,e),mr(r,t,e,s,i,n,2)):o===2&&Ov(r,t,e,s,i,n):mr(be(r),t,e,s,i,n,1);break}}}}function wv(r){var t=r.prev,e=r,s=r.next;if(Q(t,e,s)>=0)return!1;for(var i=t.x,n=e.x,o=s.x,a=t.y,u=e.y,l=s.y,h=in?i>o?i:o:n>o?n:o,p=a>u?a>l?a:l:u>l?u:l,f=s.next;f!==t;){if(f.x>=h&&f.x<=d&&f.y>=c&&f.y<=p&&Ge(i,a,n,u,o,l,f.x,f.y)&&Q(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Rv(r,t,e,s){var i=r.prev,n=r,o=r.next;if(Q(i,n,o)>=0)return!1;for(var a=i.x,u=n.x,l=o.x,h=i.y,c=n.y,d=o.y,p=au?a>l?a:l:u>l?u:l,m=h>c?h>d?h:d:c>d?c:d,_=Cn(p,f,t,e,s),x=Cn(g,m,t,e,s),b=r.prevZ,y=r.nextZ;b&&b.z>=_&&y&&y.z<=x;){if(b.x>=p&&b.x<=g&&b.y>=f&&b.y<=m&&b!==i&&b!==o&&Ge(a,h,u,c,l,d,b.x,b.y)&&Q(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=p&&y.x<=g&&y.y>=f&&y.y<=m&&y!==i&&y!==o&&Ge(a,h,u,c,l,d,y.x,y.y)&&Q(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=_;){if(b.x>=p&&b.x<=g&&b.y>=f&&b.y<=m&&b!==i&&b!==o&&Ge(a,h,u,c,l,d,b.x,b.y)&&Q(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=x;){if(y.x>=p&&y.x<=g&&y.y>=f&&y.y<=m&&y!==i&&y!==o&&Ge(a,h,u,c,l,d,y.x,y.y)&&Q(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function Mv(r,t,e){var s=r;do{var i=s.prev,n=s.next.next;!Ss(i,n)&&Kh(i,s,s.next,n)&&gr(i,n)&&gr(n,i)&&(t.push(i.i/e|0),t.push(s.i/e|0),t.push(n.i/e|0),_r(s),_r(s.next),s=r=n),s=s.next}while(s!==r);return be(s)}function Ov(r,t,e,s,i,n){var o=r;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&Lv(o,a)){var u=qh(o,a);o=be(o,o.next),u=be(u,u.next),mr(o,t,e,s,i,n,0),mr(u,t,e,s,i,n,0);return}a=a.next}o=o.next}while(o!==r)}function Cv(r,t,e,s){var i=[],n,o,a,u,l;for(n=0,o=t.length;n=e.next.y&&e.next.y!==e.y){var a=e.x+(i-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(a<=s&&a>n&&(n=a,o=e.x=e.x&&e.x>=l&&s!==e.x&&Ge(io.x||e.x===o.x&&Fv(o,e)))&&(o=e,c=d)),e=e.next;while(e!==u);return o}function Fv(r,t){return Q(r.prev,r,t.prev)<0&&Q(t.next,r,r.next)<0}function Dv(r,t,e,s){var i=r;do i.z===0&&(i.z=Cn(i.x,i.y,t,e,s)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,Uv(i)}function Uv(r){var t,e,s,i,n,o,a,u,l=1;do{for(e=r,r=null,n=null,o=0;e;){for(o++,s=e,a=0,t=0;t0||u>0&&s;)a!==0&&(u===0||!s||e.z<=s.z)?(i=e,e=e.nextZ,a--):(i=s,s=s.nextZ,u--),n?n.nextZ=i:r=i,i.prevZ=n,n=i;e=s}n.nextZ=null,l*=2}while(o>1);return r}function Cn(r,t,e,s,i){return r=(r-e)*i|0,t=(t-s)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r|t<<1}function kv(r){var t=r,e=r;do(t.x=(r-o)*(n-a)&&(r-o)*(s-a)>=(e-o)*(t-a)&&(e-o)*(n-a)>=(i-o)*(s-a)}function Lv(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!$v(r,t)&&(gr(r,t)&&gr(t,r)&&Nv(r,t)&&(Q(r.prev,r,t.prev)||Q(r,t.prev,t))||Ss(r,t)&&Q(r.prev,r,r.next)>0&&Q(t.prev,t,t.next)>0)}function Q(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function Ss(r,t){return r.x===t.x&&r.y===t.y}function Kh(r,t,e,s){var i=As(Q(r,t,e)),n=As(Q(r,t,s)),o=As(Q(e,s,r)),a=As(Q(e,s,t));return!!(i!==n&&o!==a||i===0&&Es(r,e,t)||n===0&&Es(r,s,t)||o===0&&Es(e,r,s)||a===0&&Es(e,t,s))}function Es(r,t,e){return t.x<=Math.max(r.x,e.x)&&t.x>=Math.min(r.x,e.x)&&t.y<=Math.max(r.y,e.y)&&t.y>=Math.min(r.y,e.y)}function As(r){return r>0?1:r<0?-1:0}function $v(r,t){var e=r;do{if(e.i!==r.i&&e.next.i!==r.i&&e.i!==t.i&&e.next.i!==t.i&&Kh(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function gr(r,t){return Q(r.prev,r,r.next)<0?Q(r,t,r.next)>=0&&Q(r,r.prev,t)>=0:Q(r,t,r.prev)<0||Q(r,r.next,t)<0}function Nv(r,t){var e=r,s=!1,i=(r.x+t.x)/2,n=(r.y+t.y)/2;do e.y>n!=e.next.y>n&&e.next.y!==e.y&&i<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(s=!s),e=e.next;while(e!==r);return s}function qh(r,t){var e=new Gn(r.i,r.x,r.y),s=new Gn(t.i,t.x,t.y),i=r.next,n=t.prev;return r.next=t,t.prev=r,e.next=i,i.prev=e,s.next=e,e.prev=s,n.next=s,s.prev=n,s}function Zh(r,t,e,s){var i=new Gn(r,t,e);return s?(i.next=s.next,i.prev=s,s.next.prev=i,s.next=i):(i.prev=i,i.next=i),i}function _r(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Gn(r,t,e){this.i=r,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Ts.deviation=function(r,t,e,s){var i=t&&t.length,n=i?t[0]*e:r.length,o=Math.abs(In(r,0,n,e));if(i)for(var a=0,u=t.length;a0&&(s+=r[i-1].length,e.holes.push(s))}return e};var Hv=ys.exports,Qh=ki(Hv);function Bn(r,t,e,s,i,n,o){const a=Qh(r,t,2);if(!a)return;for(let l=0;l=0&&o>=0&&(t[0]=s,t[1]=i,t[2]=s+n,t[3]=i,t[4]=s+n,t[5]=i+o,t[6]=s,t[7]=i+o),t},triangulate(r,t,e,s,i,n){let o=0;s*=e,t[s+o]=r[0],t[s+o+1]=r[1],o+=e,t[s+o]=r[2],t[s+o+1]=r[3],o+=e,t[s+o]=r[6],t[s+o+1]=r[7],o+=e,t[s+o]=r[4],t[s+o+1]=r[5],o+=e;const a=s/e;i[n++]=a,i[n++]=a+1,i[n++]=a+2,i[n++]=a+1,i[n++]=a+3,i[n++]=a+2}},Un={build(r,t){return t[0]=r.x,t[1]=r.y,t[2]=r.x2,t[3]=r.y2,t[4]=r.x3,t[5]=r.y3,t},triangulate(r,t,e,s,i,n){let o=0;s*=e,t[s+o]=r[0],t[s+o+1]=r[1],o+=e,t[s+o]=r[2],t[s+o+1]=r[3],o+=e,t[s+o]=r[4],t[s+o+1]=r[5];const a=s/e;i[n++]=a,i[n++]=a+1,i[n++]=a+2}},kn={rectangle:Dn,polygon:Fn,triangle:Un,circle:_e,ellipse:_e,roundedRectangle:_e},zv=new z;function Jh(r,t){const{geometryData:e,batches:s}=t;s.length=0,e.indices.length=0,e.vertices.length=0,e.uvs.length=0;for(let i=0;i{var p;const f=u.length,g=o.length/2,m=[],_=kn[h.type];if(_.build(h,m),c&&xs(m,c),s){const S=(p=h.closePath)!=null?p:!0;Wh(m,t,!1,S,o,2,g,u,f)}else if(e&&l===d){l!==0&&console.warn("[Pixi Graphics] only the last shape have be cut out");const S=[],P=m.slice();Vv(e.shapePath).forEach(R=>{S.push(P.length/2),P.push(...R)}),Bn(P,S,o,2,g,u,f)}else _.triangulate(m,o,2,g,u,f);const x=a.length/2,b=t.texture;if(b!==A.WHITE){const S=t.matrix;c&&S.append(c.clone().invert()),wn(o,2,g,a,x,2,o.length/2-g,S)}else Rn(a,x,2,o.length/2-g);const y=H.get(vs);y.indexOffset=f,y.indexSize=u.length-f,y.vertexOffset=g,y.vertexSize=o.length/2-g,y.color=t.color,y.alpha=t.alpha,y.texture=b,y.geometryData=n,i.push(y)})}function Vv(r){if(!r)return[];const t=r.shapePrimitives,e=[];for(let s=0;s{H.return(s)})}destroy(){for(const t of this._needsContextNeedsRebuild)this._gpuContextHash[t.uid]&&this.onGraphicsContextDestroy(t);this._needsContextNeedsRebuild.length=0}};Ln.extension={type:[v.WebGLSystem,v.WebGPUSystem,v.CanvasSystem],name:"graphicsContext"},Ln.defaultOptions={bezierSmoothness:.5};let Ps=Ln;const Wv={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8},$n=0,Nn=1,Hn=2,Xn=3,zn=4,jn=5,Vn=class Ax{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<$n)}set blend(t){!!(this.data&1<<$n)!==t&&(this.data^=1<<$n)}get offsets(){return!!(this.data&1<>16&255)/255,e[s++]=(r>>8&255)/255,e[s++]=(r&255)/255,e[s++]=t}function xr(r,t,e){const s=(r>>24&255)/255;t[e++]=(r&255)/255*s,t[e++]=(r>>8&255)/255*s,t[e++]=(r>>16&255)/255*s,t[e++]=s}class Wn{constructor(t,e){this.state=Ct.for2d(),this._graphicsBatchesHash=Object.create(null),this.renderer=t,this._adaptor=e,this._adaptor.init()}validateRenderable(t){const e=t.context,s=!!this._graphicsBatchesHash[t.uid],i=this.renderer.graphicsContext.updateGpuContext(e);return!!(i.isBatchable||s!==i.isBatchable)}addRenderable(t,e){const s=this.renderer.graphicsContext.updateGpuContext(t.context);t._didGraphicsUpdate&&(t._didGraphicsUpdate=!1,this._rebuild(t)),s.isBatchable?this._addToBatcher(t,e):(this.renderer.renderPipes.batch.break(e),e.add(t))}updateRenderable(t){const e=this._graphicsBatchesHash[t.uid];if(e)for(let s=0;s{const a=H.get(vs);return o.copyTo(a),a.renderable=t,a.roundPixels=i,a});return this._graphicsBatchesHash[t.uid]=n,t.on("destroyed",()=>{this.destroyRenderable(t)}),n}_removeBatchForRenderable(t){this._graphicsBatchesHash[t].forEach(e=>{H.return(e)}),this._graphicsBatchesHash[t]=null}destroy(){this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null;for(const t in this._graphicsBatchesHash)this._removeBatchForRenderable(t);this._graphicsBatchesHash=null}}Wn.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"graphics"},D.add(Wn),D.add(Ps);const Yn=Object.create(null),sc=Object.create(null);function br(r,t){let e=sc[r];return e===void 0&&(Yn[t]===void 0&&(Yn[t]=1),sc[r]=e=Yn[t]++),e}function ic(r,t){switch(r){case"f32":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"mat2x2":return new Float32Array([1,0,0,1]);case"mat3x3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var Kv=Object.defineProperty,nc=Object.getOwnPropertySymbols,qv=Object.prototype.hasOwnProperty,Zv=Object.prototype.propertyIsEnumerable,oc=(r,t,e)=>t in r?Kv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ac=(r,t)=>{for(var e in t||(t={}))qv.call(t,e)&&oc(r,e,t[e]);if(nc)for(var e of nc(t))Zv.call(t,e)&&oc(r,e,t[e]);return r};const uc=class Px{constructor(t,e){this._touched=0,this.uid=Z("uniform"),this._resourceType="uniformGroup",this._resourceId=Z("resource"),this.isUniformGroup=!0,this._dirtyId=0;var s,i;e=ac(ac({},Px.defaultOptions),e),this.uniformStructures=t;const n={};for(const o in t){const a=t[o];a.name=o,a.size=(s=a.size)!=null?s:1,(i=a.value)!=null||(a.value=ic(a.type,a.size)),n[o]=a.value}this.uniforms=n,this._dirtyId=1,this.ubo=e.ubo,this.isStatic=e.isStatic,this._signature=br(Object.keys(n).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};uc.defaultOptions={ubo:!1,isStatic:!1};let it=uc;class ws{constructor(){this.batcher=null,this.batch=null,this.roundPixels=0,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get blendMode(){return this.mesh.groupBlendMode}reset(){this.mesh=null,this.texture=null,this.batcher=null,this.batch=null}packIndex(t,e,s){const i=this.geometry.indices;for(let n=0;n"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new Lt({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this.renderer=t,this._adaptor=e,this._adaptor.init()}validateRenderable(t){const e=this._getMeshData(t),s=e.batched,i=t.batched;if(e.batched=i,s!==i)return!0;if(i){const n=t._geometry;if(n.indices.length!==e.indexSize||n.positions.length!==e.vertexSize)return e.indexSize=n.indices.length,e.vertexSize=n.positions.length,!0;const o=this._getBatchableMesh(t),a=t.texture;if(o.texture._source!==a._source&&o.texture._source!==a._source)return!o.batcher.checkAndUpdateTexture(o,a)}return!1}addRenderable(t,e){const s=this.renderer.renderPipes.batch,{batched:i}=this._getMeshData(t);if(i){const n=this._getBatchableMesh(t);n.texture=t._texture,n.geometry=t._geometry,s.addToBatch(n)}else s.break(e),e.add({renderPipeId:"mesh",mesh:t})}updateRenderable(t){if(t.batched){const e=this._gpuBatchableMeshHash[t.uid];e.texture=t._texture,e.geometry=t._geometry,e.batcher.updateElement(e)}}destroyRenderable(t){this._meshDataHash[t.uid]=null;const e=this._gpuBatchableMeshHash[t.uid];e&&(H.return(e),this._gpuBatchableMeshHash[t.uid]=null)}execute({mesh:t}){if(!t.isRenderable)return;t.state.blendMode=t.groupBlendMode;const e=this.localUniforms;e.uniforms.uTransformMatrix=t.groupTransform,e.uniforms.uRound=this.renderer._roundPixels|t._roundPixels,e.update(),xr(t.groupColorAlpha,e.uniforms.uColor,0),this._adaptor.execute(this,t)}_getMeshData(t){return this._meshDataHash[t.uid]||this._initMeshData(t)}_initMeshData(t){var e,s;return this._meshDataHash[t.uid]={batched:t.batched,indexSize:(e=t._geometry.indices)==null?void 0:e.length,vertexSize:(s=t._geometry.positions)==null?void 0:s.length},t.on("destroyed",()=>{this.destroyRenderable(t)}),this._meshDataHash[t.uid]}_getBatchableMesh(t){return this._gpuBatchableMeshHash[t.uid]||this._initBatchableMesh(t)}_initBatchableMesh(t){const e=H.get(ws);return e.mesh=t,e.texture=t._texture,e.roundPixels=this.renderer._roundPixels|t._roundPixels,this._gpuBatchableMeshHash[t.uid]=e,e.mesh=t,e}destroy(){for(const t in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[t]&&H.return(this._gpuBatchableMeshHash[t]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.destroy(),this._adaptor=null,this.renderer=null}}Kn.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"mesh"},D.add(Kn);class Rs{constructor(){this.vertexSize=4,this.indexSize=6,this.location=0,this.batcher=null,this.batch=null,this.roundPixels=0}get blendMode(){return this.renderable.groupBlendMode}packAttributes(t,e,s,i){const n=this.renderable,o=this.texture,a=n.groupTransform,u=a.a,l=a.b,h=a.c,c=a.d,d=a.tx,p=a.ty,f=this.bounds,g=f.maxX,m=f.minX,_=f.maxY,x=f.minY,b=o.uvs,y=n.groupColorAlpha,S=i<<16|this.roundPixels&65535;t[s+0]=u*m+h*x+d,t[s+1]=c*x+l*m+p,t[s+2]=b.x0,t[s+3]=b.y0,e[s+4]=y,e[s+5]=S,t[s+6]=u*g+h*x+d,t[s+7]=c*x+l*g+p,t[s+8]=b.x1,t[s+9]=b.y1,e[s+10]=y,e[s+11]=S,t[s+12]=u*g+h*_+d,t[s+13]=c*_+l*g+p,t[s+14]=b.x2,t[s+15]=b.y2,e[s+16]=y,e[s+17]=S,t[s+18]=u*m+h*_+d,t[s+19]=c*_+l*m+p,t[s+20]=b.x3,t[s+21]=b.y3,e[s+22]=y,e[s+23]=S}packIndex(t,e,s){t[e]=s+0,t[e+1]=s+1,t[e+2]=s+2,t[e+3]=s+0,t[e+4]=s+2,t[e+5]=s+3}reset(){this.renderable=null,this.texture=null,this.batcher=null,this.batch=null,this.bounds=null}}class qn{constructor(t){this._gpuText=Object.create(null),this._renderer=t}validateRenderable(t){var e;const s=this._getGpuText(t),i=t._getKey();if(s.currentKey!==i){const n=(e=t.resolution)!=null?e:this._renderer.resolution,{width:o,height:a}=this._renderer.canvasText.getTextureSize(t.text,n,t._style);return!(this._renderer.canvasText.getReferenceCount(s.currentKey)===1&&o===s.texture._source.width&&a===s.texture._source.height)}return!1}addRenderable(t,e){const s=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),this._renderer.renderPipes.batch.addToBatch(s)}updateRenderable(t){const e=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),e.batcher.updateElement(e)}destroyRenderable(t){this._destroyRenderableById(t.uid)}_destroyRenderableById(t){const e=this._gpuText[t];this._renderer.canvasText.decreaseReferenceCount(e.currentKey),H.return(e.batchableSprite),this._gpuText[t]=null}_updateText(t){const e=t._getKey(),s=this._getGpuText(t),i=s.batchableSprite;s.currentKey!==e&&this._updateGpuText(t),t._didTextUpdate=!1;const n=t._style.padding;dr(i.bounds,t._anchor,i.texture,n)}_updateGpuText(t){var e;const s=this._getGpuText(t),i=s.batchableSprite;s.texture&&this._renderer.canvasText.decreaseReferenceCount(s.currentKey);const n=(e=t.resolution)!=null?e:this._renderer.resolution;s.texture=i.texture=this._renderer.canvasText.getTexture(t.text,n,t._style,t._getKey()),s.currentKey=t._getKey(),i.texture=s.texture}_getGpuText(t){return this._gpuText[t.uid]||this.initGpuText(t)}initGpuText(t){const e={texture:null,currentKey:"--",batchableSprite:H.get(Rs)};return e.batchableSprite.renderable=t,e.batchableSprite.bounds={minX:0,maxX:1,minY:0,maxY:0},e.batchableSprite.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuText[t.uid]=e,this._updateText(t),t.on("destroyed",()=>{this.destroyRenderable(t)}),e}destroy(){for(const t in this._gpuText)this._destroyRenderableById(t);this._gpuText=null,this._renderer=null}}qn.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"text"};class lc{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,e){const s=X.get().createCanvas();s.width=t,s.height=e;const i=s.getContext("2d");return{canvas:s,context:i}}getOptimalCanvasAndContext(t,e,s=1){t=Math.ceil(t*s-1e-6),e=Math.ceil(e*s-1e-6),t=me(t),e=me(e);const i=(t<<17)+(e<<1);this._canvasPool[i]||(this._canvasPool[i]=[]);let n=this._canvasPool[i].pop();return n||(n=this._createCanvasAndContext(t,e)),n}returnCanvasAndContext(t){const{width:e,height:s}=t.canvas,i=(e<<17)+(s<<1);this._canvasPool[i].push(t)}clear(){this._canvasPool={}}}const jt=new lc;var Qv=Object.defineProperty,Jv=Object.defineProperties,t0=Object.getOwnPropertyDescriptors,hc=Object.getOwnPropertySymbols,e0=Object.prototype.hasOwnProperty,r0=Object.prototype.propertyIsEnumerable,cc=(r,t,e)=>t in r?Qv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,s0=(r,t)=>{for(var e in t||(t={}))e0.call(t,e)&&cc(r,e,t[e]);if(hc)for(var e of hc(t))r0.call(t,e)&&cc(r,e,t[e]);return r},i0=(r,t)=>Jv(r,t0(t));let n0=0;class dc{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,e,s){const i=new et(i0(s0({},this.textureOptions),{width:t,height:e,resolution:1,antialias:s,autoGarbageCollect:!0}));return new A({source:i,label:`texturePool_${n0++}`})}getOptimalTexture(t,e,s=1,i){let n=Math.ceil(t*s-1e-6),o=Math.ceil(e*s-1e-6);n=me(n),o=me(o);const a=(n<<17)+(o<<1)+(i?1:0);this._texturePool[a]||(this._texturePool[a]=[]);let u=this._texturePool[a].pop();return u||(u=this.createTexture(n,o,i)),u.source._resolution=s,u.source.width=n/s,u.source.height=o/s,u.source.pixelWidth=n,u.source.pixelHeight=o,u.frame.x=0,u.frame.y=0,u.frame.width=t,u.frame.height=e,u.updateUvs(),this._poolKeyHash[u.uid]=a,u}getSameSizeTexture(t,e=!1){const s=t.source;return this.getOptimalTexture(t.width,t.height,s._resolution,e)}returnTexture(t){const e=this._poolKeyHash[t.uid];this._texturePool[e].push(t)}clear(t){if(t=t!==!1,t)for(const e in this._texturePool){const s=this._texturePool[e];if(s)for(let i=0;i=0;s--){let i=e[s].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!a0.includes(i)&&(i=`"${i}"`),e[s]=i}return`${r.fontStyle} ${r.fontVariant} ${r.fontWeight} ${t} ${e.join(",")}`}const Qn={willReadFrequently:!0},Gt=class O{static get experimentalLetterSpacingSupported(){let t=O._experimentalLetterSpacingSupported;if(t!==void 0){const e=X.get().getCanvasRenderingContext2D().prototype;t=O._experimentalLetterSpacingSupported="letterSpacing"in e||"textLetterSpacing"in e}return t}constructor(t,e,s,i,n,o,a,u,l){this.text=t,this.style=e,this.width=s,this.height=i,this.lines=n,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=u,this.fontProperties=l}static measureText(t=" ",e,s=O._canvas,i=e.wordWrap){var n;const o=`${t}:${e.styleKey}`;if(O._measurementCache[o])return O._measurementCache[o];const a=vr(e),u=O.measureFont(a);u.fontSize===0&&(u.fontSize=e.fontSize,u.ascent=e.fontSize);const l=O.__context;l.font=a;const h=(i?O._wordWrap(t,e,s):t).split(/(?:\r\n|\r|\n)/),c=new Array(h.length);let d=0;for(let _=0;_0&&(i?n-=e:n+=(O.graphemeSegmenter(t).length-1)*e),n}static _wordWrap(t,e,s=O._canvas){const i=s.getContext("2d",Qn);let n=0,o="",a="";const u=Object.create(null),{letterSpacing:l,whiteSpace:h}=e,c=O._collapseSpaces(h),d=O._collapseNewlines(h);let p=!c;const f=e.wordWrapWidth+l,g=O._tokenize(t);for(let m=0;mf)if(o!==""&&(a+=O._addLine(o),o="",n=0),O.canBreakWords(_,e.breakWords)){const b=O.wordWrapSplit(_);for(let y=0;yf&&(a+=O._addLine(o),p=!1,o="",n=0),o+=S,n+=w}}else{o.length>0&&(a+=O._addLine(o),o="",n=0);const b=m===g.length-1;a+=O._addLine(_,!b),p=!1,o="",n=0}else x+n>f&&(p=!1,a+=O._addLine(o),o="",n=0),(o.length>0||!O.isBreakingSpace(_)||p)&&(o+=_,n+=x)}return a+=O._addLine(o,!1),a}static _addLine(t,e=!0){return t=O._trimRight(t),t=e?`${t} +`:t,t}static _getFromCache(t,e,s,i){let n=s[t];return typeof n!="number"&&(n=O._measureText(t,e,i)+e,s[t]=n),n}static _collapseSpaces(t){return t==="normal"||t==="pre-line"}static _collapseNewlines(t){return t==="normal"}static _trimRight(t){if(typeof t!="string")return"";for(let e=t.length-1;e>=0;e--){const s=t[e];if(!O.isBreakingSpace(s))break;t=t.slice(0,-1)}return t}static _isNewline(t){return typeof t!="string"?!1:O._newlines.includes(t.charCodeAt(0))}static isBreakingSpace(t,e){return typeof t!="string"?!1:O._breakingSpaces.includes(t.charCodeAt(0))}static _tokenize(t){const e=[];let s="";if(typeof t!="string")return e;for(let i=0;i{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const r=new Intl.Segmenter;return t=>[...r.segment(t)].map(e=>e.segment)}return r=>[...r]})(),Gt.experimentalLetterSpacing=!1,Gt._fonts={},Gt._newlines=[10,13],Gt._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],Gt._measurementCache={};let It=Gt;const gc=class Wu{constructor(t,e,s,i){this.uid=Z("fillGradient"),this.type="linear",this.gradientStops=[],this.x0=t,this.y0=e,this.x1=s,this.y1=i}addColorStop(t,e){return this.gradientStops.push({offset:t,color:W.shared.setValue(e).toHex()}),this}buildLinearGradient(){const t=Wu.defaultTextureSize,{gradientStops:e}=this,s=X.get().createCanvas();s.width=t,s.height=t;const i=s.getContext("2d"),n=i.createLinearGradient(0,0,Wu.defaultTextureSize,1);for(let g=0;g{s.addColorStop(i.offset,W.shared.setValue(i.color).toHex())}),s}}}else{const e=t.createPattern(r.texture.source.resource,"repeat"),s=r.matrix.copyTo(G.shared);return s.scale(r.texture.frame.width,r.texture.frame.height),e.setTransform(s),e}return"red"}class to{constructor(){this._activeTextures={}}getTextureSize(t,e,s){const i=It.measureText(t||" ",s);let n=Math.ceil(Math.ceil(Math.max(1,i.width)+s.padding*2)*e),o=Math.ceil(Math.ceil(Math.max(1,i.height)+s.padding*2)*e);return n=Math.ceil(n-1e-6),o=Math.ceil(o-1e-6),n=me(n),o=me(o),{width:n,height:o}}getTexture(t,e,s,i){if(this._activeTextures[i])return this._increaseReferenceCount(i),this._activeTextures[i].texture;const n=It.measureText(t||" ",s),o=Math.ceil(Math.ceil(Math.max(1,n.width)+s.padding*2)*e),a=Math.ceil(Math.ceil(Math.max(1,n.height)+s.padding*2)*e),u=jt.getOptimalCanvasAndContext(o,a),{canvas:l}=u;this.renderTextToCanvas(t,s,e,u);const h=Zn(l,o,a,e);if(s.trim){const c=mc(l,e);h.frame.copyFrom(c),h.updateUvs()}return this._activeTextures[i]={canvasAndContext:u,texture:h,usageCount:1},h}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}decreaseReferenceCount(t){const e=this._activeTextures[t];if(e.usageCount--,e.usageCount===0){jt.returnCanvasAndContext(e.canvasAndContext),ut.returnTexture(e.texture);const s=e.texture.source;s.resource=null,s.uploadMethodId="unknown",s.alphaMode="no-premultiply-alpha",this._activeTextures[t]=null}}getReferenceCount(t){return this._activeTextures[t].usageCount}renderTextToCanvas(t,e,s,i){var n,o,a,u,l,h;const{canvas:c,context:d}=i,p=vr(e),f=It.measureText(t||" ",e),g=f.lines,m=f.lineHeight,_=f.lineWidths,x=f.maxLineWidth,b=f.fontProperties,y=c.height;if(d.resetTransform(),d.scale(s,s),d.clearRect(0,0,f.width+4,f.height+4),(n=e._stroke)!=null&&n.width){const w=e._stroke;d.lineWidth=w.width,d.miterLimit=w.miterLimit,d.lineJoin=w.join,d.lineCap=w.cap}d.font=p;let S,P;const R=e.dropShadow?2:1;for(let w=0;we.texture.destroy(!0)),this.pages=null)}}var u0=h0,ro={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},l0=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function h0(r){var t=[];return r.replace(l0,function(e,s,i){var n=s.toLowerCase();for(i=d0(i),n=="m"&&i.length>2&&(t.push([s].concat(i.splice(0,2))),n="l",s=s=="m"?"l":"L");;){if(i.length==ro[n])return i.unshift(s),t.push(i);if(i.length0&&(i=s.pop(),i?(n=i.startX,o=i.startY):(n=0,o=0)),i=null;break;default:}l!=="Z"&&l!=="z"&&i===null&&(i={startX:n,startY:o},s.push(i))}return t}class Ii{constructor(t=0,e=0,s=0){this.type="circle",this.x=t,this.y=e,this.radius=s}clone(){return new Ii(this.x,this.y,this.radius)}contains(t,e){if(this.radius<=0)return!1;const s=this.radius*this.radius;let i=this.x-t,n=this.y-e;return i*=i,n*=n,i+n<=s}strokeContains(t,e,s){if(this.radius===0)return!1;const i=this.x-t,n=this.y-e,o=this.radius,a=s/2,u=Math.sqrt(i*i+n*n);return uo-a}getBounds(t){return t=t||new z,t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=this.radius*2,t.height=this.radius*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}}class Bi{constructor(t=0,e=0,s=0,i=0){this.type="ellipse",this.x=t,this.y=e,this.halfWidth=s,this.halfHeight=i}clone(){return new Bi(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,e){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let s=(t-this.x)/this.halfWidth,i=(e-this.y)/this.halfHeight;return s*=s,i*=i,s+i<=1}strokeContains(t,e,s){const{halfWidth:i,halfHeight:n}=this;if(i<=0||n<=0)return!1;const o=s/2,a=i-o,u=n-o,l=i+o,h=n+o,c=t-this.x,d=e-this.y,p=c*c/(a*a)+d*d/(u*u),f=c*c/(l*l)+d*d/(h*h);return p>1&&f<=1}getBounds(){return new z(this.x-this.halfWidth,this.y-this.halfHeight,this.halfWidth*2,this.halfHeight*2)}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}}function Tr(r,t,e,s,i,n){const o=r-e,a=t-s,u=i-e,l=n-s,h=o*u+a*l,c=u*u+l*l;let d=-1;c!==0&&(d=h/c);let p,f;d<0?(p=e,f=s):d>1?(p=i,f=n):(p=e+d*u,f=s+d*l);const g=r-p,m=t-f;return g*g+m*m}class Ae{constructor(...t){this.type="polygon";let e=Array.isArray(t[0])?t[0]:t;if(typeof e[0]!="number"){const s=[];for(let i=0,n=e.length;ie!=h>e&&t<(l-a)*((e-u)/(h-u))+a&&(s=!s)}return s}strokeContains(t,e,s){const i=s/2,n=i*i,{points:o}=this;for(let a=0;ai?l:i,n=ho?h:o}return t.x=s,t.width=i-s,t.y=n,t.height=o-n,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return this.points[this.points.length-2]}get y(){return this.points[this.points.length-1]}}const Os=(r,t,e,s,i,n)=>{const o=r-e,a=t-s,u=Math.sqrt(o*o+a*a);return u>=i-n&&u<=i+n};class Fi{constructor(t=0,e=0,s=0,i=0,n=20){this.type="roundedRectangle",this.x=t,this.y=e,this.width=s,this.height=i,this.radius=n}getBounds(t){return t=t||new z,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new Fi(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){const s=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(e>=this.y+s&&e<=this.y+this.height-s||t>=this.x+s&&t<=this.x+this.width-s)return!0;let i=t-(this.x+s),n=e-(this.y+s);const o=s*s;if(i*i+n*n<=o||(i=t-(this.x+this.width-s),i*i+n*n<=o)||(n=e-(this.y+this.height-s),i*i+n*n<=o)||(i=t-(this.x+s),i*i+n*n<=o))return!0}return!1}strokeContains(t,e,s){const{x:i,y:n,width:o,height:a,radius:u}=this,l=s/2,h=i+u,c=n+u,d=o-u*2,p=a-u*2,f=i+o,g=n+a;return(t>=i-l&&t<=i+l||t>=f-l&&t<=f+l)&&e>=c&&e<=c+p||(e>=n-l&&e<=n+l||e>=g-l&&e<=g+l)&&t>=h&&t<=h+d?!0:tf-u&&ef-u&&e>g-u&&Os(t,e,f-u,g-u,u,l)||tg-u&&Os(t,e,h,g-u,u,l)}}const f0=8,Cs=11920929e-14,m0=1,so=.01,Ie=0,ve=0;function io(r,t,e,s,i,n,o,a,u,l){const h=Math.min(.99,Math.max(0,l!=null?l:Ps.defaultOptions.bezierSmoothness));let c=(m0-h)/1;return c*=c,g0(t,e,s,i,n,o,a,u,r,c),r}function g0(r,t,e,s,i,n,o,a,u,l){no(r,t,e,s,i,n,o,a,u,l,0),u.push(o,a)}function no(r,t,e,s,i,n,o,a,u,l,h){if(h>f0)return;const c=Math.PI,d=(r+e)/2,p=(t+s)/2,f=(e+i)/2,g=(s+n)/2,m=(i+o)/2,_=(n+a)/2,x=(d+f)/2,b=(p+g)/2,y=(f+m)/2,S=(g+_)/2,P=(x+y)/2,R=(b+S)/2;if(h>0){let w=o-r,T=a-t;const E=Math.abs((e-o)*T-(s-a)*w),L=Math.abs((i-o)*T-(n-a)*w);let k,C;if(E>Cs&&L>Cs){if((E+L)*(E+L)<=l*(w*w+T*T)){if(Ie=c&&(k=2*c-k),C>=c&&(C=2*c-C),k+Cve){u.push(e,s);return}if(C>ve){u.push(i,n);return}}}}else if(E>Cs){if(E*E<=l*(w*w+T*T)){if(Ie=c&&(k=2*c-k),kve){u.push(e,s);return}}}else if(L>Cs){if(L*L<=l*(w*w+T*T)){if(Ie=c&&(k=2*c-k),kve){u.push(i,n);return}}}else if(w=P-(r+o)/2,T=R-(t+a)/2,w*w+T*T<=l){u.push(P,R);return}}no(r,t,d,p,x,b,P,R,u,l,h+1),no(P,R,y,S,m,_,o,a,u,l,h+1)}const _0=8,x0=11920929e-14,b0=1,v0=.01,bc=0;function vc(r,t,e,s,i,n,o,a){const u=Math.min(.99,Math.max(0,a!=null?a:Ps.defaultOptions.bezierSmoothness));let l=(b0-u)/1;return l*=l,y0(t,e,s,i,n,o,r,l),r}function y0(r,t,e,s,i,n,o,a){oo(o,r,t,e,s,i,n,a,0),o.push(i,n)}function oo(r,t,e,s,i,n,o,a,u){if(u>_0)return;const l=Math.PI,h=(t+s)/2,c=(e+i)/2,d=(s+n)/2,p=(i+o)/2,f=(h+d)/2,g=(c+p)/2;let m=n-t,_=o-e;const x=Math.abs((s-n)*_-(i-o)*m);if(x>x0){if(x*x<=a*(m*m+_*_)){if(bc=l&&(b=2*l-b),bn||o&&n>i)&&(u=2*Math.PI-u),a=a||Math.max(6,Math.floor(6*Math.pow(s,1/3)*(u/Math.PI))),a=Math.max(a,3);let l=u/a,h=i;l*=o?-1:1;for(let c=0;ch*a)}const Sr=Math.PI*2,uo={centerX:0,centerY:0,ang1:0,ang2:0},lo=({x:r,y:t},e,s,i,n,o,a,u)=>{r*=e,t*=s;const l=i*r-n*t,h=n*r+i*t;return u.x=l+o,u.y=h+a,u};function T0(r,t){const e=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),s=t===1.5707963267948966?.551915024494:e,i=Math.cos(r),n=Math.sin(r),o=Math.cos(r+t),a=Math.sin(r+t);return[{x:i-n*s,y:n+i*s},{x:o+a*s,y:a-o*s},{x:o,y:a}]}const Tc=(r,t,e,s)=>{const i=r*s-t*e<0?-1:1;let n=r*e+t*s;return n>1&&(n=1),n<-1&&(n=-1),i*Math.acos(n)},S0=(r,t,e,s,i,n,o,a,u,l,h,c,d)=>{const p=Math.pow(i,2),f=Math.pow(n,2),g=Math.pow(h,2),m=Math.pow(c,2);let _=p*f-p*m-f*g;_<0&&(_=0),_/=p*m+f*g,_=Math.sqrt(_)*(o===a?-1:1);const x=_*i/n*c,b=_*-n/i*h,y=l*x-u*b+(r+e)/2,S=u*x+l*b+(t+s)/2,P=(h-x)/i,R=(c-b)/n,w=(-h-x)/i,T=(-c-b)/n,E=Tc(1,0,P,R);let L=Tc(P,R,w,T);a===0&&L>0&&(L-=Sr),a===1&&L<0&&(L+=Sr),d.centerX=y,d.centerY=S,d.ang1=E,d.ang2=L};function Sc(r,t,e,s,i,n,o,a=0,u=0,l=0){if(n===0||o===0)return;const h=Math.sin(a*Sr/360),c=Math.cos(a*Sr/360),d=c*(t-s)/2+h*(e-i)/2,p=-h*(t-s)/2+c*(e-i)/2;if(d===0&&p===0)return;n=Math.abs(n),o=Math.abs(o);const f=Math.pow(d,2)/Math.pow(n,2)+Math.pow(p,2)/Math.pow(o,2);f>1&&(n*=Math.sqrt(f),o*=Math.sqrt(f)),S0(t,e,s,i,n,o,u,l,h,c,d,p,uo);let{ang1:g,ang2:m}=uo;const{centerX:_,centerY:x}=uo;let b=Math.abs(m)/(Sr/4);Math.abs(1-b)<1e-7&&(b=1);const y=Math.max(Math.ceil(b),1);m/=y;let S=r[r.length-2],P=r[r.length-1];const R={x:0,y:0};for(let w=0;w{const l=u.x-a.x,h=u.y-a.y,c=Math.sqrt(l*l+h*h),d=l/c,p=h/c;return{len:c,nx:d,ny:p}},n=(a,u)=>{a===0?r.moveTo(u.x,u.y):r.lineTo(u.x,u.y)};let o=t[t.length-1];for(let a=0;a0&&(f=-1,g=!0);const m=p/2;let _,x=Math.abs(Math.cos(m)*l/Math.sin(m));x>Math.min(c.len/2,d.len/2)?(x=Math.min(c.len/2,d.len/2),_=Math.abs(x*Math.sin(m)/Math.cos(m))):_=l;const b=u.x+d.nx*x+-d.ny*_*f,y=u.y+d.ny*x+d.nx*_*f,S=Math.atan2(c.ny,c.nx)+Math.PI/2*f,P=Math.atan2(d.ny,d.nx)-Math.PI/2*f;a===0&&r.moveTo(b+Math.cos(S)*_,y+Math.sin(S)*_),r.arc(b,y,_,S,P,g),o=u}}function Ac(r,t,e,s){var i;const n=(u,l)=>Math.sqrt((u.x-l.x)**2+(u.y-l.y)**2),o=(u,l,h)=>({x:u.x+(l.x-u.x)*h,y:u.y+(l.y-u.y)*h}),a=t.length;for(let u=0;u=2;c-=2)h[c]===h[c-2]&&h[c-1]===h[c-3]&&h.splice(c-1,2);return this.poly(h,!0,o)}ellipse(t,e,s,i,n){return this.drawShape(new Bi(t,e,s,i),n),this}roundRect(t,e,s,i,n,o){return this.drawShape(new Fi(t,e,s,i,n),o),this}drawShape(t,e){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:e}),this}startPoly(t,e){let s=this._currentPoly;return s&&this.endPoly(),s=new Ae,s.points.push(t,e),this._currentPoly=s,this}endPoly(t=!1){const e=this._currentPoly;return e&&e.points.length>2&&(e.closePath=t,this.shapePrimitives.push({shape:e})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new Ae,t)){const e=this.shapePrimitives[this.shapePrimitives.length-1];if(e){let s=e.shape.x,i=e.shape.y;if(!e.transform.isIdentity()){const n=e.transform,o=s;s=n.a*s+n.c*i+n.tx,i=n.b*o+n.d*i+n.ty}this._currentPoly.points.push(s,i)}else this._currentPoly.points.push(0,0)}}buildPath(){const t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let e=0;et in r?A0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Gs=(r,t)=>{for(var e in t||(t={}))P0.call(t,e)&&Rc(r,e,t[e]);if(wc)for(var e of wc(t))w0.call(t,e)&&Rc(r,e,t[e]);return r};function Mc(r,t){if(typeof r=="string"){const s=document.createElement("div");s.innerHTML=r.trim(),r=s.querySelector("svg")}const e={context:t,path:new ne};return Oc(r,e,null,null),t}function Oc(r,t,e,s){const i=r.children,{fillStyle:n,strokeStyle:o}=R0(r);n&&e?e=Gs(Gs({},e),n):n&&(e=n),o&&s?s=Gs(Gs({},s),o):o&&(s=o),t.context.fillStyle=e,t.context.strokeStyle=s;let a,u,l,h,c,d,p,f,g,m,_,x,b,y,S,P,R;switch(r.nodeName.toLowerCase()){case"path":y=r.getAttribute("d"),S=new ne(y),t.context.path(S),e&&t.context.fill(),s&&t.context.stroke();break;case"circle":p=ot(r,"cx",0),f=ot(r,"cy",0),g=ot(r,"r",0),t.context.ellipse(p,f,g,g),e&&t.context.fill(),s&&t.context.stroke();break;case"rect":a=ot(r,"x",0),u=ot(r,"y",0),P=ot(r,"width",0),R=ot(r,"height",0),m=ot(r,"rx",0),_=ot(r,"ry",0),m||_?t.context.roundRect(a,u,P,R,m||_):t.context.rect(a,u,P,R),e&&t.context.fill(),s&&t.context.stroke();break;case"ellipse":p=ot(r,"cx",0),f=ot(r,"cy",0),m=ot(r,"rx",0),_=ot(r,"ry",0),t.context.beginPath(),t.context.ellipse(p,f,m,_),e&&t.context.fill(),s&&t.context.stroke();break;case"line":l=ot(r,"x1",0),h=ot(r,"y1",0),c=ot(r,"x2",0),d=ot(r,"y2",0),t.context.beginPath(),t.context.moveTo(l,h),t.context.lineTo(c,d),s&&t.context.stroke();break;case"polygon":b=r.getAttribute("points"),x=b.match(/\d+/g).map(w=>parseInt(w,10)),t.context.poly(x,!0),e&&t.context.fill(),s&&t.context.stroke();break;case"polyline":b=r.getAttribute("points"),x=b.match(/\d+/g).map(w=>parseInt(w,10)),t.context.poly(x,!1),s&&t.context.stroke();break;case"g":case"svg":break;default:{console.info(`[SVG parser] <${r.nodeName}> elements unsupported`);break}}for(let w=0;wt in r?M0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ye=(r,t)=>{for(var e in t||(t={}))G0.call(t,e)&&Gc(r,e,t[e]);if(Cc)for(var e of Cc(t))I0.call(t,e)&&Gc(r,e,t[e]);return r},ho=(r,t)=>O0(r,C0(t));function Vt(r,t){var e,s;if(r==null)return null;let i,n;if(r!=null&&r.fill?(n=r.fill,i=ye(ye({},t),r)):(n=r,i=t),W.isColorLike(n)){const u=W.shared.setValue(n!=null?n:0);return ho(ye({},i),{color:u.toNumber(),alpha:u.alpha===1?i.alpha:u.alpha,texture:A.WHITE})}else if(n instanceof Jn){const u=n;return ho(ye({},i),{color:16777215,texture:u.texture,matrix:u.transform,fill:(e=i.fill)!=null?e:null})}else if(n instanceof Ms){const u=n;return u.buildLinearGradient(),ho(ye({},i),{color:16777215,texture:u.texture,matrix:u.transform})}const o=ye(ye({},t),r);if(o.texture){if(o.texture!==A.WHITE){const l=((s=o.matrix)==null?void 0:s.invert())||new G;l.scale(1/o.texture.frame.width,1/o.texture.frame.height),o.matrix=l}const u=o.texture.source.style;u.addressMode==="clamp-to-edge"&&(u.addressMode="repeat")}const a=W.shared.setValue(o.color);return o.alpha*=a.alpha,o.color=a.toNumber(),o.matrix=o.matrix?o.matrix.clone():null,o}var B0=Object.defineProperty,Ic=Object.getOwnPropertySymbols,F0=Object.prototype.hasOwnProperty,D0=Object.prototype.propertyIsEnumerable,Bc=(r,t,e)=>t in r?B0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Be=(r,t)=>{for(var e in t||(t={}))F0.call(t,e)&&Bc(r,e,t[e]);if(Ic)for(var e of Ic(t))D0.call(t,e)&&Bc(r,e,t[e]);return r};const U0=new j,Fc=new G,co=class $t extends ct{constructor(){super(...arguments),this.uid=Z("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this._activePath=new ne,this._transform=new G,this._fillStyle=Be({},$t.defaultFillStyle),this._strokeStyle=Be({},$t.defaultStrokeStyle),this._stateStack=[],this._tick=0,this._bounds=new lt,this._boundsDirty=!0}clone(){const t=new $t;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle=Be({},this._fillStyle),t._strokeStyle=Be({},this._strokeStyle),t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=Vt(t,$t.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=Vt(t,$t.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=Vt(t,$t.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=Vt(t,$t.defaultStrokeStyle),this}texture(t,e,s,i,n,o){return this.instructions.push({action:"texture",data:{image:t,dx:s||0,dy:i||0,dw:n||t.frame.width,dh:o||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:e?W.shared.setValue(e).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new ne,this}fill(t,e){let s;const i=this.instructions[this.instructions.length-1];return this._tick===0&&i&&i.action==="stroke"?s=i.data.path:s=this._activePath.clone(),s?(t!=null&&(e!==void 0&&typeof t=="number"&&(t={color:t,alpha:e}),this._fillStyle=Vt(t,$t.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:s}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:e}=this._activePath.getLastPoint(j.shared);this._activePath.clear(),this._activePath.moveTo(t,e)}stroke(t){let e;const s=this.instructions[this.instructions.length-1];return this._tick===0&&s&&s.action==="fill"?e=s.data.path:e=this._activePath.clone(),e?(t!=null&&(this._strokeStyle=Vt(t,$t.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:e}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){const e=this.instructions[this.instructions.length-1-t],s=this._activePath.clone();if(e&&(e.action==="stroke"||e.action==="fill"))if(e.data.hole)e.data.hole.addPath(s);else{e.data.hole=s;break}}return this._initNextPathLocation(),this}arc(t,e,s,i,n,o){this._tick++;const a=this._transform;return this._activePath.arc(a.a*t+a.c*e+a.tx,a.b*t+a.d*e+a.ty,s,i,n,o),this}arcTo(t,e,s,i,n){this._tick++;const o=this._transform;return this._activePath.arcTo(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,o.a*s+o.c*i+o.tx,o.b*s+o.d*i+o.ty,n),this}arcToSvg(t,e,s,i,n,o,a){this._tick++;const u=this._transform;return this._activePath.arcToSvg(t,e,s,i,n,u.a*o+u.c*a+u.tx,u.b*o+u.d*a+u.ty),this}bezierCurveTo(t,e,s,i,n,o,a){this._tick++;const u=this._transform;return this._activePath.bezierCurveTo(u.a*t+u.c*e+u.tx,u.b*t+u.d*e+u.ty,u.a*s+u.c*i+u.tx,u.b*s+u.d*i+u.ty,u.a*n+u.c*o+u.tx,u.b*n+u.d*o+u.ty,a),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,e,s,i){return this._tick++,this._activePath.ellipse(t,e,s,i,this._transform.clone()),this}circle(t,e,s){return this._tick++,this._activePath.circle(t,e,s,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,e){this._tick++;const s=this._transform;return this._activePath.lineTo(s.a*t+s.c*e+s.tx,s.b*t+s.d*e+s.ty),this}moveTo(t,e){this._tick++;const s=this._transform,i=this._activePath.instructions,n=s.a*t+s.c*e+s.tx,o=s.b*t+s.d*e+s.ty;return i.length===1&&i[0].action==="moveTo"?(i[0].data[0]=n,i[0].data[1]=o,this):(this._activePath.moveTo(n,o),this)}quadraticCurveTo(t,e,s,i,n){this._tick++;const o=this._transform;return this._activePath.quadraticCurveTo(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,o.a*s+o.c*i+o.tx,o.b*s+o.d*i+o.ty,n),this}rect(t,e,s,i){return this._tick++,this._activePath.rect(t,e,s,i,this._transform.clone()),this}roundRect(t,e,s,i,n){return this._tick++,this._activePath.roundRect(t,e,s,i,n,this._transform.clone()),this}poly(t,e){return this._tick++,this._activePath.poly(t,e,this._transform.clone()),this}regularPoly(t,e,s,i,n=0,o){return this._tick++,this._activePath.regularPoly(t,e,s,i,n,o),this}roundPoly(t,e,s,i,n,o){return this._tick++,this._activePath.roundPoly(t,e,s,i,n,o),this}roundShape(t,e,s,i){return this._tick++,this._activePath.roundShape(t,e,s,i),this}filletRect(t,e,s,i,n){return this._tick++,this._activePath.filletRect(t,e,s,i,n),this}chamferRect(t,e,s,i,n,o){return this._tick++,this._activePath.chamferRect(t,e,s,i,n,o),this}star(t,e,s,i,n=0,o=0){return this._tick++,this._activePath.star(t,e,s,i,n,o,this._transform.clone()),this}svg(t){return this._tick++,Mc(t,this),this}restore(){const t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:Be({},this._fillStyle),strokeStyle:Be({},this._strokeStyle)}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,e=t){return this._transform.scale(t,e),this}setTransform(t,e,s,i,n,o){return t instanceof G?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,e,s,i,n,o),this)}transform(t,e,s,i,n,o){return t instanceof G?(this._transform.append(t),this):(Fc.set(t,e,s,i,n,o),this._transform.append(Fc),this)}translate(t,e=t){return this._transform.translate(t,e),this}clear(){return this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this.dirty||(this.emit("update",this,16),this.dirty=!0,this._boundsDirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;const t=this._bounds;t.clear();for(let e=0;et in r?L0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ar=(r,t)=>{for(var e in t||(t={}))$0.call(t,e)&&Lc(r,e,t[e]);if(kc)for(var e of kc(t))N0.call(t,e)&&Lc(r,e,t[e]);return r};const fo=class Ye extends ct{constructor(t={}){super(),H0(t);const e=Ar(Ar({},Ye.defaultTextStyle),t);for(const s in e){const i=s;this[i]=e[s]}this.update()}get align(){return this._align}set align(t){this._align=t,this.update()}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords=t,this.update()}get dropShadow(){return this._dropShadow}set dropShadow(t){t!==null&&typeof t=="object"?this._dropShadow=Ar(Ar({},Ye.defaultDropShadow),t):this._dropShadow=t?Ar({},Ye.defaultDropShadow):null,this.update()}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily=t,this.update()}get fontSize(){return this._fontSize}set fontSize(t){typeof t=="string"?this._fontSize=parseInt(t,10):this._fontSize=t,this.update()}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle=t,this.update()}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant=t,this.update()}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight=t,this.update()}get leading(){return this._leading}set leading(t){this._leading=t,this.update()}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing=t,this.update()}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight=t,this.update()}get padding(){return this._padding}set padding(t){this._padding=t,this.update()}get trim(){return this._trim}set trim(t){this._trim=t,this.update()}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline=t,this.update()}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace=t,this.update()}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap=t,this.update()}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth=t,this.update()}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._fill=Vt(t===0?"black":t,Bt.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._stroke=Vt(t,Bt.defaultStrokeStyle),this.update())}_generateKey(){return this._styleKey=po(this),this._styleKey}update(){this._styleKey=null,this.emit("update",this)}reset(){const t=Ye.defaultTextStyle;for(const e in t)this[e]=t[e]}get styleKey(){return this._styleKey||this._generateKey()}clone(){return new Ye({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,textBaseline:this.textBaseline,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth})}destroy(t=!1){var e,s,i,n;if(this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const o=typeof t=="boolean"?t:t==null?void 0:t.textureSource;(e=this._fill)!=null&&e.texture&&this._fill.texture.destroy(o),(s=this._originalFill)!=null&&s.texture&&this._originalFill.texture.destroy(o),(i=this._stroke)!=null&&i.texture&&this._stroke.texture.destroy(o),(n=this._originalStroke)!=null&&n.texture&&this._originalStroke.texture.destroy(o)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}};fo.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5},fo.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let Wt=fo;function H0(r){var t,e,s,i,n;const o=r;if(typeof o.dropShadow=="boolean"&&o.dropShadow){const a=Wt.defaultDropShadow;r.dropShadow={alpha:(t=o.dropShadowAlpha)!=null?t:a.alpha,angle:(e=o.dropShadowAngle)!=null?e:a.angle,blur:(s=o.dropShadowBlur)!=null?s:a.blur,color:(i=o.dropShadowColor)!=null?i:a.color,distance:(n=o.dropShadowDistance)!=null?n:a.distance}}if(o.strokeThickness){const a=o.stroke;r.stroke={color:a,width:o.strokeThickness}}if(Array.isArray(o.fill)){const a=new Ms(0,0,0,r.fontSize*1.7),u=o.fill.map(l=>W.shared.setValue(l).toNumber());u.forEach((l,h)=>{var c;const d=(c=o.fillGradientStops[h])!=null?c:h/u.length;a.addColorStop(d,l)}),r.fill={fill:a}}}function mo(r){if(r==="")return[];typeof r=="string"&&(r=[r]);const t=[];for(let e=0,s=r.length;e!this._currentChars.includes(b)).filter((b,y,S)=>S.indexOf(b)===y);if(!o.length)return;this._currentChars=[...this._currentChars,...o];let a;this._currentPageIndex===-1?a=this._nextPage():a=this.pages[this._currentPageIndex];let{canvas:u,context:l}=a.canvasAndContext,h=a.texture.source;const c=this._style;let d=this._currentX,p=this._currentY;const f=this.baseRenderedFontSize/this.baseMeasurementFontSize,g=this._padding*f,m=c.fontStyle==="italic"?2:1;let _=0,x=!1;for(let b=0;b512&&(p+=_,_=T,d=0,p+_>512)){h.update();const L=this._nextPage();u=L.canvasAndContext.canvas,l=L.canvasAndContext.context,h=L.texture.source,p=0}const E=P/f-((s=(e=c.dropShadow)==null?void 0:e.distance)!=null?s:0)-((n=(i=c._stroke)==null?void 0:i.width)!=null?n:0);if(this.chars[y]={id:y.codePointAt(0),xOffset:-this._padding,yOffset:-this._padding,xAdvance:E,kerning:{}},x){this._drawGlyph(l,S,d+g,p+g,f,c);const L=h.width*f,k=h.height*f,C=new z(d/L*h.width,p/k*h.height,w/L*h.width,T/k*h.height);this.chars[y].texture=new A({source:h,frame:C}),d+=Math.ceil(w)}}h.update(),this._currentX=d,this._currentY=p,this._skipKerning&&this._applyKerning(o,l)}get pageTextures(){return this.pages}_applyKerning(t,e){const s=this._measureCache;for(let i=0;i{const f=i.width;for(let g=0;g{let p=i.chars.length-1,f=i.chars[p];for(;f===" ";)i.width-=e.chars[f].xAdvance,f=i.chars[--p];s.width=Math.max(s.width,i.width),i={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},o=!0,s.lines.push(i),s.height+=e.lineHeight},h=e.baseMeasurementFontSize/t.fontSize,c=t.letterSpacing*h,d=t.wordWrapWidth*h;for(let p=0;pd?(l(),u(a),g||i.charPositions.push(0)):(a.start=i.width,u(a),g||i.charPositions.push(0)),f==="\r"||f===` +`)i.width!==0&&l();else if(!g){const _=m.xAdvance+(m.kerning[n]||0)+c;i.width+=_,i.spaceWidth=_,i.spacesIndex.push(i.charPositions.length),i.chars.push(f)}}else{const _=m.kerning[n]||0,x=m.xAdvance+_+c;a.positions[a.index++]=a.width+_,a.chars.push(f),a.width+=x}n=f}return l(),t.align==="center"?X0(s):t.align==="right"?z0(s):t.align==="justify"&&j0(s),s}function X0(r){for(let t=0;tt in r?V0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,xo=(r,t)=>{for(var e in t||(t={}))W0.call(t,e)&&Nc(r,e,t[e]);if($c)for(var e of $c(t))Y0.call(t,e)&&Nc(r,e,t[e]);return r};let K0=class{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1}}getFont(t,e){var s;let i=`${e.fontFamily}-bitmap`,n=!0;if(e._fill.fill&&(i+=e._fill.fill.uid,n=!1),!Y.has(i)){const a=new go(xo({style:e,overrideFill:n,overrideSize:!0},this.defaultOptions));a.once("destroy",()=>Y.remove(i)),Y.set(i,a)}const o=Y.get(i);return(s=o.ensureCharacters)==null||s.call(o,t),o}getLayout(t,e){const s=this.getFont(t,e);return _o(t.split(""),e,s)}measureText(t,e){return this.getLayout(t,e)}install(...t){var e,s,i,n;let o=t[0];typeof o=="string"&&(o={name:o,style:t[1],chars:(e=t[2])==null?void 0:e.chars,resolution:(s=t[2])==null?void 0:s.resolution,padding:(i=t[2])==null?void 0:i.padding,skipKerning:(n=t[2])==null?void 0:n.skipKerning});const a=o==null?void 0:o.name;if(!a)throw new Error("[BitmapFontManager] Property `name` is required.");o=xo(xo({},this.defaultOptions),o);const u=o.style,l=u instanceof Wt?u:new Wt(u),h=l._fill.fill!==null&&l._fill.fill!==void 0,c=new go({style:l,overrideFill:h,skipKerning:o.skipKerning,padding:o.padding,resolution:o.resolution,overrideSize:!1}),d=mo(o.chars);return c.ensureCharacters(d.join("")),Y.set(`${a}-bitmap`,c),c.once("destroy",()=>Y.remove(`${a}-bitmap`)),c}uninstall(t){const e=`${t}-bitmap`,s=Y.get(e);s&&(Y.remove(e),s.destroy())}};const Pr=new K0;class bo extends eo{constructor(t,e){var s;super();const{textures:i,data:n}=t;Object.keys(n.pages).forEach(o=>{const a=n.pages[parseInt(o,10)],u=i[a.id];this.pages.push({texture:u})}),Object.keys(n.chars).forEach(o=>{var a;const u=n.chars[o],l=i[u.page].source,h=new z(u.x,u.y,u.width,u.height),c=new A({source:l,frame:h});this.chars[o]={id:o.codePointAt(0),xOffset:u.xOffset,yOffset:u.yOffset,xAdvance:u.xAdvance,kerning:(a=u.kerning)!=null?a:{},texture:c}}),this.baseRenderedFontSize=n.fontSize,this.baseMeasurementFontSize=n.fontSize,this.fontMetrics={ascent:0,descent:0,fontSize:n.fontSize},this.baseLineOffset=n.baseLineOffset,this.lineHeight=n.lineHeight,this.fontFamily=n.fontFamily,this.distanceField=(s=n.distanceField)!=null?s:{type:"none",range:0},this.url=e}destroy(){super.destroy();for(let t=0;t")?vo.test(X.get().parseXML(r)):!1},parse(r){return vo.parse(X.get().parseXML(r))}},q0=[".xml",".fnt"],Hc={extension:v.CacheParser,test:r=>r instanceof bo,getCacheableAssets(r,t){const e={};return r.forEach(s=>{e[s]=t}),e[`${t.fontFamily}-bitmap`]=t,e}},Xc={extension:{type:v.LoadParser,priority:gt.Normal},test(r){return q0.includes(dt.extname(r).toLowerCase())},async testParse(r){return Is.test(r)||yo.test(r)},async parse(r,t,e){const s=Is.test(r)?Is.parse(r):yo.parse(r),{src:i}=t,{pages:n}=s,o=[];for(let l=0;la[l]);return new bo({data:s,textures:u},i)},async load(r,t){return await(await X.get().fetch(r)).text()},async unload(r,t,e){await Promise.all(r.pages.map(s=>e.unload(s.texture.source._sourceOrigin))),r.destroy()}};var Z0=Object.defineProperty,Bs=Object.getOwnPropertySymbols,zc=Object.prototype.hasOwnProperty,jc=Object.prototype.propertyIsEnumerable,Vc=(r,t,e)=>t in r?Z0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Q0=(r,t)=>{for(var e in t||(t={}))zc.call(t,e)&&Vc(r,e,t[e]);if(Bs)for(var e of Bs(t))jc.call(t,e)&&Vc(r,e,t[e]);return r},J0=(r,t)=>{var e={};for(var s in r)zc.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Bs)for(var s of Bs(r))t.indexOf(s)<0&&jc.call(r,s)&&(e[s]=r[s]);return e};class qe extends V{constructor(t){t instanceof Bt&&(t={context:t});const e=t||{},{context:s,roundPixels:i}=e,n=J0(e,["context","roundPixels"]);super(Q0({label:"Graphics"},n)),this.canBundle=!0,this.renderPipeId="graphics",this._roundPixels=0,s?this._context=s:this._context=this._ownedContext=new Bt,this._context.on("update",this.onViewUpdate,this),this.allowChildren=!1,this.roundPixels=i!=null?i:!1}set context(t){t!==this._context&&(this._context.off("update",this.onViewUpdate,this),this._context=t,this._context.on("update",this.onViewUpdate,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}addBounds(t){t.addBounds(this._context.bounds)}containsPoint(t){return this._context.containsPoint(t)}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}onViewUpdate(){this._didChangeId+=4096,this._didGraphicsUpdate=!0,!this.didViewUpdate&&(this.didViewUpdate=!0,this.renderGroup&&this.renderGroup.onChildViewUpdate(this))}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(t===!0||(t==null?void 0:t.context)===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_callContextMethod(t,e){return this.context[t](...e),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new qe(this._context.clone()):(this._ownedContext=null,new qe(this._context))}lineStyle(t,e,s){const i={};return t&&(i.width=t),e&&(i.color=e),s&&(i.alpha=s),this.context.strokeStyle=i,this}beginFill(t,e){const s={};return t&&(s.color=t),e&&(s.alpha=e),this.context.fillStyle=s,this}endFill(){this.context.fill();const t=this.context.strokeStyle;return(t.width!==Bt.defaultStrokeStyle.width||t.color!==Bt.defaultStrokeStyle.color||t.alpha!==Bt.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return this._callContextMethod("circle",t)}drawEllipse(...t){return this._callContextMethod("ellipse",t)}drawPolygon(...t){return this._callContextMethod("poly",t)}drawRect(...t){return this._callContextMethod("rect",t)}drawRoundedRect(...t){return this._callContextMethod("roundRect",t)}drawStar(...t){return this._callContextMethod("star",t)}}let wr;function Wc(){return(!wr||wr!=null&&wr.isContextLost())&&(wr=X.get().createCanvas().getContext("webgl",{})),wr}let Fs;function Yc(){if(!Fs){Fs="mediump";const r=Wc();r&&r.getShaderPrecisionFormat&&(Fs=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision?"highp":"mediump")}return Fs}function Kc(r,t,e){return t?r:e?(r=r.replace("out vec4 finalColor;",""),` + + #ifdef GL_ES // This checks if it is WebGL1 + #define in varying + #define finalColor gl_FragColor + #define texture texture2D + #endif + ${r} + `):` + + #ifdef GL_ES // This checks if it is WebGL1 + #define in attribute + #define out varying + #endif + ${r} + `}function qc(r,t,e){const s=e?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(r.substring(0,9)!=="precision"){let i=e?t.requestedFragmentPrecision:t.requestedVertexPrecision;return i==="highp"&&s!=="highp"&&(i="mediump"),`precision ${i} float; +${r}`}else if(s!=="highp"&&r.substring(0,15)==="precision highp")return r.replace("precision highp","precision mediump");return r}function Zc(r,t){return t?`#version 300 es +${r}`:r}const ty={},ey={};function Qc(r,{name:t="pixi-program"},e=!0){t=t.replace(/\s+/g,"-"),t+=e?"-fragment":"-vertex";const s=e?ty:ey;return s[t]?(s[t]++,t+=`-${s[t]}`):s[t]=1,r.indexOf("#define SHADER_NAME")!==-1?r:`${`#define SHADER_NAME ${t}`} +${r}`}function Jc(r,t){return t?r.replace("#version 300 es",""):r}var ry=Object.defineProperty,td=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,ed=(r,t,e)=>t in r?ry(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,rd=(r,t)=>{for(var e in t||(t={}))sy.call(t,e)&&ed(r,e,t[e]);if(td)for(var e of td(t))iy.call(t,e)&&ed(r,e,t[e]);return r};const To={stripVersion:Jc,ensurePrecision:qc,addProgramDefines:Kc,setProgramName:Qc,insertVersion:Zc},So=Object.create(null),sd=class Yu{constructor(t){t=rd(rd({},Yu.defaultOptions),t);const e=t.fragment.indexOf("#version 300 es")!==-1,s={stripVersion:e,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:Yc()},setProgramName:{name:t.name},addProgramDefines:e,insertVersion:e};let i=t.fragment,n=t.vertex;Object.keys(To).forEach(o=>{const a=s[o];i=To[o](i,a,!0),n=To[o](n,a,!1)}),this.fragment=i,this.vertex=n,this._key=br(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null}static from(t){const e=`${t.vertex}:${t.fragment}`;return So[e]||(So[e]=new Yu(t)),So[e]}};sd.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let Rt=sd;const id={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function Fe(r){var t;return(t=id[r])!=null?t:id.float32}const ny={f32:"float32","vec2":"float32x2","vec3":"float32x3","vec4":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2":"sint32x2","vec3":"sint32x3","vec4":"sint32x4",u32:"uint32","vec2":"uint32x2","vec3":"uint32x3","vec4":"uint32x4",bool:"uint32","vec2":"uint32x2","vec3":"uint32x3","vec4":"uint32x4"};function nd({source:r,entryPoint:t}){var e;const s={},i=r.indexOf(`fn ${t}`);if(i!==-1){const n=r.indexOf("->",i);if(n!==-1){const o=r.substring(i,n),a=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|$)/g;let u;for(;(u=a.exec(o))!==null;){const l=(e=ny[u[3]])!=null?e:"float32";s[u[2]]={location:parseInt(u[1],10),format:l,stride:Fe(l).stride,offset:0,instance:!1,start:0}}}}return s}function Ds(r){var t,e,s;const i=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,o=/@binding\((\d+)\)/,a=/var(<[^>]+>)? (\w+)/,u=/:\s*(\w+)/,l=/struct\s+(\w+)\s*{([^}]+)}/g,h=/(\w+)\s*:\s*([\w\<\>]+)/g,c=/struct\s+(\w+)/,d=(t=r.match(i))==null?void 0:t.map(f=>({group:parseInt(f.match(n)[1],10),binding:parseInt(f.match(o)[1],10),name:f.match(a)[2],isUniform:f.match(a)[1]==="",type:f.match(u)[1]}));if(!d)return{groups:[],structs:[]};const p=(s=(e=r.match(l))==null?void 0:e.map(f=>{const g=f.match(c)[1],m=f.match(h).reduce((_,x)=>{const[b,y]=x.split(":");return _[b.trim()]=y.trim(),_},{});return m?{name:g,members:m}:null}).filter(({name:f})=>d.some(g=>g.type===f)))!=null?s:[];return{groups:d,structs:p}}var De=(r=>(r[r.VERTEX=1]="VERTEX",r[r.FRAGMENT=2]="FRAGMENT",r[r.COMPUTE=4]="COMPUTE",r))(De||{});function od({groups:r}){const t=[];for(let e=0;ee.has(o.name)?!1:(e.add(o.name),!0)),n=[...r.groups,...t.groups].filter(o=>{const a=`${o.name}-${o.binding}`;return s.has(a)?!1:(s.add(a),!0)});return{structs:i,groups:n}}const Eo=Object.create(null);class Tt{constructor(t){this._layoutKey=0;var e,s;const{fragment:i,vertex:n,layout:o,gpuLayout:a,name:u}=t;if(this.name=u,this.fragment=i,this.vertex=n,i.source===n.source){const l=Ds(i.source);this.structsAndGroups=l}else{const l=Ds(n.source),h=Ds(i.source);this.structsAndGroups=ud(l,h)}this.layout=o!=null?o:ad(this.structsAndGroups),this.gpuLayout=a!=null?a:od(this.structsAndGroups),this.autoAssignGlobalUniforms=((e=this.layout[0])==null?void 0:e.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((s=this.layout[1])==null?void 0:s.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:e}=this,s=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=br(s,"program")}get attributeData(){var t;return(t=this._attributeData)!=null||(this._attributeData=nd(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null}static from(t){const e=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return Eo[e]||(Eo[e]=new Tt(t)),Eo[e]}}function Ao(r,t,e){if(r)for(const s in r){const i=s.toLocaleLowerCase(),n=t[i];if(n){let o=r[s];s==="header"&&(o=o.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),e&&n.push(`//----${e}----//`),n.push(o)}}}const ld=/\{\{(.*?)\}\}/g;function Po(r){var t,e;const s={};return((e=(t=r.match(ld))==null?void 0:t.map(i=>i.replace(/[{()}]/g,"")))!=null?e:[]).forEach(i=>{s[i]=[]}),s}function hd(r,t){let e;const s=/@in\s+([^;]+);/g;for(;(e=s.exec(r))!==null;)t.push(e[1])}function wo(r,t,e=!1){const s=[];hd(t,s),r.forEach(a=>{a.header&&hd(a.header,s)});const i=s;e&&i.sort();const n=i.map((a,u)=>` @location(${u}) ${a},`).join(` +`);let o=t.replace(/@in\s+[^;]+;\s*/g,"");return o=o.replace("{{in}}",` +${n} +`),o}function cd(r,t){let e;const s=/@out\s+([^;]+);/g;for(;(e=s.exec(r))!==null;)t.push(e[1])}function oy(r){const t=/\b(\w+)\s*:/g.exec(r);return t?t[1]:""}function ay(r){const t=/@.*?\s+/g;return r.replace(t,"")}function dd(r,t){const e=[];cd(t,e),r.forEach(u=>{u.header&&cd(u.header,e)});let s=0;const i=e.sort().map(u=>u.indexOf("builtin")>-1?u:`@location(${s++}) ${u}`).join(`, +`),n=e.sort().map(u=>` var ${ay(u)};`).join(` +`),o=`return VSOutput( + ${e.sort().map(u=>` ${oy(u)}`).join(`, +`)});`;let a=t.replace(/@out\s+[^;]+;\s*/g,"");return a=a.replace("{{struct}}",` +${i} +`),a=a.replace("{{start}}",` +${n} +`),a=a.replace("{{return}}",` +${o} +`),a}function Ro(r,t){let e=r;for(const s in t){const i=t[s];i.join(` +`).length?e=e.replace(`{{${s}}}`,`//-----${s} START-----// +${i.join(` +`)} +//----${s} FINISH----//`):e=e.replace(`{{${s}}}`,"")}return e}const Te=Object.create(null),Mo=new Map;let uy=0;function pd({template:r,bits:t}){const e=md(r,t);if(Te[e])return Te[e];const{vertex:s,fragment:i}=ly(r,t);return Te[e]=gd(s,i,t),Te[e]}function fd({template:r,bits:t}){const e=md(r,t);return Te[e]||(Te[e]=gd(r.vertex,r.fragment,t)),Te[e]}function ly(r,t){const e=t.map(o=>o.vertex).filter(o=>!!o),s=t.map(o=>o.fragment).filter(o=>!!o);let i=wo(e,r.vertex,!0);i=dd(e,i);const n=wo(s,r.fragment,!0);return{vertex:i,fragment:n}}function md(r,t){return t.map(e=>(Mo.has(e)||Mo.set(e,uy++),Mo.get(e))).sort((e,s)=>e-s).join("-")+r.vertex+r.fragment}function gd(r,t,e){const s=Po(r),i=Po(t);return e.forEach(n=>{Ao(n.vertex,s,n.name),Ao(n.fragment,i,n.name)}),{vertex:Ro(r,s),fragment:Ro(t,i)}}const _d=` + @in aPosition: vec2; + @in aUV: vec2; + + @out @builtin(position) vPosition: vec4; + @out vUV : vec2; + @out vColor : vec4; + + {{header}} + + struct VSOutput { + {{struct}} + }; + + @vertex + fn main( {{in}} ) -> VSOutput { + + var worldTransformMatrix = globalUniforms.uWorldTransformMatrix; + var modelMatrix = mat3x3( + 1.0, 0.0, 0.0, + 0.0, 1.0, 0.0, + 0.0, 0.0, 1.0 + ); + var position = aPosition; + var uv = aUV; + + {{start}} + + vColor = vec4(1., 1., 1., 1.); + + {{main}} + + vUV = uv; + + var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix; + + vPosition = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); + + vColor *= globalUniforms.uWorldColorAlpha; + + {{end}} + + {{return}} + }; +`,xd=` + @in vUV : vec2; + @in vColor : vec4; + + {{header}} + + @fragment + fn main( + {{in}} + ) -> @location(0) vec4 { + + {{start}} + + var outColor:vec4; + + {{main}} + + return outColor * vColor; + }; +`,bd=` + in vec2 aPosition; + in vec2 aUV; + + out vec4 vColor; + out vec2 vUV; + + {{header}} + + void main(void){ + + mat3 worldTransformMatrix = uWorldTransformMatrix; + mat3 modelMatrix = mat3( + 1.0, 0.0, 0.0, + 0.0, 1.0, 0.0, + 0.0, 0.0, 1.0 + ); + vec2 position = aPosition; + vec2 uv = aUV; + + {{start}} + + vColor = vec4(1.); + + {{main}} + + vUV = uv; + + mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix; + + gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); + + vColor *= uWorldColorAlpha; + + {{end}} + } +`,vd=` + + in vec4 vColor; + in vec2 vUV; + + out vec4 finalColor; + + {{header}} + + void main(void) { + + {{start}} + + vec4 outColor; + + {{main}} + + finalColor = outColor * vColor; + } +`,yd={name:"global-uniforms-bit",vertex:{header:` + struct GlobalUniforms { + uProjectionMatrix:mat3x3, + uWorldTransformMatrix:mat3x3, + uWorldColorAlpha: vec4, + uResolution: vec2, + } + + @group(0) @binding(0) var globalUniforms : GlobalUniforms; + `}},hy={name:"global-uniforms-ubo-bit",vertex:{header:` + uniform globalUniforms { + mat3 uProjectionMatrix; + mat3 uWorldTransformMatrix; + vec4 uWorldColorAlpha; + vec2 uResolution; + }; + `}},Td={name:"global-uniforms-bit",vertex:{header:` + uniform mat3 uProjectionMatrix; + uniform mat3 uWorldTransformMatrix; + uniform vec4 uWorldColorAlpha; + uniform vec2 uResolution; + `}};var cy=Object.defineProperty,Sd=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,py=Object.prototype.propertyIsEnumerable,Ed=(r,t,e)=>t in r?cy(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,fy=(r,t)=>{for(var e in t||(t={}))dy.call(t,e)&&Ed(r,e,t[e]);if(Sd)for(var e of Sd(t))py.call(t,e)&&Ed(r,e,t[e]);return r};function Ue({bits:r,name:t}){const e=pd({template:{fragment:xd,vertex:_d},bits:[yd,...r]});return Tt.from({name:t,vertex:{source:e.vertex,entryPoint:"main"},fragment:{source:e.fragment,entryPoint:"main"}})}function ke({bits:r,name:t}){return new Rt(fy({name:t},fd({template:{vertex:bd,fragment:vd},bits:[Td,...r]})))}const Us={name:"color-bit",vertex:{header:` + @in aColor: vec4; + `,main:` + vColor *= vec4(aColor.rgb * aColor.a, aColor.a); + `}},ks={name:"color-bit",vertex:{header:` + in vec4 aColor; + `,main:` + vColor *= vec4(aColor.rgb * aColor.a, aColor.a); + `}},Oo={};function my(r){const t=[];if(r===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let e=0;for(let s=0;s;`),t.push(`@group(1) @binding(${e++}) var textureSampler${s+1}: sampler;`)}return t.join(` +`)}function gy(r){const t=[];if(r===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let e=0;e; + @out @interpolate(flat) vTextureId : u32; + `,main:` + vTextureId = aTextureIdAndRound.y; + `,end:` + if(aTextureIdAndRound.x == 1) + { + vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw); + } + `},fragment:{header:` + @in @interpolate(flat) vTextureId: u32; + + ${my(16)} + `,main:` + var uvDx = dpdx(vUV); + var uvDy = dpdy(vUV); + + ${gy(16)} + `}}),Oo[r]}const Co={};function _y(r){const t=[];for(let e=0;e0&&t.push("else"),e, targetSize: vec2) -> vec2 + { + return (floor((position * 0.5 + 0.5) * targetSize) / targetSize) * 2.0 - 1.0; + } + `}},$e={name:"round-pixels-bit",vertex:{header:` + vec2 roundPixels(vec2 position, vec2 targetSize) + { + return (floor((position * 0.5 + 0.5) * targetSize) / targetSize) * 2.0 - 1.0; + } + `}},Ad=new Int32Array(wt);for(let r=0;r(r[r.WEBGL=1]="WEBGL",r[r.WEBGPU=2]="WEBGPU",r[r.BOTH=3]="BOTH",r))(xt||{}),xy=Object.defineProperty,Hs=Object.getOwnPropertySymbols,Pd=Object.prototype.hasOwnProperty,wd=Object.prototype.propertyIsEnumerable,Rd=(r,t,e)=>t in r?xy(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,by=(r,t)=>{for(var e in t||(t={}))Pd.call(t,e)&&Rd(r,e,t[e]);if(Hs)for(var e of Hs(t))wd.call(t,e)&&Rd(r,e,t[e]);return r},vy=(r,t)=>{var e={};for(var s in r)Pd.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Hs)for(var s of Hs(r))t.indexOf(s)<0&&wd.call(r,s)&&(e[s]=r[s]);return e};class St extends ct{constructor(t){super(),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[];let{gpuProgram:e,glProgram:s,groups:i,resources:n,compatibleRenderers:o,groupMap:a}=t;this.gpuProgram=e,this.glProgram=s,o===void 0&&(o=0,e&&(o|=xt.WEBGPU),s&&(o|=xt.WEBGL)),this.compatibleRenderers=o;const u={};if(!n&&!i&&(n={}),n&&i)throw new Error("[Shader] Cannot have both resources and groups");if(!e&&i&&!a)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!e&&i&&a)for(const l in a)for(const h in a[l]){const c=a[l][h];u[c]={group:l,binding:h,name:c}}else if(e&&i&&!a){const l=e.structsAndGroups.groups;a={},l.forEach(h=>{a[h.group]=a[h.group]||{},a[h.group][h.binding]=h.name,u[h.name]=h})}else if(n){if(e){const l=e.structsAndGroups.groups;a={},l.forEach(h=>{a[h.group]=a[h.group]||{},a[h.group][h.binding]=h.name,u[h.name]=h})}else{a={},i={99:new Lt},this._ownedBindGroups.push(i[99]);let l=0;for(const h in n)u[h]={group:99,binding:l,name:h},a[99]=a[99]||{},a[99][l]=h,l++}i={};for(const l in n){const h=l;let c=n[l];!c.source&&!c._resourceType&&(c=new it(c));const d=u[h];d&&(i[d.group]||(i[d.group]=new Lt,this._ownedBindGroups.push(i[d.group])),i[d.group].setResource(c,d.binding))}}this.groups=i,this._uniformBindMap=a,this.resources=this._buildResourceAccessor(i,u)}addResource(t,e,s){var i,n;(i=this._uniformBindMap)[e]||(i[e]={}),(n=this._uniformBindMap[e])[s]||(n[s]=t),this.groups[e]||(this.groups[e]=new Lt,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){const s={};for(const i in e){const n=e[i];Object.defineProperty(s,n.name,{get(){return t[n.group].getResource(n.binding)},set(o){t[n.group].setResource(o,n.binding)}})}return s}destroy(t=!1){var e,s;this.emit("destroy",this),t&&((e=this.gpuProgram)==null||e.destroy(),(s=this.glProgram)==null||s.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(i=>{i.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null}static from(t){const e=t,{gpu:s,gl:i}=e,n=vy(e,["gpu","gl"]);let o,a;return s&&(o=Tt.from(s)),i&&(a=Rt.from(i)),new St(by({gpuProgram:o,glProgram:a},n))}}const Md={name:"local-uniform-msdf-bit",vertex:{header:` + struct LocalUniforms { + uColor:vec4, + uTransformMatrix:mat3x3, + uDistance: f32, + uRound:f32, + } + + @group(2) @binding(0) var localUniforms : LocalUniforms; + `,main:` + vColor *= localUniforms.uColor; + modelMatrix *= localUniforms.uTransformMatrix; + `,end:` + if(localUniforms.uRound == 1) + { + vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw); + } + `},fragment:{header:` + struct LocalUniforms { + uColor:vec4, + uTransformMatrix:mat3x3, + uDistance: f32 + } + + @group(2) @binding(0) var localUniforms : LocalUniforms; + `,main:` + outColor = vColor * calculateMSDFAlpha(outColor, localUniforms.uDistance); + `}},Od={name:"local-uniform-msdf-bit",vertex:{header:` + uniform mat3 uTransformMatrix; + uniform vec4 uColor; + uniform float uRound; + `,main:` + vColor *= uColor; + modelMatrix *= uTransformMatrix; + `,end:` + if(uRound == 1.) + { + gl_Position.xy = roundPixels(gl_Position.xy, uResolution); + } + `},fragment:{header:` + uniform float uDistance; + `,main:` + outColor = vColor * calculateMSDFAlpha(outColor, uDistance); + `}},Cd={name:"msdf-bit",fragment:{header:` + fn calculateMSDFAlpha(msdfColor:vec4, distance:f32) -> f32 { + + // MSDF + var median = msdfColor.r + msdfColor.g + msdfColor.b - + min(msdfColor.r, min(msdfColor.g, msdfColor.b)) - + max(msdfColor.r, max(msdfColor.g, msdfColor.b)); + + // SDF + median = min(median, msdfColor.a); + + var screenPxDistance = distance * (median - 0.5); + var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0); + if (median < 0.01) { + alpha = 0.0; + } else if (median > 0.99) { + alpha = 1.0; + } + + return alpha; + } + `}},Gd={name:"msdf-bit",fragment:{header:` + float calculateMSDFAlpha(vec4 msdfColor, float distance) { + + // MSDF + float median = msdfColor.r + msdfColor.g + msdfColor.b - + min(msdfColor.r, min(msdfColor.g, msdfColor.b)) - + max(msdfColor.r, max(msdfColor.g, msdfColor.b)); + + // SDF + median = min(median, msdfColor.a); + + float screenPxDistance = distance * (median - 0.5); + float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0); + + if (median < 0.01) { + alpha = 0.0; + } else if (median > 0.99) { + alpha = 1.0; + } + + return alpha; + } + `}};class Id extends St{constructor(){const t=new it({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4"},uTransformMatrix:{value:new G,type:"mat3x3"},uDistance:{value:4,type:"f32"},uRound:{value:0,type:"f32"}}),e=Ue({name:"sdf-shader",bits:[Us,Ls(wt),Md,Cd,Le]}),s=ke({name:"sdf-shader",bits:[ks,$s(wt),Od,Gd,$e]});super({glProgram:s,gpuProgram:e,resources:{localUniforms:t,batchSamplers:Ns}})}}class Go{constructor(t){this._gpuBitmapText={},this._renderer=t}validateRenderable(t){const e=this._getGpuBitmapText(t);return t._didTextUpdate&&(t._didTextUpdate=!1,this._updateContext(t,e)),this._renderer.renderPipes.graphics.validateRenderable(e)}addRenderable(t,e){const s=this._getGpuBitmapText(t);Bd(t,s),t._didTextUpdate&&(t._didTextUpdate=!1,this._updateContext(t,s)),this._renderer.renderPipes.graphics.addRenderable(s,e),s.context.customShader&&this._updateDistanceField(t)}destroyRenderable(t){this._destroyRenderableByUid(t.uid)}_destroyRenderableByUid(t){H.return(this._gpuBitmapText[t]),this._gpuBitmapText[t]=null}updateRenderable(t){const e=this._getGpuBitmapText(t);Bd(t,e),this._renderer.renderPipes.graphics.updateRenderable(e),e.context.customShader&&this._updateDistanceField(t)}_updateContext(t,e){var s;const{context:i}=e,n=Pr.getFont(t.text,t._style);i.clear(),n.distanceField.type!=="none"&&(i.customShader||(this._sdfShader||(this._sdfShader=new Id),i.customShader=this._sdfShader));const o=Array.from(t.text),a=t._style;let u=(((s=a._stroke)==null?void 0:s.width)||0)/2;u+=n.baseLineOffset;const l=_o(o,a,n);let h=0;const c=a.padding,d=l.scale;i.translate(-t._anchor._x*l.width-c,-t._anchor._y*(l.height+l.offsetY)-c).scale(d,d);const p=a._fill.color;for(let f=0;f{this.destroyRenderable(t)}),this._gpuBitmapText[t.uid]}_updateDistanceField(t){var e;const s=this._getGpuBitmapText(t).context,i=t._style.fontFamily,n=Y.get(`${i}-bitmap`),{a:o,b:a,c:u,d:l}=t.groupTransform,h=Math.sqrt(o*o+a*a),c=Math.sqrt(u*u+l*l),d=(Math.abs(h)+Math.abs(c))/2,p=n.baseRenderedFontSize/t._style.fontSize,f=(e=t.resolution)!=null?e:this._renderer.resolution,g=d*n.distanceField.range*(1/p)*f;s.customShader.resources.localUniforms.uniforms.uDistance=g}destroy(){var t;for(const e in this._gpuBitmapText)this._destroyRenderableByUid(e);this._gpuBitmapText=null,(t=this._sdfShader)==null||t.destroy(!0),this._sdfShader=null,this._renderer=null}}Go.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"bitmapText"};function Bd(r,t){t.groupTransform=r.groupTransform,t.groupColorAlpha=r.groupColorAlpha,t.groupColor=r.groupColor,t.groupBlendMode=r.groupBlendMode,t.globalDisplayStatus=r.globalDisplayStatus,t.groupTransform=r.groupTransform,t.localDisplayStatus=r.localDisplayStatus,t.groupAlpha=r.groupAlpha,t._roundPixels=r._roundPixels}D.add(Go,Xc,Hc);class Io{constructor(t){this._gpuText=Object.create(null),this._renderer=t}validateRenderable(t){const e=this._getGpuText(t),s=t._getKey();return e.textureNeedsUploading?(e.textureNeedsUploading=!1,!0):e.currentKey!==s}addRenderable(t){const e=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),this._renderer.renderPipes.batch.addToBatch(e)}updateRenderable(t){const e=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),e.batcher.updateElement(e)}destroyRenderable(t){this._destroyRenderableById(t.uid)}_destroyRenderableById(t){const e=this._gpuText[t];this._renderer.htmlText.decreaseReferenceCount(e.currentKey),H.return(e.batchableSprite),this._gpuText[t]=null}_updateText(t){const e=t._getKey(),s=this._getGpuText(t),i=s.batchableSprite;s.currentKey!==e&&this._updateGpuText(t).catch(o=>{console.error(o)}),t._didTextUpdate=!1;const n=t._style.padding;dr(i.bounds,t._anchor,i.texture,n)}async _updateGpuText(t){var e;t._didTextUpdate=!1;const s=this._getGpuText(t);if(s.generatingTexture)return;const i=t._getKey();this._renderer.htmlText.decreaseReferenceCount(s.currentKey),s.generatingTexture=!0,s.currentKey=i;const n=(e=t.resolution)!=null?e:this._renderer.resolution,o=await this._renderer.htmlText.getManagedTexture(t.text,n,t._style,t._getKey()),a=s.batchableSprite;a.texture=s.texture=o,s.generatingTexture=!1,s.textureNeedsUploading=!0,t.onViewUpdate();const u=t._style.padding;dr(a.bounds,t._anchor,a.texture,u)}_getGpuText(t){return this._gpuText[t.uid]||this.initGpuText(t)}initGpuText(t){const e={texture:A.EMPTY,currentKey:"--",batchableSprite:H.get(Rs),textureNeedsUploading:!1,generatingTexture:!1},s=e.batchableSprite;return s.renderable=t,s.texture=A.EMPTY,s.bounds={minX:0,maxX:1,minY:0,maxY:0},s.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuText[t.uid]=e,t.on("destroyed",()=>{this.destroyRenderable(t)}),e}destroy(){for(const t in this._gpuText)this._destroyRenderableById(t);this._gpuText=null,this._renderer=null}}Io.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"htmlText"};function Fd(){const{userAgent:r}=X.get().getNavigator();return/^((?!chrome|android).)*safari/i.test(r)}const Bo="http://www.w3.org/2000/svg",Fo="http://www.w3.org/1999/xhtml";class Do{constructor(){this.svgRoot=document.createElementNS(Bo,"svg"),this.foreignObject=document.createElementNS(Bo,"foreignObject"),this.domElement=document.createElementNS(Fo,"div"),this.styleElement=document.createElementNS(Fo,"style"),this.image=new Image;const{foreignObject:t,svgRoot:e,styleElement:s,domElement:i}=this;t.setAttribute("width","10000"),t.setAttribute("height","10000"),t.style.overflow="hidden",e.appendChild(t),t.appendChild(s),t.appendChild(i)}}function Dd(r){const t=r._stroke,e=r._fill,s=[`div { ${[`color: ${W.shared.setValue(e.color).toHex()}`,`font-size: ${r.fontSize}px`,`font-family: ${r.fontFamily}`,`font-weight: ${r.fontWeight}`,`font-style: ${r.fontStyle}`,`font-variant: ${r.fontVariant}`,`letter-spacing: ${r.letterSpacing}px`,`text-align: ${r.align}`,`padding: ${r.padding}px`,`white-space: ${r.whiteSpace==="pre"&&r.wordWrap?"pre-wrap":r.whiteSpace}`,...r.lineHeight?[`line-height: ${r.lineHeight}px`]:[],...r.wordWrap?[`word-wrap: ${r.breakWords?"break-all":"break-word"}`,`max-width: ${r.wordWrapWidth}px`]:[],...t?[kd(t)]:[],...r.dropShadow?[Ud(r.dropShadow)]:[],...r.cssOverrides].join(";")} }`];return yy(r.tagStyles,s),s.join(" ")}function Ud(r){const t=W.shared.setValue(r.color).setAlpha(r.alpha).toHexa(),e=Math.round(Math.cos(r.angle)*r.distance),s=Math.round(Math.sin(r.angle)*r.distance),i=`${e}px ${s}px`;return r.blur>0?`text-shadow: ${i} ${r.blur}px ${t}`:`text-shadow: ${i} ${t}`}function kd(r){return[`-webkit-text-stroke-width: ${r.width}px`,`-webkit-text-stroke-color: ${W.shared.setValue(r.color).toHex()}`,`text-stroke-width: ${r.width}px`,`text-stroke-color: ${W.shared.setValue(r.color).toHex()}`,"paint-order: stroke"].join(";")}const Ld={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},$d={fill:r=>`color: ${W.shared.setValue(r).toHex()}`,breakWords:r=>`word-wrap: ${r?"break-all":"break-word"}`,stroke:kd,dropShadow:Ud};function yy(r,t){for(const e in r){const s=r[e],i=[];for(const n in s)$d[n]?i.push($d[n](s[n])):Ld[n]&&i.push(Ld[n].replace("{{VALUE}}",s[n]));t.push(`${e} { ${i.join(";")} }`)}}class Pe extends Wt{constructor(t={}){var e,s;super(t),this._cssOverrides=[],(e=this.cssOverrides)!=null||(this.cssOverrides=t.cssOverrides),this.tagStyles=(s=t.tagStyles)!=null?s:{}}set cssOverrides(t){this._cssOverrides=t instanceof Array?t:[t],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=po(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new Pe({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){return this._cssStyle||(this._cssStyle=Dd(this)),this._cssStyle}addOverride(...t){const e=t.filter(s=>!this.cssOverrides.includes(s));e.length>0&&(this.cssOverrides.push(...e),this.update())}removeOverride(...t){const e=t.filter(s=>this.cssOverrides.includes(s));e.length>0&&(this.cssOverrides=this.cssOverrides.filter(s=>!e.includes(s)),this.update())}set fill(t){super.fill=t}set stroke(t){super.stroke=t}}function Nd(r,t){const e=t.fontFamily,s=[],i={},n=/font-family:([^;"\s]+)/g,o=r.match(n);function a(u){i[u]||(s.push(u),i[u]=!0)}if(Array.isArray(e))for(let u=0;u{const l=u.split(":")[1].trim();a(l)});for(const u in t.tagStyles){const l=t.tagStyles[u].fontFamily;a(l)}return s}async function Hd(r){const t=await(await X.get().fetch(r)).blob(),e=new FileReader;return await new Promise((s,i)=>{e.onloadend=()=>s(e.result),e.onerror=i,e.readAsDataURL(t)})}async function Uo(r,t){const e=await Hd(t);return`@font-face { + font-family: "${r.fontFamily}"; + src: url('${e}'); + font-weight: ${r.fontWeight}; + font-style: ${r.fontStyle}; + }`}const Rr=new Map;async function Xd(r,t,e){const s=r.filter(i=>Y.has(`${i}-and-url`)).map((i,n)=>{if(!Rr.has(i)){const{url:o}=Y.get(`${i}-and-url`);n===0?Rr.set(i,Uo(t,o)):Rr.set(i,Uo({fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:i},o))}return Rr.get(i)});return(await Promise.all(s)).join(` +`)}function zd(r,t,e,s,i){const{domElement:n,styleElement:o,svgRoot:a}=i;n.innerHTML=`
${r}
`,n.setAttribute("style",`transform: scale(${e});transform-origin: top left; display: inline-block`),o.textContent=s;const{width:u,height:l}=i.image;return a.setAttribute("width",u.toString()),a.setAttribute("height",l.toString()),new XMLSerializer().serializeToString(a)}function jd(r,t){const e=jt.getOptimalCanvasAndContext(r.width,r.height,t),{context:s}=e;return s.clearRect(0,0,r.width,r.height),s.drawImage(r,0,0),jt.returnCanvasAndContext(e),e.canvas}function Vd(r,t,e){return new Promise(async s=>{e&&await new Promise(i=>setTimeout(i,100)),r.onload=()=>{s()},r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(t)}`,r.crossOrigin="anonymous"})}let Wd;function ko(r,t,e,s){s=s||Wd||(Wd=new Do);const{domElement:i,styleElement:n,svgRoot:o}=s;i.innerHTML=`
${r}
`,i.setAttribute("style","transform-origin: top left; display: inline-block"),e&&(n.textContent=e),document.body.appendChild(o);const a=i.getBoundingClientRect();o.remove();const u=It.measureFont(t.fontStyle).descent;return{width:a.width,height:a.height+u}}class Xs{constructor(t){this._activeTextures={},this._renderer=t,this._createCanvas=t.type===xt.WEBGPU}getTexture(t){return this._buildTexturePromise(t.text,t.resolution,t.style)}getManagedTexture(t,e,s,i){if(this._activeTextures[i])return this._increaseReferenceCount(i),this._activeTextures[i].promise;const n=this._buildTexturePromise(t,e,s).then(o=>(this._activeTextures[i].texture=o,o));return this._activeTextures[i]={texture:null,promise:n,usageCount:1},n}async _buildTexturePromise(t,e,s){const i=H.get(Do),n=Nd(t,s),o=await Xd(n,s,Pe.defaultTextStyle),a=ko(t,s,o,i),u=Math.ceil(Math.ceil(Math.max(1,a.width)+s.padding*2)*e),l=Math.ceil(Math.ceil(Math.max(1,a.height)+s.padding*2)*e),h=i.image;h.width=u|0,h.height=l|0;const c=zd(t,s,e,o,i);await Vd(h,c,Fd()&&n.length>0);let d=h;this._createCanvas&&(d=jd(h,e));const p=Zn(d,h.width,h.height,e);return this._createCanvas&&this._renderer.texture.initSource(p.source),H.return(i),p}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}decreaseReferenceCount(t){const e=this._activeTextures[t];e&&(e.usageCount--,e.usageCount===0&&(e.texture?this._cleanUp(e):e.promise.then(s=>{e.texture=s,this._cleanUp(e)}).catch(()=>{}),this._activeTextures[t]=null))}_cleanUp(t){ut.returnTexture(t.texture),t.texture.source.resource=null,t.texture.source.uploadMethodId="unknown"}getReferenceCount(t){return this._activeTextures[t].usageCount}destroy(){this._activeTextures=null}}Xs.extension={type:[v.WebGLSystem,v.WebGPUSystem,v.CanvasSystem],name:"htmlText"},Xs.defaultFontOptions={fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal"},D.add(Xs),D.add(Io);var Ty=Object.defineProperty,Yd=Object.getOwnPropertySymbols,Sy=Object.prototype.hasOwnProperty,Ey=Object.prototype.propertyIsEnumerable,Kd=(r,t,e)=>t in r?Ty(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,qd=(r,t)=>{for(var e in t||(t={}))Sy.call(t,e)&&Kd(r,e,t[e]);if(Yd)for(var e of Yd(t))Ey.call(t,e)&&Kd(r,e,t[e]);return r};const Zd=class wx extends Oe{constructor(...t){var e;let s=(e=t[0])!=null?e:{};s instanceof Float32Array&&(s={positions:s,uvs:t[1],indices:t[2]}),s=qd(qd({},wx.defaultOptions),s);const i=s.positions||new Float32Array([0,0,1,0,1,1,0,1]),n=s.uvs||new Float32Array([0,0,1,0,1,1,0,1]),o=s.indices||new Uint32Array([0,1,2,0,2,3]),a=s.shrinkBuffersToFit,u=new _t({data:i,label:"attribute-mesh-positions",shrinkToFit:a,usage:$.VERTEX|$.COPY_DST}),l=new _t({data:n,label:"attribute-mesh-uvs",shrinkToFit:a,usage:$.VERTEX|$.COPY_DST}),h=new _t({data:o,label:"index-mesh-buffer",shrinkToFit:a,usage:$.INDEX|$.COPY_DST});super({attributes:{aPosition:{buffer:u,format:"float32x2",stride:2*4,offset:0},aUV:{buffer:l,format:"float32x2",stride:2*4,offset:0}},indexBuffer:h,topology:s.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(t){this.attributes.aPosition.buffer.data=t}get uvs(){return this.attributes.aUV.buffer.data}set uvs(t){this.attributes.aUV.buffer.data=t}get indices(){return this.indexBuffer.data}set indices(t){this.indexBuffer.data=t}};Zd.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};let Jt=Zd;var Ay=Object.defineProperty,Py=Object.defineProperties,wy=Object.getOwnPropertyDescriptors,Qd=Object.getOwnPropertySymbols,Ry=Object.prototype.hasOwnProperty,My=Object.prototype.propertyIsEnumerable,Jd=(r,t,e)=>t in r?Ay(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,tp=(r,t)=>{for(var e in t||(t={}))Ry.call(t,e)&&Jd(r,e,t[e]);if(Qd)for(var e of Qd(t))My.call(t,e)&&Jd(r,e,t[e]);return r},ep=(r,t)=>Py(r,wy(t));const Ne={name:"local-uniform-bit",vertex:{header:` + + struct LocalUniforms { + uTransformMatrix:mat3x3, + uColor:vec4, + uRound:f32, + } + + @group(1) @binding(0) var localUniforms : LocalUniforms; + `,main:` + vColor *= localUniforms.uColor; + modelMatrix *= localUniforms.uTransformMatrix; + `,end:` + if(localUniforms.uRound == 1) + { + vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw); + } + `}},rp=ep(tp({},Ne),{vertex:ep(tp({},Ne.vertex),{header:Ne.vertex.header.replace("group(1)","group(2)")})}),zs={name:"local-uniform-bit",vertex:{header:` + + uniform mat3 uTransformMatrix; + uniform vec4 uColor; + uniform float uRound; + `,main:` + vColor *= uColor; + modelMatrix = uTransformMatrix; + `,end:` + if(uRound == 1.) + { + gl_Position.xy = roundPixels(gl_Position.xy, uResolution); + } + `}},sp={name:"tiling-bit",vertex:{header:` + struct TilingUniforms { + uMapCoord:mat3x3, + uClampFrame:vec4, + uClampOffset:vec2, + uTextureTransform:mat3x3, + uSizeAnchor:vec4 + }; + + @group(2) @binding(0) var tilingUniforms: TilingUniforms; + @group(2) @binding(1) var uTexture: texture_2d; + @group(2) @binding(2) var uSampler: sampler; + `,main:` + uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy; + + position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy; + `},fragment:{header:` + struct TilingUniforms { + uMapCoord:mat3x3, + uClampFrame:vec4, + uClampOffset:vec2, + uTextureTransform:mat3x3, + uSizeAnchor:vec4 + }; + + @group(2) @binding(0) var tilingUniforms: TilingUniforms; + @group(2) @binding(1) var uTexture: texture_2d; + @group(2) @binding(2) var uSampler: sampler; + `,main:` + + var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV); + coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy; + var unclamped = coord; + coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw); + + var bias = 0.; + + if(unclamped.x == coord.x && unclamped.y == coord.y) + { + bias = -32.; + } + + outColor = textureSampleBias(uTexture, uSampler, coord, bias); + `}},ip={name:"tiling-bit",vertex:{header:` + uniform mat3 uTextureTransform; + uniform vec4 uSizeAnchor; + + `,main:` + uv = (uTextureTransform * vec3(aUV, 1.0)).xy; + + position = (position - uSizeAnchor.zw) * uSizeAnchor.xy; + `},fragment:{header:` + uniform sampler2D uTexture; + uniform mat3 uMapCoord; + uniform vec4 uClampFrame; + uniform vec2 uClampOffset; + `,main:` + + vec2 coord = vUV + ceil(uClampOffset - vUV); + coord = (uMapCoord * vec3(coord, 1.0)).xy; + vec2 unclamped = coord; + coord = clamp(coord, uClampFrame.xy, uClampFrame.zw); + + outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0 + + `}};let Lo,$o;class np extends St{constructor(){Lo!=null||(Lo=Ue({name:"tiling-sprite-shader",bits:[Ne,sp,Le]})),$o!=null||($o=ke({name:"tiling-sprite-shader",bits:[zs,ip,$e]}));const t=new it({uMapCoord:{value:new G,type:"mat3x3"},uClampFrame:{value:new Float32Array([0,0,1,1]),type:"vec4"},uClampOffset:{value:new Float32Array([0,0]),type:"vec2"},uTextureTransform:{value:new G,type:"mat3x3"},uSizeAnchor:{value:new Float32Array([100,100,.5,.5]),type:"vec4"}});super({glProgram:$o,gpuProgram:Lo,resources:{localUniforms:new it({uTransformMatrix:{value:new G,type:"mat3x3"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4"},uRound:{value:0,type:"f32"}}),tilingUniforms:t,uTexture:A.EMPTY.source,uSampler:A.EMPTY.source.style}})}updateUniforms(t,e,s,i,n,o){const a=this.resources.tilingUniforms,u=o.width,l=o.height,h=o.textureMatrix,c=a.uniforms.uTextureTransform;c.set(s.a*u/t,s.b*u/e,s.c*l/t,s.d*l/e,s.tx/t,s.ty/e),c.invert(),a.uniforms.uMapCoord=h.mapCoord,a.uniforms.uClampFrame=h.uClampFrame,a.uniforms.uClampOffset=h.uClampOffset,a.uniforms.uTextureTransform=c,a.uniforms.uSizeAnchor[0]=t,a.uniforms.uSizeAnchor[1]=e,a.uniforms.uSizeAnchor[2]=i,a.uniforms.uSizeAnchor[3]=n,o&&(this.resources.uTexture=o.source,this.resources.uSampler=o.source.style)}}class op extends Jt{constructor(){super({positions:new Float32Array([0,0,1,0,1,1,0,1]),uvs:new Float32Array([0,0,1,0,1,1,0,1]),indices:new Uint32Array([0,1,2,0,2,3])})}}function ap(r,t){const e=r.anchor.x,s=r.anchor.y;t[0]=-e*r.width,t[1]=-s*r.height,t[2]=(1-e)*r.width,t[3]=-s*r.height,t[4]=(1-e)*r.width,t[5]=(1-s)*r.height,t[6]=-e*r.width,t[7]=(1-s)*r.height}function up(r,t,e,s){let i=0;const n=r.length/(t||2),o=s.a,a=s.b,u=s.c,l=s.d,h=s.tx,c=s.ty;for(e*=t;i{this.destroyRenderable(t)}),this._tilingSpriteDataHash[t.uid]}_updateBatchableMesh(t){const e=this._getTilingSpriteData(t),{geometry:s}=e,i=t.texture.source.style;i.addressMode!=="repeat"&&(i.addressMode="repeat",i.update()),lp(t,s.uvs),ap(t,s.positions)}destroy(){for(const t in this._tilingSpriteDataHash)this.destroyRenderable(this._tilingSpriteDataHash[t].renderable);this._tilingSpriteDataHash=null,this._renderer=null}_updateCanBatch(t){const e=this._getTilingSpriteData(t),s=t.texture;let i=!0;return this._renderer.type===xt.WEBGL&&(i=this._renderer.context.supports.nonPowOf2wrapping),e.canBatch=s.textureMatrix.isSimple&&(i||s.source.isPowerOfTwo),e.canBatch}}No.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"tilingSprite"},D.add(No);var Oy=Object.defineProperty,hp=Object.getOwnPropertySymbols,Cy=Object.prototype.hasOwnProperty,Gy=Object.prototype.propertyIsEnumerable,cp=(r,t,e)=>t in r?Oy(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,dp=(r,t)=>{for(var e in t||(t={}))Cy.call(t,e)&&cp(r,e,t[e]);if(hp)for(var e of hp(t))Gy.call(t,e)&&cp(r,e,t[e]);return r};const pp=class Rx extends Jt{constructor(...t){var e;super({});let s=(e=t[0])!=null?e:{};typeof s=="number"&&(s={width:s,height:t[1],verticesX:t[2],verticesY:t[3]}),this.build(s)}build(t){var e,s,i,n;t=dp(dp({},Rx.defaultOptions),t),this.verticesX=(e=this.verticesX)!=null?e:t.verticesX,this.verticesY=(s=this.verticesY)!=null?s:t.verticesY,this.width=(i=this.width)!=null?i:t.width,this.height=(n=this.height)!=null?n:t.height;const o=this.verticesX*this.verticesY,a=[],u=[],l=[],h=this.verticesX-1,c=this.verticesY-1,d=this.width/h,p=this.height/c;for(let g=0;gt in r?Iy(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,gp=(r,t)=>{for(var e in t||(t={}))By.call(t,e)&&mp(r,e,t[e]);if(fp)for(var e of fp(t))Fy.call(t,e)&&mp(r,e,t[e]);return r};const _p=class Mx extends Ho{constructor(t={}){t=gp(gp({},Mx.defaultOptions),t),super({width:t.width,height:t.height,verticesX:4,verticesY:4}),this.update(t)}update(t){var e,s,i,n,o,a,u,l;this.width=(e=t.width)!=null?e:this.width,this.height=(s=t.height)!=null?s:this.height,this._originalWidth=(i=t.originalWidth)!=null?i:this._originalWidth,this._originalHeight=(n=t.originalHeight)!=null?n:this._originalHeight,this._leftWidth=(o=t.leftWidth)!=null?o:this._leftWidth,this._rightWidth=(a=t.rightWidth)!=null?a:this._rightWidth,this._topHeight=(u=t.topHeight)!=null?u:this._topHeight,this._bottomHeight=(l=t.bottomHeight)!=null?l:this._bottomHeight,this.updateUvs(),this.updatePositions()}updatePositions(){const t=this.positions,e=this._leftWidth+this._rightWidth,s=this.width>e?1:this.width/e,i=this._topHeight+this._bottomHeight,n=this.height>i?1:this.height/i,o=Math.min(s,n);t[9]=t[11]=t[13]=t[15]=this._topHeight*o,t[17]=t[19]=t[21]=t[23]=this.height-this._bottomHeight*o,t[25]=t[27]=t[29]=t[31]=this.height,t[2]=t[10]=t[18]=t[26]=this._leftWidth*o,t[4]=t[12]=t[20]=t[28]=this.width-this._rightWidth*o,t[6]=t[14]=t[22]=t[30]=this.width,this.getBuffer("aPosition").update()}updateUvs(){const t=this.uvs;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1;const e=1/this._originalWidth,s=1/this._originalHeight;t[2]=t[10]=t[18]=t[26]=e*this._leftWidth,t[9]=t[11]=t[13]=t[15]=s*this._topHeight,t[4]=t[12]=t[20]=t[28]=1-e*this._rightWidth,t[17]=t[19]=t[21]=t[23]=1-s*this._bottomHeight,this.getBuffer("aUV").update()}};_p.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};let te=_p;class Xo{constructor(t){this._gpuSpriteHash=Object.create(null),this._renderer=t}addRenderable(t,e){const s=this._getGpuSprite(t);t._didSpriteUpdate&&this._updateBatchableSprite(t,s),this._renderer.renderPipes.batch.addToBatch(s)}updateRenderable(t){const e=this._gpuSpriteHash[t.uid];t._didSpriteUpdate&&this._updateBatchableSprite(t,e),e.batcher.updateElement(e)}validateRenderable(t){const e=t._texture,s=this._getGpuSprite(t);return s.texture._source!==e._source?!s.batcher.checkAndUpdateTexture(s,e):!1}destroyRenderable(t){const e=this._gpuSpriteHash[t.uid];H.return(e),this._gpuSpriteHash[t.uid]=null}_updateBatchableSprite(t,e){t._didSpriteUpdate=!1,e.geometry.update(t),e.texture=t._texture}_getGpuSprite(t){return this._gpuSpriteHash[t.uid]||this._initGPUSprite(t)}_initGPUSprite(t){const e=new ws;return e.geometry=new te,e.mesh=t,e.texture=t._texture,e.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuSpriteHash[t.uid]=e,t.on("destroyed",()=>{this.destroyRenderable(t)}),e}destroy(){for(const t in this._gpuSpriteHash)this._gpuSpriteHash[t].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}}Xo.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"nineSliceSprite"},D.add(Xo);class zo{constructor(t){this._renderer=t}push(t,e,s){this._renderer.renderPipes.batch.break(s),s.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:e,filterEffect:t})}pop(t,e,s){this._renderer.renderPipes.batch.break(s),s.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(t){t.action==="pushFilter"?this._renderer.filter.push(t):t.action==="popFilter"&&this._renderer.filter.pop()}destroy(){this._renderer=null}}zo.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"filter"};const Dy=new G;function xp(r,t){return t.clear(),jo(r,t),t.isValid||t.set(0,0,0,0),r.isRenderGroupRoot?t.applyMatrix(r.renderGroup.localTransform):t.applyMatrix(r.renderGroup.worldTransform),t}function jo(r,t){if(r.localDisplayStatus!==7||!r.measurable)return;const e=!!r.effects.length;let s=t;if((r.isRenderGroupRoot||e)&&(s=kt.get().clear()),r.boundsArea)t.addRect(r.boundsArea,r.worldTransform);else{if(r.renderPipeId){const n=r.bounds;s.addFrame(n.minX,n.minY,n.maxX,n.maxY,r.groupTransform)}const i=r.children;for(let n=0;n"},uInputPixel:{value:new Float32Array(4),type:"vec4"},uInputClamp:{value:new Float32Array(4),type:"vec4"},uOutputFrame:{value:new Float32Array(4),type:"vec4"},uGlobalFrame:{value:new Float32Array(4),type:"vec4"},uOutputTexture:{value:new Float32Array(4),type:"vec4"}}),this._globalFilterBindGroup=new Lt({}),this.renderer=t}get activeBackTexture(){var t;return(t=this._activeFilterData)==null?void 0:t.backTexture}push(t){var e,s;const i=this.renderer,n=t.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());const o=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,n.length===0){o.skip=!0;return}const a=o.bounds;t.renderables?bp(t.renderables,a):t.filterEffect.filterArea?(a.clear(),a.addRect(t.filterEffect.filterArea),a.applyMatrix(t.container.worldTransform)):xp(t.container,a);const u=i.renderTarget.rootRenderTarget.colorTexture.source;let l=u._resolution,h=0,c=u.antialias,d=!1,p=!1;for(let g=0;g0?this._filterStack[this._filterStackIndex-1].bounds:null,u=t.renderTarget.getRenderTarget(e.previousRenderSurface);n=this.getBackTexture(u,i,a)}e.backTexture=n;const o=e.filterEffect.filters;if(this._globalFilterBindGroup.setResource(s.source.style,2),this._globalFilterBindGroup.setResource(n.source,3),t.globalUniforms.pop(),o.length===1)o[0].apply(this,s,e.previousRenderSurface,!1),ut.returnTexture(s);else{let a=e.inputTexture,u=ut.getOptimalTexture(i.width,i.height,a.source._resolution,!1),l=0;for(l=0;l0&&this._filterStack[c].skip;)--c;c>0&&(h=this._filterStack[c].inputTexture.source._resolution);const d=this._filterGlobalUniforms,p=d.uniforms,f=p.uOutputFrame,g=p.uInputSize,m=p.uInputPixel,_=p.uInputClamp,x=p.uGlobalFrame,b=p.uOutputTexture;if(l){let P=this._filterStackIndex;for(;P>0;){P--;const R=this._filterStack[this._filterStackIndex-1];if(!R.skip){u.x=R.bounds.minX,u.y=R.bounds.minY;break}}f[0]=a.minX-u.x,f[1]=a.minY-u.y}else f[0]=0,f[1]=0;f[2]=e.frame.width,f[3]=e.frame.height,g[0]=e.source.width,g[1]=e.source.height,g[2]=1/g[0],g[3]=1/g[1],m[0]=e.source.pixelWidth,m[1]=e.source.pixelHeight,m[2]=1/m[0],m[3]=1/m[1],_[0]=.5*m[2],_[1]=.5*m[3],_[2]=e.frame.width*g[2]-.5*m[2],_[3]=e.frame.height*g[3]-.5*m[3];const y=this.renderer.renderTarget.rootRenderTarget.colorTexture;x[0]=u.x*h,x[1]=u.y*h,x[2]=y.source.width*h,x[3]=y.source.height*h;const S=this.renderer.renderTarget.getRenderTarget(s);if(n.renderTarget.bind(s,!!i),s instanceof A?(b[0]=s.frame.width,b[1]=s.frame.height):(b[0]=S.width,b[1]=S.height),b[2]=S.isRoot?-1:1,d.update(),n.renderPipes.uniformBatch){const P=n.renderPipes.uniformBatch.getUboResource(d);this._globalFilterBindGroup.setResource(P,0)}else this._globalFilterBindGroup.setResource(d,0);this._globalFilterBindGroup.setResource(e.source,1),this._globalFilterBindGroup.setResource(e.source.style,2),t.groups[0]=this._globalFilterBindGroup,n.encoder.draw({geometry:Uy,shader:t,state:t._state,topology:"triangle-list"}),n.type===xt.WEBGL&&n.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new lt,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(t,e){const s=this._activeFilterData,i=t.set(s.inputTexture._source.width,0,0,s.inputTexture._source.height,s.bounds.minX,s.bounds.minY),n=e.worldTransform.copyTo(G.shared);return n.invert(),i.prepend(n),i.scale(1/e.texture.frame.width,1/e.texture.frame.height),i.translate(e.anchor.x,e.anchor.y),i}}Vo.extension={type:[v.WebGLSystem,v.WebGPUSystem],name:"filter"},D.add(Vo),D.add(zo);var ky={__proto__:null};const Wo=[];D.handleByNamedList(v.Environment,Wo);async function vp(r){if(r)for(let t=0;t(r[r.NONE=0]="NONE",r[r.COLOR=16384]="COLOR",r[r.STENCIL=1024]="STENCIL",r[r.DEPTH=256]="DEPTH",r[r.COLOR_DEPTH=16640]="COLOR_DEPTH",r[r.COLOR_STENCIL=17408]="COLOR_STENCIL",r[r.DEPTH_STENCIL=1280]="DEPTH_STENCIL",r[r.ALL=17664]="ALL",r))(pt||{});class Ko{constructor(t){this.items=[],this._name=t}emit(t,e,s,i,n,o,a,u){const{name:l,items:h}=this;for(let c=0,d=h.length;ct in r?Ly(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Vs=(r,t)=>{for(var e in t||(t={}))$y.call(t,e)&&Tp(r,e,t[e]);if(yp)for(var e of yp(t))Ny.call(t,e)&&Tp(r,e,t[e]);return r};const Hy=["init","destroy","contextChange","resolutionChange","reset","renderEnd","renderStart","render","update","postrender","prerender"],Sp=class Ox extends ct{constructor(t){var e;super(),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name;const s=[...Hy,...(e=t.runners)!=null?e:[]];this._addRunners(...s),this._addSystems(t.systems),this._addPipes(t.renderPipes,t.renderPipeAdaptors),this._unsafeEvalCheck()}async init(t={}){for(const e in this._systemsHash){const s=this._systemsHash[e].constructor.defaultOptions;t=Vs(Vs({},s),t)}t=Vs(Vs({},Ox.defaultOptions),t),this._roundPixels=t.roundPixels?1:0;for(let e=0;e{this.runners[e]=new Ko(e)})}_addSystems(t){let e;for(e in t){const s=t[e];this._addSystem(s.value,s.name)}}_addSystem(t,e){const s=new t(this);if(this[e])throw new Error(`Whoops! The name "${e}" is already in use`);this[e]=s,this._systemsHash[e]=s;for(const i in this.runners)this.runners[i].add(s);return this}_addPipes(t,e){const s=e.reduce((i,n)=>(i[n.name]=n.value,i),{});t.forEach(i=>{const n=i.value,o=i.name,a=s[o];this.renderPipes[o]=new n(this,a?new a:null)})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash=null,this.renderPipes=null}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!Yo())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}};Sp.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let Or=Sp,qo;function Cr(r){return qo!==void 0||(qo=(()=>{var t;const e={stencil:!0,failIfMajorPerformanceCaveat:r!=null?r:Or.defaultOptions.failIfMajorPerformanceCaveat};try{if(!X.get().getWebGLRenderingContext())return!1;let s=X.get().createCanvas().getContext("webgl",e);const i=!!((t=s==null?void 0:s.getContextAttributes())!=null&&t.stencil);if(s){const n=s.getExtension("WEBGL_lose_context");n&&n.loseContext()}return s=null,i}catch(s){return!1}})()),qo}let Zo;async function Gr(r={}){return Zo!==void 0||(Zo=await(async()=>{if(!X.get().getNavigator().gpu)return!1;try{return await(await navigator.gpu.requestAdapter(r)).requestDevice(),!0}catch(t){return!1}})()),Zo}var Xy=Object.defineProperty,Ep=Object.getOwnPropertySymbols,zy=Object.prototype.hasOwnProperty,jy=Object.prototype.propertyIsEnumerable,Ap=(r,t,e)=>t in r?Xy(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ir=(r,t)=>{for(var e in t||(t={}))zy.call(t,e)&&Ap(r,e,t[e]);if(Ep)for(var e of Ep(t))jy.call(t,e)&&Ap(r,e,t[e]);return r};const Pp=["webgpu","webgl","canvas"];async function wp(r){var t,e;let s=[];r.preference?(s.push(r.preference),Pp.forEach(a=>{a!==r.preference&&s.push(a)})):s=Pp.slice();let i;await vp((t=r.manageImports)!=null?t:!0);let n={};for(let a=0;at in r?Vy(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ky=(r,t)=>{for(var e in t||(t={}))Wy.call(t,e)&&Mp(r,e,t[e]);if(Rp)for(var e of Rp(t))Yy.call(t,e)&&Mp(r,e,t[e]);return r};const Op=class Ku{constructor(...t){this.stage=new V}async init(t){t=Ky({},t),this.renderer=await wp(t),Ku._plugins.forEach(e=>{e.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,e=!1){const s=Ku._plugins.slice(0);s.reverse(),s.forEach(i=>{i.destroy.call(this)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null}};Op._plugins=[];let Cp=Op;D.handleByList(v.Application,Cp._plugins);class Gp{constructor(t,e=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=e}add(t){t.forEach(e=>{this._assetList.push(e)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const t=[],e=Math.min(this._assetList.length,this._maxConcurrent);for(let s=0;sArray.isArray(r)&&r.every(t=>t instanceof A),getCacheableAssets:(r,t)=>{const e={};return r.forEach(s=>{t.forEach((i,n)=>{e[s+(n===0?"":n+1)]=i})}),e}};async function Qo(r){if("Image"in globalThis)return new Promise(t=>{const e=new Image;e.onload=()=>{t(!0)},e.onerror=()=>{t(!1)},e.src=r});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const t=await(await fetch(r)).blob();await createImageBitmap(t)}catch(t){return!1}return!0}return!1}const Bp={extension:{type:v.DetectionParser,priority:1},test:async()=>Qo("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async r=>[...r,"avif"],remove:async r=>r.filter(t=>t!=="avif")},Fp=["png","jpg","jpeg"],Dp={extension:{type:v.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async r=>[...r,...Fp],remove:async r=>r.filter(t=>!Fp.includes(t))},qy="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function Ws(r){return qy?!1:document.createElement("video").canPlayType(r)!==""}const Up={extension:{type:v.DetectionParser,priority:0},test:async()=>Ws("video/mp4"),add:async r=>[...r,"mp4","m4v"],remove:async r=>r.filter(t=>t!=="mp4"&&t!=="m4v")},kp={extension:{type:v.DetectionParser,priority:0},test:async()=>Ws("video/ogg"),add:async r=>[...r,"ogv"],remove:async r=>r.filter(t=>t!=="ogv")},Lp={extension:{type:v.DetectionParser,priority:0},test:async()=>Ws("video/webm"),add:async r=>[...r,"webm"],remove:async r=>r.filter(t=>t!=="webm")},$p={extension:{type:v.DetectionParser,priority:0},test:async()=>Qo("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async r=>[...r,"webp"],remove:async r=>r.filter(t=>t!=="webp")};var Zy=Object.defineProperty,Qy=Object.defineProperties,Jy=Object.getOwnPropertyDescriptors,Np=Object.getOwnPropertySymbols,t1=Object.prototype.hasOwnProperty,e1=Object.prototype.propertyIsEnumerable,Hp=(r,t,e)=>t in r?Zy(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,r1=(r,t)=>{for(var e in t||(t={}))t1.call(t,e)&&Hp(r,e,t[e]);if(Np)for(var e of Np(t))e1.call(t,e)&&Hp(r,e,t[e]);return r},s1=(r,t)=>Qy(r,Jy(t));class Xp{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,e,s)=>(this._parsersValidated=!1,t[e]=s,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,e){const s={promise:null,parser:null};return s.promise=(async()=>{var i,n;let o=null,a=null;if(e.loadParser&&(a=this._parserHash[e.loadParser]),!a){for(let u=0;u({alias:[l],src:l})),a=o.length,u=o.map(async l=>{const h=dt.toAbsolute(l.src);if(!i[l.src])try{this.promiseCache[h]||(this.promiseCache[h]=this._getLoadPromiseAndParser(h,l)),i[l.src]=await this.promiseCache[h].promise,e&&e(++s/a)}catch(c){throw delete this.promiseCache[h],delete i[l.src],new Error(`[Loader.load] Failed to load ${h}. +${c}`)}});return await Promise.all(u),n?i[o[0].src]:i}async unload(t){const e=Pt(t,s=>({alias:[s],src:s})).map(async s=>{var i,n;const o=dt.toAbsolute(s.src),a=this.promiseCache[o];if(a){const u=await a.promise;delete this.promiseCache[o],await((n=(i=a.parser)==null?void 0:i.unload)==null?void 0:n.call(i,u,s,this))}});await Promise.all(e)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,e)=>(e.name&&t[e.name],s1(r1({},t),{[e.name]:e})),{})}}function Se(r,t){if(Array.isArray(t)){for(const e of t)if(r.startsWith(`data:${e}`))return!0;return!1}return r.startsWith(`data:${t}`)}function Mt(r,t){const e=r.split("?")[0],s=dt.extname(e).toLowerCase();return Array.isArray(t)?t.includes(s):s===t}const i1=".json",n1="application/json",zp={extension:{type:v.LoadParser,priority:gt.Low},name:"loadJson",test(r){return Se(r,n1)||Mt(r,i1)},async load(r){return await(await X.get().fetch(r)).json()}},o1=".txt",a1="text/plain",jp={name:"loadTxt",extension:{type:v.LoadParser,priority:gt.Low},test(r){return Se(r,a1)||Mt(r,o1)},async load(r){return await(await X.get().fetch(r)).text()}};var u1=Object.defineProperty,l1=Object.defineProperties,h1=Object.getOwnPropertyDescriptors,Vp=Object.getOwnPropertySymbols,c1=Object.prototype.hasOwnProperty,d1=Object.prototype.propertyIsEnumerable,Wp=(r,t,e)=>t in r?u1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,p1=(r,t)=>{for(var e in t||(t={}))c1.call(t,e)&&Wp(r,e,t[e]);if(Vp)for(var e of Vp(t))d1.call(t,e)&&Wp(r,e,t[e]);return r},f1=(r,t)=>l1(r,h1(t));const m1=["normal","bold","100","200","300","400","500","600","700","800","900"],g1=[".ttf",".otf",".woff",".woff2"],_1=["font/ttf","font/otf","font/woff","font/woff2"],x1=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function Yp(r){const t=dt.extname(r),e=dt.basename(r,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1));let s=e.length>0;for(const n of e)if(!n.match(x1)){s=!1;break}let i=e.join(" ");return s||(i=`"${i.replace(/[\\"]/g,"\\$&")}"`),i}const b1=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function v1(r){return b1.test(r)?r:encodeURI(r)}const Kp={extension:{type:v.LoadParser,priority:gt.Low},name:"loadWebFont",test(r){return Se(r,_1)||Mt(r,g1)},async load(r,t){var e,s,i,n,o,a;const u=X.get().getFontFaceSet();if(u){const l=[],h=(s=(e=t.data)==null?void 0:e.family)!=null?s:Yp(r),c=(o=(n=(i=t.data)==null?void 0:i.weights)==null?void 0:n.filter(p=>m1.includes(p)))!=null?o:["normal"],d=(a=t.data)!=null?a:{};for(let p=0;p{Y.remove(t.family),X.get().getFontFaceSet().delete(t)})}};function Ys(r,t=1){var e;const s=(e=qt.RETINA_PREFIX)==null?void 0:e.exec(r);return s?parseFloat(s[1]):t}function ee(r,t,e){r.label=e,r._sourceOrigin=e;const s=new A({source:r,label:e}),i=()=>{delete t.promiseCache[e],Y.has(e)&&Y.remove(e)};return s.source.once("destroy",()=>{t.promiseCache[e]&&i()}),s.once("destroy",()=>{r.destroyed||i()}),s}var y1=Object.defineProperty,Ks=Object.getOwnPropertySymbols,qp=Object.prototype.hasOwnProperty,Zp=Object.prototype.propertyIsEnumerable,Qp=(r,t,e)=>t in r?y1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,T1=(r,t)=>{for(var e in t||(t={}))qp.call(t,e)&&Qp(r,e,t[e]);if(Ks)for(var e of Ks(t))Zp.call(t,e)&&Qp(r,e,t[e]);return r},S1=(r,t)=>{var e={};for(var s in r)qp.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Ks)for(var s of Ks(r))t.indexOf(s)<0&&Zp.call(r,s)&&(e[s]=r[s]);return e};const E1=".svg",A1="image/svg+xml",Jp={extension:{type:v.LoadParser,priority:gt.Low},name:"loadSVG",config:{crossOrigin:"anonymous",parseAsGraphicsContext:!1},test(r){return Se(r,A1)||Mt(r,E1)},async load(r,t,e){var s;return((s=t.data.parseAsGraphicsContext)!=null?s:this.config.parseAsGraphicsContext)?w1(r):P1(r,t,e,this.config.crossOrigin)},unload(r){r.destroy(!0)}};async function P1(r,t,e,s){var i,n,o,a,u;const l=await(await X.get().fetch(r)).blob(),h=URL.createObjectURL(l),c=new Image;c.src=h,c.crossOrigin=s,await c.decode(),URL.revokeObjectURL(h);const d=document.createElement("canvas"),p=d.getContext("2d"),f=((i=t.data)==null?void 0:i.resolution)||Ys(r),g=(o=(n=t.data)==null?void 0:n.width)!=null?o:c.width,m=(u=(a=t.data)==null?void 0:a.height)!=null?u:c.height;d.width=g*f,d.height=m*f,p.drawImage(c,0,0,g*f,m*f);const _=t.data,{parseAsGraphicsContext:x}=_,b=S1(_,["parseAsGraphicsContext"]),y=new ge(T1({resource:d,alphaMode:"premultiply-alpha-on-upload",resolution:f},b));return ee(y,e,r)}async function w1(r){const t=await(await X.get().fetch(r)).text(),e=new Bt;return e.svg(t),e}const R1=`(function(){"use strict";const e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";async function a(){try{if(typeof createImageBitmap!="function")return!1;const A=await(await fetch(e)).blob(),t=await createImageBitmap(A);return t.width===1&&t.height===1}catch(A){return!1}}a().then(A=>{self.postMessage(A)})})(); +`;let He=null,Jo=class{constructor(){He||(He=URL.createObjectURL(new Blob([R1],{type:"application/javascript"}))),this.worker=new Worker(He)}};Jo.revokeObjectURL=function(){He&&(URL.revokeObjectURL(He),He=null)};const M1='(function(){"use strict";async function e(t){const a=await fetch(t);if(!a.ok)throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${t}: ${a.status} ${a.statusText}`);const s=await a.blob();return await createImageBitmap(s)}self.onmessage=async t=>{try{const a=await e(t.data.data[0]);self.postMessage({data:a,uuid:t.data.uuid,id:t.data.id},[a])}catch(a){self.postMessage({error:a,uuid:t.data.uuid,id:t.data.id})}}})();\n';let Xe=null,tf=class{constructor(){Xe||(Xe=URL.createObjectURL(new Blob([M1],{type:"application/javascript"}))),this.worker=new Worker(Xe)}};tf.revokeObjectURL=function(){Xe&&(URL.revokeObjectURL(Xe),Xe=null)};let ef=0,ta,O1=class{constructor(){this._initialized=!1,this._createdWorkers=0,this._workerPool=[],this._queue=[],this._resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(t=>{const{worker:e}=new Jo;e.addEventListener("message",s=>{e.terminate(),Jo.revokeObjectURL(),t(s.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}_getWorker(){ta===void 0&&(ta=navigator.hardwareConcurrency||4);let t=this._workerPool.pop();return!t&&this._createdWorkers{this._complete(e.data),this._returnWorker(e.target),this._next()})),t}_returnWorker(t){this._workerPool.push(t)}_complete(t){t.error!==void 0?this._resolveHash[t.uuid].reject(t.error):this._resolveHash[t.uuid].resolve(t.data),this._resolveHash[t.uuid]=null}async _run(t,e){await this._initWorkers();const s=new Promise((i,n)=>{this._queue.push({id:t,arguments:e,resolve:i,reject:n})});return this._next(),s}_next(){if(!this._queue.length)return;const t=this._getWorker();if(!t)return;const e=this._queue.pop(),s=e.id;this._resolveHash[ef]={resolve:e.resolve,reject:e.reject},t.postMessage({data:e.arguments,uuid:ef++,id:s})}};const ea=new O1;var C1=Object.defineProperty,rf=Object.getOwnPropertySymbols,G1=Object.prototype.hasOwnProperty,I1=Object.prototype.propertyIsEnumerable,sf=(r,t,e)=>t in r?C1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,B1=(r,t)=>{for(var e in t||(t={}))G1.call(t,e)&&sf(r,e,t[e]);if(rf)for(var e of rf(t))I1.call(t,e)&&sf(r,e,t[e]);return r};const F1=[".jpeg",".jpg",".png",".webp",".avif"],D1=["image/jpeg","image/png","image/webp","image/avif"];async function nf(r){const t=await X.get().fetch(r);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${t.status} ${t.statusText}`);const e=await t.blob();return await createImageBitmap(e)}const ra={name:"loadTextures",extension:{type:v.LoadParser,priority:gt.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(r){return Se(r,D1)||Mt(r,F1)},async load(r,t,e){var s;let i=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await ea.isImageBitmapSupported()?i=await ea.loadImageBitmap(r):i=await nf(r):i=await new Promise(o=>{i=new Image,i.crossOrigin=this.config.crossOrigin,i.src=r,i.complete?o(i):i.onload=()=>{o(i)}});const n=new ge(B1({resource:i,alphaMode:"premultiply-alpha-on-upload",resolution:((s=t.data)==null?void 0:s.resolution)||Ys(r)},t.data));return ee(n,e,r)},unload(r){r.destroy(!0)}};var U1=Object.defineProperty,k1=Object.defineProperties,L1=Object.getOwnPropertyDescriptors,of=Object.getOwnPropertySymbols,$1=Object.prototype.hasOwnProperty,N1=Object.prototype.propertyIsEnumerable,af=(r,t,e)=>t in r?U1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,sa=(r,t)=>{for(var e in t||(t={}))$1.call(t,e)&&af(r,e,t[e]);if(of)for(var e of of(t))N1.call(t,e)&&af(r,e,t[e]);return r},uf=(r,t)=>k1(r,L1(t));const lf=[".mp4",".m4v",".webm",".ogg",".ogv",".h264",".avi",".mov"],H1=lf.map(r=>`video/${r.substring(1)}`);function hf(r,t,e){e===void 0&&!t.startsWith("data:")?r.crossOrigin=df(t):e!==!1&&(r.crossOrigin=typeof e=="string"?e:"anonymous")}function cf(r){return new Promise((t,e)=>{r.addEventListener("canplaythrough",s),r.addEventListener("error",i),r.load();function s(){n(),t()}function i(o){n(),e(o)}function n(){r.removeEventListener("canplaythrough",s),r.removeEventListener("error",i)}})}function df(r,t=globalThis.location){if(r.startsWith("data:"))return"";t=t||globalThis.location;const e=new URL(r,document.baseURI);return e.hostname!==t.hostname||e.port!==t.port||e.protocol!==t.protocol?"anonymous":""}const pf={name:"loadVideo",extension:{type:v.LoadParser},config:null,test(r){const t=Se(r,H1),e=Mt(r,lf);return t||e},async load(r,t,e){var s,i;const n=sa(uf(sa({},pr.defaultOptions),{resolution:((s=t.data)==null?void 0:s.resolution)||Ys(r),alphaMode:((i=t.data)==null?void 0:i.alphaMode)||await _n()}),t.data),o=document.createElement("video"),a={preload:n.autoLoad!==!1?"auto":void 0,"webkit-playsinline":n.playsinline!==!1?"":void 0,playsinline:n.playsinline!==!1?"":void 0,muted:n.muted===!0?"":void 0,loop:n.loop===!0?"":void 0,autoplay:n.autoPlay!==!1?"":void 0};Object.keys(a).forEach(h=>{const c=a[h];c!==void 0&&o.setAttribute(h,c)}),n.muted===!0&&(o.muted=!0),hf(o,r,n.crossorigin);const u=document.createElement("source");let l;if(r.startsWith("data:"))l=r.slice(5,r.indexOf(";"));else if(!r.startsWith("blob:")){const h=r.split("?")[0].slice(r.lastIndexOf(".")+1).toLowerCase();l=pr.MIME_TYPES[h]||`video/${h}`}return u.src=r,l&&(u.type=l),new Promise(h=>{const c=async()=>{const d=new pr(uf(sa({},n),{resource:o}));o.removeEventListener("canplay",c),t.data.preload&&await cf(o),h(ee(d,e,r))};o.addEventListener("canplay",c),o.appendChild(u)})},unload(r){r.destroy(!0)}},ia={extension:v.ResolveParser,test:ra.test,parse:r=>{var t,e;return{resolution:parseFloat((e=(t=qt.RETINA_PREFIX.exec(r))==null?void 0:t[1])!=null?e:"1"),format:r.split(".").pop(),src:r}}},ff={extension:v.ResolveParser,test:r=>qt.RETINA_PREFIX.test(r)&&r.endsWith(".json"),parse:ia.parse};class mf{constructor(){this._detections=[],this._initialized=!1,this.resolver=new qt,this.loader=new Xp,this.cache=Y,this._backgroundLoader=new Gp(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var e,s,i;if(this._initialized)return;if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let u=t.manifest;typeof u=="string"&&(u=await this.load(u)),this.resolver.addManifest(u)}const n=(s=(e=t.texturePreference)==null?void 0:e.resolution)!=null?s:1,o=typeof n=="number"?[n]:n,a=await this._detectFormats({preferredFormats:(i=t.texturePreference)==null?void 0:i.format,skipDetections:t.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:a,resolution:o}}),t.preferences&&this.setPreferences(t.preferences)}add(t){this.resolver.add(t)}async load(t,e){this._initialized||await this.init();const s=cr(t),i=Pt(t).map(a=>{if(typeof a!="string"){const u=this.resolver.getAlias(a);return u.some(l=>!this.resolver.hasKey(l))&&this.add(a),Array.isArray(u)?u[0]:u}return this.resolver.hasKey(a)||this.add({alias:a,src:a}),a}),n=this.resolver.resolve(i),o=await this._mapLoadToResolve(n,e);return s?o[i[0]]:o}addBundle(t,e){this.resolver.addBundle(t,e)}async loadBundle(t,e){this._initialized||await this.init();let s=!1;typeof t=="string"&&(s=!0,t=[t]);const i=this.resolver.resolveBundle(t),n={},o=Object.keys(i);let a=0,u=0;const l=()=>{e==null||e(++a/u)},h=o.map(c=>{const d=i[c];return u+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(p=>{n[c]=p})});return await Promise.all(h),s?n[t[0]]:n}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const e=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(e))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const e=this.resolver.resolveBundle(t);Object.values(e).forEach(s=>{this._backgroundLoader.add(Object.values(s))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return Y.get(t);const e={};for(let s=0;s{const a=i[o.src],u=[o.src];o.alias&&u.push(...o.alias),u.forEach(l=>{n[l]=a}),Y.set(u,a)}),n}async unload(t){this._initialized||await this.init();const e=Pt(t).map(i=>typeof i!="string"?i.src:i),s=this.resolver.resolve(e);await this._unloadFromResolved(s)}async unloadBundle(t){this._initialized||await this.init(),t=Pt(t);const e=this.resolver.resolveBundle(t),s=Object.keys(e).map(i=>this._unloadFromResolved(e[i]));await Promise.all(s)}async _unloadFromResolved(t){const e=Object.values(t);e.forEach(s=>{Y.remove(s.src)}),await this.loader.unload(e)}async _detectFormats(t){let e=[];t.preferredFormats&&(e=Array.isArray(t.preferredFormats)?t.preferredFormats:[t.preferredFormats]);for(const s of t.detections)t.skipDetections||await s.test()?e=await s.add(e):t.skipDetections||(e=await s.remove(e));return e=e.filter((s,i)=>e.indexOf(s)===i),e}get detections(){return this._detections}setPreferences(t){this.loader.parsers.forEach(e=>{e.config&&Object.keys(e.config).filter(s=>s in t).forEach(s=>{e.config[s]=t[s]})})}}const Br=new mf;D.handleByList(v.LoadParser,Br.loader.parsers).handleByList(v.ResolveParser,Br.resolver.parsers).handleByList(v.CacheParser,Br.cache.parsers).handleByList(v.DetectionParser,Br.detections),D.add(Ip,Dp,Bp,$p,Up,kp,Lp,zp,jp,Kp,Jp,ra,pf,ia,ff);const gf={loader:v.LoadParser,resolver:v.ResolveParser,cache:v.CacheParser,detection:v.DetectionParser};D.handle(v.Asset,r=>{const t=r.ref;Object.entries(gf).filter(([e])=>!!t[e]).forEach(([e,s])=>{var i;return D.add(Object.assign(t[e],{extension:(i=t[e].extension)!=null?i:s}))})},r=>{const t=r.ref;Object.keys(gf).filter(e=>!!t[e]).forEach(e=>D.remove(t[e]))});const X1={extension:{type:v.DetectionParser,priority:3},test:async()=>!!(await Gr()||Cr()),add:async r=>[...r,"basis"],remove:async r=>r.filter(t=>t!=="basis")};class Fr extends et{constructor(t){super(t),this.uploadMethodId="compressed",this.resource=t.resource,this.mipLevelCount=this.resource.length}}let qs;function na(){if(qs)return qs;const r=document.createElement("canvas").getContext("webgl");return r?(qs=[...r.getExtension("EXT_texture_compression_bptc")?["bc6h-rgb-ufloat","bc6h-rgb-float","bc7-rgba-unorm","bc7-rgba-unorm-srgb"]:[],...r.getExtension("WEBGL_compressed_texture_s3tc")?["bc1-rgba-unorm","bc2-rgba-unorm","bc3-rgba-unorm"]:[],...r.getExtension("WEBGL_compressed_texture_s3tc_srgb")?["bc1-rgba-unorm-srgb","bc2-rgba-unorm-srgb","bc3-rgba-unorm-srgb"]:[],...r.getExtension("EXT_texture_compression_rgtc")?["bc4-r-unorm","bc4-r-snorm","bc5-rg-unorm","bc5-rg-snorm"]:[],...r.getExtension("WEBGL_compressed_texture_etc")?["etc2-rgb8unorm","etc2-rgb8unorm-srgb","etc2-rgba8unorm","etc2-rgba8unorm-srgb","etc2-rgb8a1unorm","etc2-rgb8a1unorm-srgb","eac-r11unorm","eac-rg11unorm"]:[],...r.getExtension("WEBGL_compressed_texture_astc")?["astc-4x4-unorm","astc-4x4-unorm-srgb","astc-5x4-unorm","astc-5x4-unorm-srgb","astc-5x5-unorm","astc-5x5-unorm-srgb","astc-6x5-unorm","astc-6x5-unorm-srgb","astc-6x6-unorm","astc-6x6-unorm-srgb","astc-8x5-unorm","astc-8x5-unorm-srgb","astc-8x6-unorm","astc-8x6-unorm-srgb","astc-8x8-unorm","astc-8x8-unorm-srgb","astc-10x5-unorm","astc-10x5-unorm-srgb","astc-10x6-unorm","astc-10x6-unorm-srgb","astc-10x8-unorm","astc-10x8-unorm-srgb","astc-10x10-unorm","astc-10x10-unorm-srgb","astc-12x10-unorm","astc-12x10-unorm-srgb","astc-12x12-unorm","astc-12x12-unorm-srgb"]:[]],qs):[]}let Zs;async function oa(){if(Zs)return Zs;const r=await navigator.gpu.requestAdapter();return Zs=[...r.features.has("texture-compression-bc")?["bc1-rgba-unorm","bc1-rgba-unorm-srgb","bc2-rgba-unorm","bc2-rgba-unorm-srgb","bc3-rgba-unorm","bc3-rgba-unorm-srgb","bc4-r-unorm","bc4-r-snorm","bc5-rg-unorm","bc5-rg-snorm","bc6h-rgb-ufloat","bc6h-rgb-float","bc7-rgba-unorm","bc7-rgba-unorm-srgb"]:[],...r.features.has("texture-compression-etc2")?["etc2-rgb8unorm","etc2-rgb8unorm-srgb","etc2-rgb8a1unorm","etc2-rgb8a1unorm-srgb","etc2-rgba8unorm","etc2-rgba8unorm-srgb","eac-r11unorm","eac-r11snorm","eac-rg11unorm","eac-rg11snorm"]:[],...r.features.has("texture-compression-astc")?["astc-4x4-unorm","astc-4x4-unorm-srgb","astc-5x4-unorm","astc-5x4-unorm-srgb","astc-5x5-unorm","astc-5x5-unorm-srgb","astc-6x5-unorm","astc-6x5-unorm-srgb","astc-6x6-unorm","astc-6x6-unorm-srgb","astc-8x5-unorm","astc-8x5-unorm-srgb","astc-8x6-unorm","astc-8x6-unorm-srgb","astc-8x8-unorm","astc-8x8-unorm-srgb","astc-10x5-unorm","astc-10x5-unorm-srgb","astc-10x6-unorm","astc-10x6-unorm-srgb","astc-10x8-unorm","astc-10x8-unorm-srgb","astc-10x10-unorm","astc-10x10-unorm-srgb","astc-12x10-unorm","astc-12x10-unorm-srgb","astc-12x12-unorm","astc-12x12-unorm-srgb"]:[]],Zs}let aa;async function ua(){return aa!==void 0||(aa=await(async()=>{const r=await Gr(),t=Cr();if(r&&t){const e=await oa(),s=na();return e.filter(i=>s.includes(i))}else{if(r)return await oa();if(t)return na()}return[]})()),aa}const _f=["r8unorm","r8snorm","r8uint","r8sint","r16uint","r16sint","r16float","rg8unorm","rg8snorm","rg8uint","rg8sint","r32uint","r32sint","r32float","rg16uint","rg16sint","rg16float","rgba8unorm","rgba8unorm-srgb","rgba8snorm","rgba8uint","rgba8sint","bgra8unorm","bgra8unorm-srgb","rgb9e5ufloat","rgb10a2unorm","rg11b10ufloat","rg32uint","rg32sint","rg32float","rgba16uint","rgba16sint","rgba16float","rgba32uint","rgba32sint","rgba32float","stencil8","depth16unorm","depth24plus","depth24plus-stencil8","depth32float","depth32float-stencil8"];let Qs;async function Dr(){if(Qs!==void 0)return Qs;const r=await ua();return Qs=[..._f,...r],Qs}const z1='(function(){"use strict";function g(r,a){const t=r.getNumImages(),s=r.getNumLevels(0);if(!r.startTranscoding())throw new Error("startTranscoding failed");const m=[];for(let e=0;e{BASIS({locateFile:s=>a}).then(s=>{s.initializeBasis(),t(s.BasisFile)})})}return c}async function b(r,a){const t=await fetch(r);if(t.ok){const s=await t.arrayBuffer();return new a(new Uint8Array(s))}throw new Error(`Failed to load Basis texture: ${r}`)}const h=["bc7-rgba-unorm","astc-4x4-unorm","etc2-rgba8unorm","bc3-rgba-unorm","rgba8unorm"];async function p(r){const a=await l(),t=await b(r,a),s=g(t,u);return{width:t.getImageWidth(0,0),height:t.getImageHeight(0,0),format:i,resource:s,alphaMode:"no-premultiply-alpha"}}async function y(r,a,t){r&&(n.jsUrl=r),a&&(n.wasmUrl=a),i=h.filter(s=>t.includes(s))[0],u=d(i),await l()}const U={init:async r=>{const{jsUrl:a,wasmUrl:t,supportedTextures:s}=r;await y(a,t,s)},load:async r=>{var a;try{const t=await p(r.url);return{type:"load",url:r.url,success:!0,textureOptions:t,transferables:(a=t.resource)==null?void 0:a.map(s=>s.buffer)}}catch(t){throw t}}};self.onmessage=async r=>{const a=r.data,t=await U[a.type](a);t&&self.postMessage(t,t.transferables)}})();\n';let ze=null,xf=class{constructor(){ze||(ze=URL.createObjectURL(new Blob([z1],{type:"application/javascript"}))),this.worker=new Worker(ze)}};xf.revokeObjectURL=function(){ze&&(URL.revokeObjectURL(ze),ze=null)};const Js={jsUrl:"https://files.pixijs.download/transcoders/basis/basis_transcoder.js",wasmUrl:"https://files.pixijs.download/transcoders/basis/basis_transcoder.wasm"};function j1(r){Object.assign(Js,r)}let Ur;const bf={};function V1(r){return Ur||(Ur=new xf().worker,Ur.onmessage=t=>{const{success:e,url:s,textureOptions:i}=t.data;e||console.warn("Failed to load Basis texture",s),bf[s](i)},Ur.postMessage({type:"init",jsUrl:Js.jsUrl,wasmUrl:Js.wasmUrl,supportedTextures:r})),Ur}function vf(r,t){const e=V1(t);return new Promise(s=>{bf[r]=s,e.postMessage({type:"load",url:r})})}const W1={extension:{type:v.LoadParser,priority:gt.High},name:"loadBasis",test(r){return Mt(r,[".basis"])},async load(r,t,e){const s=await Dr(),i=await vf(r,s),n=new Fr(i);return ee(n,e,r)},unload(r){Array.isArray(r)?r.forEach(t=>t.destroy(!0)):r.destroy(!0)}};function Y1(r,t){const e=r.getNumImages(),s=r.getNumLevels(0);if(!r.startTranscoding())throw new Error("startTranscoding failed");const i=[];for(let n=0;n(r[r.DXGI_FORMAT_UNKNOWN=0]="DXGI_FORMAT_UNKNOWN",r[r.DXGI_FORMAT_R32G32B32A32_TYPELESS=1]="DXGI_FORMAT_R32G32B32A32_TYPELESS",r[r.DXGI_FORMAT_R32G32B32A32_FLOAT=2]="DXGI_FORMAT_R32G32B32A32_FLOAT",r[r.DXGI_FORMAT_R32G32B32A32_UINT=3]="DXGI_FORMAT_R32G32B32A32_UINT",r[r.DXGI_FORMAT_R32G32B32A32_SINT=4]="DXGI_FORMAT_R32G32B32A32_SINT",r[r.DXGI_FORMAT_R32G32B32_TYPELESS=5]="DXGI_FORMAT_R32G32B32_TYPELESS",r[r.DXGI_FORMAT_R32G32B32_FLOAT=6]="DXGI_FORMAT_R32G32B32_FLOAT",r[r.DXGI_FORMAT_R32G32B32_UINT=7]="DXGI_FORMAT_R32G32B32_UINT",r[r.DXGI_FORMAT_R32G32B32_SINT=8]="DXGI_FORMAT_R32G32B32_SINT",r[r.DXGI_FORMAT_R16G16B16A16_TYPELESS=9]="DXGI_FORMAT_R16G16B16A16_TYPELESS",r[r.DXGI_FORMAT_R16G16B16A16_FLOAT=10]="DXGI_FORMAT_R16G16B16A16_FLOAT",r[r.DXGI_FORMAT_R16G16B16A16_UNORM=11]="DXGI_FORMAT_R16G16B16A16_UNORM",r[r.DXGI_FORMAT_R16G16B16A16_UINT=12]="DXGI_FORMAT_R16G16B16A16_UINT",r[r.DXGI_FORMAT_R16G16B16A16_SNORM=13]="DXGI_FORMAT_R16G16B16A16_SNORM",r[r.DXGI_FORMAT_R16G16B16A16_SINT=14]="DXGI_FORMAT_R16G16B16A16_SINT",r[r.DXGI_FORMAT_R32G32_TYPELESS=15]="DXGI_FORMAT_R32G32_TYPELESS",r[r.DXGI_FORMAT_R32G32_FLOAT=16]="DXGI_FORMAT_R32G32_FLOAT",r[r.DXGI_FORMAT_R32G32_UINT=17]="DXGI_FORMAT_R32G32_UINT",r[r.DXGI_FORMAT_R32G32_SINT=18]="DXGI_FORMAT_R32G32_SINT",r[r.DXGI_FORMAT_R32G8X24_TYPELESS=19]="DXGI_FORMAT_R32G8X24_TYPELESS",r[r.DXGI_FORMAT_D32_FLOAT_S8X24_UINT=20]="DXGI_FORMAT_D32_FLOAT_S8X24_UINT",r[r.DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS=21]="DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS",r[r.DXGI_FORMAT_X32_TYPELESS_G8X24_UINT=22]="DXGI_FORMAT_X32_TYPELESS_G8X24_UINT",r[r.DXGI_FORMAT_R10G10B10A2_TYPELESS=23]="DXGI_FORMAT_R10G10B10A2_TYPELESS",r[r.DXGI_FORMAT_R10G10B10A2_UNORM=24]="DXGI_FORMAT_R10G10B10A2_UNORM",r[r.DXGI_FORMAT_R10G10B10A2_UINT=25]="DXGI_FORMAT_R10G10B10A2_UINT",r[r.DXGI_FORMAT_R11G11B10_FLOAT=26]="DXGI_FORMAT_R11G11B10_FLOAT",r[r.DXGI_FORMAT_R8G8B8A8_TYPELESS=27]="DXGI_FORMAT_R8G8B8A8_TYPELESS",r[r.DXGI_FORMAT_R8G8B8A8_UNORM=28]="DXGI_FORMAT_R8G8B8A8_UNORM",r[r.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB=29]="DXGI_FORMAT_R8G8B8A8_UNORM_SRGB",r[r.DXGI_FORMAT_R8G8B8A8_UINT=30]="DXGI_FORMAT_R8G8B8A8_UINT",r[r.DXGI_FORMAT_R8G8B8A8_SNORM=31]="DXGI_FORMAT_R8G8B8A8_SNORM",r[r.DXGI_FORMAT_R8G8B8A8_SINT=32]="DXGI_FORMAT_R8G8B8A8_SINT",r[r.DXGI_FORMAT_R16G16_TYPELESS=33]="DXGI_FORMAT_R16G16_TYPELESS",r[r.DXGI_FORMAT_R16G16_FLOAT=34]="DXGI_FORMAT_R16G16_FLOAT",r[r.DXGI_FORMAT_R16G16_UNORM=35]="DXGI_FORMAT_R16G16_UNORM",r[r.DXGI_FORMAT_R16G16_UINT=36]="DXGI_FORMAT_R16G16_UINT",r[r.DXGI_FORMAT_R16G16_SNORM=37]="DXGI_FORMAT_R16G16_SNORM",r[r.DXGI_FORMAT_R16G16_SINT=38]="DXGI_FORMAT_R16G16_SINT",r[r.DXGI_FORMAT_R32_TYPELESS=39]="DXGI_FORMAT_R32_TYPELESS",r[r.DXGI_FORMAT_D32_FLOAT=40]="DXGI_FORMAT_D32_FLOAT",r[r.DXGI_FORMAT_R32_FLOAT=41]="DXGI_FORMAT_R32_FLOAT",r[r.DXGI_FORMAT_R32_UINT=42]="DXGI_FORMAT_R32_UINT",r[r.DXGI_FORMAT_R32_SINT=43]="DXGI_FORMAT_R32_SINT",r[r.DXGI_FORMAT_R24G8_TYPELESS=44]="DXGI_FORMAT_R24G8_TYPELESS",r[r.DXGI_FORMAT_D24_UNORM_S8_UINT=45]="DXGI_FORMAT_D24_UNORM_S8_UINT",r[r.DXGI_FORMAT_R24_UNORM_X8_TYPELESS=46]="DXGI_FORMAT_R24_UNORM_X8_TYPELESS",r[r.DXGI_FORMAT_X24_TYPELESS_G8_UINT=47]="DXGI_FORMAT_X24_TYPELESS_G8_UINT",r[r.DXGI_FORMAT_R8G8_TYPELESS=48]="DXGI_FORMAT_R8G8_TYPELESS",r[r.DXGI_FORMAT_R8G8_UNORM=49]="DXGI_FORMAT_R8G8_UNORM",r[r.DXGI_FORMAT_R8G8_UINT=50]="DXGI_FORMAT_R8G8_UINT",r[r.DXGI_FORMAT_R8G8_SNORM=51]="DXGI_FORMAT_R8G8_SNORM",r[r.DXGI_FORMAT_R8G8_SINT=52]="DXGI_FORMAT_R8G8_SINT",r[r.DXGI_FORMAT_R16_TYPELESS=53]="DXGI_FORMAT_R16_TYPELESS",r[r.DXGI_FORMAT_R16_FLOAT=54]="DXGI_FORMAT_R16_FLOAT",r[r.DXGI_FORMAT_D16_UNORM=55]="DXGI_FORMAT_D16_UNORM",r[r.DXGI_FORMAT_R16_UNORM=56]="DXGI_FORMAT_R16_UNORM",r[r.DXGI_FORMAT_R16_UINT=57]="DXGI_FORMAT_R16_UINT",r[r.DXGI_FORMAT_R16_SNORM=58]="DXGI_FORMAT_R16_SNORM",r[r.DXGI_FORMAT_R16_SINT=59]="DXGI_FORMAT_R16_SINT",r[r.DXGI_FORMAT_R8_TYPELESS=60]="DXGI_FORMAT_R8_TYPELESS",r[r.DXGI_FORMAT_R8_UNORM=61]="DXGI_FORMAT_R8_UNORM",r[r.DXGI_FORMAT_R8_UINT=62]="DXGI_FORMAT_R8_UINT",r[r.DXGI_FORMAT_R8_SNORM=63]="DXGI_FORMAT_R8_SNORM",r[r.DXGI_FORMAT_R8_SINT=64]="DXGI_FORMAT_R8_SINT",r[r.DXGI_FORMAT_A8_UNORM=65]="DXGI_FORMAT_A8_UNORM",r[r.DXGI_FORMAT_R1_UNORM=66]="DXGI_FORMAT_R1_UNORM",r[r.DXGI_FORMAT_R9G9B9E5_SHAREDEXP=67]="DXGI_FORMAT_R9G9B9E5_SHAREDEXP",r[r.DXGI_FORMAT_R8G8_B8G8_UNORM=68]="DXGI_FORMAT_R8G8_B8G8_UNORM",r[r.DXGI_FORMAT_G8R8_G8B8_UNORM=69]="DXGI_FORMAT_G8R8_G8B8_UNORM",r[r.DXGI_FORMAT_BC1_TYPELESS=70]="DXGI_FORMAT_BC1_TYPELESS",r[r.DXGI_FORMAT_BC1_UNORM=71]="DXGI_FORMAT_BC1_UNORM",r[r.DXGI_FORMAT_BC1_UNORM_SRGB=72]="DXGI_FORMAT_BC1_UNORM_SRGB",r[r.DXGI_FORMAT_BC2_TYPELESS=73]="DXGI_FORMAT_BC2_TYPELESS",r[r.DXGI_FORMAT_BC2_UNORM=74]="DXGI_FORMAT_BC2_UNORM",r[r.DXGI_FORMAT_BC2_UNORM_SRGB=75]="DXGI_FORMAT_BC2_UNORM_SRGB",r[r.DXGI_FORMAT_BC3_TYPELESS=76]="DXGI_FORMAT_BC3_TYPELESS",r[r.DXGI_FORMAT_BC3_UNORM=77]="DXGI_FORMAT_BC3_UNORM",r[r.DXGI_FORMAT_BC3_UNORM_SRGB=78]="DXGI_FORMAT_BC3_UNORM_SRGB",r[r.DXGI_FORMAT_BC4_TYPELESS=79]="DXGI_FORMAT_BC4_TYPELESS",r[r.DXGI_FORMAT_BC4_UNORM=80]="DXGI_FORMAT_BC4_UNORM",r[r.DXGI_FORMAT_BC4_SNORM=81]="DXGI_FORMAT_BC4_SNORM",r[r.DXGI_FORMAT_BC5_TYPELESS=82]="DXGI_FORMAT_BC5_TYPELESS",r[r.DXGI_FORMAT_BC5_UNORM=83]="DXGI_FORMAT_BC5_UNORM",r[r.DXGI_FORMAT_BC5_SNORM=84]="DXGI_FORMAT_BC5_SNORM",r[r.DXGI_FORMAT_B5G6R5_UNORM=85]="DXGI_FORMAT_B5G6R5_UNORM",r[r.DXGI_FORMAT_B5G5R5A1_UNORM=86]="DXGI_FORMAT_B5G5R5A1_UNORM",r[r.DXGI_FORMAT_B8G8R8A8_UNORM=87]="DXGI_FORMAT_B8G8R8A8_UNORM",r[r.DXGI_FORMAT_B8G8R8X8_UNORM=88]="DXGI_FORMAT_B8G8R8X8_UNORM",r[r.DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM=89]="DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM",r[r.DXGI_FORMAT_B8G8R8A8_TYPELESS=90]="DXGI_FORMAT_B8G8R8A8_TYPELESS",r[r.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB=91]="DXGI_FORMAT_B8G8R8A8_UNORM_SRGB",r[r.DXGI_FORMAT_B8G8R8X8_TYPELESS=92]="DXGI_FORMAT_B8G8R8X8_TYPELESS",r[r.DXGI_FORMAT_B8G8R8X8_UNORM_SRGB=93]="DXGI_FORMAT_B8G8R8X8_UNORM_SRGB",r[r.DXGI_FORMAT_BC6H_TYPELESS=94]="DXGI_FORMAT_BC6H_TYPELESS",r[r.DXGI_FORMAT_BC6H_UF16=95]="DXGI_FORMAT_BC6H_UF16",r[r.DXGI_FORMAT_BC6H_SF16=96]="DXGI_FORMAT_BC6H_SF16",r[r.DXGI_FORMAT_BC7_TYPELESS=97]="DXGI_FORMAT_BC7_TYPELESS",r[r.DXGI_FORMAT_BC7_UNORM=98]="DXGI_FORMAT_BC7_UNORM",r[r.DXGI_FORMAT_BC7_UNORM_SRGB=99]="DXGI_FORMAT_BC7_UNORM_SRGB",r[r.DXGI_FORMAT_AYUV=100]="DXGI_FORMAT_AYUV",r[r.DXGI_FORMAT_Y410=101]="DXGI_FORMAT_Y410",r[r.DXGI_FORMAT_Y416=102]="DXGI_FORMAT_Y416",r[r.DXGI_FORMAT_NV12=103]="DXGI_FORMAT_NV12",r[r.DXGI_FORMAT_P010=104]="DXGI_FORMAT_P010",r[r.DXGI_FORMAT_P016=105]="DXGI_FORMAT_P016",r[r.DXGI_FORMAT_420_OPAQUE=106]="DXGI_FORMAT_420_OPAQUE",r[r.DXGI_FORMAT_YUY2=107]="DXGI_FORMAT_YUY2",r[r.DXGI_FORMAT_Y210=108]="DXGI_FORMAT_Y210",r[r.DXGI_FORMAT_Y216=109]="DXGI_FORMAT_Y216",r[r.DXGI_FORMAT_NV11=110]="DXGI_FORMAT_NV11",r[r.DXGI_FORMAT_AI44=111]="DXGI_FORMAT_AI44",r[r.DXGI_FORMAT_IA44=112]="DXGI_FORMAT_IA44",r[r.DXGI_FORMAT_P8=113]="DXGI_FORMAT_P8",r[r.DXGI_FORMAT_A8P8=114]="DXGI_FORMAT_A8P8",r[r.DXGI_FORMAT_B4G4R4A4_UNORM=115]="DXGI_FORMAT_B4G4R4A4_UNORM",r[r.DXGI_FORMAT_P208=116]="DXGI_FORMAT_P208",r[r.DXGI_FORMAT_V208=117]="DXGI_FORMAT_V208",r[r.DXGI_FORMAT_V408=118]="DXGI_FORMAT_V408",r[r.DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE=119]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE",r[r.DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE=120]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE",r[r.DXGI_FORMAT_FORCE_UINT=121]="DXGI_FORMAT_FORCE_UINT",r))(yf||{}),Tf=(r=>(r[r.DDS_DIMENSION_TEXTURE1D=2]="DDS_DIMENSION_TEXTURE1D",r[r.DDS_DIMENSION_TEXTURE2D=3]="DDS_DIMENSION_TEXTURE2D",r[r.DDS_DIMENSION_TEXTURE3D=6]="DDS_DIMENSION_TEXTURE3D",r))(Tf||{});function at(r){return r.charCodeAt(0)+(r.charCodeAt(1)<<8)+(r.charCodeAt(2)<<16)+(r.charCodeAt(3)<<24)}var bt=(r=>(r[r.UNKNOWN=0]="UNKNOWN",r[r.R8G8B8=20]="R8G8B8",r[r.A8R8G8B8=21]="A8R8G8B8",r[r.X8R8G8B8=22]="X8R8G8B8",r[r.R5G6B5=23]="R5G6B5",r[r.X1R5G5B5=24]="X1R5G5B5",r[r.A1R5G5B5=25]="A1R5G5B5",r[r.A4R4G4B4=26]="A4R4G4B4",r[r.R3G3B2=27]="R3G3B2",r[r.A8=28]="A8",r[r.A8R3G3B2=29]="A8R3G3B2",r[r.X4R4G4B4=30]="X4R4G4B4",r[r.A2B10G10R10=31]="A2B10G10R10",r[r.A8B8G8R8=32]="A8B8G8R8",r[r.X8B8G8R8=33]="X8B8G8R8",r[r.G16R16=34]="G16R16",r[r.A2R10G10B10=35]="A2R10G10B10",r[r.A16B16G16R16=36]="A16B16G16R16",r[r.A8P8=40]="A8P8",r[r.P8=41]="P8",r[r.L8=50]="L8",r[r.A8L8=51]="A8L8",r[r.A4L4=52]="A4L4",r[r.V8U8=60]="V8U8",r[r.L6V5U5=61]="L6V5U5",r[r.X8L8V8U8=62]="X8L8V8U8",r[r.Q8W8V8U8=63]="Q8W8V8U8",r[r.V16U16=64]="V16U16",r[r.A2W10V10U10=67]="A2W10V10U10",r[r.Q16W16V16U16=110]="Q16W16V16U16",r[r.R16F=111]="R16F",r[r.G16R16F=112]="G16R16F",r[r.A16B16G16R16F=113]="A16B16G16R16F",r[r.R32F=114]="R32F",r[r.G32R32F=115]="G32R32F",r[r.A32B32G32R32F=116]="A32B32G32R32F",r[r.UYVY=at("UYVY")]="UYVY",r[r.R8G8_B8G8=at("RGBG")]="R8G8_B8G8",r[r.YUY2=at("YUY2")]="YUY2",r[r.D3DFMT_G8R8_G8B8=at("GRGB")]="D3DFMT_G8R8_G8B8",r[r.DXT1=at("DXT1")]="DXT1",r[r.DXT2=at("DXT2")]="DXT2",r[r.DXT3=at("DXT3")]="DXT3",r[r.DXT4=at("DXT4")]="DXT4",r[r.DXT5=at("DXT5")]="DXT5",r[r.ATI1=at("ATI1")]="ATI1",r[r.AT1N=at("AT1N")]="AT1N",r[r.ATI2=at("ATI2")]="ATI2",r[r.AT2N=at("AT2N")]="AT2N",r[r.BC4U=at("BC4U")]="BC4U",r[r.BC4S=at("BC4S")]="BC4S",r[r.BC5U=at("BC5U")]="BC5U",r[r.BC5S=at("BC5S")]="BC5S",r[r.DX10=at("DX10")]="DX10",r))(bt||{});const la={[bt.DXT1]:"bc1-rgba-unorm",[bt.DXT2]:"bc2-rgba-unorm",[bt.DXT3]:"bc2-rgba-unorm",[bt.DXT4]:"bc3-rgba-unorm",[bt.DXT5]:"bc3-rgba-unorm",[bt.ATI1]:"bc4-r-unorm",[bt.BC4U]:"bc4-r-unorm",[bt.BC4S]:"bc4-r-snorm",[bt.ATI2]:"bc5-rg-unorm",[bt.BC5U]:"bc5-rg-unorm",[bt.BC5S]:"bc5-rg-snorm",36:"rgba16uint",110:"rgba16sint",111:"r16float",112:"rg16float",113:"rgba16float",114:"r32float",115:"rg32float",116:"rgba32float"},ft={70:"bc1-rgba-unorm",71:"bc1-rgba-unorm",72:"bc1-rgba-unorm-srgb",73:"bc2-rgba-unorm",74:"bc2-rgba-unorm",75:"bc2-rgba-unorm-srgb",76:"bc3-rgba-unorm",77:"bc3-rgba-unorm",78:"bc3-rgba-unorm-srgb",79:"bc4-r-unorm",80:"bc4-r-unorm",81:"bc4-r-snorm",82:"bc5-rg-unorm",83:"bc5-rg-unorm",84:"bc5-rg-snorm",94:"bc6h-rgb-ufloat",95:"bc6h-rgb-ufloat",96:"bc6h-rgb-float",97:"bc7-rgba-unorm",98:"bc7-rgba-unorm",99:"bc7-rgba-unorm-srgb",28:"rgba8unorm",29:"rgba8unorm-srgb",87:"bgra8unorm",91:"bgra8unorm-srgb",41:"r32float",49:"rg8unorm",56:"r16uint",61:"r8unorm",24:"rgb10a2unorm",11:"rgba16uint",13:"rgba16sint",10:"rgba16float",54:"r16float",34:"rg16float",16:"rg32float",2:"rgba32float"},I={MAGIC_VALUE:542327876,MAGIC_SIZE:4,HEADER_SIZE:124,HEADER_DX10_SIZE:20,PIXEL_FORMAT_FLAGS:{ALPHAPIXELS:1,ALPHA:2,FOURCC:4,RGB:64,RGBA:65,YUV:512,LUMINANCE:131072,LUMINANCEA:131073},RESOURCE_MISC_TEXTURECUBE:4,HEADER_FIELDS:Z1,HEADER_DX10_FIELDS:Q1,DXGI_FORMAT:yf,D3D10_RESOURCE_DIMENSION:Tf,D3DFMT:bt},Sf={"bc1-rgba-unorm":8,"bc1-rgba-unorm-srgb":8,"bc2-rgba-unorm":16,"bc2-rgba-unorm-srgb":16,"bc3-rgba-unorm":16,"bc3-rgba-unorm-srgb":16,"bc4-r-unorm":8,"bc4-r-snorm":8,"bc5-rg-unorm":16,"bc5-rg-snorm":16,"bc6h-rgb-ufloat":16,"bc6h-rgb-float":16,"bc7-rgba-unorm":16,"bc7-rgba-unorm-srgb":16};function Ef(r,t){const{format:e,fourCC:s,width:i,height:n,dataOffset:o,mipmapCount:a}=tT(r);if(!t.includes(e))throw new Error(`Unsupported texture format: ${s} ${e}, supported: ${t}`);if(a<=1)return{format:e,width:i,height:n,resource:[new Uint8Array(r,o)],alphaMode:"no-premultiply-alpha"};const u=J1(e,i,n,o,a,r);return{format:e,width:i,height:n,resource:u,alphaMode:"no-premultiply-alpha"}}function J1(r,t,e,s,i,n){const o=[],a=Sf[r];let u=t,l=e,h=s;for(let c=0;c>1,1),l=Math.max(l>>1,1)}return o}function tT(r){const t=new Uint32Array(r,0,I.HEADER_SIZE/Uint32Array.BYTES_PER_ELEMENT);if(t[I.HEADER_FIELDS.MAGIC]!==I.MAGIC_VALUE)throw new Error("Invalid magic number in DDS header");const e=t[I.HEADER_FIELDS.HEIGHT],s=t[I.HEADER_FIELDS.WIDTH],i=Math.max(1,t[I.HEADER_FIELDS.MIPMAP_COUNT]),n=t[I.HEADER_FIELDS.PF_FLAGS],o=t[I.HEADER_FIELDS.FOURCC],a=eT(t,n,o,r),u=I.MAGIC_SIZE+I.HEADER_SIZE+(o===I.D3DFMT.DX10?I.HEADER_DX10_SIZE:0);return{format:a,fourCC:o,width:s,height:e,dataOffset:u,mipmapCount:i}}function eT(r,t,e,s){if(t&I.PIXEL_FORMAT_FLAGS.FOURCC){if(e===I.D3DFMT.DX10){const i=new Uint32Array(s,I.MAGIC_SIZE+I.HEADER_SIZE,I.HEADER_DX10_SIZE/Uint32Array.BYTES_PER_ELEMENT);if(i[I.HEADER_DX10_FIELDS.MISC_FLAG]===I.RESOURCE_MISC_TEXTURECUBE)throw new Error("DDSParser does not support cubemap textures");if(i[I.HEADER_DX10_FIELDS.RESOURCE_DIMENSION]===I.D3D10_RESOURCE_DIMENSION.DDS_DIMENSION_TEXTURE3D)throw new Error("DDSParser does not supported 3D texture data");const n=i[I.HEADER_DX10_FIELDS.DXGI_FORMAT];if(n in ft)return ft[n];throw new Error(`DDSParser cannot parse texture data with DXGI format ${n}`)}if(e in la)return la[e];throw new Error(`DDSParser cannot parse texture data with fourCC format ${e}`)}if(t&I.PIXEL_FORMAT_FLAGS.RGB||t&I.PIXEL_FORMAT_FLAGS.RGBA)return rT(r);throw t&I.PIXEL_FORMAT_FLAGS.YUV?new Error("DDSParser does not supported YUV uncompressed texture data."):t&I.PIXEL_FORMAT_FLAGS.LUMINANCE||t&I.PIXEL_FORMAT_FLAGS.LUMINANCEA?new Error("DDSParser does not support single-channel (lumninance) texture data!"):t&I.PIXEL_FORMAT_FLAGS.ALPHA||t&I.PIXEL_FORMAT_FLAGS.ALPHAPIXELS?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}function rT(r){const t=r[I.HEADER_FIELDS.RGB_BITCOUNT],e=r[I.HEADER_FIELDS.R_BIT_MASK],s=r[I.HEADER_FIELDS.G_BIT_MASK],i=r[I.HEADER_FIELDS.B_BIT_MASK],n=r[I.HEADER_FIELDS.A_BIT_MASK];switch(t){case 32:if(e===255&&s===65280&&i===16711680&&n===4278190080)return ft[I.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM];if(e===16711680&&s===65280&&i===255&&n===4278190080)return ft[I.DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM];if(e===1072693248&&s===1047552&&i===1023&&n===3221225472)return ft[I.DXGI_FORMAT.DXGI_FORMAT_R10G10B10A2_UNORM];if(e===65535&&s===4294901760&&i===0&&n===0)return ft[I.DXGI_FORMAT.DXGI_FORMAT_R16G16_UNORM];if(e===4294967295&&s===0&&i===0&&n===0)return ft[I.DXGI_FORMAT.DXGI_FORMAT_R32_FLOAT];break;case 24:break;case 16:if(e===31744&&s===992&&i===31&&n===32768)return ft[I.DXGI_FORMAT.DXGI_FORMAT_B5G5R5A1_UNORM];if(e===63488&&s===2016&&i===31&&n===0)return ft[I.DXGI_FORMAT.DXGI_FORMAT_B5G6R5_UNORM];if(e===3840&&s===240&&i===15&&n===61440)return ft[I.DXGI_FORMAT.DXGI_FORMAT_B4G4R4A4_UNORM];if(e===255&&s===0&&i===0&&n===65280)return ft[I.DXGI_FORMAT.DXGI_FORMAT_R8G8_UNORM];if(e===65535&&s===0&&i===0&&n===0)return ft[I.DXGI_FORMAT.DXGI_FORMAT_R16_UNORM];break;case 8:if(e===255&&s===0&&i===0&&n===0)return ft[I.DXGI_FORMAT.DXGI_FORMAT_R8_UNORM];break}throw new Error(`DDSParser does not support uncompressed texture with configuration: + bitCount = ${t}, rBitMask = ${e}, gBitMask = ${s}, aBitMask = ${n}`)}const sT={extension:{type:v.LoadParser,priority:gt.High},name:"loadDDS",test(r){return Mt(r,[".dds"])},async load(r,t,e){const s=await Dr(),i=await(await fetch(r)).arrayBuffer(),n=Ef(i,s),o=new Fr(n);return ee(o,e,r)},unload(r){Array.isArray(r)?r.forEach(t=>t.destroy(!0)):r.destroy(!0)}};var Af=(r=>(r[r.RGBA8_SNORM=36759]="RGBA8_SNORM",r[r.RGBA=6408]="RGBA",r[r.RGBA8UI=36220]="RGBA8UI",r[r.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",r[r.RGBA8I=36238]="RGBA8I",r[r.RGBA8=32856]="RGBA8",r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RED_RGTC1_EXT=36283]="COMPRESSED_RED_RGTC1_EXT",r[r.COMPRESSED_SIGNED_RED_RGTC1_EXT=36284]="COMPRESSED_SIGNED_RED_RGTC1_EXT",r[r.COMPRESSED_RED_GREEN_RGTC2_EXT=36285]="COMPRESSED_RED_GREEN_RGTC2_EXT",r[r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT=36286]="COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",r[r.COMPRESSED_RGBA_ASTC_5x4_KHR=37809]="COMPRESSED_RGBA_ASTC_5x4_KHR",r[r.COMPRESSED_RGBA_ASTC_5x5_KHR=37810]="COMPRESSED_RGBA_ASTC_5x5_KHR",r[r.COMPRESSED_RGBA_ASTC_6x5_KHR=37811]="COMPRESSED_RGBA_ASTC_6x5_KHR",r[r.COMPRESSED_RGBA_ASTC_6x6_KHR=37812]="COMPRESSED_RGBA_ASTC_6x6_KHR",r[r.COMPRESSED_RGBA_ASTC_8x5_KHR=37813]="COMPRESSED_RGBA_ASTC_8x5_KHR",r[r.COMPRESSED_RGBA_ASTC_8x6_KHR=37814]="COMPRESSED_RGBA_ASTC_8x6_KHR",r[r.COMPRESSED_RGBA_ASTC_8x8_KHR=37815]="COMPRESSED_RGBA_ASTC_8x8_KHR",r[r.COMPRESSED_RGBA_ASTC_10x5_KHR=37816]="COMPRESSED_RGBA_ASTC_10x5_KHR",r[r.COMPRESSED_RGBA_ASTC_10x6_KHR=37817]="COMPRESSED_RGBA_ASTC_10x6_KHR",r[r.COMPRESSED_RGBA_ASTC_10x8_KHR=37818]="COMPRESSED_RGBA_ASTC_10x8_KHR",r[r.COMPRESSED_RGBA_ASTC_10x10_KHR=37819]="COMPRESSED_RGBA_ASTC_10x10_KHR",r[r.COMPRESSED_RGBA_ASTC_12x10_KHR=37820]="COMPRESSED_RGBA_ASTC_12x10_KHR",r[r.COMPRESSED_RGBA_ASTC_12x12_KHR=37821]="COMPRESSED_RGBA_ASTC_12x12_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840]="COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=37841]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=37842]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=37843]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=37844]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=37845]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=37846]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=37847]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=37848]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=37849]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=37850]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=37851]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=37852]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",r[r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=37853]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",r[r.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",r[r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",r[r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",r[r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",r))(Af||{}),iT=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(iT||{}),nT=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(nT||{});const oT={33776:"bc1-rgba-unorm",33777:"bc1-rgba-unorm",33778:"bc2-rgba-unorm",33779:"bc3-rgba-unorm",35916:"bc1-rgba-unorm-srgb",35917:"bc1-rgba-unorm-srgb",35918:"bc2-rgba-unorm-srgb",35919:"bc3-rgba-unorm-srgb",36283:"bc4-r-unorm",36284:"bc4-r-snorm",36285:"bc5-rg-unorm",36286:"bc5-rg-snorm",37488:"eac-r11unorm",37490:"eac-rg11snorm",37492:"etc2-rgb8unorm",37496:"etc2-rgba8unorm",37493:"etc2-rgb8unorm-srgb",37497:"etc2-rgba8unorm-srgb",37494:"etc2-rgb8a1unorm",37495:"etc2-rgb8a1unorm-srgb",37808:"astc-4x4-unorm",37840:"astc-4x4-unorm-srgb",37809:"astc-5x4-unorm",37841:"astc-5x4-unorm-srgb",37810:"astc-5x5-unorm",37842:"astc-5x5-unorm-srgb",37811:"astc-6x5-unorm",37843:"astc-6x5-unorm-srgb",37812:"astc-6x6-unorm",37844:"astc-6x6-unorm-srgb",37813:"astc-8x5-unorm",37845:"astc-8x5-unorm-srgb",37814:"astc-8x6-unorm",37846:"astc-8x6-unorm-srgb",37815:"astc-8x8-unorm",37847:"astc-8x8-unorm-srgb",37816:"astc-10x5-unorm",37848:"astc-10x5-unorm-srgb",37817:"astc-10x6-unorm",37849:"astc-10x6-unorm-srgb",37818:"astc-10x8-unorm",37850:"astc-10x8-unorm-srgb",37819:"astc-10x10-unorm",37851:"astc-10x10-unorm-srgb",37820:"astc-12x10-unorm",37852:"astc-12x10-unorm-srgb",37821:"astc-12x12-unorm",37853:"astc-12x12-unorm-srgb",36492:"bc7-rgba-unorm",36493:"bc7-rgba-unorm-srgb",36494:"bc6h-rgb-float",36495:"bc6h-rgb-ufloat",35907:"rgba8unorm-srgb",36759:"rgba8snorm",36220:"rgba8uint",36238:"rgba8sint",6408:"rgba8unorm"},aT=[171,75,84,88,32,49,49,187,13,10,26,10],uT={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},lT=64,hT=67305985,cT={5121:1,5123:2,5124:4,5125:4,5126:4,36193:8},dT={6408:4,6407:3,33319:2,6403:1,6409:1,6410:2,6406:1},pT={32819:2,32820:2,33635:2},fT={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,36283:.5,36284:.5,36285:1,36286:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,37808:1,37840:1,37809:.8,37841:.8,37810:.64,37842:.64,37811:.53375,37843:.53375,37812:.445,37844:.445,37813:.4,37845:.4,37814:.33375,37846:.33375,37815:.25,37847:.25,37816:.32,37848:.32,37817:.26625,37849:.26625,37818:.2,37850:.2,37819:.16,37851:.16,37820:.13375,37852:.13375,37821:.11125,37853:.11125,36492:1,36493:1,36494:1,36495:1},tt={FILE_HEADER_SIZE:lT,FILE_IDENTIFIER:aT,FORMATS_TO_COMPONENTS:dT,INTERNAL_FORMAT_TO_BYTES_PER_PIXEL:fT,INTERNAL_FORMAT_TO_TEXTURE_FORMATS:oT,FIELDS:uT,TYPES_TO_BYTES_PER_COMPONENT:cT,TYPES_TO_BYTES_PER_PIXEL:pT,ENDIANNESS:hT};function Pf(r,t){const e=new DataView(r);if(!xT(e))throw new Error("Invalid KTX identifier in header");const{littleEndian:s,glType:i,glFormat:n,glInternalFormat:o,pixelWidth:a,pixelHeight:u,numberOfMipmapLevels:l,offset:h}=_T(e),c=tt.INTERNAL_FORMAT_TO_TEXTURE_FORMATS[o];if(!c)throw new Error(`Unknown texture format ${o}`);if(!t.includes(c))throw new Error(`Unsupported texture format: ${c}, supportedFormats: ${t}`);const d=gT(i,n,o),p=mT(e,i,d,a,u,h,l,s);return{format:c,width:a,height:u,resource:p,alphaMode:"no-premultiply-alpha"}}function mT(r,t,e,s,i,n,o,a){const u=s+3&-4,l=i+3&-4;let h=s*i;t===0&&(h=u*l);let c=h*e,d=s,p=i,f=u,g=l,m=n;const _=new Array(o);for(let x=0;x>1||1,p=p>>1||1,f=d+4-1&-4,g=p+4-1&-4,c=f*g*e}return _}function gT(r,t,e){let s=tt.INTERNAL_FORMAT_TO_BYTES_PER_PIXEL[e];if(r!==0&&(tt.TYPES_TO_BYTES_PER_COMPONENT[r]?s=tt.TYPES_TO_BYTES_PER_COMPONENT[r]*tt.FORMATS_TO_COMPONENTS[t]:s=tt.TYPES_TO_BYTES_PER_PIXEL[r]),s===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");return s}function _T(r){const t=r.getUint32(tt.FIELDS.ENDIANNESS,!0)===tt.ENDIANNESS,e=r.getUint32(tt.FIELDS.GL_TYPE,t),s=r.getUint32(tt.FIELDS.GL_FORMAT,t),i=r.getUint32(tt.FIELDS.GL_INTERNAL_FORMAT,t),n=r.getUint32(tt.FIELDS.PIXEL_WIDTH,t),o=r.getUint32(tt.FIELDS.PIXEL_HEIGHT,t)||1,a=r.getUint32(tt.FIELDS.PIXEL_DEPTH,t)||1,u=r.getUint32(tt.FIELDS.NUMBER_OF_ARRAY_ELEMENTS,t)||1,l=r.getUint32(tt.FIELDS.NUMBER_OF_FACES,t),h=r.getUint32(tt.FIELDS.NUMBER_OF_MIPMAP_LEVELS,t),c=r.getUint32(tt.FIELDS.BYTES_OF_KEY_VALUE_DATA,t);if(o===0||a!==1)throw new Error("Only 2D textures are supported");if(l!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(u!==1)throw new Error("WebGL does not support array textures");return{littleEndian:t,glType:e,glFormat:s,glInternalFormat:i,pixelWidth:n,pixelHeight:o,numberOfMipmapLevels:h,offset:tt.FILE_HEADER_SIZE+c}}function xT(r){for(let t=0;tt.destroy(!0)):r.destroy(!0)}},vT='(function(){"use strict";const s={rgb8unorm:{convertedFormat:"rgba8unorm",convertFunction:i},"rgb8unorm-srgb":{convertedFormat:"rgba8unorm-srgb",convertFunction:i}};function f(r){const t=r.format;if(s[t]){const n=s[t].convertFunction,o=r.resource;for(let e=0;e{LIBKTX({locateFile:o=>t}).then(o=>{n(o)})})}return c}async function v(r,t){const n=await fetch(r);if(n.ok){const o=await n.arrayBuffer();return new t.ktxTexture(new Uint8Array(o))}throw new Error(`Failed to load KTX(2) texture: ${r}`)}const x=["bc7-rgba-unorm","astc-4x4-unorm","etc2-rgba8unorm","bc3-rgba-unorm","rgba8unorm"];async function B(r){const t=await g(),n=await v(r,t);let o;if(n.needsTranscoding){o=u;const R=t.TranscodeTarget[l];if(n.transcodeBasis(R,0)!==t.ErrorCode.SUCCESS)throw new Error("Unable to transcode basis texture.")}else o=U(n);const e=d(n),b={width:n.baseWidth,height:n.baseHeight,format:o,mipLevelCount:n.numLevels,resource:e,alphaMode:"no-premultiply-alpha"};return f(b),b}async function A(r,t,n){r&&(a.jsUrl=r),t&&(a.wasmUrl=t),u=x.filter(o=>n.includes(o))[0],l=y(u),await g()}const m={init:async r=>{const{jsUrl:t,wasmUrl:n,supportedTextures:o}=r;await A(t,n,o)},load:async r=>{var t;try{const n=await B(r.url);return{type:"load",url:r.url,success:!0,textureOptions:n,transferables:(t=n.resource)==null?void 0:t.map(o=>o.buffer)}}catch(n){throw n}}};self.onmessage=async r=>{var t;const n=r.data,o=await((t=m[n.type])==null?void 0:t.call(m,n));o&&self.postMessage(o,o.transferables)}})();\n';let je=null;class wf{constructor(){je||(je=URL.createObjectURL(new Blob([vT],{type:"application/javascript"}))),this.worker=new Worker(je)}}wf.revokeObjectURL=function(){je&&(URL.revokeObjectURL(je),je=null)};const ti={jsUrl:"https://files.pixijs.download/transcoders/ktx/libktx.js",wasmUrl:"https://files.pixijs.download/transcoders/ktx/libktx.wasm"};function yT(r){Object.assign(ti,r)}let kr;const Rf={};function TT(r){return kr||(kr=new wf().worker,kr.onmessage=t=>{const{success:e,url:s,textureOptions:i}=t.data;e||console.warn("Failed to load KTX texture",s),Rf[s](i)},kr.postMessage({type:"init",jsUrl:ti.jsUrl,wasmUrl:ti.wasmUrl,supportedTextures:r})),kr}function Mf(r,t){const e=TT(t);return new Promise(s=>{Rf[r]=s,e.postMessage({type:"load",url:r})})}const ST={extension:{type:v.LoadParser,priority:gt.High},name:"loadKTX2",test(r){return Mt(r,".ktx2")},async load(r,t,e){const s=await Dr(),i=await Mf(r,s),n=new Fr(i);return ee(n,e,r)},unload(r){Array.isArray(r)?r.forEach(t=>t.destroy(!0)):r.destroy(!0)}},ha={rgb8unorm:{convertedFormat:"rgba8unorm",convertFunction:Of},"rgb8unorm-srgb":{convertedFormat:"rgba8unorm-srgb",convertFunction:Of}};function ET(r){const t=r.format;if(ha[t]){const e=ha[t].convertFunction,s=r.resource;for(let i=0;iMt(r,[".ktx",".ktx2",".dds"]),parse:r=>{var t,e;let s;const i=r.split(".");if(i.length>2){const n=i[i.length-2];ei.includes(n)&&(s=n)}else s=i[i.length-1];return{resolution:parseFloat((e=(t=qt.RETINA_PREFIX.exec(r))==null?void 0:t[1])!=null?e:"1"),format:s,src:r}}};let ri;const GT={extension:{type:v.DetectionParser,priority:2},test:async()=>!!(await Gr()||Cr()),add:async r=>{const t=await ua();return ri=IT(t),[...ri,...r]},remove:async r=>ri?r.filter(t=>!(t in ri)):r};function IT(r){const t=["basis"],e={};return r.forEach(s=>{const i=s.split("-")[0];i&&!e[i]&&(e[i]=!0,t.push(i))}),t.sort((s,i)=>{const n=ei.indexOf(s),o=ei.indexOf(i);return n===-1?1:o===-1?-1:n-o}),t}const BT=new lt,ca=class{cull(t,e,s=!0){this._cullRecursive(t,e,s)}_cullRecursive(t,e,s=!0){var i;if(t.cullable&&t.measurable&&t.includeInBuild){const n=(i=t.cullArea)!=null?i:nr(t,s,BT);t.culled=!(n.x>=e.x+e.width||n.y>=e.y+e.height||n.x+n.width<=e.x||n.y+n.height<=e.y)}if(!(!t.cullableChildren||t.culled||!t.renderable||!t.measurable||!t.includeInBuild))for(let n=0;n{If.shared.cull(this.stage,this.renderer.screen),this.renderer.render({container:this.stage})}}static destroy(){this.render=this._renderRef}}Bf.extension={priority:10,type:v.Application,name:"culler"};const FT={extension:{type:v.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Promise.resolve().then(function(){return ky})}};var DT=Object.defineProperty,si=Object.getOwnPropertySymbols,Ff=Object.prototype.hasOwnProperty,Df=Object.prototype.propertyIsEnumerable,Uf=(r,t,e)=>t in r?DT(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,da=(r,t)=>{for(var e in t||(t={}))Ff.call(t,e)&&Uf(r,e,t[e]);if(si)for(var e of si(t))Df.call(t,e)&&Uf(r,e,t[e]);return r},UT=(r,t)=>{var e={};for(var s in r)Ff.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&si)for(var s of si(r))t.indexOf(s)<0&&Df.call(r,s)&&(e[s]=r[s]);return e};const kf=class qu extends St{constructor(t){t=da(da({},qu.defaultOptions),t),super(t),this.enabled=!0,this._state=Ct.for2d(),this.padding=t.padding,typeof t.antialias=="boolean"?this.antialias=t.antialias?"on":"off":this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.addResource("uTexture",0,1)}apply(t,e,s,i){t.applyFilter(this,e,s,i)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){const e=t,{gpu:s,gl:i}=e,n=UT(e,["gpu","gl"]);let o,a;return s&&(o=Tt.from(s)),i&&(a=Rt.from(i)),new qu(da({gpuProgram:o,glProgram:a},n))}};kf.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1};let Yt=kf;var Lf=` +in vec2 vTextureCoord; +in vec4 vColor; + +out vec4 finalColor; + +uniform float uBlend; + +uniform sampler2D uTexture; +uniform sampler2D uBackTexture; + +{FUNCTIONS} + +void main() +{ + vec4 back = texture(uBackTexture, vTextureCoord); + vec4 front = texture(uTexture, vTextureCoord); + + {MAIN} +} +`,$f=`in vec2 aPosition; +out vec2 vTextureCoord; +out vec2 backgroundUv; + +uniform vec4 uInputSize; +uniform vec4 uOutputFrame; +uniform vec4 uOutputTexture; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy; + + position.x = position.x * (2.0 / uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aPosition * (uOutputFrame.zw * uInputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); +} +`,Nf=` +struct GlobalFilterUniforms { + uInputSize:vec4, + uInputPixel:vec4, + uInputClamp:vec4, + uOutputFrame:vec4, + uGlobalFrame:vec4, + uOutputTexture:vec4, +}; + +struct BlendUniforms { + uBlend:f32, +}; + +@group(0) @binding(0) var gfu: GlobalFilterUniforms; +@group(0) @binding(1) var uTexture: texture_2d; +@group(0) @binding(2) var uSampler : sampler; +@group(0) @binding(3) var uBackTexture: texture_2d; + +@group(1) @binding(0) var blendUniforms : BlendUniforms; + + +struct VSOutput { + @builtin(position) position: vec4, + @location(0) uv : vec2 + }; + +fn filterVertexPosition(aPosition:vec2) -> vec4 +{ + var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy; + + position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +fn filterTextureCoord( aPosition:vec2 ) -> vec2 +{ + return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw); +} + +fn globalTextureCoord( aPosition:vec2 ) -> vec2 +{ + return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); +} + +@vertex +fn mainVertex( + @location(0) aPosition : vec2, +) -> VSOutput { + return VSOutput( + filterVertexPosition(aPosition), + filterTextureCoord(aPosition) + ); +} + +{FUNCTIONS} + +@fragment +fn mainFragment( + @location(0) uv: vec2 +) -> @location(0) vec4 { + + + var back = textureSample(uBackTexture, uSampler, uv); + var front = textureSample(uTexture, uSampler, uv); + + var out = vec4(0.0,0.0,0.0,0.0); + + {MAIN} + + return out; +}`,kT=Object.defineProperty,Hf=Object.getOwnPropertySymbols,LT=Object.prototype.hasOwnProperty,$T=Object.prototype.propertyIsEnumerable,Xf=(r,t,e)=>t in r?kT(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,zf=(r,t)=>{for(var e in t||(t={}))LT.call(t,e)&&Xf(r,e,t[e]);if(Hf)for(var e of Hf(t))$T.call(t,e)&&Xf(r,e,t[e]);return r};class NT extends Yt{constructor(t){const e=t.gpu,s=jf(zf({source:Nf},e)),i=Tt.from({vertex:{source:s,entryPoint:"mainVertex"},fragment:{source:s,entryPoint:"mainFragment"}}),n=t.gl,o=jf(zf({source:Lf},n)),a=Rt.from({vertex:$f,fragment:o}),u=new it({uBlend:{value:1,type:"f32"}});super({gpuProgram:i,glProgram:a,blendRequired:!0,resources:{blendUniforms:u,uBackTexture:A.EMPTY}})}}function jf(r){const{source:t,functions:e,main:s}=r;return t.replace("{FUNCTIONS}",e).replace("{MAIN}",s)}const HT=` + float getLuminosity(vec3 c) { + return 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; + } + + vec3 setLuminosity(vec3 c, float lum) { + float modLum = lum - getLuminosity(c); + vec3 color = c.rgb + vec3(modLum); + + // clip back into legal range + modLum = getLuminosity(color); + vec3 modLumVec = vec3(modLum); + + float cMin = min(color.r, min(color.g, color.b)); + float cMax = max(color.r, max(color.g, color.b)); + + if(cMin < 0.0) { + color = mix(modLumVec, color, modLum / (modLum - cMin)); + } + + if(cMax > 1.0) { + color = mix(modLumVec, color, (1.0 - modLum) / (cMax - modLum)); + } + + return color; + } + + float getSaturation(vec3 c) { + return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); + } + + vec3 setSaturationMinMidMax(vec3 cSorted, float s) { + vec3 colorSorted = cSorted; + + if(colorSorted.z > colorSorted.x) { + colorSorted.y = (((colorSorted.y - colorSorted.x) * s) / (colorSorted.z - colorSorted.x)); + colorSorted.z = s; + } + else { + colorSorted.y = 0.0; + colorSorted.z = 0.0; + } + + colorSorted.x = 0.0; + + return colorSorted; + } + + vec3 setSaturation(vec3 c, float s) { + vec3 color = c; + + if(color.r <= color.g && color.r <= color.b) { + if(color.g <= color.b) { + color = setSaturationMinMidMax(color.rgb, s).rgb; + } + else { + color = setSaturationMinMidMax(color.rbg, s).rbg; + } + } + else if(color.g <= color.r && color.g <= color.b) { + if(color.r <= color.b) { + color = setSaturationMinMidMax(color.grb, s).grb; + } + else { + color = setSaturationMinMidMax(color.gbr, s).gbr; + } + } + else { + // Using bgr for both fixes part of hue + if(color.r <= color.g) { + color = setSaturationMinMidMax(color.brg, s).brg; + } + else { + color = setSaturationMinMidMax(color.bgr, s).bgr; + } + } + + return color; + } + `,XT=` + fn getLuminosity(c: vec3) -> f32 + { + return 0.3*c.r + 0.59*c.g + 0.11*c.b; + } + + fn setLuminosity(c: vec3, lum: f32) -> vec3 + { + var modLum: f32 = lum - getLuminosity(c); + var color: vec3 = c.rgb + modLum; + + // clip back into legal range + modLum = getLuminosity(color); + let modLumVec = vec3(modLum); + + let cMin: f32 = min(color.r, min(color.g, color.b)); + let cMax: f32 = max(color.r, max(color.g, color.b)); + + if(cMin < 0.0) + { + color = mix(modLumVec, color, modLum / (modLum - cMin)); + } + + if(cMax > 1.0) + { + color = mix(modLumVec, color, (1 - modLum) / (cMax - modLum)); + } + + return color; + } + + fn getSaturation(c: vec3) -> f32 + { + return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); + } + + fn setSaturationMinMidMax(cSorted: vec3, s: f32) -> vec3 + { + var colorSorted = cSorted; + + if(colorSorted.z > colorSorted.x) + { + colorSorted.y = (((colorSorted.y - colorSorted.x) * s) / (colorSorted.z - colorSorted.x)); + colorSorted.z = s; + } + else + { + colorSorted.y = 0; + colorSorted.z = 0; + } + + colorSorted.x = 0; + + return colorSorted; + } + + fn setSaturation(c: vec3, s: f32) -> vec3 + { + var color = c; + + if (color.r <= color.g && color.r <= color.b) + { + if (color.g <= color.b) + { + color = vec3(setSaturationMinMidMax(color.rgb, s)).rgb; + } + else + { + color = vec3(setSaturationMinMidMax(color.rbg, s)).rbg; + } + } + else if (color.g <= color.r && color.g <= color.b) + { + if (color.r <= color.b) + { + color = vec3(setSaturationMinMidMax(color.grb, s)).grb; + } + else + { + color = vec3(setSaturationMinMidMax(color.gbr, s)).gbr; + } + } + else + { + // Using bgr for both fixes part of hue + if (color.r <= color.g) + { + color = vec3(setSaturationMinMidMax(color.brg, s)).brg; + } + else + { + color = vec3(setSaturationMinMidMax(color.bgr, s)).bgr; + } + } + + return color; + } + `;var ii=`in vec2 aPosition; +out vec2 vTextureCoord; + +uniform vec4 uInputSize; +uniform vec4 uOutputFrame; +uniform vec4 uOutputTexture; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy; + + position.x = position.x * (2.0 / uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aPosition * (uOutputFrame.zw * uInputSize.zw); +} + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); +} +`,Vf=` +in vec2 vTextureCoord; + +out vec4 finalColor; + +uniform float uAlpha; +uniform sampler2D uTexture; + +void main() +{ + finalColor = texture(uTexture, vTextureCoord) * uAlpha; +} +`,pa=`struct GlobalFilterUniforms { + uInputSize:vec4, + uInputPixel:vec4, + uInputClamp:vec4, + uOutputFrame:vec4, + uGlobalFrame:vec4, + uOutputTexture:vec4, +}; + +struct AlphaUniforms { + uAlpha:f32, +}; + +@group(0) @binding(0) var gfu: GlobalFilterUniforms; +@group(0) @binding(1) var uTexture: texture_2d; +@group(0) @binding(2) var uSampler : sampler; + +@group(1) @binding(0) var alphaUniforms : AlphaUniforms; + +struct VSOutput { + @builtin(position) position: vec4, + @location(0) uv : vec2 + }; + +fn filterVertexPosition(aPosition:vec2) -> vec4 +{ + var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy; + + position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +fn filterTextureCoord( aPosition:vec2 ) -> vec2 +{ + return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw); +} + +fn globalTextureCoord( aPosition:vec2 ) -> vec2 +{ + return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); +} + +fn getSize() -> vec2 +{ + return gfu.uGlobalFrame.zw; +} + +@vertex +fn mainVertex( + @location(0) aPosition : vec2, +) -> VSOutput { + return VSOutput( + filterVertexPosition(aPosition), + filterTextureCoord(aPosition) + ); +} + +@fragment +fn mainFragment( + @location(0) uv: vec2, + @builtin(position) position: vec4 +) -> @location(0) vec4 { + + var sample = textureSample(uTexture, uSampler, uv); + + return sample * alphaUniforms.uAlpha; +}`,zT=Object.defineProperty,jT=Object.defineProperties,VT=Object.getOwnPropertyDescriptors,ni=Object.getOwnPropertySymbols,Wf=Object.prototype.hasOwnProperty,Yf=Object.prototype.propertyIsEnumerable,Kf=(r,t,e)=>t in r?zT(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,fa=(r,t)=>{for(var e in t||(t={}))Wf.call(t,e)&&Kf(r,e,t[e]);if(ni)for(var e of ni(t))Yf.call(t,e)&&Kf(r,e,t[e]);return r},WT=(r,t)=>jT(r,VT(t)),YT=(r,t)=>{var e={};for(var s in r)Wf.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&ni)for(var s of ni(r))t.indexOf(s)<0&&Yf.call(r,s)&&(e[s]=r[s]);return e};const qf=class Cx extends Yt{constructor(t){t=fa(fa({},Cx.defaultOptions),t);const e=Tt.from({vertex:{source:pa,entryPoint:"mainVertex"},fragment:{source:pa,entryPoint:"mainFragment"}}),s=Rt.from({vertex:ii,fragment:Vf,name:"alpha-filter"}),i=t,{alpha:n}=i,o=YT(i,["alpha"]),a=new it({uAlpha:{value:n,type:"f32"}});super(WT(fa({},o),{gpuProgram:e,glProgram:s,resources:{alphaUniforms:a}}))}get alpha(){return this.resources.alphaUniforms.uniforms.uAlpha}set alpha(t){this.resources.alphaUniforms.uniforms.uAlpha=t}};qf.defaultOptions={alpha:1};let KT=qf;const ma={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},qT=["in vec2 vBlurTexCoords[%size%];","uniform sampler2D uTexture;","out vec4 finalColor;","void main(void)","{"," finalColor = vec4(0.0);"," %blur%","}"].join(` +`);function Zf(r){const t=ma[r],e=t.length;let s=qT,i="";const n="finalColor += texture(uTexture, vBlurTexCoords[%index%]) * %value%;";let o;for(let a=0;a=e&&(o=r-a-1),u=u.replace("%value%",t[o].toString()),i+=u,i+=` +`}return s=s.replace("%blur%",i),s=s.replace("%size%",r.toString()),s}const ZT=` + in vec2 aPosition; + + uniform float uStrength; + + out vec2 vBlurTexCoords[%size%]; + + uniform vec4 uInputSize; + uniform vec4 uOutputFrame; + uniform vec4 uOutputTexture; + + vec4 filterVertexPosition( void ) +{ + vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy; + + position.x = position.x * (2.0 / uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + + vec2 filterTextureCoord( void ) + { + return aPosition * (uOutputFrame.zw * uInputSize.zw); + } + + void main(void) + { + gl_Position = filterVertexPosition(); + + float pixelStrength = uInputSize.%dimension% * uStrength; + + vec2 textureCoord = filterTextureCoord(); + %blur% + }`;function Qf(r,t){const e=Math.ceil(r/2);let s=ZT,i="",n;t?n="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * pixelStrength, 0.0);":n="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * pixelStrength);";for(let o=0;o, + uInputPixel:vec4, + uInputClamp:vec4, + uOutputFrame:vec4, + uGlobalFrame:vec4, + uOutputTexture:vec4, +}; + +struct BlurUniforms { + uStrength:f32, +}; + +@group(0) @binding(0) var gfu: GlobalFilterUniforms; +@group(0) @binding(1) var uTexture: texture_2d; +@group(0) @binding(2) var uSampler : sampler; + +@group(1) @binding(0) var blurUniforms : BlurUniforms; + + +struct VSOutput { + @builtin(position) position: vec4, + %blur-struct% + }; + +fn filterVertexPosition(aPosition:vec2) -> vec4 +{ + var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy; + + position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +fn filterTextureCoord( aPosition:vec2 ) -> vec2 +{ + return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw); +} + +fn globalTextureCoord( aPosition:vec2 ) -> vec2 +{ + return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); +} + +fn getSize() -> vec2 +{ + return gfu.uGlobalFrame.zw; +} + + +@vertex +fn mainVertex( + @location(0) aPosition : vec2, +) -> VSOutput { + + let filteredCord = filterTextureCoord(aPosition); + + let strength = gfu.uInputSize.w * blurUniforms.uStrength; + + return VSOutput( + filterVertexPosition(aPosition), + %blur-vertex-out% + ); +} + +@fragment +fn mainFragment( + @builtin(position) position: vec4, + %blur-fragment-in% +) -> @location(0) vec4 { + + var finalColor = vec4(0.0); + + %blur-sampling% + + return finalColor; +}`;function em(r,t){const e=ma[t],s=e.length,i=[],n=[],o=[];for(let c=0;c,`,r?n[c]=`filteredCord + vec2(${c-s+1} * strength, 0.0),`:n[c]=`filteredCord + vec2(0.0, ${c-s+1} * strength),`;const d=ct in r?QT(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ga=(r,t)=>{for(var e in t||(t={}))JT.call(t,e)&&sm(r,e,t[e]);if(rm)for(var e of rm(t))tS.call(t,e)&&sm(r,e,t[e]);return r};const im=class Gx extends Yt{constructor(t){t=ga(ga({},Gx.defaultOptions),t);const e=Jf(t.horizontal,t.kernelSize),s=em(t.horizontal,t.kernelSize);super(ga({glProgram:e,gpuProgram:s,resources:{blurUniforms:{uStrength:{value:0,type:"f32"}}}},t)),this.horizontal=t.horizontal,this._quality=0,this.quality=t.quality,this.blur=t.strength,this._uniforms=this.resources.blurUniforms.uniforms}apply(t,e,s,i){if(this._uniforms.uStrength=this.strength/this.passes,this.passes===1)t.applyFilter(this,e,s,i);else{const n=ut.getSameSizeTexture(e);let o=e,a=n;this._state.blend=!1;for(let u=0;ut in r?eS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Lr=(r,t)=>{for(var e in t||(t={}))nm.call(t,e)&&am(r,e,t[e]);if(ai)for(var e of ai(t))om.call(t,e)&&am(r,e,t[e]);return r},iS=(r,t)=>rS(r,sS(t)),nS=(r,t)=>{var e={};for(var s in r)nm.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&ai)for(var s of ai(r))t.indexOf(s)<0&&om.call(r,s)&&(e[s]=r[s]);return e};class um extends Yt{constructor(...t){var e;let s=(e=t[0])!=null?e:{};typeof s=="number"&&(s={strength:s},t[1]&&(s.quality=t[1]),t[2]&&(s.resolution=t[2]),t[3]&&(s.kernelSize=t[3])),s=Lr(Lr({},oi.defaultOptions),s);const i=s,{strength:n,quality:o}=i,a=nS(i,["strength","quality"]);super(iS(Lr({},a),{compatibleRenderers:xt.BOTH,resources:{}})),this._repeatEdgePixels=!1,this.blurXFilter=new oi(Lr({horizontal:!1},s)),this.blurYFilter=new oi(Lr({horizontal:!0},s)),this.quality=o,this.blur=n,this.repeatEdgePixels=!1}apply(t,e,s,i){const n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){const a=ut.getSameSizeTexture(e);this.blurXFilter.apply(t,e,a,!0),this.blurYFilter.apply(t,a,s,i),ut.returnTexture(a)}else o?this.blurYFilter.apply(t,e,s,i):this.blurXFilter.apply(t,e,s,i)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.blur),Math.abs(this.blurYFilter.blur))*2}get blur(){return this.blurXFilter.blur}set blur(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(t){this.blurXFilter.quality=this.blurYFilter.quality=t}get blurX(){return this.blurXFilter.blur}set blurX(t){this.blurXFilter.blur=t,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(t){this.blurYFilter.blur=t,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(t){this.blurYFilter.blendMode=t}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(t){this._repeatEdgePixels=t,this.updatePadding()}}um.defaultOptions={strength:8,quality:4,kernelSize:5};var lm=` +in vec2 vTextureCoord; +in vec4 vColor; + +out vec4 finalColor; + +uniform float uColorMatrix[20]; +uniform float uAlpha; + +uniform sampler2D uTexture; + +float rand(vec2 co) +{ + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main() +{ + vec4 color = texture(uTexture, vTextureCoord); + float randomValue = rand(gl_FragCoord.xy * 0.2); + float diff = (randomValue - 0.5) * 0.5; + + if (uAlpha == 0.0) { + finalColor = color; + return; + } + + if (color.a > 0.0) { + color.rgb /= color.a; + } + + vec4 result; + + result.r = (uColorMatrix[0] * color.r); + result.r += (uColorMatrix[1] * color.g); + result.r += (uColorMatrix[2] * color.b); + result.r += (uColorMatrix[3] * color.a); + result.r += uColorMatrix[4]; + + result.g = (uColorMatrix[5] * color.r); + result.g += (uColorMatrix[6] * color.g); + result.g += (uColorMatrix[7] * color.b); + result.g += (uColorMatrix[8] * color.a); + result.g += uColorMatrix[9]; + + result.b = (uColorMatrix[10] * color.r); + result.b += (uColorMatrix[11] * color.g); + result.b += (uColorMatrix[12] * color.b); + result.b += (uColorMatrix[13] * color.a); + result.b += uColorMatrix[14]; + + result.a = (uColorMatrix[15] * color.r); + result.a += (uColorMatrix[16] * color.g); + result.a += (uColorMatrix[17] * color.b); + result.a += (uColorMatrix[18] * color.a); + result.a += uColorMatrix[19]; + + vec3 rgb = mix(color.rgb, result.rgb, uAlpha); + + // Premultiply alpha again. + rgb *= result.a; + + finalColor = vec4(rgb, result.a); +} +`,_a=`struct GlobalFilterUniforms { + uInputSize:vec4, + uInputPixel:vec4, + uInputClamp:vec4, + uOutputFrame:vec4, + uGlobalFrame:vec4, + uOutputTexture:vec4, +}; + +struct ColorMatrixUniforms { + uColorMatrix:array, 5>, + uAlpha:f32, +}; + + +@group(0) @binding(0) var gfu: GlobalFilterUniforms; +@group(0) @binding(1) var uTexture: texture_2d; +@group(0) @binding(2) var uSampler : sampler; +@group(1) @binding(0) var colorMatrixUniforms : ColorMatrixUniforms; + + +struct VSOutput { + @builtin(position) position: vec4, + @location(0) uv : vec2, + }; + +fn filterVertexPosition(aPosition:vec2) -> vec4 +{ + var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy; + + position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +fn filterTextureCoord( aPosition:vec2 ) -> vec2 +{ + return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw); +} + +@vertex +fn mainVertex( + @location(0) aPosition : vec2, +) -> VSOutput { + return VSOutput( + filterVertexPosition(aPosition), + filterTextureCoord(aPosition), + ); +} + + +@fragment +fn mainFragment( + @location(0) uv: vec2, +) -> @location(0) vec4 { + + + var c = textureSample(uTexture, uSampler, uv); + + if (colorMatrixUniforms.uAlpha == 0.0) { + return c; + } + + + // Un-premultiply alpha before applying the color matrix. See issue #3539. + if (c.a > 0.0) { + c.r /= c.a; + c.g /= c.a; + c.b /= c.a; + } + + var cm = colorMatrixUniforms.uColorMatrix; + + + var result = vec4(0.); + + result.r = (cm[0][0] * c.r); + result.r += (cm[0][1] * c.g); + result.r += (cm[0][2] * c.b); + result.r += (cm[0][3] * c.a); + result.r += cm[1][0]; + + result.g = (cm[1][1] * c.r); + result.g += (cm[1][2] * c.g); + result.g += (cm[1][3] * c.b); + result.g += (cm[2][0] * c.a); + result.g += cm[2][1]; + + result.b = (cm[2][2] * c.r); + result.b += (cm[2][3] * c.g); + result.b += (cm[3][0] * c.b); + result.b += (cm[3][1] * c.a); + result.b += cm[3][2]; + + result.a = (cm[3][3] * c.r); + result.a += (cm[4][0] * c.g); + result.a += (cm[4][1] * c.b); + result.a += (cm[4][2] * c.a); + result.a += cm[4][3]; + + var rgb = mix(c.rgb, result.rgb, colorMatrixUniforms.uAlpha); + + rgb.r *= result.a; + rgb.g *= result.a; + rgb.b *= result.a; + + return vec4(rgb, result.a); +}`,oS=Object.defineProperty,aS=Object.defineProperties,uS=Object.getOwnPropertyDescriptors,hm=Object.getOwnPropertySymbols,lS=Object.prototype.hasOwnProperty,hS=Object.prototype.propertyIsEnumerable,cm=(r,t,e)=>t in r?oS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,cS=(r,t)=>{for(var e in t||(t={}))lS.call(t,e)&&cm(r,e,t[e]);if(hm)for(var e of hm(t))hS.call(t,e)&&cm(r,e,t[e]);return r},dS=(r,t)=>aS(r,uS(t));class pS extends Yt{constructor(t={}){const e=new it({uColorMatrix:{value:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],type:"f32",size:20},uAlpha:{value:1,type:"f32"}}),s=Tt.from({vertex:{source:_a,entryPoint:"mainVertex"},fragment:{source:_a,entryPoint:"mainFragment"}}),i=Rt.from({vertex:ii,fragment:lm,name:"color-matrix-filter"});super(dS(cS({},t),{gpuProgram:s,glProgram:i,resources:{colorMatrixUniforms:e}})),this.alpha=1}_loadMatrix(t,e=!1){let s=t;e&&(this._multiply(s,this.matrix,t),s=this._colorMatrix(s)),this.resources.colorMatrixUniforms.uniforms.uColorMatrix=s,this.resources.colorMatrixUniforms.update()}_multiply(t,e,s){return t[0]=e[0]*s[0]+e[1]*s[5]+e[2]*s[10]+e[3]*s[15],t[1]=e[0]*s[1]+e[1]*s[6]+e[2]*s[11]+e[3]*s[16],t[2]=e[0]*s[2]+e[1]*s[7]+e[2]*s[12]+e[3]*s[17],t[3]=e[0]*s[3]+e[1]*s[8]+e[2]*s[13]+e[3]*s[18],t[4]=e[0]*s[4]+e[1]*s[9]+e[2]*s[14]+e[3]*s[19]+e[4],t[5]=e[5]*s[0]+e[6]*s[5]+e[7]*s[10]+e[8]*s[15],t[6]=e[5]*s[1]+e[6]*s[6]+e[7]*s[11]+e[8]*s[16],t[7]=e[5]*s[2]+e[6]*s[7]+e[7]*s[12]+e[8]*s[17],t[8]=e[5]*s[3]+e[6]*s[8]+e[7]*s[13]+e[8]*s[18],t[9]=e[5]*s[4]+e[6]*s[9]+e[7]*s[14]+e[8]*s[19]+e[9],t[10]=e[10]*s[0]+e[11]*s[5]+e[12]*s[10]+e[13]*s[15],t[11]=e[10]*s[1]+e[11]*s[6]+e[12]*s[11]+e[13]*s[16],t[12]=e[10]*s[2]+e[11]*s[7]+e[12]*s[12]+e[13]*s[17],t[13]=e[10]*s[3]+e[11]*s[8]+e[12]*s[13]+e[13]*s[18],t[14]=e[10]*s[4]+e[11]*s[9]+e[12]*s[14]+e[13]*s[19]+e[14],t[15]=e[15]*s[0]+e[16]*s[5]+e[17]*s[10]+e[18]*s[15],t[16]=e[15]*s[1]+e[16]*s[6]+e[17]*s[11]+e[18]*s[16],t[17]=e[15]*s[2]+e[16]*s[7]+e[17]*s[12]+e[18]*s[17],t[18]=e[15]*s[3]+e[16]*s[8]+e[17]*s[13]+e[18]*s[18],t[19]=e[15]*s[4]+e[16]*s[9]+e[17]*s[14]+e[18]*s[19]+e[19],t}_colorMatrix(t){const e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e}brightness(t,e){const s=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(s,e)}tint(t,e){const[s,i,n]=W.shared.setValue(t).toArray(),o=[s,0,0,0,0,0,i,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(o,e)}greyscale(t,e){const s=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(s,e)}grayscale(t,e){this.greyscale(t,e)}blackAndWhite(t){const e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)}hue(t,e){t=(t||0)/180*Math.PI;const s=Math.cos(t),i=Math.sin(t),n=Math.sqrt,o=1/3,a=n(o),u=s+(1-s)*o,l=o*(1-s)-a*i,h=o*(1-s)+a*i,c=o*(1-s)+a*i,d=s+o*(1-s),p=o*(1-s)-a*i,f=o*(1-s)-a*i,g=o*(1-s)+a*i,m=s+o*(1-s),_=[u,l,h,0,0,c,d,p,0,0,f,g,m,0,0,0,0,0,1,0];this._loadMatrix(_,e)}contrast(t,e){const s=(t||0)+1,i=-.5*(s-1),n=[s,0,0,0,i,0,s,0,0,i,0,0,s,0,i,0,0,0,1,0];this._loadMatrix(n,e)}saturate(t=0,e){const s=t*2/3+1,i=(s-1)*-.5,n=[s,i,i,0,0,i,s,i,0,0,i,i,s,0,0,0,0,0,1,0];this._loadMatrix(n,e)}desaturate(){this.saturate(-1)}negative(t){const e=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(e,t)}sepia(t){const e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)}technicolor(t){const e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)}polaroid(t){const e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)}toBGR(t){const e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)}kodachrome(t){const e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)}browni(t){const e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)}vintage(t){const e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)}colorTone(t,e,s,i,n){t=t||.2,e=e||.15,s=s||16770432,i=i||3375104;const o=W.shared,[a,u,l]=o.setValue(s).toArray(),[h,c,d]=o.setValue(i).toArray(),p=[.3,.59,.11,0,0,a,u,l,t,0,h,c,d,e,0,a-h,u-c,l-d,0,0];this._loadMatrix(p,n)}night(t,e){t=t||.1;const s=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,t*2,0,0,0,0,0,1,0];this._loadMatrix(s,e)}predator(t,e){const s=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(s,e)}lsd(t){const e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)}reset(){const t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)}get matrix(){return this.resources.colorMatrixUniforms.uniforms.uColorMatrix}set matrix(t){this.resources.colorMatrixUniforms.uniforms.uColorMatrix=t}get alpha(){return this.resources.colorMatrixUniforms.uniforms.uAlpha}set alpha(t){this.resources.colorMatrixUniforms.uniforms.uAlpha=t}}var dm=` +in vec2 vTextureCoord; +in vec2 vFilterUv; + +out vec4 finalColor; + +uniform sampler2D uTexture; +uniform sampler2D uMapTexture; + +uniform vec4 uInputClamp; +uniform highp vec4 uInputSize; +uniform mat2 uRotation; +uniform vec2 uScale; + +void main() +{ + vec4 map = texture(uMapTexture, vFilterUv); + + vec2 offset = uInputSize.zw * (uRotation * (map.xy - 0.5)) * uScale; + + finalColor = texture(uTexture, clamp(vTextureCoord + offset, uInputClamp.xy, uInputClamp.zw)); +} +`,pm=`in vec2 aPosition; +out vec2 vTextureCoord; +out vec2 vFilterUv; + + +uniform vec4 uInputSize; +uniform vec4 uOutputFrame; +uniform vec4 uOutputTexture; + +uniform mat3 uFilterMatrix; + +vec4 filterVertexPosition( void ) +{ + vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy; + + position.x = position.x * (2.0 / uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +vec2 filterTextureCoord( void ) +{ + return aPosition * (uOutputFrame.zw * uInputSize.zw); +} + +vec2 getFilterCoord( void ) +{ + return ( uFilterMatrix * vec3( filterTextureCoord(), 1.0) ).xy; +} + + +void main(void) +{ + gl_Position = filterVertexPosition(); + vTextureCoord = filterTextureCoord(); + vFilterUv = getFilterCoord(); +} +`,xa=` +struct GlobalFilterUniforms { + uInputSize:vec4, + uInputPixel:vec4, + uInputClamp:vec4, + uOutputFrame:vec4, + uGlobalFrame:vec4, + uOutputTexture:vec4, +}; + +struct DisplacementUniforms { + uFilterMatrix:mat3x3, + uScale:vec2, + uRotation:mat2x2 +}; + + + +@group(0) @binding(0) var gfu: GlobalFilterUniforms; +@group(0) @binding(1) var uTexture: texture_2d; +@group(0) @binding(2) var uSampler : sampler; + +@group(1) @binding(0) var filterUniforms : DisplacementUniforms; +@group(1) @binding(1) var uMapTexture: texture_2d; +@group(1) @binding(2) var uMapSampler : sampler; + +struct VSOutput { + @builtin(position) position: vec4, + @location(0) uv : vec2, + @location(1) filterUv : vec2, + }; + +fn filterVertexPosition(aPosition:vec2) -> vec4 +{ + var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy; + + position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +fn filterTextureCoord( aPosition:vec2 ) -> vec2 +{ + return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw); +} + +fn globalTextureCoord( aPosition:vec2 ) -> vec2 +{ + return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); +} + +fn getFilterCoord(aPosition:vec2 ) -> vec2 +{ + return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy; +} + +fn getSize() -> vec2 +{ + + + return gfu.uGlobalFrame.zw; +} + +@vertex +fn mainVertex( + @location(0) aPosition : vec2, +) -> VSOutput { + return VSOutput( + filterVertexPosition(aPosition), + filterTextureCoord(aPosition), + getFilterCoord(aPosition) + ); +} + +@fragment +fn mainFragment( + @location(0) uv: vec2, + @location(1) filterUv: vec2, + @builtin(position) position: vec4 +) -> @location(0) vec4 { + + var map = textureSample(uMapTexture, uMapSampler, filterUv); + + var offset = gfu.uInputSize.zw * (filterUniforms.uRotation * (map.xy - 0.5)) * filterUniforms.uScale; + + return textureSample(uTexture, uSampler, clamp(uv + offset, gfu.uInputClamp.xy, gfu.uInputClamp.zw)); +}`,fS=Object.defineProperty,mS=Object.defineProperties,gS=Object.getOwnPropertyDescriptors,ui=Object.getOwnPropertySymbols,fm=Object.prototype.hasOwnProperty,mm=Object.prototype.propertyIsEnumerable,gm=(r,t,e)=>t in r?fS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,_S=(r,t)=>{for(var e in t||(t={}))fm.call(t,e)&&gm(r,e,t[e]);if(ui)for(var e of ui(t))mm.call(t,e)&&gm(r,e,t[e]);return r},xS=(r,t)=>mS(r,gS(t)),bS=(r,t)=>{var e={};for(var s in r)fm.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&ui)for(var s of ui(r))t.indexOf(s)<0&&mm.call(r,s)&&(e[s]=r[s]);return e};class vS extends Yt{constructor(...t){let e=t[0];e instanceof Ft&&(e={sprite:e,scale:t[1]});const s=e,{sprite:i,scale:n}=s,o=bS(s,["sprite","scale"]);let a=n!=null?n:20;typeof a=="number"&&(a=new j(a,a));const u=new it({uFilterMatrix:{value:new G,type:"mat3x3"},uScale:{value:a,type:"vec2"},uRotation:{value:new Float32Array([0,0,0,0]),type:"mat2x2"}}),l=Rt.from({vertex:pm,fragment:dm,name:"displacement-filter"}),h=Tt.from({vertex:{source:xa,entryPoint:"mainVertex"},fragment:{source:xa,entryPoint:"mainFragment"}}),c=i.texture.source;super(xS(_S({},o),{gpuProgram:h,glProgram:l,resources:{filterUniforms:u,uMapTexture:c,uMapSampler:c.style}})),this._sprite=e.sprite,this._sprite.renderable=!1}apply(t,e,s,i){const n=this.resources.filterUniforms.uniforms;t.calculateSpriteMatrix(n.uFilterMatrix,this._sprite);const o=this._sprite.worldTransform,a=Math.sqrt(o.a*o.a+o.b*o.b),u=Math.sqrt(o.c*o.c+o.d*o.d);a!==0&&u!==0&&(n.uRotation[0]=o.a/a,n.uRotation[1]=o.b/a,n.uRotation[2]=o.c/u,n.uRotation[3]=o.d/u),this.resources.uMapTexture=this._sprite.texture.source,t.applyFilter(this,e,s,i)}get scale(){return this.resources.filterUniforms.uniforms.uScale}}var _m=` +in vec2 vTextureCoord; +in vec4 vColor; + +out vec4 finalColor; + +uniform float uNoise; +uniform float uSeed; +uniform sampler2D uTexture; + +float rand(vec2 co) +{ + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main() +{ + vec4 color = texture(uTexture, vTextureCoord); + float randomValue = rand(gl_FragCoord.xy * uSeed); + float diff = (randomValue - 0.5) * uNoise; + + // Un-premultiply alpha before applying the color matrix. See issue #3539. + if (color.a > 0.0) { + color.rgb /= color.a; + } + + color.r += diff; + color.g += diff; + color.b += diff; + + // Premultiply alpha again. + color.rgb *= color.a; + + finalColor = color; +} +`,ba=` + +struct GlobalFilterUniforms { + uInputSize:vec4, + uInputPixel:vec4, + uInputClamp:vec4, + uOutputFrame:vec4, + uGlobalFrame:vec4, + uOutputTexture:vec4, +}; + +struct NoiseUniforms { + uNoise:f32, + uSeed:f32, +}; + +@group(0) @binding(0) var gfu: GlobalFilterUniforms; +@group(0) @binding(1) var uTexture: texture_2d; +@group(0) @binding(2) var uSampler : sampler; + +@group(1) @binding(0) var noiseUniforms : NoiseUniforms; + +struct VSOutput { + @builtin(position) position: vec4, + @location(0) uv : vec2 + }; + +fn filterVertexPosition(aPosition:vec2) -> vec4 +{ + var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy; + + position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +fn filterTextureCoord( aPosition:vec2 ) -> vec2 +{ + return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw); +} + +fn globalTextureCoord( aPosition:vec2 ) -> vec2 +{ + return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); +} + +fn getSize() -> vec2 +{ + return gfu.uGlobalFrame.zw; +} + +@vertex +fn mainVertex( + @location(0) aPosition : vec2, +) -> VSOutput { + return VSOutput( + filterVertexPosition(aPosition), + filterTextureCoord(aPosition) + ); +} + +fn rand(co:vec2) -> f32 +{ + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + + + +@fragment +fn mainFragment( + @location(0) uv: vec2, + @builtin(position) position: vec4 +) -> @location(0) vec4 { + + var pixelPosition = globalTextureCoord(position.xy);// / (getSize());//- gfu.uOutputFrame.xy); + + + var sample = textureSample(uTexture, uSampler, uv); + var randomValue = rand(pixelPosition.xy * noiseUniforms.uSeed); + var diff = (randomValue - 0.5) * noiseUniforms.uNoise; + + // Un-premultiply alpha before applying the color matrix. See issue #3539. + if (sample.a > 0.0) { + sample.r /= sample.a; + sample.g /= sample.a; + sample.b /= sample.a; + } + + sample.r += diff; + sample.g += diff; + sample.b += diff; + + // Premultiply alpha again. + sample.r *= sample.a; + sample.g *= sample.a; + sample.b *= sample.a; + + return sample; +}`,yS=Object.defineProperty,TS=Object.defineProperties,SS=Object.getOwnPropertyDescriptors,li=Object.getOwnPropertySymbols,xm=Object.prototype.hasOwnProperty,bm=Object.prototype.propertyIsEnumerable,vm=(r,t,e)=>t in r?yS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,va=(r,t)=>{for(var e in t||(t={}))xm.call(t,e)&&vm(r,e,t[e]);if(li)for(var e of li(t))bm.call(t,e)&&vm(r,e,t[e]);return r},ES=(r,t)=>TS(r,SS(t)),AS=(r,t)=>{var e={};for(var s in r)xm.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&li)for(var s of li(r))t.indexOf(s)<0&&bm.call(r,s)&&(e[s]=r[s]);return e};const ym=class Ix extends Yt{constructor(t={}){t=va(va({},Ix.defaultOptions),t);const e=Tt.from({vertex:{source:ba,entryPoint:"mainVertex"},fragment:{source:ba,entryPoint:"mainFragment"}}),s=Rt.from({vertex:ii,fragment:_m,name:"noise-filter"}),i=t,{noise:n,seed:o}=i,a=AS(i,["noise","seed"]);super(ES(va({},a),{gpuProgram:e,glProgram:s,resources:{noiseUniforms:new it({uNoise:{value:1,type:"f32"},uSeed:{value:1,type:"f32"}})}})),this.noise=n,this.seed=o!=null?o:Math.random()}get noise(){return this.resources.noiseUniforms.uniforms.uNoise}set noise(t){this.resources.noiseUniforms.uniforms.uNoise=t}get seed(){return this.resources.noiseUniforms.uniforms.uSeed}set seed(t){this.resources.noiseUniforms.uniforms.uSeed=t}};ym.defaultOptions={noise:.5};let PS=ym;var Tm=`in vec2 vMaskCoord; +in vec2 vTextureCoord; + +uniform sampler2D uTexture; +uniform sampler2D uMaskTexture; + +uniform float uAlpha; +uniform vec4 uMaskClamp; + +out vec4 finalColor; + +void main(void) +{ + float clip = step(3.5, + step(uMaskClamp.x, vMaskCoord.x) + + step(uMaskClamp.y, vMaskCoord.y) + + step(vMaskCoord.x, uMaskClamp.z) + + step(vMaskCoord.y, uMaskClamp.w)); + + // TODO look into why this is needed + float npmAlpha = uAlpha; + vec4 original = texture(uTexture, vTextureCoord); + vec4 masky = texture(uMaskTexture, vMaskCoord); + float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a); + + original *= (alphaMul * masky.r * uAlpha * clip); + + finalColor = original; +} +`,Sm=`in vec2 aPosition; + +out vec2 vTextureCoord; +out vec2 vMaskCoord; + + +uniform vec4 uInputSize; +uniform vec4 uOutputFrame; +uniform vec4 uOutputTexture; +uniform mat3 uFilterMatrix; + +vec4 filterVertexPosition( vec2 aPosition ) +{ + vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy; + + position.x = position.x * (2.0 / uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +vec2 filterTextureCoord( vec2 aPosition ) +{ + return aPosition * (uOutputFrame.zw * uInputSize.zw); +} + +vec2 getFilterCoord( vec2 aPosition ) +{ + return ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy; +} + +void main(void) +{ + gl_Position = filterVertexPosition(aPosition); + vTextureCoord = filterTextureCoord(aPosition); + vMaskCoord = getFilterCoord(aPosition); +} +`,ya=`struct GlobalFilterUniforms { + uInputSize:vec4, + uInputPixel:vec4, + uInputClamp:vec4, + uOutputFrame:vec4, + uGlobalFrame:vec4, + uOutputTexture:vec4, +}; + +struct MaskUniforms { + uFilterMatrix:mat3x3, + uMaskClamp:vec4, + uAlpha:f32, +}; + + +@group(0) @binding(0) var gfu: GlobalFilterUniforms; +@group(0) @binding(1) var uTexture: texture_2d; +@group(0) @binding(2) var uSampler : sampler; + +@group(1) @binding(0) var filterUniforms : MaskUniforms; +@group(1) @binding(1) var uMaskTexture: texture_2d; + +struct VSOutput { + @builtin(position) position: vec4, + @location(0) uv : vec2, + @location(1) filterUv : vec2, + }; + +fn filterVertexPosition(aPosition:vec2) -> vec4 +{ + var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy; + + position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0; + position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z; + + return vec4(position, 0.0, 1.0); +} + +fn filterTextureCoord( aPosition:vec2 ) -> vec2 +{ + return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw); +} + +fn globalTextureCoord( aPosition:vec2 ) -> vec2 +{ + return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); +} + +fn getFilterCoord(aPosition:vec2 ) -> vec2 +{ + return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy; +} + +fn getSize() -> vec2 +{ + + + return gfu.uGlobalFrame.zw; +} + +@vertex +fn mainVertex( + @location(0) aPosition : vec2, +) -> VSOutput { + return VSOutput( + filterVertexPosition(aPosition), + filterTextureCoord(aPosition), + getFilterCoord(aPosition) + ); +} + +@fragment +fn mainFragment( + @location(0) uv: vec2, + @location(1) filterUv: vec2, + @builtin(position) position: vec4 +) -> @location(0) vec4 { + + var maskClamp = filterUniforms.uMaskClamp; + + var clip = step(3.5, + step(maskClamp.x, filterUv.x) + + step(maskClamp.y, filterUv.y) + + step(filterUv.x, maskClamp.z) + + step(filterUv.y, maskClamp.w)); + + var mask = textureSample(uMaskTexture, uSampler, filterUv); + var source = textureSample(uTexture, uSampler, uv); + + var npmAlpha = 0.0; + + var alphaMul = 1.0 - npmAlpha * (1.0 - mask.a); + + var a = (alphaMul * mask.r) * clip; + + return vec4(source.rgb, source.a) * a; +}`,wS=Object.defineProperty,RS=Object.defineProperties,MS=Object.getOwnPropertyDescriptors,hi=Object.getOwnPropertySymbols,Em=Object.prototype.hasOwnProperty,Am=Object.prototype.propertyIsEnumerable,Pm=(r,t,e)=>t in r?wS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,OS=(r,t)=>{for(var e in t||(t={}))Em.call(t,e)&&Pm(r,e,t[e]);if(hi)for(var e of hi(t))Am.call(t,e)&&Pm(r,e,t[e]);return r},CS=(r,t)=>RS(r,MS(t)),GS=(r,t)=>{var e={};for(var s in r)Em.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&hi)for(var s of hi(r))t.indexOf(s)<0&&Am.call(r,s)&&(e[s]=r[s]);return e};class wm extends Yt{constructor(t){const e=t,{sprite:s}=e,i=GS(e,["sprite"]),n=new hn(s.texture),o=new it({uFilterMatrix:{value:new G,type:"mat3x3"},uMaskClamp:{value:n.uClampFrame,type:"vec4"},uAlpha:{value:1,type:"f32"}}),a=Tt.from({vertex:{source:ya,entryPoint:"mainVertex"},fragment:{source:ya,entryPoint:"mainFragment"}}),u=Rt.from({vertex:Sm,fragment:Tm,name:"mask-filter"});super(CS(OS({},i),{gpuProgram:a,glProgram:u,resources:{filterUniforms:o,uMaskTexture:s.texture.source}})),this.sprite=s,this._textureMatrix=n}apply(t,e,s,i){this._textureMatrix.texture=this.sprite.texture,t.calculateSpriteMatrix(this.resources.filterUniforms.uniforms.uFilterMatrix,this.sprite).prepend(this._textureMatrix.mapCoord),this.resources.uMaskTexture=this.sprite.texture.source,t.applyFilter(this,e,s,i)}}var IS=`fn getLuminosity(c: vec3) -> f32 { + return 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; +} + +fn setLuminosity(c: vec3, lum: f32) -> vec3 { + let d: f32 = lum - getLuminosity(c); + let newColor: vec3 = c.rgb + vec3(d, d, d); + + // clip back into legal range + let newLum: f32 = getLuminosity(newColor); + let cMin: f32 = min(newColor.r, min(newColor.g, newColor.b)); + let cMax: f32 = max(newColor.r, max(newColor.g, newColor.b)); + + let t1: f32 = newLum / (newLum - cMin); + let t2: f32 = (1.0 - newLum) / (cMax - newLum); + + let finalColor = mix(vec3(newLum, newLum, newLum), newColor, select(select(1.0, t2, cMax > 1.0), t1, cMin < 0.0)); + + return finalColor; +} + +fn getSaturation(c: vec3) -> f32 { + return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); +} + +// Set saturation if color components are sorted in ascending order. +fn setSaturationMinMidMax(cSorted: vec3, s: f32) -> vec3 { + var result: vec3; + if (cSorted.z > cSorted.x) { + let newY = (((cSorted.y - cSorted.x) * s) / (cSorted.z - cSorted.x)); + result = vec3(0.0, newY, s); + } else { + result = vec3(0.0, 0.0, 0.0); + } + return vec3(result.x, result.y, result.z); +} + +fn setSaturation(c: vec3, s: f32) -> vec3 { + var result: vec3 = c; + + if (c.r <= c.g && c.r <= c.b) { + if (c.g <= c.b) { + result = setSaturationMinMidMax(result, s); + } else { + var temp: vec3 = vec3(result.r, result.b, result.g); + temp = setSaturationMinMidMax(temp, s); + result = vec3(temp.r, temp.b, temp.g); + } + } else if (c.g <= c.r && c.g <= c.b) { + if (c.r <= c.b) { + var temp: vec3 = vec3(result.g, result.r, result.b); + temp = setSaturationMinMidMax(temp, s); + result = vec3(temp.g, temp.r, temp.b); + } else { + var temp: vec3 = vec3(result.g, result.b, result.r); + temp = setSaturationMinMidMax(temp, s); + result = vec3(temp.g, temp.b, temp.r); + } + } else { + if (c.r <= c.g) { + var temp: vec3 = vec3(result.b, result.r, result.g); + temp = setSaturationMinMidMax(temp, s); + result = vec3(temp.b, temp.r, temp.g); + } else { + var temp: vec3 = vec3(result.b, result.g, result.r); + temp = setSaturationMinMidMax(temp, s); + result = vec3(temp.b, temp.g, temp.r); + } + } + + return result; +}`;class Qu{constructor(t=0,e=0,s=0,i=0,n=0,o=0){this.type="triangle",this.x=t,this.y=e,this.x2=s,this.y2=i,this.x3=n,this.y3=o}contains(t,e){const s=(this.x-this.x3)*(e-this.y3)-(this.y-this.y3)*(t-this.x3),i=(this.x2-this.x)*(e-this.y)-(this.y2-this.y)*(t-this.x);if(s<0!=i<0&&s!==0&&i!==0)return!1;const n=(this.x3-this.x2)*(e-this.y2)-(this.y3-this.y2)*(t-this.x2);return n===0||n<0==s+i<=0}strokeContains(t,e,s){const i=s/2,n=i*i,{x:o,x2:a,x3:u,y:l,y2:h,y3:c}=this;return Tr(t,e,o,l,a,c)<=n||Tr(t,e,a,h,u,c)<=n||Tr(t,e,u,c,o,l)<=n}clone(){return new Qu(this.x,this.y,this.x2,this.y2,this.x3,this.y3)}copyFrom(t){return this.x=t.x,this.y=t.y,this.x2=t.x2,this.y2=t.y2,this.x3=t.x3,this.y3=t.y3,this}copyTo(t){return t.copyFrom(this),t}getBounds(t){t=t||new z;const e=Math.min(this.x,this.x2,this.x3),s=Math.max(this.x,this.x2,this.x3),i=Math.min(this.y,this.y2,this.y3),n=Math.max(this.y,this.y2,this.y3);return t.x=e,t.y=i,t.width=s-e,t.height=n-i,t}}const Rm=class Bx{constructor(t){this._tick=()=>{this.timeout=setTimeout(this._processQueue,0)},this._processQueue=()=>{const{queue:e}=this;let s=0;for(;e.length&&s{this.queue.length?(this.resolves.push(e),this.dedupeQueue(),ht.system.addOnce(this._tick,this,Xt.UTILITY)):e()})}dedupeQueue(){const t=Object.create(null);let e=0;for(let s=0;st in r?BS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,FS=(r,t)=>{for(var e in t||(t={}))Om.call(t,e)&&Gm(r,e,t[e]);if(ci)for(var e of ci(t))Cm.call(t,e)&&Gm(r,e,t[e]);return r},DS=(r,t)=>{var e={};for(var s in r)Om.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&ci)for(var s of ci(r))t.indexOf(s)<0&&Cm.call(r,s)&&(e[s]=r[s]);return e};const Im=new Ae;class $r extends V{constructor(...t){var e;let s=t[0];s instanceof Oe&&(s={geometry:s,shader:t[1]},t[3]&&(s.geometry.topology=t[3]));const i=s,{geometry:n,shader:o,texture:a,roundPixels:u,state:l}=i,h=DS(i,["geometry","shader","texture","roundPixels","state"]);super(FS({label:"Mesh"},h)),this.renderPipeId="mesh",this.canBundle=!0,this._roundPixels=0,this.allowChildren=!1,this.shader=o,this.texture=(e=a!=null?a:o==null?void 0:o.texture)!=null?e:A.WHITE,this.state=l!=null?l:Ct.for2d(),this._geometry=n,this._geometry.on("update",this.onViewUpdate,this),this.roundPixels=u!=null?u:!1}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}get material(){return this._shader}set shader(t){this._shader!==t&&(this._shader=t,this.onViewUpdate())}get shader(){return this._shader}set geometry(t){var e;this._geometry!==t&&((e=this._geometry)==null||e.off("update",this.onViewUpdate,this),t.on("update",this.onViewUpdate,this),this._geometry=t,this.onViewUpdate())}get geometry(){return this._geometry}set texture(t){t||(t=A.EMPTY);const e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this.shader&&(this.shader.texture=t),this._texture=t,this.onViewUpdate())}get texture(){return this._texture}get batched(){return this._shader?!1:this._geometry instanceof Jt?this._geometry.batchMode==="auto"?this._geometry.positions.length/2<=100:this._geometry.batchMode==="batch":!1}get bounds(){return this._geometry.bounds}addBounds(t){t.addBounds(this.geometry.bounds)}containsPoint(t){const{x:e,y:s}=t;if(!this.bounds.containsPoint(e,s))return!1;const i=this.geometry.getBuffer("aPosition").data,n=Im.points,o=this.geometry.getIndex().data,a=o.length,u=this.geometry.topology==="triangle-strip"?3:1;for(let l=0;l+2=this._durations[this.currentFrame];)n-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=n/this._durations[this.currentFrame]}else this._currentTime+=s;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei)&&this.onLoop(),this._updateTexture())}_updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this.texture=this._textures[t],this.updateAnchor&&this.anchor.copyFrom(this.texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(){this.stop(),super.destroy(),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(t){const e=[];for(let s=0;sthis.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this._updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(ht.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(ht.shared.add(this.update,this),this._isConnectedToTicker=!0))}}class Bm{constructor({matrix:t,observer:e}={}){this.dirty=!0,this._matrix=t!=null?t:new G,this.observer=e,this.position=new rt(this,0,0),this.scale=new rt(this,1,1),this.pivot=new rt(this,0,0),this.skew=new rt(this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1}get matrix(){const t=this._matrix;return this.dirty&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this.dirty=!1),t}_onUpdate(t){var e;this.dirty=!0,t===this.skew&&this.updateSkew(),(e=this.observer)==null||e._onUpdate(this)}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this.dirty=!0}setFromMatrix(t){t.decompose(this),this.dirty=!0}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())}}var US=Object.defineProperty,di=Object.getOwnPropertySymbols,Fm=Object.prototype.hasOwnProperty,Dm=Object.prototype.propertyIsEnumerable,Um=(r,t,e)=>t in r?US(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Nr=(r,t)=>{for(var e in t||(t={}))Fm.call(t,e)&&Um(r,e,t[e]);if(di)for(var e of di(t))Dm.call(t,e)&&Um(r,e,t[e]);return r},kS=(r,t)=>{var e={};for(var s in r)Fm.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&di)for(var s of di(r))t.indexOf(s)<0&&Dm.call(r,s)&&(e[s]=r[s]);return e};const km=class Gi extends V{constructor(...t){let e=t[0]||{};e instanceof A&&(e={texture:e}),t.length>1&&(e.width=t[1],e.height=t[2]),e=Nr(Nr({},Gi.defaultOptions),e);const s=e!=null?e:{},{texture:i,anchor:n,tilePosition:o,tileScale:a,tileRotation:u,width:l,height:h,applyAnchorToTexture:c,roundPixels:d}=s,p=kS(s,["texture","anchor","tilePosition","tileScale","tileRotation","width","height","applyAnchorToTexture","roundPixels"]);super(Nr({label:"TilingSprite"},p)),this.renderPipeId="tilingSprite",this.canBundle=!0,this.batched=!0,this._roundPixels=0,this._bounds={minX:0,maxX:1,minY:0,maxY:0},this._boundsDirty=!0,this.allowChildren=!1,this._anchor=new rt(this),this._applyAnchorToTexture=c,this.texture=i,this._width=l!=null?l:i.width,this._height=h!=null?h:i.height,this._tileTransform=new Bm({observer:{_onUpdate:()=>this.onViewUpdate()}}),n&&(this.anchor=n),this.tilePosition=o,this.tileScale=a,this.tileRotation=u,this.roundPixels=d!=null?d:!1}static from(t,e={}){return typeof t=="string"?new Gi(Nr({texture:Y.get(t)},e)):new Gi(Nr({texture:t},e))}get clampMargin(){return this._texture.textureMatrix.clampMargin}set clampMargin(t){this._texture.textureMatrix.clampMargin=t}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get tilePosition(){return this._tileTransform.position}set tilePosition(t){this._tileTransform.position.copyFrom(t)}get tileScale(){return this._tileTransform.scale}set tileScale(t){typeof t=="number"?this._tileTransform.scale.set(t):this._tileTransform.scale.copyFrom(t)}set tileRotation(t){this._tileTransform.rotation=t}get tileRotation(){return this._tileTransform.rotation}get tileTransform(){return this._tileTransform}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}get bounds(){return this._boundsDirty&&(this._updateBounds(),this._boundsDirty=!1),this._bounds}set texture(t){t||(t=A.EMPTY);const e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this.onViewUpdate())}get texture(){return this._texture}set width(t){this._width=t,this.onViewUpdate()}get width(){return this._width}set height(t){this._height=t,this.onViewUpdate()}get height(){return this._height}_updateBounds(){const t=this._bounds,e=this._anchor,s=this._width,i=this._height;t.maxX=-e._x*s,t.minX=t.maxX+s,t.maxY=-e._y*i,t.minY=t.maxY+i}addBounds(t){const e=this.bounds;t.addFrame(e.minX,e.minY,e.maxX,e.maxY)}containsPoint(t){const e=this.bounds.minX,s=this.bounds.minY,i=-e*this._anchor._x;let n=0;return t.x>=i&&t.x<=i+e&&(n=-s*this._anchor._y,t.y>=n&&t.y<=n+s)}onViewUpdate(){this._boundsDirty=!0,this._didTilingSpriteUpdate=!0,this._didChangeId+=4096,!this.didViewUpdate&&(this.didViewUpdate=!0,this.renderGroup&&this.renderGroup.onChildViewUpdate(this))}destroy(t=!1){if(super.destroy(t),this._anchor=null,this._tileTransform=null,this._bounds=null,typeof t=="boolean"?t:t==null?void 0:t.texture){const e=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(e)}this._texture=null}};km.defaultOptions={texture:A.EMPTY,anchor:{x:0,y:0},tilePosition:{x:0,y:0},tileScale:{x:1,y:1},tileRotation:0,applyAnchorToTexture:!1};let Lm=km;var LS=Object.defineProperty,pi=Object.getOwnPropertySymbols,$m=Object.prototype.hasOwnProperty,Nm=Object.prototype.propertyIsEnumerable,Hm=(r,t,e)=>t in r?LS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,$S=(r,t)=>{for(var e in t||(t={}))$m.call(t,e)&&Hm(r,e,t[e]);if(pi)for(var e of pi(t))Nm.call(t,e)&&Hm(r,e,t[e]);return r},NS=(r,t)=>{var e={};for(var s in r)$m.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&pi)for(var s of pi(r))t.indexOf(s)<0&&Nm.call(r,s)&&(e[s]=r[s]);return e};class fi extends V{constructor(t,e){const s=t,{text:i,resolution:n,style:o,anchor:a,width:u,height:l,roundPixels:h}=s,c=NS(s,["text","resolution","style","anchor","width","height","roundPixels"]);super($S({},c)),this.batched=!0,this.resolution=null,this._didTextUpdate=!0,this._roundPixels=0,this._bounds=new lt,this._boundsDirty=!0,this._styleClass=e,this.text=i!=null?i:"",this.style=o,this.resolution=n!=null?n:null,this.allowChildren=!1,this._anchor=new rt({_onUpdate:()=>{this.onViewUpdate()}}),a&&(this.anchor=a),this.roundPixels=h!=null?h:!1,u&&(this.width=u),l&&(this.height=l)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}get style(){return this._style}set style(t){var e;t=t||{},(e=this._style)==null||e.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get bounds(){return this._boundsDirty&&(this._updateBounds(),this._boundsDirty=!1),this._bounds}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,e){var s;let i,n;typeof t!="object"?(i=t,n=e!=null?e:t):(i=t.width,n=(s=t.height)!=null?s:t.width),i!==void 0&&this._setWidth(i,this.bounds.width),n!==void 0&&this._setHeight(n,this.bounds.height)}addBounds(t){const e=this.bounds;t.addFrame(e.minX,e.minY,e.maxX,e.maxY)}containsPoint(t){const e=this.bounds.maxX,s=this.bounds.maxY,i=-e*this.anchor.x;let n=0;return t.x>=i&&t.x<=i+e&&(n=-s*this.anchor.y,t.y>=n&&t.y<=n+s)}onViewUpdate(){this._didChangeId+=4096,this._boundsDirty=!0,!this.didViewUpdate&&(this.didViewUpdate=!0,this._didTextUpdate=!0,this.renderGroup&&this.renderGroup.onChildViewUpdate(this))}_getKey(){return`${this.text}:${this._style.styleKey}`}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,(typeof t=="boolean"?t:t!=null&&t.style)&&this._style.destroy(t),this._style=null,this._text=null}}function mi(r,t){var e;let s=(e=r[0])!=null?e:{};return(typeof s=="string"||r[1])&&(s={text:s,style:r[1]}),s}class Ta extends fi{constructor(...t){const e=mi(t,"Text");super(e,Wt),this.renderPipeId="text"}_updateBounds(){const t=this._bounds,e=this._style.padding,s=this._anchor,i=It.measureText(this._text,this._style),{width:n,height:o}=i;t.minX=-s._x*n-e,t.maxX=t.minX+n,t.minY=-s._y*o-e,t.maxY=t.minY+o}}class Xm extends Mm{resolveQueueItem(t,e){return t instanceof V?this.resolveContainerQueueItem(t,e):t instanceof et||t instanceof A?e.push(t.source):t instanceof Bt&&e.push(t),null}resolveContainerQueueItem(t,e){t instanceof Ft||t instanceof Lm||t instanceof $r?e.push(t.texture.source):t instanceof Ta?e.push(t):t instanceof qe?e.push(t.context):t instanceof Yr&&t.textures.forEach(s=>{s.source?e.push(s.source):e.push(s.texture.source)})}resolveGraphicsContextQueueItem(t){this.renderer.graphicsContext.getContextRenderData(t);const{instructions:e}=t;for(const s of e)if(s.action==="texture"){const{image:i}=s.data;return i.source}else if(s.action==="fill"){const{texture:i}=s.data.style;return i.source}return null}}class zm extends fi{constructor(...t){var e,s,i;const n=mi(t,"BitmapText");(e=n.style)!=null||(n.style=n.style||{}),(i=(s=n.style).fill)!=null||(s.fill=16777215),super(n,Wt),this.renderPipeId="bitmapText"}_updateBounds(){const t=this._bounds,e=this._style.padding,s=this._anchor,i=Pr.measureText(this.text,this._style),n=i.scale,o=i.offsetY*n,a=i.width*n,u=i.height*n;t.minX=-s._x*a-e,t.maxX=t.minX+a,t.minY=-s._y*(u+o)-e,t.maxY=t.minY+u}}class jm extends fi{constructor(...t){const e=mi(t,"HtmlText");super(e,Pe),this.renderPipeId="htmlText"}_updateBounds(){const t=this._bounds,e=this._style.padding,s=this._anchor,i=ko(this.text,this._style),{width:n,height:o}=i;t.minX=-s._x*n-e,t.maxX=t.minX+n,t.minY=-s._y*o-e,t.maxY=t.minY+o}}class Vm extends Xm{uploadQueueItem(t){t instanceof et?this.uploadTextureSource(t):t instanceof Ta?this.uploadText(t):t instanceof jm?this.uploadHTMLText(t):t instanceof zm?this.uploadBitmapText(t):t instanceof Bt&&this.uploadGraphicsContext(t)}uploadTextureSource(t){this.renderer.texture.initSource(t)}uploadText(t){this.renderer.renderPipes.text.initGpuText(t)}uploadBitmapText(t){this.renderer.renderPipes.bitmapText.initGpuText(t)}uploadHTMLText(t){this.renderer.renderPipes.htmlText.initGpuText(t)}uploadGraphicsContext(t){this.renderer.graphicsContext.getContextRenderData(t);const{instructions:e}=t;for(const s of e)if(s.action==="texture"){const{image:i}=s.data;this.uploadTextureSource(i.source)}else if(s.action==="fill"){const{texture:i}=s.data.style;this.uploadTextureSource(i.source)}return null}}class Wm extends Vm{destroy(){clearTimeout(this.timeout),this.renderer=null,this.queue=null,this.resolves=null}}Wm.extension={type:[v.WebGLSystem,v.WebGPUSystem],name:"prepare"};class Sa{constructor(){this._didUpload=!1,this._tempState=Ct.for2d()}init(t){const e=ke({name:"batch",bits:[ks,$s(wt),$e]});this._shader=new St({glProgram:e,resources:{batchSamplers:Ns}}),t.renderer.runners.contextChange.add(this)}contextChange(){this._didUpload=!1}start(t,e){const s=t.renderer;s.shader.bind(this._shader,this._didUpload),s.shader.updateUniformGroup(s.globalUniforms.uniformGroup),s.geometry.bind(e,this._shader.glProgram)}execute(t,e){const s=t.renderer;this._didUpload=!0,this._tempState.blendMode=e.blendMode,s.state.set(this._tempState);const i=e.textures.textures;for(let n=0;ns.trim()).filter(s=>s.length);let e="";return t.map(s=>{let i=e+s;return s==="{"?e+=" ":s==="}"&&(e=e.substr(0,e.length-4),i=e+s),i}).join(` +`)}const Ym={name:"texture-bit",vertex:{header:` + + struct TextureUniforms { + uTextureMatrix:mat3x3, + } + + @group(2) @binding(2) var textureUniforms : TextureUniforms; + `,main:` + uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy; + `},fragment:{header:` + @group(2) @binding(0) var uTexture: texture_2d; + @group(2) @binding(1) var uSampler: sampler; + + + `,main:` + outColor = textureSample(uTexture, uSampler, vUV); + `}},Km={name:"texture-bit",vertex:{header:` + uniform mat3 uTextureMatrix; + `,main:` + uv = (uTextureMatrix * vec3(uv, 1.0)).xy; + `},fragment:{header:` + uniform sampler2D uTexture; + + + `,main:` + outColor = texture(uTexture, vUV); + `}};function qm(r,t){const e=r.root,s=r.instructionSet;s.reset(),t.batch.buildStart(s),t.blendMode.buildStart(),t.colorMask.buildStart(),e.sortableChildren&&e.sortChildren(),Zm(e,s,t,!0),t.batch.buildEnd(s),t.blendMode.buildEnd(s)}function Hr(r,t,e){r.globalDisplayStatus<7||!r.includeInBuild||(r.sortableChildren&&r.sortChildren(),r.isSimple?jS(r,t,e):Zm(r,t,e,!1))}function jS(r,t,e){if(r.renderPipeId&&(e.blendMode.setBlendMode(r,r.groupBlendMode,t),r.didViewUpdate=!1,e[r.renderPipeId].addRenderable(r,t)),!r.isRenderGroupRoot){const s=r.children,i=s.length;for(let n=0;n=0;o--){const a=r.effects[o];e[a.pipe].pop(a,r,t)}}}const VS=new lt;class WS extends ts{constructor(){super({filters:[new wm({sprite:new Ft(A.EMPTY)})]})}get sprite(){return this.filters[0].sprite}set sprite(t){this.filters[0].sprite=t}}class Pa{constructor(t){this._activeMaskStage=[],this._renderer=t}push(t,e,s){const i=this._renderer;if(i.renderPipes.batch.break(s),s.add({renderPipeId:"alphaMask",action:"pushMaskBegin",mask:t,canBundle:!1,maskedContainer:e}),t.renderMaskToTexture){const n=t.mask;n.includeInBuild=!0,Hr(n,s,i.renderPipes),n.includeInBuild=!1}i.renderPipes.batch.break(s),s.add({renderPipeId:"alphaMask",action:"pushMaskEnd",mask:t,maskedContainer:e,canBundle:!1})}pop(t,e,s){this._renderer.renderPipes.batch.break(s),s.add({renderPipeId:"alphaMask",action:"popMaskEnd",mask:t,canBundle:!1})}execute(t){const e=this._renderer,s=t.mask.renderMaskToTexture;if(t.action==="pushMaskBegin"){const i=H.get(WS);if(s){t.mask.mask.measurable=!0;const n=nr(t.mask.mask,!0,VS);t.mask.mask.measurable=!1,n.ceil();const o=ut.getOptimalTexture(n.width,n.height,1,!1);e.renderTarget.push(o,!0),e.globalUniforms.push({offset:n,worldColor:4294967295});const a=i.sprite;a.texture=o,a.worldTransform.tx=n.minX,a.worldTransform.ty=n.minY,this._activeMaskStage.push({filterEffect:i,maskedContainer:t.maskedContainer,filterTexture:o})}else i.sprite=t.mask.mask,this._activeMaskStage.push({filterEffect:i,maskedContainer:t.maskedContainer})}else if(t.action==="pushMaskEnd"){const i=this._activeMaskStage[this._activeMaskStage.length-1];s&&(e.renderTarget.pop(),e.globalUniforms.pop()),e.filter.push({renderPipeId:"filter",action:"pushFilter",container:i.maskedContainer,filterEffect:i.filterEffect,canBundle:!1})}else if(t.action==="popMaskEnd"){e.filter.pop();const i=this._activeMaskStage.pop();s&&ut.returnTexture(i.filterTexture),H.return(i.filterEffect)}}destroy(){this._renderer=null,this._activeMaskStage=null}}Pa.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"alphaMask"};class wa{constructor(t){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=t}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(t,e,s){this._renderer.renderPipes.batch.break(s);const i=this._colorStack;i[this._colorStackIndex]=i[this._colorStackIndex-1]&t.mask;const n=this._colorStack[this._colorStackIndex];n!==this._currentColor&&(this._currentColor=n,s.add({renderPipeId:"colorMask",colorMask:n,canBundle:!1})),this._colorStackIndex++}pop(t,e,s){this._renderer.renderPipes.batch.break(s);const i=this._colorStack;this._colorStackIndex--;const n=i[this._colorStackIndex-1];n!==this._currentColor&&(this._currentColor=n,s.add({renderPipeId:"colorMask",colorMask:n,canBundle:!1}))}execute(t){this._renderer.colorMask.setMask(t.colorMask)}destroy(){this._colorStack=null}}wa.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"colorMask"};class YS{constructor(t){this.priority=0,this.pipe="scissorMask",this.mask=t,this.mask.renderable=!1,this.mask.measurable=!1}addBounds(t,e){ps(this.mask,t,e)}addLocalBounds(t,e){fs(this.mask,t,e)}containsPoint(t,e){const s=this.mask;return e(s,t)}reset(){this.mask.measurable=!0,this.mask=null}destroy(){this.reset()}}class Ra{constructor(t){this._maskStackHash={},this._maskHash=new WeakMap,this._renderer=t}push(t,e,s){var i,n;const o=t,a=this._renderer;a.renderPipes.batch.break(s),a.renderPipes.blendMode.setBlendMode(o.mask,"none",s),s.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:t,canBundle:!1});const u=o.mask;u.includeInBuild=!0,this._maskHash.has(o)||this._maskHash.set(o,{instructionsStart:0,instructionsLength:0});const l=this._maskHash.get(o);l.instructionsStart=s.instructionSize,Hr(u,s,a.renderPipes),u.includeInBuild=!1,a.renderPipes.batch.break(s),s.add({renderPipeId:"stencilMask",action:"pushMaskEnd",mask:t,canBundle:!1});const h=s.instructionSize-l.instructionsStart-1;l.instructionsLength=h;const c=a.renderTarget.renderTarget.uid;(n=(i=this._maskStackHash)[c])!=null||(i[c]=0)}pop(t,e,s){const i=t,n=this._renderer;n.renderPipes.batch.break(s),n.renderPipes.blendMode.setBlendMode(i.mask,"none",s),s.add({renderPipeId:"stencilMask",action:"popMaskBegin",canBundle:!1});const o=this._maskHash.get(t);for(let a=0;a(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(Xr||{});class Qm{constructor(t,e){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.type=e}}class Ma{constructor(t){this._gpuBuffers=Object.create(null),this._boundBufferBases=Object.create(null),this._renderer=t}destroy(){this._renderer=null,this._gl=null,this._gpuBuffers=null,this._boundBufferBases=null}contextChange(){this._gpuBuffers=Object.create(null),this._gl=this._renderer.gl}getGlBuffer(t){return this._gpuBuffers[t.uid]||this.createGLBuffer(t)}bind(t){const{_gl:e}=this,s=this.getGlBuffer(t);e.bindBuffer(s.type,s.buffer)}bindBufferBase(t,e){const{_gl:s}=this;if(this._boundBufferBases[e]!==t){const i=this.getGlBuffer(t);this._boundBufferBases[e]=t,s.bindBufferBase(s.UNIFORM_BUFFER,e,i.buffer)}}bindBufferRange(t,e,s){const{_gl:i}=this;s=s||0;const n=this.getGlBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,e||0,n.buffer,s*256,256)}updateBuffer(t){const{_gl:e}=this,s=this.getGlBuffer(t);if(t._updateID===s.updateID)return s;s.updateID=t._updateID,e.bindBuffer(s.type,s.buffer);const i=t.data;if(s.byteLength>=t.data.byteLength)e.bufferSubData(s.type,0,i,0,t._updateSize/i.BYTES_PER_ELEMENT);else{const n=t.descriptor.usage&$.STATIC?e.STATIC_DRAW:e.DYNAMIC_DRAW;s.byteLength=i.byteLength,e.bufferData(s.type,i,n)}return s}destroyAll(){const t=this._gl;for(const e in this._gpuBuffers)t.deleteBuffer(this._gpuBuffers[e].buffer);this._gpuBuffers=Object.create(null)}onBufferDestroy(t,e){const s=this._gpuBuffers[t.uid],i=this._gl;e||i.deleteBuffer(s.buffer),this._gpuBuffers[t.uid]=null}createGLBuffer(t){const{_gl:e}=this;let s=Xr.ARRAY_BUFFER;t.descriptor.usage&$.INDEX?s=Xr.ELEMENT_ARRAY_BUFFER:t.descriptor.usage&$.UNIFORM&&(s=Xr.UNIFORM_BUFFER);const i=new Qm(e.createBuffer(),s);return this._gpuBuffers[t.uid]=i,t.on("destroy",this.onBufferDestroy,this),i}}Ma.extension={type:[v.WebGLSystem],name:"buffer"};var KS=Object.defineProperty,qS=Object.defineProperties,ZS=Object.getOwnPropertyDescriptors,Jm=Object.getOwnPropertySymbols,QS=Object.prototype.hasOwnProperty,JS=Object.prototype.propertyIsEnumerable,tg=(r,t,e)=>t in r?KS(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,_i=(r,t)=>{for(var e in t||(t={}))QS.call(t,e)&&tg(r,e,t[e]);if(Jm)for(var e of Jm(t))JS.call(t,e)&&tg(r,e,t[e]);return r},eg=(r,t)=>qS(r,ZS(t));const Oa=class Fx{constructor(t){this.supports={uint32Indices:!0,uniformBufferObject:!0,vertexArrayObject:!0,srgbTextures:!0,nonPowOf2wrapping:!0,msaa:!0,nonPowOf2mipmaps:!0},this._renderer=t,this.extensions=Object.create(null),this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this._renderer.gl=t}init(t){var e,s;if(t=_i(_i({},Fx.defaultOptions),t),t.context)this.initFromContext(t.context);else{const i=this._renderer.background.alpha<1,n=(e=t.premultipliedAlpha)!=null?e:!0,o=t.antialias&&!this._renderer.backBuffer.useBackBuffer;this.createContext(t.preferWebGLVersion,{alpha:i,premultipliedAlpha:n,antialias:o,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:(s=t.powerPreference)!=null?s:"default"})}}initFromContext(t){this.gl=t,this.webGLVersion=t instanceof X.get().getWebGL2RenderingContext()?2:1,this.getExtensions(),this.validateContext(t),this._renderer.runners.contextChange.emit(t);const e=this._renderer.view.canvas;e.addEventListener("webglcontextlost",this.handleContextLost,!1),e.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}createContext(t,e){let s;const i=this._renderer.view.canvas;if(t===2&&(s=i.getContext("webgl2",e)),!s&&(s=i.getContext("webgl",e),!s))throw new Error("This browser does not support WebGL. Try using the canvas renderer");this.gl=s,this.initFromContext(this.gl)}getExtensions(){const{gl:t}=this,e={anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc"),bptc:t.getExtension("EXT_texture_compression_bptc"),rgtc:t.getExtension("EXT_texture_compression_rgtc"),loseContext:t.getExtension("WEBGL_lose_context")};this.webGLVersion===1?this.extensions=eg(_i({},e),{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear"),vertexAttribDivisorANGLE:t.getExtension("ANGLE_instanced_arrays"),srgb:t.getExtension("EXT_sRGB")}):this.extensions=eg(_i({},e),{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),this._contextLossForced&&(this._contextLossForced=!1,setTimeout(()=>{var e;this.gl.isContextLost()&&((e=this.extensions.loseContext)==null||e.restoreContext())},0))}handleContextRestored(){this._renderer.runners.contextChange.emit(this.gl)}destroy(){var t;const e=this._renderer.view.canvas;this._renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),(t=this.extensions.loseContext)==null||t.loseContext()}forceContextLoss(){var t;(t=this.extensions.loseContext)==null||t.loseContext(),this._contextLossForced=!0}validateContext(t){const e=t.getContextAttributes();e&&e.stencil;const s=this.supports,i=this.webGLVersion===2,n=this.extensions;s.uint32Indices=i||!!n.uint32ElementIndex,s.uniformBufferObject=i,s.vertexArrayObject=i||!!n.vertexArrayObject,s.srgbTextures=i||!!n.srgb,s.nonPowOf2wrapping=i,s.nonPowOf2mipmaps=i,s.msaa=i,s.uint32Indices}};Oa.extension={type:[v.WebGLSystem],name:"context"},Oa.defaultOptions={context:null,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:void 0,preferWebGLVersion:2};let rg=Oa,Ca=0;const sg=500;function xi(...r){Ca!==sg&&(Ca++,Ca===sg?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...r))}function Ga(r,t){var e,s,i,n;for(const o in r.attributes){const a=r.attributes[o],u=t[o];u?((e=a.location)!=null||(a.location=u.location),(s=a.format)!=null||(a.format=u.format),(i=a.offset)!=null||(a.offset=u.offset),(n=a.instance)!=null||(a.instance=u.instance)):xi(`Attribute ${o} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`)}t2(r)}function t2(r){var t,e;const{buffers:s,attributes:i}=r,n={},o={};for(const a in s){const u=s[a];n[u.uid]=0,o[u.uid]=0}for(const a in i){const u=i[a];n[u.buffer.uid]+=Fe(u.format).stride}for(const a in i){const u=i[a];(t=u.stride)!=null||(u.stride=n[u.buffer.uid]),(e=u.start)!=null||(u.start=o[u.buffer.uid]),o[u.buffer.uid]+=Fe(u.format).stride}}var bi=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(bi||{}),Ia=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(Ia||{}),ig=(r=>(r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",r))(ig||{}),N=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(N||{});const ng={uint8x2:N.UNSIGNED_BYTE,uint8x4:N.UNSIGNED_BYTE,sint8x2:N.BYTE,sint8x4:N.BYTE,unorm8x2:N.UNSIGNED_BYTE,unorm8x4:N.UNSIGNED_BYTE,snorm8x2:N.BYTE,snorm8x4:N.BYTE,uint16x2:N.UNSIGNED_SHORT,uint16x4:N.UNSIGNED_SHORT,sint16x2:N.SHORT,sint16x4:N.SHORT,unorm16x2:N.UNSIGNED_SHORT,unorm16x4:N.UNSIGNED_SHORT,snorm16x2:N.SHORT,snorm16x4:N.SHORT,float16x2:N.HALF_FLOAT,float16x4:N.HALF_FLOAT,float32:N.FLOAT,float32x2:N.FLOAT,float32x3:N.FLOAT,float32x4:N.FLOAT,uint32:N.UNSIGNED_INT,uint32x2:N.UNSIGNED_INT,uint32x3:N.UNSIGNED_INT,uint32x4:N.UNSIGNED_INT,sint32:N.INT,sint32x2:N.INT,sint32x3:N.INT,sint32x4:N.INT};function og(r){var t;return(t=ng[r])!=null?t:ng.float32}const e2={"point-list":0,"line-list":1,"line-strip":3,"triangle-list":4,"triangle-strip":5};class Ba{constructor(t){this._geometryVaoHash=Object.create(null),this._renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0}contextChange(){const t=this.gl=this._renderer.gl;if(!this._renderer.context.supports.vertexArrayObject)throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");const e=this._renderer.context.extensions.vertexArrayObject;e&&(t.createVertexArray=()=>e.createVertexArrayOES(),t.bindVertexArray=i=>e.bindVertexArrayOES(i),t.deleteVertexArray=i=>e.deleteVertexArrayOES(i));const s=this._renderer.context.extensions.vertexAttribDivisorANGLE;s&&(t.drawArraysInstanced=(i,n,o,a)=>{s.drawArraysInstancedANGLE(i,n,o,a)},t.drawElementsInstanced=(i,n,o,a,u)=>{s.drawElementsInstancedANGLE(i,n,o,a,u)},t.vertexAttribDivisor=(i,n)=>s.vertexAttribDivisorANGLE(i,n)),this._activeGeometry=null,this._activeVao=null,this._geometryVaoHash=Object.create(null)}bind(t,e){const s=this.gl;this._activeGeometry=t;const i=this.getVao(t,e);this._activeVao!==i&&(this._activeVao=i,s.bindVertexArray(i)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,e=this._renderer.buffer;for(let s=0;s1?n.drawElementsInstanced(a,e||o.indexBuffer.data.length,l,(s||0)*u,i):n.drawElements(a,e||o.indexBuffer.data.length,l,(s||0)*u)}else i>1?n.drawArraysInstanced(a,s||0,e||o.getSize(),i):n.drawArrays(a,s||0,e||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this._renderer=null,this.gl=null,this._activeVao=null,this._activeGeometry=null}}Ba.extension={type:[v.WebGLSystem],name:"geometry"};var r2=Object.defineProperty,ag=Object.getOwnPropertySymbols,s2=Object.prototype.hasOwnProperty,i2=Object.prototype.propertyIsEnumerable,ug=(r,t,e)=>t in r?r2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,lg=(r,t)=>{for(var e in t||(t={}))s2.call(t,e)&&ug(r,e,t[e]);if(ag)for(var e of ag(t))i2.call(t,e)&&ug(r,e,t[e]);return r};const n2=new Oe({attributes:{aPosition:[-1,-1,3,-1,-1,3]}}),Fa=class Dx{constructor(t){this.useBackBuffer=!1,this._useBackBufferThisRender=!1,this._renderer=t}init(t={}){const{useBackBuffer:e,antialias:s}=lg(lg({},Dx.defaultOptions),t);this.useBackBuffer=e,this._antialias=s,this._renderer.context.supports.msaa||(xi("antialiasing, is not supported on when using the back buffer"),this._antialias=!1),this._state=Ct.for2d();const i=new Rt({vertex:` + attribute vec2 aPosition; + out vec2 vUv; + + void main() { + gl_Position = vec4(aPosition, 0.0, 1.0); + + vUv = (aPosition + 1.0) / 2.0; + + // flip dem UVs + vUv.y = 1.0 - vUv.y; + }`,fragment:` + in vec2 vUv; + out vec4 finalColor; + + uniform sampler2D uTexture; + + void main() { + finalColor = texture(uTexture, vUv); + }`,name:"big-triangle"});this._bigTriangleShader=new St({glProgram:i,resources:{uTexture:A.WHITE.source}})}renderStart(t){const e=this._renderer.renderTarget.getRenderTarget(t.target);if(this._useBackBufferThisRender=this.useBackBuffer&&!!e.isRoot,this._useBackBufferThisRender){const s=this._renderer.renderTarget.getRenderTarget(t.target);this._targetTexture=s.colorTexture,t.target=this._getBackBufferTexture(s.colorTexture)}}renderEnd(){this._presentBackBuffer()}_presentBackBuffer(){const t=this._renderer;t.renderTarget.finishRenderPass(),this._useBackBufferThisRender&&(t.renderTarget.bind(this._targetTexture,!1),this._bigTriangleShader.resources.uTexture=this._backBufferTexture.source,t.encoder.draw({geometry:n2,shader:this._bigTriangleShader,state:this._state}))}_getBackBufferTexture(t){return this._backBufferTexture=this._backBufferTexture||new A({source:new et({width:t.width,height:t.height,resolution:t._resolution,antialias:this._antialias})}),this._backBufferTexture.source.resize(t.width,t.height,t._resolution),this._backBufferTexture}destroy(){this._backBufferTexture&&(this._backBufferTexture.destroy(),this._backBufferTexture=null)}};Fa.extension={type:[v.WebGLSystem],name:"backBuffer",priority:1},Fa.defaultOptions={useBackBuffer:!1};let hg=Fa;class Da{constructor(t){this._colorMaskCache=15,this._renderer=t}setMask(t){this._colorMaskCache!==t&&(this._colorMaskCache=t,this._renderer.gl.colorMask(!!(t&8),!!(t&4),!!(t&2),!!(t&1)))}}Da.extension={type:[v.WebGLSystem],name:"colorMask"};class Ua{constructor(t){this.commandFinished=Promise.resolve(),this._renderer=t}setGeometry(t,e){this._renderer.geometry.bind(t,e.glProgram)}finishRenderPass(){}draw(t){const e=this._renderer,{geometry:s,shader:i,state:n,skipSync:o,topology:a,size:u,start:l,instanceCount:h}=t;e.shader.bind(i,o),e.geometry.bind(s,e.shader._activeProgram),n&&e.state.set(n),e.geometry.draw(a,u,l,h!=null?h:s.instanceCount)}destroy(){this._renderer=null}}Ua.extension={type:[v.WebGLSystem],name:"encoder"};class cg{constructor(){this.width=-1,this.height=-1,this.msaa=!1,this.msaaRenderBuffer=[]}}const re=[];re[st.NONE]=void 0,re[st.DISABLED]={stencilWriteMask:0,stencilReadMask:0},re[st.RENDERING_MASK_ADD]={stencilFront:{compare:"equal",passOp:"increment-clamp"},stencilBack:{compare:"equal",passOp:"increment-clamp"}},re[st.RENDERING_MASK_REMOVE]={stencilFront:{compare:"equal",passOp:"decrement-clamp"},stencilBack:{compare:"equal",passOp:"decrement-clamp"}},re[st.MASK_ACTIVE]={stencilWriteMask:0,stencilFront:{compare:"equal",passOp:"keep"},stencilBack:{compare:"equal",passOp:"keep"}};class ka{constructor(t){this._stencilCache={enabled:!1,stencilReference:0,stencilMode:st.NONE},this._renderTargetStencilState=Object.create(null),t.renderTarget.onRenderTargetChange.add(this)}contextChange(t){this._gl=t,this._comparisonFuncMapping={always:t.ALWAYS,never:t.NEVER,equal:t.EQUAL,"not-equal":t.NOTEQUAL,less:t.LESS,"less-equal":t.LEQUAL,greater:t.GREATER,"greater-equal":t.GEQUAL},this._stencilOpsMapping={keep:t.KEEP,zero:t.ZERO,replace:t.REPLACE,invert:t.INVERT,"increment-clamp":t.INCR,"decrement-clamp":t.DECR,"increment-wrap":t.INCR_WRAP,"decrement-wrap":t.DECR_WRAP},this._stencilCache.enabled=!1,this._stencilCache.stencilMode=st.NONE,this._stencilCache.stencilReference=0}onRenderTargetChange(t){if(this._activeRenderTarget===t)return;this._activeRenderTarget=t;let e=this._renderTargetStencilState[t.uid];e||(e=this._renderTargetStencilState[t.uid]={stencilMode:st.DISABLED,stencilReference:0}),this.setStencilMode(e.stencilMode,e.stencilReference)}setStencilMode(t,e){const s=this._renderTargetStencilState[this._activeRenderTarget.uid],i=this._gl,n=re[t],o=this._stencilCache;if(s.stencilMode=t,s.stencilReference=e,t===st.DISABLED){this._stencilCache.enabled&&(this._stencilCache.enabled=!1,i.disable(i.STENCIL_TEST));return}this._stencilCache.enabled||(this._stencilCache.enabled=!0,i.enable(i.STENCIL_TEST)),(t!==o.stencilMode||o.stencilReference!==e)&&(o.stencilMode=t,o.stencilReference=e,i.stencilFunc(this._comparisonFuncMapping[n.stencilBack.compare],e,255),i.stencilOp(i.KEEP,i.KEEP,this._stencilOpsMapping[n.stencilBack.passOp]))}}ka.extension={type:[v.WebGLSystem],name:"stencil"};class La{constructor(t){this._syncFunctionHash=Object.create(null),this._adaptor=t,this._systemCheck()}_systemCheck(){if(!Yo())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}ensureUniformGroup(t){const e=this.getUniformGroupData(t);t.buffer||(t.buffer=new _t({data:new Float32Array(e.layout.size/4),usage:$.UNIFORM|$.COPY_DST}))}getUniformGroupData(t){return this._syncFunctionHash[t._signature]||this._initUniformGroup(t)}_initUniformGroup(t){const e=t._signature;let s=this._syncFunctionHash[e];if(!s){const i=Object.keys(t.uniformStructures).map(a=>t.uniformStructures[a]),n=this._adaptor.createUboElements(i),o=this._generateUboSync(n.uboElements);s=this._syncFunctionHash[e]={layout:n,syncFunction:o}}return this._syncFunctionHash[e]}_generateUboSync(t){return this._adaptor.generateUboSync(t)}syncUniformGroup(t,e,s){const i=this.getUniformGroupData(t);return t.buffer||(t.buffer=new _t({data:new Float32Array(i.layout.size/4),usage:$.UNIFORM|$.COPY_DST})),e||(e=t.buffer.data),s||(s=0),i.syncFunction(t.uniforms,e,s),!0}updateUniformGroup(t){if(t.isStatic&&!t._dirtyId)return!1;t._dirtyId=0;const e=this.syncUniformGroup(t);return t.buffer.update(),e}destroy(){this._syncFunctionHash=null}}const $a={f32:4,"vec2":8,"vec3":12,"vec4":16,"mat2x2":32,"mat3x3":48,"mat4x4":64};function dg(r){const t=r.map(n=>({data:n,offset:0,size:0}));let e=0,s=0,i=0;for(let n=0;n1&&(e=Math.max(e,16)*o.data.size),o.size=e,s%e!==0&&s<16){const a=s%e%16;s+=a,i+=a}s+e>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=e,s=e):(o.offset=i,s+=e,i+=e)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}const se=[{type:"mat3x3",test:r=>r.value.a!==void 0,ubo:` + var matrix = uv[name].toArray(true); + data[offset] = matrix[0]; + data[offset + 1] = matrix[1]; + data[offset + 2] = matrix[2]; + data[offset + 4] = matrix[3]; + data[offset + 5] = matrix[4]; + data[offset + 6] = matrix[5]; + data[offset + 8] = matrix[6]; + data[offset + 9] = matrix[7]; + data[offset + 10] = matrix[8]; + `,uniform:` + gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true)); + `},{type:"vec4",test:r=>r.type==="vec4"&&r.size===1&&r.value.width!==void 0,ubo:` + v = uv[name]; + data[offset] = v.x; + data[offset + 1] = v.y; + data[offset + 2] = v.width; + data[offset + 3] = v.height; + `,uniform:` + cv = ud[name].value; + v = uv[name]; + if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) { + cv[0] = v.x; + cv[1] = v.y; + cv[2] = v.width; + cv[3] = v.height; + gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height); + } + `},{type:"vec2",test:r=>r.type==="vec2"&&r.size===1&&r.value.x!==void 0,ubo:` + v = uv[name]; + data[offset] = v.x; + data[offset + 1] = v.y; + `,uniform:` + cv = ud[name].value; + v = uv[name]; + if (cv[0] !== v.x || cv[1] !== v.y) { + cv[0] = v.x; + cv[1] = v.y; + gl.uniform2f(ud[name].location, v.x, v.y); + } + `},{type:"vec4",test:r=>r.type==="vec4"&&r.size===1&&r.value.red!==void 0,ubo:` + v = uv[name]; + data[offset] = v.red; + data[offset + 1] = v.green; + data[offset + 2] = v.blue; + data[offset + 3] = v.alpha; + `,uniform:` + cv = ud[name].value; + v = uv[name]; + if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) { + cv[0] = v.red; + cv[1] = v.green; + cv[2] = v.blue; + cv[3] = v.alpha; + gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha); + } + `},{type:"vec3",test:r=>r.type==="vec3"&&r.size===1&&r.value.red!==void 0,ubo:` + v = uv[name]; + data[offset] = v.red; + data[offset + 1] = v.green; + data[offset + 2] = v.blue; + `,uniform:` + cv = ud[name].value; + v = uv[name]; + if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) { + cv[0] = v.red; + cv[1] = v.green; + cv[2] = v.blue; + gl.uniform3f(ud[name].location, v.red, v.green, v.blue); + } + `}];function Na(r,t,e,s){const i=[` + var v = null; + var v2 = null; + var t = 0; + var index = 0; + var name = null; + var arrayOffset = null; + `];let n=0;for(let a=0;a1)c=u.offset/4,i.push(e(u,c-n));else{const d=s[u.data.type];c=u.offset/4,i.push(` + v = uv.${l}; + offset += ${c-n}; + ${d}; + `)}n=c}const o=i.join(` +`);return new Function("uv","data","offset",o)}var o2=Object.defineProperty,a2=Object.defineProperties,u2=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,l2=Object.prototype.hasOwnProperty,h2=Object.prototype.propertyIsEnumerable,fg=(r,t,e)=>t in r?o2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,c2=(r,t)=>{for(var e in t||(t={}))l2.call(t,e)&&fg(r,e,t[e]);if(pg)for(var e of pg(t))h2.call(t,e)&&fg(r,e,t[e]);return r},d2=(r,t)=>a2(r,u2(t));function Ve(r,t){return` + for (let i = 0; i < ${r*t}; i++) { + data[offset + (((i / ${r})|0) * 4) + (i % ${r})] = v[i]; + } + `}const Ha={f32:` + data[offset] = v;`,i32:` + data[offset] = v;`,"vec2":` + data[offset] = v[0]; + data[offset + 1] = v[1];`,"vec3":` + data[offset] = v[0]; + data[offset + 1] = v[1]; + data[offset + 2] = v[2];`,"vec4":` + data[offset] = v[0]; + data[offset + 1] = v[1]; + data[offset + 2] = v[2]; + data[offset + 3] = v[3];`,"mat2x2":` + data[offset] = v[0]; + data[offset + 1] = v[1]; + data[offset + 4] = v[2]; + data[offset + 5] = v[3];`,"mat3x3":` + data[offset] = v[0]; + data[offset + 1] = v[1]; + data[offset + 2] = v[2]; + data[offset + 4] = v[3]; + data[offset + 5] = v[4]; + data[offset + 6] = v[5]; + data[offset + 8] = v[6]; + data[offset + 9] = v[7]; + data[offset + 10] = v[8];`,"mat4x4":` + for (let i = 0; i < 16; i++) { + data[offset + i] = v[i]; + }`,"mat3x2":Ve(3,2),"mat4x2":Ve(4,2),"mat2x3":Ve(2,3),"mat4x3":Ve(4,3),"mat2x4":Ve(2,4),"mat3x4":Ve(3,4)},mg=d2(c2({},Ha),{"mat2x2":` + data[offset] = v[0]; + data[offset + 1] = v[1]; + data[offset + 2] = v[2]; + data[offset + 3] = v[3]; + `});function gg(r,t){const e=Math.max($a[r.data.type]/16,1),s=r.data.value.length/r.data.size,i=(4-s%4)%4;return` + v = uv.${r.data.name}; + offset += ${t}; + + arrayOffset = offset; + + t = 0; + + for(var i=0; i < ${r.data.size*e}; i++) + { + for(var j = 0; j < ${s}; j++) + { + data[arrayOffset++] = v[t++]; + } + ${i!==0?`arrayOffset += ${i};`:""} + } + `}function _g(r){return Na(r,"uboStd40",gg,Ha)}class Xa extends La{constructor(){super({createUboElements:dg,generateUboSync:_g})}}Xa.extension={type:[v.WebGLSystem],name:"ubo"};class xg{constructor(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new z}init(t,e){this._renderer=t,this._renderTargetSystem=e,t.runners.contextChange.add(this)}contextChange(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new z}copyToTexture(t,e,s,i,n){const o=this._renderTargetSystem,a=this._renderer,u=o.getGpuRenderTarget(t),l=a.gl;return this.finishRenderPass(t),l.bindFramebuffer(l.FRAMEBUFFER,u.resolveTargetFramebuffer),a.texture.bind(e,0),l.copyTexSubImage2D(l.TEXTURE_2D,0,n.x,n.y,s.x,s.y,i.width,i.height),e}startRenderPass(t,e=!0,s,i){const n=this._renderTargetSystem,o=t.colorTexture,a=n.getGpuRenderTarget(t);let u=i.y;t.isRoot&&(u=o.pixelHeight-i.height),t.colorTextures.forEach(c=>{this._renderer.texture.unbind(c)});const l=this._renderer.gl;l.bindFramebuffer(l.FRAMEBUFFER,a.framebuffer);const h=this._viewPortCache;(h.x!==i.x||h.y!==u||h.width!==i.width||h.height!==i.height)&&(h.x=i.x,h.y=u,h.width=i.width,h.height=i.height,l.viewport(i.x,u,i.width,i.height)),!a.depthStencilRenderBuffer&&(t.stencil||t.depth)&&this._initStencil(a),this.clear(t,e,s)}finishRenderPass(t){const e=this._renderTargetSystem.getGpuRenderTarget(t);if(!e.msaa)return;const s=this._renderer.gl;s.bindFramebuffer(s.FRAMEBUFFER,e.resolveTargetFramebuffer),s.bindFramebuffer(s.READ_FRAMEBUFFER,e.framebuffer),s.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,s.COLOR_BUFFER_BIT,s.NEAREST),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer)}initGpuRenderTarget(t){const e=this._renderer.gl,s=new cg;return Qt.test(t.colorTexture.resource)?(s.framebuffer=null,s):(this._initColor(t,s),e.bindFramebuffer(e.FRAMEBUFFER,null),s)}clear(t,e,s){if(!e)return;const i=this._renderTargetSystem;typeof e=="boolean"&&(e=e?pt.ALL:pt.NONE);const n=this._renderer.gl;if(e&pt.COLOR){s!=null||(s=i.defaultClearColor);const o=this._clearColorCache,a=s;(o[0]!==a[0]||o[1]!==a[1]||o[2]!==a[2]||o[3]!==a[3])&&(o[0]=a[0],o[1]=a[1],o[2]=a[2],o[3]=a[3],n.clearColor(a[0],a[1],a[2],a[3]))}n.clear(e)}resizeGpuRenderTarget(t){if(t.isRoot)return;const e=this._renderTargetSystem.getGpuRenderTarget(t);this._resizeColor(t,e),t.stencil&&this._resizeStencil(e)}_initColor(t,e){const s=this._renderer,i=s.gl,n=i.createFramebuffer();if(e.resolveTargetFramebuffer=n,i.bindFramebuffer(i.FRAMEBUFFER,n),e.width=t.colorTexture.source.pixelWidth,e.height=t.colorTexture.source.pixelHeight,t.colorTextures.forEach((o,a)=>{const u=o.source;u.antialias&&(s.context.supports.msaa?e.msaa=!0:xi("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),s.texture.bindSource(u,0);const l=s.texture.getGlSource(u).texture;i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+a,3553,l,0)}),e.msaa){const o=i.createFramebuffer();e.framebuffer=o,i.bindFramebuffer(i.FRAMEBUFFER,o),t.colorTextures.forEach((a,u)=>{const l=i.createRenderbuffer();e.msaaRenderBuffer[u]=l})}else e.framebuffer=n;this._resizeColor(t,e)}_resizeColor(t,e){const s=t.colorTexture.source;if(e.width=s.pixelWidth,e.height=s.pixelHeight,t.colorTextures.forEach((i,n)=>{n!==0&&i.source.resize(s.width,s.height,s._resolution)}),e.msaa){const i=this._renderer,n=i.gl,o=e.framebuffer;n.bindFramebuffer(n.FRAMEBUFFER,o),t.colorTextures.forEach((a,u)=>{const l=a.source;i.texture.bindSource(l,0);const h=i.texture.getGlSource(l).internalFormat,c=e.msaaRenderBuffer[u];n.bindRenderbuffer(n.RENDERBUFFER,c),n.renderbufferStorageMultisample(n.RENDERBUFFER,4,h,l.pixelWidth,l.pixelHeight),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+u,n.RENDERBUFFER,c)})}}_initStencil(t){if(t.framebuffer===null)return;const e=this._renderer.gl,s=e.createRenderbuffer();t.depthStencilRenderBuffer=s,e.bindRenderbuffer(e.RENDERBUFFER,s),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,s),this._resizeStencil(t)}_resizeStencil(t){const e=this._renderer.gl;e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilRenderBuffer),t.msaa?e.renderbufferStorageMultisample(e.RENDERBUFFER,4,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,this._renderer.context.webGLVersion===2?e.DEPTH24_STENCIL8:e.DEPTH_STENCIL,t.width,t.height)}}function bg(r,t,e,s,i,n){const o=n?1:-1;return r.identity(),r.a=1/s*2,r.d=o*(1/i*2),r.tx=-1-t*r.a,r.ty=-o-e*r.d,r}var p2=Object.defineProperty,vg=Object.getOwnPropertySymbols,f2=Object.prototype.hasOwnProperty,m2=Object.prototype.propertyIsEnumerable,yg=(r,t,e)=>t in r?p2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,g2=(r,t)=>{for(var e in t||(t={}))f2.call(t,e)&&yg(r,e,t[e]);if(vg)for(var e of vg(t))m2.call(t,e)&&yg(r,e,t[e]);return r};const We=new Map;function za(r,t){if(!We.has(r)){const e=new A({source:new Qt(g2({resource:r},t))}),s=()=>{We.get(r)===e&&We.delete(r)};e.once("destroy",s),e.source.once("destroy",s),We.set(r,e)}return We.get(r)}function _2(r){return We.has(r)}function Tg(r){const t=r.colorTexture.source.resource;return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement&&document.body.contains(t)}var x2=Object.defineProperty,Sg=Object.getOwnPropertySymbols,b2=Object.prototype.hasOwnProperty,v2=Object.prototype.propertyIsEnumerable,Eg=(r,t,e)=>t in r?x2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ag=(r,t)=>{for(var e in t||(t={}))b2.call(t,e)&&Eg(r,e,t[e]);if(Sg)for(var e of Sg(t))v2.call(t,e)&&Eg(r,e,t[e]);return r};const Pg=class Ux{constructor(t={}){if(this.uid=Z("renderTarget"),this.colorTextures=[],this.dirtyId=0,this.isRoot=!1,this._size=new Float32Array(2),t=Ag(Ag({},Ux.defaultOptions),t),this.stencil=t.stencil,this.depth=t.depth,this.isRoot=t.isRoot,typeof t.colorTextures=="number")for(let e=0;es.source)];const e=this.colorTexture.source;this.resize(e.width,e.height,e._resolution)}this.colorTexture.source.on("resize",this.onSourceResize,this),(t.depthStencilTexture||this.stencil)&&(t.depthStencilTexture instanceof A||t.depthStencilTexture instanceof et?this.depthStencilTexture=t.depthStencilTexture.source:this.ensureDepthStencilTexture())}get size(){const t=this._size;return t[0]=this.pixelWidth,t[1]=this.pixelHeight,t}get width(){return this.colorTexture.source.width}get height(){return this.colorTexture.source.height}get pixelWidth(){return this.colorTexture.source.pixelWidth}get pixelHeight(){return this.colorTexture.source.pixelHeight}get resolution(){return this.colorTexture.source._resolution}get colorTexture(){return this.colorTextures[0]}onSourceResize(t){this.resize(t.width,t.height,t._resolution,!0)}ensureDepthStencilTexture(){this.depthStencilTexture||(this.depthStencilTexture=new et({width:this.width,height:this.height,resolution:this.resolution,format:"depth24plus-stencil8",autoGenerateMipmaps:!1,antialias:!1,mipLevelCount:1}))}resize(t,e,s=this.resolution,i=!1){this.dirtyId++,this.colorTextures.forEach((n,o)=>{i&&o===0||n.source.resize(t,e,s)}),this.depthStencilTexture&&this.depthStencilTexture.source.resize(t,e,s)}destroy(){this.colorTexture.source.off("resize",this.onSourceResize,this),this.depthStencilTexture&&(this.depthStencilTexture.destroy(),delete this.depthStencilTexture)}};Pg.defaultOptions={width:0,height:0,resolution:1,colorTextures:1,stencil:!1,depth:!1,antialias:!1,isRoot:!1};let vi=Pg;class ja{constructor(t){this.rootViewPort=new z,this.viewport=new z,this.onRenderTargetChange=new Ko("onRenderTargetChange"),this.projectionMatrix=new G,this.defaultClearColor=[0,0,0,0],this._renderSurfaceToRenderTargetHash=new Map,this._gpuRenderTargetHash=Object.create(null),this._renderTargetStack=[],this._renderer=t}finishRenderPass(){this.adaptor.finishRenderPass(this.renderTarget)}renderStart({target:t,clear:e,clearColor:s,frame:i}){this._renderTargetStack.length=0,this.push(t,e,s,i),this.rootViewPort.copyFrom(this.viewport),this.rootRenderTarget=this.renderTarget,this.renderingToScreen=Tg(this.rootRenderTarget)}bind(t,e=!0,s,i){const n=this.getRenderTarget(t),o=this.renderTarget!==n;this.renderTarget=n,this.renderSurface=t;const a=this.getGpuRenderTarget(n);(n.pixelWidth!==a.width||n.pixelHeight!==a.height)&&(this.adaptor.resizeGpuRenderTarget(n),a.width=n.pixelWidth,a.height=n.pixelHeight);const u=n.colorTexture,l=this.viewport,h=u.pixelWidth,c=u.pixelHeight;if(!i&&t instanceof A&&(i=t.frame),i){const d=u._resolution;l.x=i.x*d+.5|0,l.y=i.y*d+.5|0,l.width=i.width*d+.5|0,l.height=i.height*d+.5|0}else l.x=0,l.y=0,l.width=h,l.height=c;return bg(this.projectionMatrix,0,0,l.width/u.resolution,l.height/u.resolution,!n.isRoot),this.adaptor.startRenderPass(n,e,s,l),o&&this.onRenderTargetChange.emit(n),n}clear(t,e=pt.ALL,s){e&&(t&&(t=this.getRenderTarget(t)),this.adaptor.clear(t||this.renderTarget,e,s,this.viewport))}contextChange(){this._gpuRenderTargetHash=Object.create(null)}push(t,e=pt.ALL,s,i){const n=this.bind(t,e,s,i);return this._renderTargetStack.push({renderTarget:n,frame:i}),n}pop(){this._renderTargetStack.pop();const t=this._renderTargetStack[this._renderTargetStack.length-1];this.bind(t.renderTarget,!1,null,t.frame)}getRenderTarget(t){var e;return t.isTexture&&(t=t.source),(e=this._renderSurfaceToRenderTargetHash.get(t))!=null?e:this._initRenderTarget(t)}copyToTexture(t,e,s,i,n){s.x<0&&(i.width+=s.x,n.x-=s.x,s.x=0),s.y<0&&(i.height+=s.y,n.y-=s.y,s.y=0);const{pixelWidth:o,pixelHeight:a}=t;return i.width=Math.min(i.width,o-s.x),i.height=Math.min(i.height,a-s.y),this.adaptor.copyToTexture(t,e,s,i,n)}ensureDepthStencil(){this.renderTarget.stencil||(this.renderTarget.stencil=!0,this.adaptor.startRenderPass(this.renderTarget,!1,null,this.viewport))}destroy(){this._renderer=null,this._renderSurfaceToRenderTargetHash.forEach((t,e)=>{t!==e&&t.destroy()}),this._renderSurfaceToRenderTargetHash.clear(),this._gpuRenderTargetHash=Object.create(null)}_initRenderTarget(t){let e=null;return Qt.test(t)&&(t=za(t)),t instanceof vi?e=t:t instanceof et&&(e=new vi({colorTextures:[t]}),Qt.test(t.source.resource)&&(e.isRoot=!0),t.on("destroy",()=>{e.destroy()})),this._renderSurfaceToRenderTargetHash.set(t,e),e}getGpuRenderTarget(t){return this._gpuRenderTargetHash[t.uid]||(this._gpuRenderTargetHash[t.uid]=this.adaptor.initGpuRenderTarget(t))}}class Va extends ja{constructor(t){super(t),this.adaptor=new xg,this.adaptor.init(t,this)}}Va.extension={type:[v.WebGLSystem],name:"renderTarget"};class yi extends ct{constructor({buffer:t,offset:e,size:s}){super(),this.uid=Z("buffer"),this._resourceType="bufferResource",this._touched=0,this._resourceId=Z("resource"),this._bufferResource=!0,this.buffer=t,this.offset=e|0,this.size=s,this.buffer.on("change",this.onBufferChange,this)}onBufferChange(){this._resourceId=Z("resource"),this.emit("change",this)}destroy(t=!1){t&&this.buffer.destroy(),this.buffer=null}}function wg(r,t){const e=[],s=[` + var g = s.groups; + var sS = r.shader; + var p = s.glProgram; + var ugS = r.uniformGroup; + var resources; + `];let i=!1,n=0,o=0;const a=t._getProgramData(r.glProgram);for(const l in r.groups){const h=r.groups[l];e.push(` + resources = g[${l}].resources; + `);for(const c in h.resources){const d=h.resources[c];if(d instanceof it)d.ubo?e.push(` + sS.bindUniformBlock( + resources[${c}], + sS._uniformBindMap[${l}[${c}], + ${n++} + ); + `):e.push(` + ugS.updateUniformGroup(resources[${c}], p, sD); + `);else if(d instanceof yi)e.push(` + sS.bindUniformBlock( + resources[${c}], + sS._uniformBindMap[${l}[${c}], + ${n++} + ); + `);else if(d instanceof et){const p=r._uniformBindMap[l][c],f=a.uniformData[p];f&&(i||(i=!0,s.push(` + var tS = r.texture; + `)),t._gl.uniform1i(f.location,o),e.push(` + tS.bind(resources[${c}], ${o}); + `),o++)}}}const u=[...s,...e].join(` +`);return new Function("r","s","sD",u)}class y2{}class Rg{constructor(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBlockBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBlockBindings=null,this.program=null}}function Wa(r,t,e){const s=r.createShader(t);return r.shaderSource(s,e),r.compileShader(s),s}function Ya(r){const t=new Array(r);for(let e=0;eo>a?1:-1);for(let o=0;o`${h}: ${l}`),s=r.getShaderInfoLog(t),i=s.split(` +`),n={},o=i.map(l=>parseFloat(l.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(l=>l&&!n[l]?(n[l]=!0,!0):!1),a=[""];o.forEach(l=>{e[l-1]=`%c${e[l-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const u=e.join(` +`);a[0]=u,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function Fg(r,t,e,s){r.getProgramParameter(t,r.LINK_STATUS)||(r.getShaderParameter(e,r.COMPILE_STATUS)||Bg(r,e),r.getShaderParameter(s,r.COMPILE_STATUS)||Bg(r,s),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(t)))}function Dg(r,t){const e=Wa(r,r.VERTEX_SHADER,t.vertex),s=Wa(r,r.FRAGMENT_SHADER,t.fragment),i=r.createProgram();r.attachShader(i,e),r.attachShader(i,s);const n=t.transformFeedbackVaryings;n&&(typeof r.transformFeedbackVaryings!="function"||r.transformFeedbackVaryings(i,n.names,n.bufferMode==="separate"?r.SEPARATE_ATTRIBS:r.INTERLEAVED_ATTRIBS)),r.linkProgram(i),r.getProgramParameter(i,r.LINK_STATUS)||Fg(r,i,e,s),t._attributeData=Cg(i,r,!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertex)),t._uniformData=Ig(i,r),t._uniformBlockData=Gg(i,r),r.deleteShader(e),r.deleteShader(s);const o={};for(const a in t._uniformData){const u=t._uniformData[a];o[a]={location:r.getUniformLocation(i,a),value:Ka(u.type,u.size)}}return new Rg(i,o)}const Si={textureCount:0,blockIndex:0};class Za{constructor(t){this._activeProgram=null,this._programDataHash=Object.create(null),this._nextIndex=0,this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._renderer=t}contextChange(t){this._gl=t,this._maxBindings=t.MAX_UNIFORM_BUFFER_BINDINGS?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0,this._programDataHash=Object.create(null),this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._activeProgram=null}bind(t,e){if(this._setProgram(t.glProgram),e)return;Si.textureCount=0,Si.blockIndex=0;let s=this._shaderSyncFunctions[t.glProgram._key];s||(s=this._shaderSyncFunctions[t.glProgram._key]=this._generateShaderSync(t,this)),s(this._renderer,t,Si)}updateUniformGroup(t){this._renderer.uniformGroup.updateUniformGroup(t,this._activeProgram,Si)}bindUniformBlock(t,e,s=0){const i=this._renderer.buffer,n=this._getProgramData(this._activeProgram),o=t._bufferResource;o&&this._renderer.ubo.updateUniformGroup(t),i.updateBuffer(t.buffer);let a=this._boundUniformsIdsToIndexHash[t.uid];if(a===void 0){const h=this._nextIndex++%this._maxBindings,c=this._boundIndexToUniformsHash[h];c&&(this._boundUniformsIdsToIndexHash[c.uid]=void 0),a=this._boundUniformsIdsToIndexHash[t.uid]=h,this._boundIndexToUniformsHash[h]=t,o?i.bindBufferRange(t.buffer,h,t.offset):i.bindBufferBase(t.buffer,h)}const u=this._gl,l=this._activeProgram._uniformBlockData[e].index;n.uniformBlockBindings[s]!==a&&(n.uniformBlockBindings[s]=a,u.uniformBlockBinding(n.program,l,a))}_setProgram(t){if(this._activeProgram===t)return;this._activeProgram=t;const e=this._getProgramData(t);this._gl.useProgram(e.program)}_getProgramData(t){return this._programDataHash[t._key]||this._createProgramData(t)}_createProgramData(t){const e=t._key;return this._programDataHash[e]=Dg(this._gl,t),this._programDataHash[e]}destroy(){for(const t of Object.keys(this._programDataHash))this._programDataHash[t].destroy(),this._programDataHash[t]=null;this._programDataHash=null,this._boundUniformsIdsToIndexHash=null}_generateShaderSync(t,e){return wg(t,e)}}Za.extension={type:[v.WebGLSystem],name:"shader"};const Ug={f32:`if (cv !== v) { + cu.value = v; + gl.uniform1f(location, v); + }`,"vec2":`if (cv[0] !== v[0] || cv[1] !== v[1]) { + cv[0] = v[0]; + cv[1] = v[1]; + gl.uniform2f(location, v[0], v[1]); + }`,"vec3":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + gl.uniform3f(location, v[0], v[1], v[2]); + }`,"vec4":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + gl.uniform4f(location, v[0], v[1], v[2], v[3]); + }`,i32:`if (cv !== v) { + cu.value = v; + gl.uniform1i(location, v); + }`,"vec2":`if (cv[0] !== v[0] || cv[1] !== v[1]) { + cv[0] = v[0]; + cv[1] = v[1]; + gl.uniform2i(location, v[0], v[1]); + }`,"vec3":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + gl.uniform3i(location, v[0], v[1], v[2]); + }`,"vec4":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + gl.uniform4i(location, v[0], v[1], v[2], v[3]); + }`,u32:`if (cv !== v) { + cu.value = v; + gl.uniform1ui(location, v); + }`,"vec2":`if (cv[0] !== v[0] || cv[1] !== v[1]) { + cv[0] = v[0]; + cv[1] = v[1]; + gl.uniform2ui(location, v[0], v[1]); + }`,"vec3":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + gl.uniform3ui(location, v[0], v[1], v[2]); + }`,"vec4":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + gl.uniform4ui(location, v[0], v[1], v[2], v[3]); + }`,bool:`if (cv !== v) { + cu.value = v; + gl.uniform1i(location, v); + }`,"vec2":`if (cv[0] !== v[0] || cv[1] !== v[1]) { + cv[0] = v[0]; + cv[1] = v[1]; + gl.uniform2i(location, v[0], v[1]); + }`,"vec3":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + gl.uniform3i(location, v[0], v[1], v[2]); + }`,"vec4":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) { + cv[0] = v[0]; + cv[1] = v[1]; + cv[2] = v[2]; + cv[3] = v[3]; + gl.uniform4i(location, v[0], v[1], v[2], v[3]); + }`,"mat2x2":"gl.uniformMatrix2fv(location, false, v);","mat3x3":"gl.uniformMatrix3fv(location, false, v);","mat4x4":"gl.uniformMatrix4fv(location, false, v);"},kg={f32:"gl.uniform1fv(location, v);","vec2":"gl.uniform2fv(location, v);","vec3":"gl.uniform3fv(location, v);","vec4":"gl.uniform4fv(location, v);","mat2x2":"gl.uniformMatrix2fv(location, false, v);","mat3x3":"gl.uniformMatrix3fv(location, false, v);","mat4x4":"gl.uniformMatrix4fv(location, false, v);",i32:"gl.uniform1iv(location, v);","vec2":"gl.uniform2iv(location, v);","vec3":"gl.uniform3iv(location, v);","vec4":"gl.uniform4iv(location, v);",u32:"gl.uniform1iv(location, v);","vec2":"gl.uniform2iv(location, v);","vec3":"gl.uniform3iv(location, v);","vec4":"gl.uniform4iv(location, v);",bool:"gl.uniform1iv(location, v);","vec2":"gl.uniform2iv(location, v);","vec3":"gl.uniform3iv(location, v);","vec4":"gl.uniform4iv(location, v);"};function Lg(r,t){const e=[` + var v = null; + var cv = null; + var cu = null; + var t = 0; + var gl = renderer.gl; + var name = null; + `];for(const s in r.uniforms){if(!t[s]){r.uniforms[s]instanceof it?r.uniforms[s].ubo?e.push(` + renderer.shader.bindUniformBlock(uv.${s}, "${s}"); + `):e.push(` + renderer.shader.updateUniformGroup(uv.${s}); + `):r.uniforms[s]instanceof yi&&e.push(` + renderer.shader.bindBufferResource(uv.${s}, "${s}"); + `);continue}const i=r.uniformStructures[s];let n=!1;for(let o=0;o>1,s++;this.stateId=t.data}for(let e=0;e>1,1),i=Math.max(i>>1,1)}}},Ja={id:"image",upload(r,t,e,s){const i=r.alphaMode==="premultiply-alpha-on-upload";e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i);const n=t.width,o=t.height,a=r.pixelWidth,u=r.pixelHeight,l=r.resourceWidth,h=r.resourceHeight;l1){const l=Math.min(r.maxAnisotropy,t.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));t[i](u,s.TEXTURE_MAX_ANISOTROPY_EXT,l)}r.compare&&t[i](u,t.TEXTURE_COMPARE_FUNC,Yg[r.compare])}function Kg(r){return{r8unorm:r.RED,r8snorm:r.RED,r8uint:r.RED,r8sint:r.RED,r16uint:r.RED,r16sint:r.RED,r16float:r.RED,rg8unorm:r.RG,rg8snorm:r.RG,rg8uint:r.RG,rg8sint:r.RG,r32uint:r.RED,r32sint:r.RED,r32float:r.RED,rg16uint:r.RG,rg16sint:r.RG,rg16float:r.RG,rgba8unorm:r.RGBA,"rgba8unorm-srgb":r.RGBA,rgba8snorm:r.RGBA,rgba8uint:r.RGBA,rgba8sint:r.RGBA,bgra8unorm:r.RGBA,"bgra8unorm-srgb":r.RGBA,rgb9e5ufloat:r.RGB,rgb10a2unorm:r.RGBA,rg11b10ufloat:r.RGB,rg32uint:r.RG,rg32sint:r.RG,rg32float:r.RG,rgba16uint:r.RGBA,rgba16sint:r.RGBA,rgba16float:r.RGBA,rgba32uint:r.RGBA,rgba32sint:r.RGBA,rgba32float:r.RGBA,stencil8:r.STENCIL_INDEX8,depth16unorm:r.DEPTH_COMPONENT,depth24plus:r.DEPTH_COMPONENT,"depth24plus-stencil8":r.DEPTH_STENCIL,depth32float:r.DEPTH_COMPONENT,"depth32float-stencil8":r.DEPTH_STENCIL}}var I2=Object.defineProperty,B2=Object.defineProperties,F2=Object.getOwnPropertyDescriptors,qg=Object.getOwnPropertySymbols,D2=Object.prototype.hasOwnProperty,U2=Object.prototype.propertyIsEnumerable,Zg=(r,t,e)=>t in r?I2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ee=(r,t)=>{for(var e in t||(t={}))D2.call(t,e)&&Zg(r,e,t[e]);if(qg)for(var e of qg(t))U2.call(t,e)&&Zg(r,e,t[e]);return r},k2=(r,t)=>B2(r,F2(t));function Qg(r,t){let e={},s=r.RGBA;return r instanceof X.get().getWebGL2RenderingContext()?(e={"rgba8unorm-srgb":r.SRGB8_ALPHA8,"bgra8unorm-srgb":r.SRGB8_ALPHA8},s=r.RGBA8):t.srgb&&(e={"rgba8unorm-srgb":t.srgb.SRGB8_ALPHA8_EXT,"bgra8unorm-srgb":t.srgb.SRGB8_ALPHA8_EXT}),Ee(Ee(Ee(Ee(Ee(Ee(k2(Ee({r8unorm:r.R8,r8snorm:r.R8_SNORM,r8uint:r.R8UI,r8sint:r.R8I,r16uint:r.R16UI,r16sint:r.R16I,r16float:r.R16F,rg8unorm:r.RG8,rg8snorm:r.RG8_SNORM,rg8uint:r.RG8UI,rg8sint:r.RG8I,r32uint:r.R32UI,r32sint:r.R32I,r32float:r.R32F,rg16uint:r.RG16UI,rg16sint:r.RG16I,rg16float:r.RG16F,rgba8unorm:r.RGBA},e),{rgba8snorm:r.RGBA8_SNORM,rgba8uint:r.RGBA8UI,rgba8sint:r.RGBA8I,bgra8unorm:s,rgb9e5ufloat:r.RGB9_E5,rgb10a2unorm:r.RGB10_A2,rg11b10ufloat:r.R11F_G11F_B10F,rg32uint:r.RG32UI,rg32sint:r.RG32I,rg32float:r.RG32F,rgba16uint:r.RGBA16UI,rgba16sint:r.RGBA16I,rgba16float:r.RGBA16F,rgba32uint:r.RGBA32UI,rgba32sint:r.RGBA32I,rgba32float:r.RGBA32F,stencil8:r.STENCIL_INDEX8,depth16unorm:r.DEPTH_COMPONENT16,depth24plus:r.DEPTH_COMPONENT24,"depth24plus-stencil8":r.DEPTH24_STENCIL8,depth32float:r.DEPTH_COMPONENT32F,"depth32float-stencil8":r.DEPTH32F_STENCIL8}),t.s3tc?{"bc1-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,"bc2-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,"bc3-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{}),t.s3tc_sRGB?{"bc1-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,"bc2-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,"bc3-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}:{}),t.rgtc?{"bc4-r-unorm":t.rgtc.COMPRESSED_RED_RGTC1_EXT,"bc4-r-snorm":t.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,"bc5-rg-unorm":t.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,"bc5-rg-snorm":t.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}:{}),t.bptc?{"bc6h-rgb-float":t.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,"bc6h-rgb-ufloat":t.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,"bc7-rgba-unorm":t.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,"bc7-rgba-unorm-srgb":t.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT}:{}),t.etc?{"etc2-rgb8unorm":t.etc.COMPRESSED_RGB8_ETC2,"etc2-rgb8unorm-srgb":t.etc.COMPRESSED_SRGB8_ETC2,"etc2-rgb8a1unorm":t.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgb8a1unorm-srgb":t.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgba8unorm":t.etc.COMPRESSED_RGBA8_ETC2_EAC,"etc2-rgba8unorm-srgb":t.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,"eac-r11unorm":t.etc.COMPRESSED_R11_EAC,"eac-rg11unorm":t.etc.COMPRESSED_SIGNED_RG11_EAC}:{}),t.astc?{"astc-4x4-unorm":t.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,"astc-4x4-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,"astc-5x4-unorm":t.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,"astc-5x4-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,"astc-5x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,"astc-5x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,"astc-6x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,"astc-6x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,"astc-6x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,"astc-6x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,"astc-8x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,"astc-8x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,"astc-8x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,"astc-8x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,"astc-8x8-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,"astc-8x8-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,"astc-10x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,"astc-10x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,"astc-10x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,"astc-10x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,"astc-10x8-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,"astc-10x8-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,"astc-10x10-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,"astc-10x10-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,"astc-12x10-unorm":t.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,"astc-12x10-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,"astc-12x12-unorm":t.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,"astc-12x12-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR}:{})}function Jg(r){return{r8unorm:r.UNSIGNED_BYTE,r8snorm:r.BYTE,r8uint:r.UNSIGNED_BYTE,r8sint:r.BYTE,r16uint:r.UNSIGNED_SHORT,r16sint:r.SHORT,r16float:r.HALF_FLOAT,rg8unorm:r.UNSIGNED_BYTE,rg8snorm:r.BYTE,rg8uint:r.UNSIGNED_BYTE,rg8sint:r.BYTE,r32uint:r.UNSIGNED_INT,r32sint:r.INT,r32float:r.FLOAT,rg16uint:r.UNSIGNED_SHORT,rg16sint:r.SHORT,rg16float:r.HALF_FLOAT,rgba8unorm:r.UNSIGNED_BYTE,"rgba8unorm-srgb":r.UNSIGNED_BYTE,rgba8snorm:r.BYTE,rgba8uint:r.UNSIGNED_BYTE,rgba8sint:r.BYTE,bgra8unorm:r.UNSIGNED_BYTE,"bgra8unorm-srgb":r.UNSIGNED_BYTE,rgb9e5ufloat:r.UNSIGNED_INT_5_9_9_9_REV,rgb10a2unorm:r.UNSIGNED_INT_2_10_10_10_REV,rg11b10ufloat:r.UNSIGNED_INT_10F_11F_11F_REV,rg32uint:r.UNSIGNED_INT,rg32sint:r.INT,rg32float:r.FLOAT,rgba16uint:r.UNSIGNED_SHORT,rgba16sint:r.SHORT,rgba16float:r.HALF_FLOAT,rgba32uint:r.UNSIGNED_INT,rgba32sint:r.INT,rgba32float:r.FLOAT,stencil8:r.UNSIGNED_BYTE,depth16unorm:r.UNSIGNED_SHORT,depth24plus:r.UNSIGNED_INT,"depth24plus-stencil8":r.UNSIGNED_INT_24_8,depth32float:r.FLOAT,"depth32float-stencil8":r.FLOAT_32_UNSIGNED_INT_24_8_REV}}function L2(r){r instanceof Uint8ClampedArray&&(r=new Uint8Array(r.buffer));const t=r.length;for(let e=0;e1,this._renderer.context.extensions.anisotropicFiltering,"texParameteri",s.TEXTURE_2D,!this._renderer.context.supports.nonPowOf2wrapping&&!t.isPowerOfTwo,e)}onSourceUnload(t){const e=this._glTextures[t.uid];e&&(this.unbind(t),this._glTextures[t.uid]=null,this._gl.deleteTexture(e.texture))}onSourceUpdate(t){const e=this._gl,s=this.getGlSource(t);e.bindTexture(e.TEXTURE_2D,s.texture),this._boundTextures[this._activeTextureLocation]=t,this._uploads[t.uploadMethodId]?this._uploads[t.uploadMethodId].upload(t,s,e,this._renderer.context.webGLVersion):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.pixelWidth,t.pixelHeight,0,e.RGBA,e.UNSIGNED_BYTE,null),t.autoGenerateMipmaps&&t.mipLevelCount>1&&this.onUpdateMipmaps(t,!1)}onUpdateMipmaps(t,e=!0){e&&this.bindSource(t,0);const s=this.getGlSource(t);this._gl.generateMipmap(s.target)}onSourceDestroy(t){t.off("destroy",this.onSourceDestroy,this),t.off("update",this.onSourceUpdate,this),t.off("resize",this.onSourceUpdate,this),t.off("unload",this.onSourceUnload,this),t.off("styleChange",this.onStyleChange,this),t.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(t),1),this.onSourceUnload(t)}_initSampler(t){const e=this._gl,s=this._gl.createSampler();return this._glSamplers[t._resourceId]=s,eu(t,e,this._boundTextures[this._activeTextureLocation].mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"samplerParameteri",s,!1,!0),this._glSamplers[t._resourceId]}_getGlSampler(t){return this._glSamplers[t._resourceId]||this._initSampler(t)}getGlSource(t){return this._glTextures[t.uid]||this._initSource(t)}generateCanvas(t){const{pixels:e,width:s,height:i}=this.getPixels(t),n=X.get().createCanvas();n.width=s,n.height=i;const o=n.getContext("2d");if(o){const a=o.createImageData(s,i);a.data.set(e),o.putImageData(a,0,0)}return n}getPixels(t){const e=t.source.resolution,s=t.frame,i=Math.max(Math.round(s.width*e),1),n=Math.max(Math.round(s.height*e),1),o=new Uint8Array($2*i*n),a=this._renderer,u=a.renderTarget.getRenderTarget(t),l=a.renderTarget.getGpuRenderTarget(u),h=a.gl;return h.bindFramebuffer(h.FRAMEBUFFER,l.resolveTargetFramebuffer),h.readPixels(Math.round(s.x*e),Math.round(s.y*e),i,n,h.RGBA,h.UNSIGNED_BYTE,o),{pixels:new Uint8ClampedArray(o.buffer),width:i,height:n}}destroy(){this.managedTextures.slice().forEach(t=>this.onSourceDestroy(t)),this.managedTextures=null,this._renderer=null}}ru.extension={type:[v.WebGLSystem],name:"texture"};class su{init(){const t=new it({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4"},uTransformMatrix:{value:new G,type:"mat3x3"},uRound:{value:0,type:"f32"}}),e=ke({name:"graphics",bits:[ks,$s(wt),zs,$e]});this.shader=new St({glProgram:e,resources:{localUniforms:t,batchSamplers:Ns}})}execute(t,e){const s=e.context,i=s.customShader||this.shader,n=t.renderer,o=n.graphicsContext,{geometry:a,instructions:u}=o.getContextRenderData(s);i.groups[0]=n.globalUniforms.bindGroup,n.shader.bind(i),n.geometry.bind(a,i.glProgram);const l=u.instructions;for(let h=0;h",value:new G}}}})}execute(t,e){const s=t.renderer;let i=e._shader;if(i){if(!i.glProgram)return}else{i=this._shader;const n=e.texture,o=n.source;i.resources.uTexture=o,i.resources.uSampler=o.style,i.resources.textureUniforms.uniforms.uTextureMatrix=n.textureMatrix.mapCoord}i.groups[100]=s.globalUniforms.bindGroup,i.groups[101]=t.localUniformsBindGroup,s.encoder.draw({geometry:e._geometry,shader:i,state:e.state})}destroy(){this._shader.destroy(!0),this._shader=null}}iu.extension={type:[v.WebGLPipesAdaptor],name:"mesh"};class nu{constructor(t){this._renderer=t}addRenderable(t,e){this._renderer.renderPipes.batch.break(e),e.add(t)}execute(t){t.isRenderable&&t.render(this._renderer)}destroy(){this._renderer=null}}nu.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"customRender"};function ou(r,t){const e=r.instructionSet,s=e.instructions;for(let i=0;i1?1:e,r.worldAlpha=e,r.worldColorAlpha=r.worldColor+((e*255|0)<<24)}function hu(r,t,e){if(t===r.updateTick)return;r.updateTick=t,r.didChange=!1;const s=r.localTransform;r.updateLocalTransform();const i=r.parent;if(i&&!i.isRenderGroupRoot?(e=e|r._updateFlags,r.relativeGroupTransform.appendFrom(s,i.relativeGroupTransform),e&&e_(r,i,e)):(e=r._updateFlags,r.relativeGroupTransform.copyFrom(s),e&&e_(r,N2,e)),!r.isRenderGroupRoot){const n=r.children,o=n.length;for(let u=0;u1?1:s,r.groupAlpha=s,r.groupColorAlpha=r.groupColor+((s*255|0)<<24)}e&Qi&&(r.groupBlendMode=r.localBlendMode==="inherit"?t.groupBlendMode:r.localBlendMode),e&ar&&(r.globalDisplayStatus=r.localDisplayStatus&t.globalDisplayStatus),r._updateFlags=0}function r_(r,t){const{list:e,index:s}=r.childrenRenderablesToUpdate;let i=!1;for(let n=0;n{this.destroyRenderable(t)}),e}destroy(){for(const t in this._gpuSpriteHash)H.return(this._gpuSpriteHash[t]);this._gpuSpriteHash=null,this._renderer=null}}du.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"sprite"};var z2=Object.defineProperty,s_=Object.getOwnPropertySymbols,j2=Object.prototype.hasOwnProperty,V2=Object.prototype.propertyIsEnumerable,i_=(r,t,e)=>t in r?z2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,n_=(r,t)=>{for(var e in t||(t={}))j2.call(t,e)&&i_(r,e,t[e]);if(s_)for(var e of s_(t))V2.call(t,e)&&i_(r,e,t[e]);return r};const pu=class kx{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new W(0),this.color=this._backgroundColor,this.alpha=1}init(t){t=n_(n_({},kx.defaultOptions),t),this.clearBeforeRender=t.clearBeforeRender,this.color=t.background||t.backgroundColor||this._backgroundColor,this.alpha=t.backgroundAlpha,this._backgroundColor.setAlpha(t.backgroundAlpha)}get color(){return this._backgroundColor}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get colorRgba(){return this._backgroundColor.toArray()}destroy(){}};pu.extension={type:[v.WebGLSystem,v.WebGPUSystem,v.CanvasSystem],name:"background",priority:0},pu.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};let o_=pu;const zr={};D.handle(v.BlendMode,r=>{if(!r.name)throw new Error("BlendMode extension must have a name property");zr[r.name]=r.ref},r=>{delete zr[r.name]});class fu{constructor(t){this._isAdvanced=!1,this._filterHash=Object.create(null),this._renderer=t}setBlendMode(t,e,s){if(this._activeBlendMode===e){this._isAdvanced&&this._renderableList.push(t);return}this._activeBlendMode=e,this._isAdvanced&&this._endAdvancedBlendMode(s),this._isAdvanced=!!zr[e],this._isAdvanced&&(this._beginAdvancedBlendMode(s),this._renderableList.push(t))}_beginAdvancedBlendMode(t){this._renderer.renderPipes.batch.break(t);const e=this._activeBlendMode;if(!zr[e])return;this._filterHash[e]||(this._filterHash[e]=new ts({filters:[new zr[e]]}));const s={renderPipeId:"filter",action:"pushFilter",renderables:[],filterEffect:this._filterHash[e],canBundle:!1};this._renderableList=s.renderables,t.add(s)}_endAdvancedBlendMode(t){this._renderableList=null,this._renderer.renderPipes.batch.break(t),t.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}buildStart(){this._isAdvanced=!1}buildEnd(t){this._isAdvanced&&this._endAdvancedBlendMode(t)}destroy(){this._renderer=null,this._renderableList=null;for(const t in this._filterHash)this._filterHash[t].destroy();this._filterHash=null}}fu.extension={type:[v.WebGLPipes,v.WebGPUPipes,v.CanvasPipes],name:"blendMode"};var W2=Object.defineProperty,a_=Object.getOwnPropertySymbols,Y2=Object.prototype.hasOwnProperty,K2=Object.prototype.propertyIsEnumerable,u_=(r,t,e)=>t in r?W2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,mu=(r,t)=>{for(var e in t||(t={}))Y2.call(t,e)&&u_(r,e,t[e]);if(a_)for(var e of a_(t))K2.call(t,e)&&u_(r,e,t[e]);return r};const gu={png:"image/png",jpg:"image/jpeg",webp:"image/webp"},_u=class Lx{constructor(t){this._renderer=t}_normalizeOptions(t,e={}){return t instanceof V||t instanceof A?mu({target:t},e):mu(mu({},e),t)}async image(t){const e=new Image;return e.src=await this.base64(t),e}async base64(t){t=this._normalizeOptions(t,Lx.defaultImageOptions);const{format:e,quality:s}=t,i=this.canvas(t);if(i.toBlob!==void 0)return new Promise((n,o)=>{i.toBlob(a=>{if(!a){o(new Error("ICanvas.toBlob failed!"));return}const u=new FileReader;u.onload=()=>n(u.result),u.onerror=o,u.readAsDataURL(a)},gu[e],s)});if(i.toDataURL!==void 0)return i.toDataURL(gu[e],s);if(i.convertToBlob!==void 0){const n=await i.convertToBlob({type:gu[e],quality:s});return new Promise((o,a)=>{const u=new FileReader;u.onload=()=>o(u.result),u.onerror=a,u.readAsDataURL(n)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(t){t=this._normalizeOptions(t);const e=t.target,s=this._renderer;if(e instanceof A)return s.texture.generateCanvas(e);const i=s.textureGenerator.generateTexture(t),n=s.texture.generateCanvas(i);return i.destroy(),n}pixels(t){t=this._normalizeOptions(t);const e=t.target,s=this._renderer,i=e instanceof A?e:s.textureGenerator.generateTexture(t),n=s.texture.getPixels(i);return e instanceof V&&i.destroy(),n}texture(t){return t=this._normalizeOptions(t),t.target instanceof A?t.target:this._renderer.textureGenerator.generateTexture(t)}download(t){var e;t=this._normalizeOptions(t);const s=this.canvas(t),i=document.createElement("a");i.download=(e=t.filename)!=null?e:"image.png",i.href=s.toDataURL("image/png"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}log(t){var e;const s=(e=t.width)!=null?e:200;t=this._normalizeOptions(t);const i=this.canvas(t),n=i.toDataURL();console.log(`[Pixi Texture] ${i.width}px ${i.height}px`);const o=["font-size: 1px;",`padding: ${s}px 300px;`,`background: url(${n}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",o)}destroy(){this._renderer=null}};_u.extension={type:[v.WebGLSystem,v.WebGPUSystem],name:"extract"},_u.defaultImageOptions={format:"png",quality:1};let l_=_u;class h_ extends A{static create(t){return new A({source:new et(t)})}resize(t,e,s){return this.source.resize(t,e,s),this}}var q2=Object.defineProperty,Z2=Object.defineProperties,Q2=Object.getOwnPropertyDescriptors,c_=Object.getOwnPropertySymbols,J2=Object.prototype.hasOwnProperty,tE=Object.prototype.propertyIsEnumerable,d_=(r,t,e)=>t in r?q2(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,eE=(r,t)=>{for(var e in t||(t={}))J2.call(t,e)&&d_(r,e,t[e]);if(c_)for(var e of c_(t))tE.call(t,e)&&d_(r,e,t[e]);return r},rE=(r,t)=>Z2(r,Q2(t));const sE=new z,iE=new lt,nE=[0,0,0,0];class xu{constructor(t){this._renderer=t}generateTexture(t){var e;t instanceof V&&(t={target:t,frame:void 0,textureSourceOptions:{},resolution:void 0});const s=t.resolution||this._renderer.resolution,i=t.antialias||this._renderer.view.antialias,n=t.target;let o=t.clearColor;o?o=Array.isArray(o)&&o.length===4?o:W.shared.setValue(o).toArray():o=nE;const a=((e=t.frame)==null?void 0:e.copyTo(sE))||is(n,iE).rectangle;a.width=Math.max(a.width,1/s)|0,a.height=Math.max(a.height,1/s)|0;const u=h_.create(rE(eE({},t.textureSourceOptions),{width:a.width,height:a.height,resolution:s,antialias:i})),l=G.shared.translate(-a.x,-a.y);return this._renderer.render({container:n,transform:l,target:u,clearColor:o}),u}destroy(){this._renderer=null}}xu.extension={type:[v.WebGLSystem,v.WebGPUSystem],name:"textureGenerator"};class bu{constructor(t){this._stackIndex=0,this._globalUniformDataStack=[],this._uniformsPool=[],this._activeUniforms=[],this._bindGroupPool=[],this._activeBindGroups=[],this._renderer=t}reset(){this._stackIndex=0;for(let t=0;t"},uWorldTransformMatrix:{value:new G,type:"mat3x3"},uWorldColorAlpha:{value:new Float32Array(4),type:"vec4"},uResolution:{value:[0,0],type:"vec2"}},{isStatic:!0})}destroy(){this._renderer=null}}bu.extension={type:[v.WebGLSystem,v.WebGPUSystem,v.CanvasSystem],name:"globalUniforms"};let p_=!1;const vu="8.0.5";function f_(r){if(!p_){if(X.get().getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){const t=[`%c %c %c %c %c PixiJS %c v${vu} (${r}) http://www.pixijs.com/ + +`,"background: #E72264; padding:5px 0;","background: #6CA2EA; padding:5px 0;","background: #B5D33D; padding:5px 0;","background: #FED23F; padding:5px 0;","color: #FFFFFF; background: #E72264; padding:5px 0;","color: #E72264; background: #FFFFFF; padding:5px 0;"];globalThis.console.log(...t)}else globalThis.console&&globalThis.console.log(`PixiJS ${vu} - ${r} - http://www.pixijs.com/`);p_=!0}}class Ai{constructor(t){this._renderer=t}init(t){if(t.hello){let e=this._renderer.name;this._renderer.type===xt.WEBGL&&(e+=` ${this._renderer.context.webGLVersion}`),f_(e)}}}Ai.extension={type:[v.WebGLSystem,v.WebGPUSystem,v.CanvasSystem],name:"hello",priority:-2},Ai.defaultOptions={hello:!1};var oE=Object.defineProperty,m_=Object.getOwnPropertySymbols,aE=Object.prototype.hasOwnProperty,uE=Object.prototype.propertyIsEnumerable,g_=(r,t,e)=>t in r?oE(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,__=(r,t)=>{for(var e in t||(t={}))aE.call(t,e)&&g_(r,e,t[e]);if(m_)for(var e of m_(t))uE.call(t,e)&&g_(r,e,t[e]);return r};const yu=class $x{constructor(t){this._renderer=t,this.count=0,this.checkCount=0}init(t){t=__(__({},$x.defaultOptions),t),this.checkCountMax=t.textureGCCheckCountMax,this.maxIdle=t.textureGCAMaxIdle,this.active=t.textureGCActive}postrender(){this._renderer.renderingToScreen&&(this.count++,this.active&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const t=this._renderer.texture.managedTextures;for(let e=0;e-1&&this.count-s._touched>this.maxIdle&&(s._touched=-1,s.unload())}}destroy(){this._renderer=null}};yu.extension={type:[v.WebGLSystem,v.WebGPUSystem],name:"textureGC"},yu.defaultOptions={textureGCActive:!0,textureGCAMaxIdle:60*60,textureGCCheckCountMax:600};let Tu=yu;D.add(Tu);var lE=Object.defineProperty,x_=Object.getOwnPropertySymbols,hE=Object.prototype.hasOwnProperty,cE=Object.prototype.propertyIsEnumerable,b_=(r,t,e)=>t in r?lE(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,v_=(r,t)=>{for(var e in t||(t={}))hE.call(t,e)&&b_(r,e,t[e]);if(x_)for(var e of x_(t))cE.call(t,e)&&b_(r,e,t[e]);return r};const Su=class Nx{get resolution(){return this.texture.source._resolution}set resolution(t){this.texture.source.resize(this.texture.source.width,this.texture.source.height,t)}init(t){t=v_(v_({},Nx.defaultOptions),t),t.view&&(t.canvas=t.view),this.screen=new z(0,0,t.width,t.height),this.canvas=t.canvas||X.get().createCanvas(),this.antialias=!!t.antialias,this.texture=za(this.canvas,t),this.renderTarget=new vi({colorTextures:[this.texture],depth:!!t.depth,isRoot:!0}),this.texture.source.transparent=t.backgroundAlpha<1,this.multiView=!!t.multiView,this.autoDensity&&(this.canvas.style.width=`${this.texture.width}px`,this.canvas.style.height=`${this.texture.height}px`),this.resolution=t.resolution}resize(t,e,s){this.texture.source.resize(t,e,s),this.screen.width=this.texture.frame.width,this.screen.height=this.texture.frame.height,this.autoDensity&&(this.canvas.style.width=`${t}px`,this.canvas.style.height=`${e}px`)}destroy(t=!1){(typeof t=="boolean"?t:t!=null&&t.removeView)&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}};Su.extension={type:[v.WebGLSystem,v.WebGPUSystem,v.CanvasSystem],name:"view",priority:0},Su.defaultOptions={width:800,height:600,autoDensity:!1,antialias:!1};let y_=Su;const Eu=[o_,bu,Ai,y_,cu,Tu,xu,l_],Au=[fu,Aa,du,au,Pa,Ra,wa,nu],dE=[...Eu,Xa,hg,rg,Ma,ru,Va,Ba,Qa,Za,Ua,Hg,ka,Da],pE=[...Au],fE=[Sa,iu,su],T_=[],S_=[],E_=[];D.handleByNamedList(v.WebGLSystem,T_),D.handleByNamedList(v.WebGLPipes,S_),D.handleByNamedList(v.WebGLPipesAdaptor,E_),D.add(...dE,...pE,...fE);class A_ extends Or{constructor(){const t={name:"webgl",type:xt.WEBGL,systems:T_,renderPipes:S_,renderPipeAdaptors:E_};super(t)}}var mE={__proto__:null,WebGLRenderer:A_};class Pu{constructor(t){this._hash=Object.create(null),this._renderer=t}contextChange(t){this._gpu=t}getBindGroup(t,e,s){return t._updateKey(),this._hash[t._key]||this._createBindGroup(t,e,s)}_createBindGroup(t,e,s){var i;const n=this._gpu.device,o=e.layout[s],a=[],u=this._renderer;for(const c in o){const d=(i=t.resources[c])!=null?i:t.resources[o[c]];let p;if(d._resourceType==="uniformGroup"){const f=d;u.ubo.updateUniformGroup(f);const g=f.buffer;p={buffer:u.buffer.getGPUBuffer(g),offset:0,size:g.descriptor.size}}else if(d._resourceType==="buffer"){const f=d;p={buffer:u.buffer.getGPUBuffer(f),offset:0,size:f.descriptor.size}}else if(d._resourceType==="bufferResource"){const f=d;p={buffer:u.buffer.getGPUBuffer(f.buffer),offset:f.offset,size:f.size}}else if(d._resourceType==="textureSampler"){const f=d;p=u.texture.getGpuSampler(f)}else if(d._resourceType==="textureSource"){const f=d;p=u.texture.getGpuSource(f).createView({})}a.push({binding:o[c],resource:p})}const l=u.shader.getProgramData(e).bindGroups[s],h=n.createBindGroup({layout:l,entries:a});return this._hash[t._key]=h,h}destroy(){for(const t of Object.keys(this._hash))this._hash[t]=null;this._hash=null,this._renderer=null}}Pu.extension={type:[v.WebGPUSystem],name:"bindGroup"};class wu{constructor(){this._gpuBuffers=Object.create(null),this._managedBuffers=[]}contextChange(t){this._gpu=t}getGPUBuffer(t){return this._gpuBuffers[t.uid]||this.createGPUBuffer(t)}updateBuffer(t){const e=this._gpuBuffers[t.uid]||this.createGPUBuffer(t),s=t.data;return t._updateID&&s&&(t._updateID=0,this._gpu.device.queue.writeBuffer(e,0,s.buffer,0,(t._updateSize||s.byteLength)+3&-4)),e}destroyAll(){for(const t in this._gpuBuffers)this._gpuBuffers[t].destroy();this._gpuBuffers={}}createGPUBuffer(t){this._gpuBuffers[t.uid]||(t.on("update",this.updateBuffer,this),t.on("change",this.onBufferChange,this),t.on("destroy",this.onBufferDestroy,this));const e=this._gpu.device.createBuffer(t.descriptor);return t._updateID=0,t.data&&(_s(t.data.buffer,e.getMappedRange()),e.unmap()),this._gpuBuffers[t.uid]=e,this._managedBuffers.push(t),e}onBufferChange(t){this._gpuBuffers[t.uid].destroy(),t._updateID=0,this._gpuBuffers[t.uid]=this.createGPUBuffer(t)}onBufferDestroy(t){this._managedBuffers.splice(this._managedBuffers.indexOf(t),1),this._destroyBuffer(t)}destroy(){this._managedBuffers.forEach(t=>this._destroyBuffer(t)),this._managedBuffers=null,this._gpuBuffers=null}_destroyBuffer(t){this._gpuBuffers[t.uid].destroy(),t.off("update",this.updateBuffer,this),t.off("change",this.onBufferChange,this),t.off("destroy",this.onBufferDestroy,this),this._gpuBuffers[t.uid]=null}}wu.extension={type:[v.WebGPUSystem],name:"buffer"};function gE(r,t){const e=r.descriptor.size,s=t.gpu.device,i=new _t({data:new Float32Array(24e5),usage:$.MAP_READ|$.COPY_DST}),n=t.buffer.createGPUBuffer(i),o=s.createCommandEncoder();o.copyBufferToBuffer(t.buffer.getGPUBuffer(r),0,n,0,e),s.queue.submit([o.finish()]),n.mapAsync(GPUMapMode.READ,0,e).then(()=>{n.getMappedRange(0,e),n.unmap()})}class P_{constructor({minUniformOffsetAlignment:t}){this._minUniformOffsetAlignment=256,this.byteIndex=0,this._minUniformOffsetAlignment=t,this.data=new Float32Array(65535)}clear(){this.byteIndex=0}addEmptyGroup(t){if(t>this._minUniformOffsetAlignment/4)throw new Error(`UniformBufferBatch: array is too large: ${t*4}`);const e=this.byteIndex;let s=e+t*4;if(s=Math.ceil(s/this._minUniformOffsetAlignment)*this._minUniformOffsetAlignment,s>this.data.length*4)throw new Error("UniformBufferBatch: ubo batch got too big");return this.byteIndex=s,e}addGroup(t){const e=this.addEmptyGroup(t.length);for(let s=0;s{this.gpu=e,this._renderer.runners.contextChange.emit(this.gpu)}),this._initPromise)}contextChange(t){this._renderer.gpu=t}async _createDeviceAndAdaptor(t){const e=await navigator.gpu.requestAdapter({powerPreference:t.powerPreference,forceFallbackAdapter:t.forceFallbackAdapter}),s=["texture-compression-bc","texture-compression-astc","texture-compression-etc2"].filter(n=>e.features.has(n)),i=await e.requestDevice({requiredFeatures:s});return{adapter:e,device:i}}destroy(){this.gpu=null,this._renderer=null}}Pi.extension={type:[v.WebGPUSystem],name:"device"},Pi.defaultOptions={powerPreference:void 0,forceFallbackAdapter:!1};var _E=Object.defineProperty,w_=Object.getOwnPropertySymbols,xE=Object.prototype.hasOwnProperty,bE=Object.prototype.propertyIsEnumerable,R_=(r,t,e)=>t in r?_E(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,M_=(r,t)=>{for(var e in t||(t={}))xE.call(t,e)&&R_(r,e,t[e]);if(w_)for(var e of w_(t))bE.call(t,e)&&R_(r,e,t[e]);return r};class Mu{constructor(t){this._boundBindGroup=Object.create(null),this._boundVertexBuffer=Object.create(null),this._renderer=t}renderStart(){this.commandFinished=new Promise(t=>{this._resolveCommandFinished=t}),this.commandEncoder=this._renderer.gpu.device.createCommandEncoder()}beginRenderPass(t){this.endRenderPass(),this._clearCache(),this.renderPassEncoder=this.commandEncoder.beginRenderPass(t.descriptor)}endRenderPass(){this.renderPassEncoder&&this.renderPassEncoder.end(),this.renderPassEncoder=null}setViewport(t){this.renderPassEncoder.setViewport(t.x,t.y,t.width,t.height,0,1)}setPipelineFromGeometryProgramAndState(t,e,s,i){const n=this._renderer.pipeline.getPipeline(t,e,s,i);this.setPipeline(n)}setPipeline(t){this._boundPipeline!==t&&(this._boundPipeline=t,this.renderPassEncoder.setPipeline(t))}_setVertexBuffer(t,e){this._boundVertexBuffer[t]!==e&&(this._boundVertexBuffer[t]=e,this.renderPassEncoder.setVertexBuffer(t,this._renderer.buffer.updateBuffer(e)))}_setIndexBuffer(t){if(this._boundIndexBuffer===t)return;this._boundIndexBuffer=t;const e=t.data.BYTES_PER_ELEMENT===2?"uint16":"uint32";this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(t),e)}resetBindGroup(t){this._boundBindGroup[t]=null}setBindGroup(t,e,s){if(this._boundBindGroup[t]===e)return;this._boundBindGroup[t]=e,e._touch(this._renderer.textureGC.count);const i=this._renderer.bindGroup.getBindGroup(e,s,t);this.renderPassEncoder.setBindGroup(t,i)}setGeometry(t){for(const e in t.attributes){const s=t.attributes[e];this._setVertexBuffer(s.location,s.buffer)}t.indexBuffer&&this._setIndexBuffer(t.indexBuffer)}_setShaderBindGroups(t,e){for(const s in t.groups){const i=t.groups[s];e||this._syncBindGroup(i),this.setBindGroup(s,i,t.gpuProgram)}}_syncBindGroup(t){for(const e in t.resources){const s=t.resources[e];s.isUniformGroup&&this._renderer.ubo.updateUniformGroup(s)}}draw(t){const{geometry:e,shader:s,state:i,topology:n,size:o,start:a,instanceCount:u,skipSync:l}=t;this.setPipelineFromGeometryProgramAndState(e,s.gpuProgram,i,n),this.setGeometry(e),this._setShaderBindGroups(s,l),e.indexBuffer?this.renderPassEncoder.drawIndexed(o||e.indexBuffer.data.length,u||e.instanceCount,a||0):this.renderPassEncoder.draw(o||e.getSize(),u||e.instanceCount,a||0)}finishRenderPass(){this.renderPassEncoder&&(this.renderPassEncoder.end(),this.renderPassEncoder=null)}postrender(){this.finishRenderPass(),this._gpu.device.queue.submit([this.commandEncoder.finish()]),this._resolveCommandFinished(),this.commandEncoder=null}restoreRenderPass(){const t=this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget,!1,[0,0,0,1]);this.renderPassEncoder=this.commandEncoder.beginRenderPass(t);const e=this._boundPipeline,s=M_({},this._boundVertexBuffer),i=this._boundIndexBuffer,n=M_({},this._boundBindGroup);this._clearCache();const o=this._renderer.renderTarget.viewport;this.renderPassEncoder.setViewport(o.x,o.y,o.width,o.height,0,1),this.setPipeline(e);for(const a in s)this._setVertexBuffer(a,s[a]);for(const a in n)this.setBindGroup(a,n[a],null);this._setIndexBuffer(i)}_clearCache(){for(let t=0;t<16;t++)this._boundBindGroup[t]=null,this._boundVertexBuffer[t]=null;this._boundIndexBuffer=null,this._boundPipeline=null}destroy(){this._renderer=null,this._gpu=null,this._boundBindGroup=null,this._boundVertexBuffer=null,this._boundIndexBuffer=null,this._boundPipeline=null}contextChange(t){this._gpu=t}}Mu.extension={type:[v.WebGPUSystem],name:"encoder",priority:1};class Ou{constructor(t){this._renderTargetStencilState=Object.create(null),this._renderer=t,t.renderTarget.onRenderTargetChange.add(this)}onRenderTargetChange(t){let e=this._renderTargetStencilState[t.uid];e||(e=this._renderTargetStencilState[t.uid]={stencilMode:st.DISABLED,stencilReference:0}),this._activeRenderTarget=t,this.setStencilMode(e.stencilMode,e.stencilReference)}setStencilMode(t,e){const s=this._renderTargetStencilState[this._activeRenderTarget.uid];s.stencilMode=t,s.stencilReference=e;const i=this._renderer;i.pipeline.setStencilMode(t),i.encoder.renderPassEncoder.setStencilReference(e)}destroy(){this._renderer.renderTarget.onRenderTargetChange.remove(this),this._renderer=null,this._activeRenderTarget=null,this._renderTargetStencilState=null}}Ou.extension={type:[v.WebGPUSystem],name:"stencil"};const jr={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2":{align:8,size:8},"vec2":{align:8,size:8},"vec2":{align:8,size:8},"vec2":{align:4,size:4},"vec3":{align:16,size:12},"vec3":{align:16,size:12},"vec3":{align:16,size:12},"vec3":{align:8,size:6},"vec4":{align:16,size:16},"vec4":{align:16,size:16},"vec4":{align:16,size:16},"vec4":{align:8,size:8},"mat2x2":{align:8,size:16},"mat2x2":{align:4,size:8},"mat3x2":{align:8,size:24},"mat3x2":{align:4,size:12},"mat4x2":{align:8,size:32},"mat4x2":{align:4,size:16},"mat2x3":{align:16,size:32},"mat2x3":{align:8,size:16},"mat3x3":{align:16,size:48},"mat3x3":{align:8,size:24},"mat4x3":{align:16,size:64},"mat4x3":{align:8,size:32},"mat2x4":{align:16,size:32},"mat2x4":{align:8,size:16},"mat3x4":{align:16,size:48},"mat3x4":{align:8,size:24},"mat4x4":{align:16,size:64},"mat4x4":{align:8,size:32}};function O_(r){const t=r.map(s=>({data:s,offset:0,size:0}));let e=0;for(let s=0;s1&&(n=Math.max(n,o)*i.data.size),e=Math.ceil(e/o)*o,i.size=n,i.offset=e,e+=n}return e=Math.ceil(e/16)*16,{uboElements:t,size:e}}function C_(r,t){const{size:e,align:s}=jr[r.data.type],i=(s-e)/4;return` + v = uv.${r.data.name}; + ${t!==0?`offset += ${t};`:""} + + arrayOffset = offset; + + t = 0; + + for(var i=0; i < ${r.data.size*(e/4)}; i++) + { + for(var j = 0; j < ${e/4}; j++) + { + data[arrayOffset++] = v[t++]; + } + ${i!==0?`arrayOffset += ${i};`:""} + } + `}function G_(r){return Na(r,"uboWgsl",C_,mg)}class Cu extends La{constructor(){super({createUboElements:O_,generateUboSync:G_})}}Cu.extension={type:[v.WebGPUSystem],name:"ubo"};const ie=128;class Gu{constructor(t){this._bindGroupHash=Object.create(null),this._buffers=[],this._bindGroups=[],this._bufferResources=[],this._renderer=t,this._batchBuffer=new P_({minUniformOffsetAlignment:ie});const e=256/ie;for(let s=0;st in r?vE(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,AE=(r,t)=>{for(var e in t||(t={}))SE.call(t,e)&&B_(r,e,t[e]);if(I_)for(var e of I_(t))EE.call(t,e)&&B_(r,e,t[e]);return r},PE=(r,t)=>yE(r,TE(t));const wE={"point-list":0,"line-list":1,"line-strip":2,"triangle-list":3,"triangle-strip":4};function RE(r,t,e,s,i){return r<<24|t<<16|e<<10|s<<5|i}function ME(r,t,e,s){return e<<6|r<<3|s<<1|t}class Iu{constructor(t){this._moduleCache=Object.create(null),this._bufferLayoutsCache=Object.create(null),this._pipeCache=Object.create(null),this._pipeStateCaches=Object.create(null),this._colorMask=15,this._multisampleCount=1,this._renderer=t}contextChange(t){this._gpu=t,this.setStencilMode(st.DISABLED),this._updatePipeHash()}setMultisampleCount(t){this._multisampleCount!==t&&(this._multisampleCount=t,this._updatePipeHash())}setRenderTarget(t){this._multisampleCount=t.msaaSamples,this._depthStencilAttachment=t.descriptor.depthStencilAttachment?1:0,this._updatePipeHash()}setColorMask(t){this._colorMask!==t&&(this._colorMask=t,this._updatePipeHash())}setStencilMode(t){this._stencilMode!==t&&(this._stencilMode=t,this._stencilState=re[t],this._updatePipeHash())}setPipeline(t,e,s,i){const n=this.getPipeline(t,e,s);i.setPipeline(n)}getPipeline(t,e,s,i){t._layoutKey||(Ga(t,e.attributeData),this._generateBufferKey(t)),i=i||t.topology;const n=RE(t._layoutKey,e._layoutKey,s.data,s._blendModeId,wE[i]);return this._pipeCache[n]?this._pipeCache[n]:(this._pipeCache[n]=this._createPipeline(t,e,s,i),this._pipeCache[n])}_createPipeline(t,e,s,i){const n=this._gpu.device,o=this._createVertexBufferLayouts(t),a=this._renderer.state.getColorTargets(s);a[0].writeMask=this._stencilMode===st.RENDERING_MASK_ADD?0:this._colorMask;const u=this._renderer.shader.getProgramData(e).pipeline,l={vertex:{module:this._getModule(e.vertex.source),entryPoint:e.vertex.entryPoint,buffers:o},fragment:{module:this._getModule(e.fragment.source),entryPoint:e.fragment.entryPoint,targets:a},primitive:{topology:i,cullMode:s.cullMode},layout:u,multisample:{count:this._multisampleCount},label:"PIXI Pipeline"};return this._depthStencilAttachment&&(l.depthStencil=PE(AE({},this._stencilState),{format:"depth24plus-stencil8",depthWriteEnabled:s.depthTest,depthCompare:s.depthTest?"less":"always"})),n.createRenderPipeline(l)}_getModule(t){return this._moduleCache[t]||this._createModule(t)}_createModule(t){const e=this._gpu.device;return this._moduleCache[t]=e.createShaderModule({code:t}),this._moduleCache[t]}_generateBufferKey(t){const e=[];let s=0;const i=Object.keys(t.attributes).sort();for(let o=0;o{const i={arrayStride:0,stepMode:"vertex",attributes:[]},n=i.attributes;for(const o in t.attributes){const a=t.attributes[o];a.buffer===s&&(i.arrayStride=a.stride,i.stepMode=a.instance?"instance":"vertex",n.push({shaderLocation:a.location,offset:a.offset,format:a.format}))}n.length&&e.push(i)}),this._bufferLayoutsCache[t._layoutKey]=e,e}_updatePipeHash(){const t=ME(this._stencilMode,this._multisampleCount,this._colorMask,this._depthStencilAttachment);this._pipeStateCaches[t]||(this._pipeStateCaches[t]=Object.create(null)),this._pipeCache=this._pipeStateCaches[t]}destroy(){this._renderer=null,this._bufferLayoutsCache=null}}Iu.extension={type:[v.WebGPUSystem],name:"pipeline"};class F_{constructor(){this.contexts=[],this.msaaTextures=[],this.msaaSamples=1}}class D_{init(t,e){this._renderer=t,this._renderTargetSystem=e}copyToTexture(t,e,s,i,n){const o=this._renderer,a=this._getGpuColorTexture(t),u=o.texture.getGpuSource(e.source);return o.encoder.commandEncoder.copyTextureToTexture({texture:a,origin:s},{texture:u,origin:n},i),e}startRenderPass(t,e=!0,s,i){const n=this._renderTargetSystem.getGpuRenderTarget(t),o=this.getDescriptor(t,e,s);n.descriptor=o,this._renderer.pipeline.setRenderTarget(n),this._renderer.encoder.beginRenderPass(n),this._renderer.encoder.setViewport(i)}finishRenderPass(){this._renderer.encoder.endRenderPass()}_getGpuColorTexture(t){const e=this._renderTargetSystem.getGpuRenderTarget(t);return e.contexts[0]?e.contexts[0].getCurrentTexture():this._renderer.texture.getGpuSource(t.colorTextures[0].source)}getDescriptor(t,e,s){typeof e=="boolean"&&(e=e?pt.ALL:pt.NONE);const i=this._renderTargetSystem,n=i.getGpuRenderTarget(t),o=t.colorTextures.map((u,l)=>{const h=n.contexts[l];let c,d;h?c=h.getCurrentTexture().createView():c=this._renderer.texture.getGpuSource(u).createView({mipLevelCount:1}),n.msaaTextures[l]&&(d=c,c=this._renderer.texture.getTextureView(n.msaaTextures[l]));const p=e&pt.COLOR?"clear":"load";return s!=null||(s=i.defaultClearColor),{view:c,resolveTarget:d,clearValue:s,storeOp:"store",loadOp:p}});let a;if((t.stencil||t.depth)&&!t.depthStencilTexture&&(t.ensureDepthStencilTexture(),t.depthStencilTexture.source.sampleCount=n.msaa?4:1),t.depthStencilTexture){const u=e&pt.STENCIL?"clear":"load",l=e&pt.DEPTH?"clear":"load";a={view:this._renderer.texture.getGpuSource(t.depthStencilTexture.source).createView(),stencilStoreOp:"store",stencilLoadOp:u,depthClearValue:1,depthLoadOp:l,depthStoreOp:"store"}}return{colorAttachments:o,depthStencilAttachment:a}}clear(t,e=!0,s,i){if(!e)return;const{gpu:n,encoder:o}=this._renderer,a=n.device;if(o.commandEncoder===null){const u=a.createCommandEncoder(),l=this.getDescriptor(t,e,s),h=u.beginRenderPass(l);h.setViewport(i.x,i.y,i.width,i.height,0,1),h.end();const c=u.finish();a.queue.submit([c])}else this.startRenderPass(t,e,s,i)}initGpuRenderTarget(t){t.isRoot=!0;const e=new F_;return t.colorTextures.forEach((s,i)=>{if(Qt.test(s.resource)){const n=s.resource.getContext("webgpu"),o=s.transparent?"premultiplied":"opaque";try{n.configure({device:this._renderer.gpu.device,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC,format:"bgra8unorm",alphaMode:o})}catch(a){console.error(a)}e.contexts[i]=n}if(e.msaa=s.source.antialias,s.source.antialias){const n=new et({width:0,height:0,sampleCount:4});e.msaaTextures[i]=n}}),e.msaa&&(e.msaaSamples=4,t.depthStencilTexture&&(t.depthStencilTexture.source.sampleCount=4)),e}ensureDepthStencilTexture(t){const e=this._renderTargetSystem.getGpuRenderTarget(t);t.depthStencilTexture&&e.msaa&&(t.depthStencilTexture.source.sampleCount=4)}resizeGpuRenderTarget(t){const e=this._renderTargetSystem.getGpuRenderTarget(t);e.width=t.width,e.height=t.height,e.msaa&&t.colorTextures.forEach((s,i)=>{const n=e.msaaTextures[i];n==null||n.resize(s.source.width,s.source.height,s.source._resolution)})}}class Bu extends ja{constructor(t){super(t),this.adaptor=new D_,this.adaptor.init(t,this)}}Bu.extension={type:[v.WebGPUSystem],name:"renderTarget"};class Fu{constructor(){this._gpuProgramData=Object.create(null)}contextChange(t){this._gpu=t}getProgramData(t){return this._gpuProgramData[t._layoutKey]||this._createGPUProgramData(t)}_createGPUProgramData(t){const e=this._gpu.device,s=t.gpuLayout.map(n=>e.createBindGroupLayout({entries:n})),i={bindGroupLayouts:s};return this._gpuProgramData[t._layoutKey]={bindGroups:s,pipeline:e.createPipelineLayout(i)},this._gpuProgramData[t._layoutKey]}destroy(){this._gpu=null,this._gpuProgramData=null}}Fu.extension={type:[v.WebGPUSystem],name:"shader"};const vt={};vt.normal={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}},vt.add={alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one",operation:"add"}},vt.multiply={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"dst",dstFactor:"one-minus-src-alpha",operation:"add"}},vt.screen={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}},vt.overlay={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}},vt.none={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"zero",operation:"add"}},vt["normal-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"}},vt["add-npm"]={alpha:{srcFactor:"one",dstFactor:"one",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one",operation:"add"}},vt["screen-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src",operation:"add"}},vt.erase={alpha:{srcFactor:"zero",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"one-minus-src",operation:"add"}};class Du{constructor(){this.defaultState=new Ct,this.defaultState.blend=!0}contextChange(t){this.gpu=t}getColorTargets(t){return[{format:"bgra8unorm",writeMask:0,blend:vt[t.blendMode]||vt.normal}]}destroy(){this.gpu=null}}Du.extension={type:[v.WebGPUSystem],name:"state"};const U_={type:"image",upload(r,t,e){const s=r.resource,i=(r.pixelWidth|0)*(r.pixelHeight|0),n=s.byteLength/i;e.device.queue.writeTexture({texture:t},s,{offset:0,rowsPerImage:r.pixelHeight,bytesPerRow:r.pixelHeight*n},{width:r.pixelWidth,height:r.pixelHeight,depthOrArrayLayers:1})}},Uu={"bc1-rgba-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"bc2-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc3-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc7-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"etc1-rgb-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"etc2-rgba8unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"astc-4x4-unorm":{blockBytes:16,blockWidth:4,blockHeight:4}},OE={blockBytes:4,blockWidth:1,blockHeight:1},k_={type:"compressed",upload(r,t,e){let s=r.pixelWidth,i=r.pixelHeight;const n=Uu[r.format]||OE;for(let o=0;o>1,1),i=Math.max(i>>1,1)}}},ku={type:"image",upload(r,t,e){const s=r.resource;if(!s)return;const i=Math.min(t.width,r.resourceWidth||r.pixelWidth),n=Math.min(t.height,r.resourceHeight||r.pixelHeight),o=r.alphaMode==="premultiply-alpha-on-upload";e.device.queue.copyExternalImageToTexture({source:s},{texture:t,premultipliedAlpha:o},{width:i,height:n})}},L_={type:"video",upload(r,t,e){ku.upload(r,t,e)}};class $_{constructor(t){this.device=t,this.sampler=t.createSampler({minFilter:"linear"}),this.pipelines={}}_getMipmapPipeline(t){let e=this.pipelines[t];return e||(this.mipmapShaderModule||(this.mipmapShaderModule=this.device.createShaderModule({code:` + var pos : array, 3> = array, 3>( + vec2(-1.0, -1.0), vec2(-1.0, 3.0), vec2(3.0, -1.0)); + + struct VertexOutput { + @builtin(position) position : vec4, + @location(0) texCoord : vec2, + }; + + @vertex + fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput { + var output : VertexOutput; + output.texCoord = pos[vertexIndex] * vec2(0.5, -0.5) + vec2(0.5); + output.position = vec4(pos[vertexIndex], 0.0, 1.0); + return output; + } + + @group(0) @binding(0) var imgSampler : sampler; + @group(0) @binding(1) var img : texture_2d; + + @fragment + fn fragmentMain(@location(0) texCoord : vec2) -> @location(0) vec4 { + return textureSample(img, imgSampler, texCoord); + } + `})),e=this.device.createRenderPipeline({layout:"auto",vertex:{module:this.mipmapShaderModule,entryPoint:"vertexMain"},fragment:{module:this.mipmapShaderModule,entryPoint:"fragmentMain",targets:[{format:t}]}}),this.pipelines[t]=e),e}generateMipmap(t){const e=this._getMipmapPipeline(t.format);if(t.dimension==="3d"||t.dimension==="1d")throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");let s=t;const i=t.depthOrArrayLayers||1,n=t.usage&GPUTextureUsage.RENDER_ATTACHMENT;if(!n){const u={size:{width:Math.ceil(t.width/2),height:Math.ceil(t.height/2),depthOrArrayLayers:i},format:t.format,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC|GPUTextureUsage.RENDER_ATTACHMENT,mipLevelCount:t.mipLevelCount-1};s=this.device.createTexture(u)}const o=this.device.createCommandEncoder({}),a=e.getBindGroupLayout(0);for(let u=0;u1&&this.onUpdateMipmaps(t))}onSourceUnload(t){const e=this._gpuSources[t.uid];e&&(this._gpuSources[t.uid]=null,e.destroy())}onUpdateMipmaps(t){this._mipmapGenerator||(this._mipmapGenerator=new $_(this._gpu.device));const e=this.getGpuSource(t);this._mipmapGenerator.generateMipmap(e)}onSourceDestroy(t){t.off("update",this.onSourceUpdate,this),t.off("unload",this.onSourceUnload,this),t.off("destroy",this.onSourceDestroy,this),t.off("resize",this.onSourceResize,this),t.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(t),1),this.onSourceUnload(t)}onSourceResize(t){const e=this._gpuSources[t.uid];e?(e.width!==t.pixelWidth||e.height!==t.pixelHeight)&&(this._textureViewHash[t.uid]=null,this._bindGroupHash[t.uid]=null,this.onSourceUnload(t),this.initSource(t)):this.initSource(t)}_initSampler(t){return this._gpuSamplers[t._resourceId]=this._gpu.device.createSampler(t),this._gpuSamplers[t._resourceId]}getGpuSampler(t){return this._gpuSamplers[t._resourceId]||this._initSampler(t)}getGpuSource(t){return this._gpuSources[t.uid]||this.initSource(t)}getTextureBindGroup(t){var e;return(e=this._bindGroupHash[t.uid])!=null?e:this._createTextureBindGroup(t)}_createTextureBindGroup(t){const e=t.source,s=e.uid;return this._bindGroupHash[s]=new Lt({0:e,1:e.style}),this._bindGroupHash[s]}getTextureView(t){var e;const s=t.source;return(e=this._textureViewHash[s.uid])!=null?e:this._createTextureView(s)}_createTextureView(t){return this._textureViewHash[t.uid]=this.getGpuSource(t).createView(),this._textureViewHash[t.uid]}generateCanvas(t){const e=this._renderer,s=e.gpu.device.createCommandEncoder(),i=X.get().createCanvas();i.width=t.source.pixelWidth,i.height=t.source.pixelHeight;const n=i.getContext("webgpu");return n.configure({device:e.gpu.device,usage:GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC,format:navigator.gpu.getPreferredCanvasFormat(),alphaMode:"premultiplied"}),s.copyTextureToTexture({texture:e.texture.getGpuSource(t.source),origin:{x:0,y:0}},{texture:n.getCurrentTexture()},{width:i.width,height:i.height}),e.gpu.device.queue.submit([s.finish()]),i}getPixels(t){const e=this.generateCanvas(t),s=jt.getOptimalCanvasAndContext(e.width,e.height),i=s.context;i.drawImage(e,0,0);const{width:n,height:o}=e,a=i.getImageData(0,0,n,o),u=new Uint8ClampedArray(a.data.buffer);return jt.returnCanvasAndContext(s),{pixels:u,width:n,height:o}}destroy(){this.managedTextures.slice().forEach(t=>this.onSourceDestroy(t)),this.managedTextures=null;for(const t of Object.keys(this._bindGroupHash)){const e=Number(t),s=this._bindGroupHash[e];s==null||s.destroy(),this._bindGroupHash[e]=null}this._gpu=null,this._mipmapGenerator=null,this._gpuSources=null,this._bindGroupHash=null,this._textureViewHash=null,this._gpuSamplers=null}}Lu.extension={type:[v.WebGPUSystem],name:"texture"};class $u{init(){const t=new it({uTransformMatrix:{value:new G,type:"mat3x3"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4"},uRound:{value:0,type:"f32"}}),e=Ue({name:"graphics",bits:[Us,Ls(wt),rp,Le]});this.shader=new St({gpuProgram:e,resources:{localUniforms:t}})}execute(t,e){const s=e.context,i=s.customShader||this.shader,n=t.renderer,o=n.graphicsContext,{geometry:a,instructions:u}=o.getContextRenderData(s),l=n.encoder;l.setPipelineFromGeometryProgramAndState(a,i.gpuProgram,t.state),l.setGeometry(a);const h=n.globalUniforms.bindGroup;l.setBindGroup(0,h,i.gpuProgram);const c=n.renderPipes.uniformBatch.getUniformBindGroup(i.resources.localUniforms,!0);l.setBindGroup(2,c,i.gpuProgram);const d=u.instructions;for(let p=0;p",value:new G}}}})}execute(t,e){const s=t.renderer;let i=e._shader;if(!i)i=this._shader,i.resources.uTexture=e.texture.source,i.resources.uSampler=e.texture.source.style,i.resources.textureUniforms.uniforms.uTextureMatrix=e.texture.textureMatrix.mapCoord;else if(!i.gpuProgram)return;const n=i.gpuProgram;if(n.autoAssignGlobalUniforms&&(i.groups[0]=s.globalUniforms.bindGroup),n.autoAssignLocalUniforms){const o=t.localUniforms;i.groups[1]=s.renderPipes.uniformBatch.getUniformBindGroup(o,!0)}s.encoder.draw({geometry:e._geometry,shader:i,state:e.state})}destroy(){this._shader.destroy(!0),this._shader=null}}Nu.extension={type:[v.WebGPUPipesAdaptor],name:"mesh"};const CE=[...Eu,Cu,Mu,Pi,wu,Lu,Bu,Fu,Du,Iu,Ru,Ou,Pu],GE=[...Au,Gu],IE=[Ea,Nu,$u],N_=[],H_=[],X_=[];D.handleByNamedList(v.WebGPUSystem,N_),D.handleByNamedList(v.WebGPUPipes,H_),D.handleByNamedList(v.WebGPUPipesAdaptor,X_),D.add(...CE,...GE,...IE);class z_ extends Or{constructor(){const t={name:"webgpu",type:xt.WEBGPU,systems:N_,renderPipes:H_,renderPipeAdaptors:X_};super(t)}}var BE={__proto__:null,WebGPURenderer:z_};const FE={POINTS:"point-list",LINES:"line-list",LINE_STRIP:"line-strip",TRIANGLES:"triangle-list",TRIANGLE_STRIP:"triangle-strip"},DE=new Proxy(FE,{get(r,t){return r[t]}}),UE=new z(0,0,1,1);function kE(r,t,e){e||(e=UE);const s=t.pixelWidth,i=t.pixelHeight;return r.x=e.x*s|0,r.y=e.y*i|0,r.width=e.width*s|0,r.height=e.height*i|0,r}var j_=(r=>(r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH",r))(j_||{}),Hu=(r=>(r.CLAMP="clamp-to-edge",r.REPEAT="repeat",r.MIRRORED_REPEAT="mirror-repeat",r))(Hu||{});const LE=new Proxy(Hu,{get(r,t){return r[t]}});var Xu=(r=>(r.NEAREST="nearest",r.LINEAR="linear",r))(Xu||{});const $E=new Proxy(Xu,{get(r,t){return r[t]}});class NE{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,e,s){const i=e.width,n=e.height;if(s){const o=t.width/2/i,a=t.height/2/n,u=t.x/i+o,l=t.y/n+a;s=U.add(s,U.NW),this.x0=u+o*U.uX(s),this.y0=l+a*U.uY(s),s=U.add(s,2),this.x1=u+o*U.uX(s),this.y1=l+a*U.uY(s),s=U.add(s,2),this.x2=u+o*U.uX(s),this.y2=l+a*U.uY(s),s=U.add(s,2),this.x3=u+o*U.uX(s),this.y3=l+a*U.uY(s)}else this.x0=t.x/i,this.y0=t.y/n,this.x1=(t.x+t.width)/i,this.y1=t.y/n,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/n,this.x3=t.x/i,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}let HE=0;function XE(){return HE++}function zE(r){const t=r.toString(),e=t.indexOf("{"),s=t.lastIndexOf("}");if(e===-1||s===-1)throw new Error("getFunctionBody: No body found in function definition");return t.slice(e+1,s).trim()}var jE=Object.defineProperty,wi=Object.getOwnPropertySymbols,V_=Object.prototype.hasOwnProperty,W_=Object.prototype.propertyIsEnumerable,Y_=(r,t,e)=>t in r?jE(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,VE=(r,t)=>{for(var e in t||(t={}))V_.call(t,e)&&Y_(r,e,t[e]);if(wi)for(var e of wi(t))W_.call(t,e)&&Y_(r,e,t[e]);return r},WE=(r,t)=>{var e={};for(var s in r)V_.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&wi)for(var s of wi(r))t.indexOf(s)<0&&W_.call(r,s)&&(e[s]=r[s]);return e};class YE extends V{constructor(t){var e,s;typeof t=="function"&&(t={render:t});const i=t,{render:n}=i,o=WE(i,["render"]);super(VE({label:"RenderContainer"},o)),this.batched=!1,this.bounds=new lt,this.canBundle=!1,this.renderPipeId="customRender",n&&(this.render=n),this.containsPoint=(e=t.containsPoint)!=null?e:()=>!1,this.addBounds=(s=t.addBounds)!=null?s:()=>!1}render(t){}}function KE(r,t){if(r===16777215||!t)return t;if(t===16777215||!r)return r;const e=r>>16&255,s=r>>8&255,i=r&255,n=t>>16&255,o=t>>8&255,a=t&255,u=e*n/255,l=s*o/255,h=i*a/255;return(u<<16)+(l<<8)+h}function qE(r,t){const e=t._scale,s=t._pivot,i=t._position,n=e._x,o=e._y,a=s._x,u=s._y;r.a=t._cx*n,r.b=t._sx*n,r.c=t._cy*o,r.d=t._sy*o,r.tx=i._x-(a*r.a+u*r.c),r.ty=i._y-(a*r.b+u*r.d)}function ZE(r,t,e){const s=r.a,i=r.b,n=r.c,o=r.d,a=r.tx,u=r.ty,l=t.a,h=t.b,c=t.c,d=t.d;e.a=s*l+i*c,e.b=s*h+i*d,e.c=n*l+o*c,e.d=n*h+o*d,e.tx=a*l+u*c+t.tx,e.ty=a*h+u*d+t.ty}const QE={rectangle:Dn,polygon:Fn,triangle:Un,circle:_e,ellipse:_e,roundedRectangle:_e};function JE(r){r instanceof ne&&(r={path:r,textureMatrix:null,out:null});const t=[],e=[],s=[],i=r.path.shapePath,n=r.textureMatrix;i.shapePrimitives.forEach(({shape:a,transform:u})=>{const l=s.length,h=t.length/2,c=[],d=QE[a.type];d.build(a,c),u&&xs(c,u),d.triangulate(c,t,2,h,s,l);const p=e.length/2;n?(u&&n.append(u.clone().invert()),wn(t,2,h,e,p,2,t.length/2-h,n)):Rn(e,p,2,t.length/2-h)});const o=r.out;return o?(o.positions=new Float32Array(t),o.uvs=new Float32Array(e),o.indices=new Uint32Array(s),o):new Jt({positions:new Float32Array(t),uvs:new Float32Array(e),indices:new Uint32Array(s)})}var tA=Object.defineProperty,eA=Object.defineProperties,rA=Object.getOwnPropertyDescriptors,Ri=Object.getOwnPropertySymbols,K_=Object.prototype.hasOwnProperty,q_=Object.prototype.propertyIsEnumerable,Z_=(r,t,e)=>t in r?tA(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,sA=(r,t)=>{for(var e in t||(t={}))K_.call(t,e)&&Z_(r,e,t[e]);if(Ri)for(var e of Ri(t))q_.call(t,e)&&Z_(r,e,t[e]);return r},iA=(r,t)=>eA(r,rA(t)),nA=(r,t)=>{var e={};for(var s in r)K_.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Ri)for(var s of Ri(r))t.indexOf(s)<0&&q_.call(r,s)&&(e[s]=r[s]);return e};class oA extends $r{constructor(t){const e=t,{texture:s,verticesX:i,verticesY:n}=e,o=nA(e,["texture","verticesX","verticesY"]),a=new Ho(Zt({width:s.width,height:s.height,verticesX:i,verticesY:n}));super(Zt(iA(sA({},o),{geometry:a,texture:s}))),this.texture=s,this.autoResize=!0}textureUpdated(){const t=this.geometry,{width:e,height:s}=this.texture;this.autoResize&&(t.width!==e||t.height!==s)&&(t.width=e,t.height=s,t.build({}))}set texture(t){var e;(e=this._texture)==null||e.off("update",this.textureUpdated,this),super.texture=t,t.on("update",this.textureUpdated,this),this.textureUpdated()}get texture(){return this._texture}destroy(t){this.texture.off("update",this.textureUpdated,this),super.destroy(t)}}var aA=Object.defineProperty,Q_=Object.getOwnPropertySymbols,uA=Object.prototype.hasOwnProperty,lA=Object.prototype.propertyIsEnumerable,J_=(r,t,e)=>t in r?aA(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,tx=(r,t)=>{for(var e in t||(t={}))uA.call(t,e)&&J_(r,e,t[e]);if(Q_)for(var e of Q_(t))lA.call(t,e)&&J_(r,e,t[e]);return r};const ex=class Hx extends Jt{constructor(t){const{width:e,points:s,textureScale:i}=tx(tx({},Hx.defaultOptions),t);super({positions:new Float32Array(s.length*4),uvs:new Float32Array(s.length*4),indices:new Uint32Array((s.length-1)*6)}),this.points=s,this._width=e,this.textureScale=i,this._build()}get width(){return this._width}_build(){const t=this.points;if(!t)return;const e=this.getBuffer("aPosition"),s=this.getBuffer("aUV"),i=this.getIndex();if(t.length<1)return;e.data.length/4!==t.length&&(e.data=new Float32Array(t.length*4),s.data=new Float32Array(t.length*4),i.data=new Uint16Array((t.length-1)*6));const n=s.data,o=i.data;n[0]=0,n[1]=0,n[2]=0,n[3]=1;let a=0,u=t[0];const l=this._width*this.textureScale,h=t.length;for(let d=0;d0){const f=u.x-t[d].x,g=u.y-t[d].y,m=Math.sqrt(f*f+g*g);u=t[d],a+=m/l}else a=d/(h-1);n[p]=a,n[p+1]=0,n[p+2]=a,n[p+3]=1}let c=0;for(let d=0;d0?this.textureScale*this._width/2:this._width/2;for(let l=0;l1&&(d=1);const p=Math.sqrt(i*i+n*n);p<1e-6?(i=0,n=0):(i/=p,n/=p,i*=u,n*=u),o[c]=h.x+i,o[c+1]=h.y+n,o[c+2]=h.x-i,o[c+3]=h.y-n,e=h}this.buffers[0].update()}update(){this.textureScale>0?this._build():this.updateVertices()}};ex.defaultOptions={width:200,points:[],textureScale:0};let rx=ex;var hA=Object.defineProperty,cA=Object.defineProperties,dA=Object.getOwnPropertyDescriptors,Mi=Object.getOwnPropertySymbols,sx=Object.prototype.hasOwnProperty,ix=Object.prototype.propertyIsEnumerable,nx=(r,t,e)=>t in r?hA(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,zu=(r,t)=>{for(var e in t||(t={}))sx.call(t,e)&&nx(r,e,t[e]);if(Mi)for(var e of Mi(t))ix.call(t,e)&&nx(r,e,t[e]);return r},pA=(r,t)=>cA(r,dA(t)),fA=(r,t)=>{var e={};for(var s in r)sx.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Mi)for(var s of Mi(r))t.indexOf(s)<0&&ix.call(r,s)&&(e[s]=r[s]);return e};const ox=class Xx extends $r{constructor(t){const e=zu(zu({},Xx.defaultOptions),t),{texture:s,points:i,textureScale:n}=e,o=fA(e,["texture","points","textureScale"]),a=new rx(Zt({width:s.height,points:i,textureScale:n}));n>0&&(s.source.style.addressMode="repeat"),super(Zt(pA(zu({},o),{texture:s,geometry:a}))),this.autoUpdate=!0,this.onRender=this._render}_render(){const t=this.geometry;(this.autoUpdate||t._width!==this.texture.height)&&(t._width=this.texture.height,t.update())}};ox.defaultOptions={textureScale:0};let mA=ox;var gA=Object.defineProperty,_A=Object.defineProperties,xA=Object.getOwnPropertyDescriptors,Oi=Object.getOwnPropertySymbols,ax=Object.prototype.hasOwnProperty,ux=Object.prototype.propertyIsEnumerable,lx=(r,t,e)=>t in r?gA(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,bA=(r,t)=>{for(var e in t||(t={}))ax.call(t,e)&&lx(r,e,t[e]);if(Oi)for(var e of Oi(t))ux.call(t,e)&&lx(r,e,t[e]);return r},vA=(r,t)=>_A(r,xA(t)),yA=(r,t)=>{var e={};for(var s in r)ax.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Oi)for(var s of Oi(r))t.indexOf(s)<0&&ux.call(r,s)&&(e[s]=r[s]);return e};class TA extends $r{constructor(t){const e=t,{texture:s,vertices:i,uvs:n,indices:o,topology:a}=e,u=yA(e,["texture","vertices","uvs","indices","topology"]),l=new Jt(Zt({positions:i,uvs:n,indices:o,topology:a}));super(Zt(vA(bA({},u),{texture:s,geometry:l}))),this.autoUpdate=!0,this.onRender=this._render}get vertices(){return this.geometry.getBuffer("aPosition").data}set vertices(t){this.geometry.getBuffer("aPosition").data=t}_render(){this.autoUpdate&&this.geometry.getBuffer("aPosition").update()}}function SA(r,t){const{width:e,height:s}=r.frame;return t.scale(1/e,1/s),t}var EA=Object.defineProperty,Ci=Object.getOwnPropertySymbols,hx=Object.prototype.hasOwnProperty,cx=Object.prototype.propertyIsEnumerable,dx=(r,t,e)=>t in r?EA(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,AA=(r,t)=>{for(var e in t||(t={}))hx.call(t,e)&&dx(r,e,t[e]);if(Ci)for(var e of Ci(t))cx.call(t,e)&&dx(r,e,t[e]);return r},PA=(r,t)=>{var e={};for(var s in r)hx.call(r,s)&&t.indexOf(s)<0&&(e[s]=r[s]);if(r!=null&&Ci)for(var s of Ci(r))t.indexOf(s)<0&&cx.call(r,s)&&(e[s]=r[s]);return e};const px=class zx extends V{constructor(t){var e,s,i,n,o,a,u,l,h,c;t instanceof A&&(t={texture:t});const d=t,{width:p,height:f,leftWidth:g,rightWidth:m,topHeight:_,bottomHeight:x,texture:b,roundPixels:y}=d,S=PA(d,["width","height","leftWidth","rightWidth","topHeight","bottomHeight","texture","roundPixels"]);super(AA({label:"NineSliceSprite"},S)),this._roundPixels=0,this.renderPipeId="nineSliceSprite",this.batched=!0,this._didSpriteUpdate=!0,this.bounds={minX:0,minY:0,maxX:0,maxY:0},this._leftWidth=(s=g!=null?g:(e=b==null?void 0:b.defaultBorders)==null?void 0:e.left)!=null?s:te.defaultOptions.leftWidth,this._topHeight=(n=_!=null?_:(i=b==null?void 0:b.defaultBorders)==null?void 0:i.top)!=null?n:te.defaultOptions.topHeight,this._rightWidth=(a=m!=null?m:(o=b==null?void 0:b.defaultBorders)==null?void 0:o.right)!=null?a:te.defaultOptions.rightWidth,this._bottomHeight=(l=x!=null?x:(u=b==null?void 0:b.defaultBorders)==null?void 0:u.bottom)!=null?l:te.defaultOptions.bottomHeight,this.bounds.maxX=this._width=(h=p!=null?p:b.width)!=null?h:te.defaultOptions.width,this.bounds.maxY=this._height=(c=f!=null?f:b.height)!=null?c:te.defaultOptions.height,this.allowChildren=!1,this.texture=b!=null?b:zx.defaultOptions.texture,this.roundPixels=y!=null?y:!1}get width(){return this._width}set width(t){this.bounds.maxX=this._width=t,this.onViewUpdate()}get height(){return this._height}set height(t){this.bounds.maxY=this._height=t,this.onViewUpdate()}get leftWidth(){return this._leftWidth}set leftWidth(t){this._leftWidth=t,this.onViewUpdate()}get topHeight(){return this._topHeight}set topHeight(t){this._topHeight=t,this.onViewUpdate()}get rightWidth(){return this._rightWidth}set rightWidth(t){this._rightWidth=t,this.onViewUpdate()}get bottomHeight(){return this._bottomHeight}set bottomHeight(t){this._bottomHeight=t,this.onViewUpdate()}get texture(){return this._texture}set texture(t){t||(t=A.EMPTY);const e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this.onViewUpdate())}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}get originalWidth(){return this._texture.width}get originalHeight(){return this._texture.height}onViewUpdate(){this._didChangeId+=4096,this._didSpriteUpdate=!0,!this.didViewUpdate&&(this.didViewUpdate=!0,this.renderGroup&&this.renderGroup.onChildViewUpdate(this))}addBounds(t){const e=this.bounds;t.addFrame(e.minX,e.minY,e.maxX,e.maxY)}containsPoint(t){const e=this.bounds;return t.x>=e.minX&&t.x<=e.maxX&&t.y>=e.minY&&t.y<=e.maxY}destroy(t){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const e=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(e)}this._texture=null,this.bounds=null}};px.defaultOptions={texture:A.EMPTY};let fx=px;class wA extends fx{constructor(...t){let e=t[0];e instanceof A&&(e={texture:e,leftWidth:t[1],topHeight:t[2],rightWidth:t[3],bottomHeight:t[4]}),super(e)}}function RA(r,t){return t instanceof Wt||t instanceof Pe?t:r==="html"?new Pe(t):new Wt(t)}const MA=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i,mx={},OA="8.0.0";function CA(r,t,e=3){if(mx[t])return;let s=new Error().stack;typeof s=="undefined"?console.warn("PixiJS Deprecation Warning: ",`${t} +Deprecated since v${r}`):(s=s.split(` +`).splice(e).join(` +`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t} +Deprecated since v${r}`),console.warn(s),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t} +Deprecated since v${r}`),console.warn(s))),mx[t]=!0}async function GA(r,t,e=200){const s=await t.extract.base64(r);await t.encoder.commandFinished;const i=e;console.log(`logging texture ${r.source.width}px ${r.source.height}px`);const n=["font-size: 1px;",`padding: ${i}px 300px;`,`background: url(${s}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",n)}var IA=Object.defineProperty,BA=Object.defineProperties,FA=Object.getOwnPropertyDescriptors,gx=Object.getOwnPropertySymbols,DA=Object.prototype.hasOwnProperty,UA=Object.prototype.propertyIsEnumerable,_x=(r,t,e)=>t in r?IA(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,xx=(r,t)=>{for(var e in t||(t={}))DA.call(t,e)&&_x(r,e,t[e]);if(gx)for(var e of gx(t))UA.call(t,e)&&_x(r,e,t[e]);return r},kA=(r,t)=>BA(r,FA(t));const LA=["#000080","#228B22","#8B0000","#4169E1","#008080","#800000","#9400D3","#FF8C00","#556B2F","#8B008B"];let $A=0;function bx(r,t=0,e={color:"#000000"}){r.isRenderGroupRoot&&(e.color=LA[$A++]);let s="";for(let o=0;o