diff --git a/.eslintrc.json b/.eslintrc.json index 695c05ddd..c659f3fc9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,110 +1,55 @@ { - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "settings": { - "react": { - "pragma": "React", - "version": "18.0.0" - } - }, "env": { "browser": true, "es2021": true }, + "parser": "@typescript-eslint/parser", "extends": [ "plugin:react/recommended", - "plugin:react/jsx-runtime", - "plugin:react-hooks/recommended" + "plugin:tailwindcss/recommended" + ], + "overrides": [ + { + "env": { + "node": true + }, + "files": [ + ".eslintrc.ts", + ".eslintrc.tsx" + ], + "parserOptions": { + "sourceType": "script" + } + } ], "plugins": [ - "@typescript-eslint", - "react" + "react", + "@typescript-eslint" ], "rules": { - "linebreak-style": [ - "off" - ], - "quotes": [ - "error", - "single" - ], - "@typescript-eslint/indent": [ - "error", - 4, - { - "SwitchCase": 1 - } - ], - "array-bracket-spacing": [ - "error", - "always" - ], - "brace-style": [ - "error", - "allman" - ], - "template-curly-spacing": [ - "error", - "always" - ], - "no-multi-spaces": [ - "error" - ], - "@typescript-eslint/object-curly-spacing": [ - "error", - "always", - { - "arraysInObjects": true, - "objectsInObjects": false - } - ], - "@typescript-eslint/ban-types": [ - "error", - { - "types": { - "String": true, - "Boolean": true, - "Number": true, - "Symbol": true, - "{}": false, - "Object": false, - "object": false, - "Function": false - }, - "extendDefaults": true - } - ], - "no-switch-case-fall-through": [ - "off" - ], - "jsx-quotes": [ - "error" - ], - "react/prop-types": [ - "off" - ], - "react/jsx-curly-spacing": [ - "error", - { - "when": "always", - "children": true - } - ], - "react/jsx-equals-spacing": [ - "error" - ], - "react/jsx-newline": [ - "error", - { - "prevent": true - } - ] + "tailwindcss/no-custom-classname": "off", + "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1, "maxBOF": 1 }], + "no-multi-spaces": ["error", { "ignoreEOLComments": false }], + "no-duplicate-imports": ["error", { "includeExports": true }], + "no-empty-character-class": "error", + "eqeqeq": ["error", "always"], + "no-duplicate-case": "error", + "comma-dangle": ["error", "never"], + "quotes": [ "error", "double" ], + "semi": [ "error", "never" ], + "indent": [ "error", 4 ], + "react/react-in-jsx-scope": "off", + "react/prop-types": "off", + "react/no-unescaped-entities": "off", + "object-curly-spacing": [ "error", "always" ], + "array-bracket-spacing": [ "error", "always" ], + "space-infix-ops": ["error", { "int32Hint": false }], + "space-in-parens": ["error", "never"], + "space-before-blocks": ["error", "always"] + }, + "settings": { + "react": { + "version": "detect" + } } } diff --git a/.gitignore b/.gitignore index 154341fb1..c8ba38a64 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /dist +/illumina /tmp /out-tsc /node_modules diff --git a/.vscode/settings.json b/.vscode/settings.json index 3fdf856d0..3edccc924 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,32 +1,15 @@ { "typescript.tsdk": "node_modules\\typescript\\lib", "typescript.preferences.importModuleSpecifier": "relative", - "typescript.preferences.quoteStyle": "single", - "typescript.format.placeOpenBraceOnNewLineForControlBlocks": true, - "typescript.format.placeOpenBraceOnNewLineForFunctions": true, - "editor.wordWrap": "on", + "typescript.preferences.quoteStyle": "double", "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.sortJSON": false, - "source.organizeImports": true + "source.fixAll.eslint": "explicit", + "source.organizeImports": "explicit" }, - "editor.formatOnSave": false, - "git.ignoreLimitWarning": true, + "editor.insertSpaces": true, + "editor.tabSize": 2, + "editor.formatOnSave": true, "files.eol": "\n", - "files.insertFinalNewline": true, - "files.trimFinalNewlines": true, "emmet.showExpandedAbbreviation": "never", - "eslint.format.enable": true, - "eslint.validate": [ - "javascript", - "typescript" - ], - "eslint.workingDirectories": [ - { - "pattern": "./src" - } - ], "javascript.format.enable": false, - "thunder-client.saveToWorkspace": false, - "thunder-client.workspaceRelativePath": "." } diff --git a/README.md b/README.md index 7b6ffc14d..34a654ea5 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,34 @@ -# Nitro React v2.1 +# Illumina Nitro React v2.1 ## Prerequisites -- [Git](https://git-scm.com/) -- [NodeJS](https://nodejs.org/) >= 18 - - If using NodeJS < 18 remove `--openssl-legacy-provider` from the package.json scripts -- [Yarn](https://yarnpkg.com/) `npm i yarn -g` +- [Git](https://git-scm.com/) +- [NodeJS](https://nodejs.org/) >= 18 + - If using NodeJS < 18 remove `--openssl-legacy-provider` from the package.json scripts +- [Yarn](https://yarnpkg.com/) `npm i yarn -g` ## Installation -- First you should open terminal and navigate to the folder where you want to clone Nitro -- Clone Nitro - - `git clone https://git.krews.org/nitro/nitro-react.git` -- Install the dependencies - - `yarn install` - - This may take some time, please be patient -- Rename a few files - - Rename `public/renderer-config.json.example` to `public/renderer-config.json` - - Rename `public/ui-config.json.example` to `public/ui-config.json` -- Set your links - - Open `public/renderer-config.json` - - Update `socket.url, asset.url, image.library.url, & hof.furni.url` - - Open `public/ui-config.json` - - Update `camera.url, thumbnails.url, url.prefix, habbopages.url` - - You can override any variable by passing it to `NitroConfig` in the index.html +- First you should open terminal and navigate to the folder where you want to clone Nitro +- Clone Nitro + - `git clone https://git.krews.org/nitro/nitro-react.git` +- Install the dependencies + - `yarn install` + - This may take some time, please be patient +- Rename a few files + - Rename `public/renderer-config.json.example` to `public/renderer-config.json` + - Rename `public/ui-config.json.example` to `public/ui-config.json` +- Set your links + - Open `public/renderer-config.json` + - Update `socket.url, asset.url, image.library.url, & hof.furni.url` + - Open `public/ui-config.json` + - Update `camera.url, thumbnails.url, url.prefix, habbopages.url` + - You can override any variable by passing it to `NitroConfig` in the index.html ## Usage -- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions -- See [Morningstar Websockets](https://git.krews.org/nitro/ms-websockets) for instructions on configuring websockets on your server +- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions +- See [Morningstar Websockets](https://git.krews.org/nitro/ms-websockets) for instructions on configuring websockets on your server ### Development @@ -46,5 +46,5 @@ To build a production version of Nitro just run the following command yarn build:prod ``` -- A `dist` folder will be generated, these are the files that must be uploaded to your webserver -- Consult your CMS documentation for compatibility with Nitro and how to add the production files +- A `dist` folder will be generated, these are the files that must be uploaded to your webserver +- Consult your CMS documentation for compatibility with Nitro and how to add the production files diff --git a/index.html b/index.html index dd4538b5d..b7a0fcafb 100644 --- a/index.html +++ b/index.html @@ -9,27 +9,27 @@ - - + + - - Nitro + + Illumina UI -
+
- + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..ee58eafe3 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6692 @@ +{ + "name": "nitro-react", + "version": "2.1.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "nitro-react", + "version": "2.1.1", + "dependencies": { + "@nitrots/nitro-renderer": "^1.6.6", + "@tanstack/react-virtual": "^3.0.0-alpha.0", + "react": "^18.2.0", + "react-bootstrap": "^2.2.2", + "react-dom": "^18.2.0", + "react-icons": "^4.7.1", + "react-slider": "^2.0.0", + "typescript": "^4.3.5", + "use-between": "^1.3.4" + }, + "devDependencies": { + "@types/node": "^18.6.1", + "@types/react": "^18.0.15", + "@types/react-dom": "^18.0.6", + "@types/react-slider": "^1.3.1", + "@typescript-eslint/eslint-plugin": "^5.30.7", + "@typescript-eslint/parser": "^5.30.7", + "@vitejs/plugin-react": "^3.0.0", + "autoprefixer": "^10.4.17", + "eslint": "^8.20.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jsx-a11y": "^6.6.0", + "eslint-plugin-react": "^7.30.1", + "eslint-plugin-tailwindcss": "^3.15.1", + "postcss": "^8.4.33", + "sass": "^1.56.2", + "tailwindcss": "^3.4.1", + "vite": "^4.4.5", + "vite-plugin-javascript-obfuscator": "^3.1.0", + "vite-plugin-minify": "^1.5.2" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/generator": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz", + "integrity": "sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz", + "integrity": "sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", + "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.15", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.15.tgz", + "integrity": "sha512-XmrFwEOYauKte9QjS6hz60FpOCnw4zaPAb7XV7O4lx1r39XjJhTN7ZpXqJh4sN6q60zbP6QwAVVA8N/wUyBH/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", + "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "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/@isaacs/cliui/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/@isaacs/cliui/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/@javascript-obfuscator/escodegen": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@javascript-obfuscator/escodegen/-/escodegen-2.3.0.tgz", + "integrity": "sha512-QVXwMIKqYMl3KwtTirYIA6gOCiJ0ZDtptXqAv/8KWLG9uQU2fZqTVy7a/A5RvcoZhbDoFfveTxuGxJ5ibzQtkw==", + "dev": true, + "dependencies": { + "@javascript-obfuscator/estraverse": "^5.3.0", + "esprima": "^4.0.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/@javascript-obfuscator/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@javascript-obfuscator/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@javascript-obfuscator/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@javascript-obfuscator/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@javascript-obfuscator/estraverse": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@javascript-obfuscator/estraverse/-/estraverse-5.4.0.tgz", + "integrity": "sha512-CZFX7UZVN9VopGbjTx4UXaXsi9ewoM1buL0kY7j1ftYdSs7p2spv9opxFjHlQ/QGTgh4UqufYqJJ0WKLml7b6w==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT" + }, + "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/@nitrots/nitro-renderer": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@nitrots/nitro-renderer/-/nitro-renderer-1.6.6.tgz", + "integrity": "sha512-VMxn4gAV49G1nnOrtL6koLnJglHdp83zILcKe8DTZsZXX6GOGU2wST1sSnHvdcH28KpesqrCP5dyJGKC/0ylYQ==", + "license": "GPL-3.0", + "dependencies": { + "@pixi/app": "~6.5.0", + "@pixi/basis": "~6.5.0", + "@pixi/canvas-display": "~6.5.0", + "@pixi/canvas-extract": "~6.5.0", + "@pixi/canvas-renderer": "~6.5.0", + "@pixi/constants": "~6.5.0", + "@pixi/core": "~6.5.0", + "@pixi/display": "~6.5.0", + "@pixi/events": "~6.5.0", + "@pixi/extensions": "~6.5.0", + "@pixi/extract": "~6.5.0", + "@pixi/filter-alpha": "~6.5.0", + "@pixi/filter-color-matrix": "~6.5.0", + "@pixi/graphics": "~6.5.0", + "@pixi/graphics-extras": "~6.5.0", + "@pixi/interaction": "~6.5.0", + "@pixi/loaders": "~6.5.0", + "@pixi/math": "~6.5.0", + "@pixi/math-extras": "~6.5.0", + "@pixi/mixin-cache-as-bitmap": "~6.5.0", + "@pixi/mixin-get-child-by-name": "~6.5.0", + "@pixi/mixin-get-global-position": "~6.5.0", + "@pixi/polyfill": "~6.5.0", + "@pixi/runner": "~6.5.0", + "@pixi/settings": "~6.5.0", + "@pixi/sprite": "~6.5.0", + "@pixi/sprite-tiling": "~6.5.0", + "@pixi/spritesheet": "~6.5.0", + "@pixi/text": "~6.5.0", + "@pixi/ticker": "~6.5.0", + "@pixi/tilemap": "^3.2.2", + "@pixi/utils": "~6.5.0", + "gifuct-js": "^2.1.2", + "howler": "^2.2.3", + "pako": "^2.0.4" + } + }, + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pixi/app": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/app/-/app-6.5.10.tgz", + "integrity": "sha512-VsNHLajZ5Dbc/Zrj7iWmIl3eu6Fec+afjW/NXXezD8Sp3nTDF0bv5F+GDgN/zSc2gqIvPHyundImT7hQGBDghg==", + "license": "MIT", + "peerDependencies": { + "@pixi/core": "6.5.10", + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/basis": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/basis/-/basis-6.5.10.tgz", + "integrity": "sha512-FPhp93S/v8mrebosS1lleEkVCgaQDKMn0ml5jKofoW5wqYF2dLst0evUhMYQ/oZiauxaGrBpULv55d5kPFYoBQ==", + "license": "MIT", + "peerDependencies": { + "@pixi/compressed-textures": "6.5.10", + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/loaders": "6.5.10", + "@pixi/runner": "6.5.10", + "@pixi/settings": "6.5.10" + } + }, + "node_modules/@pixi/canvas-display": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/canvas-display/-/canvas-display-6.5.10.tgz", + "integrity": "sha512-pT0uhEoy24ei/5JwCYgpf+4A5vP8X5zFICJJOm2bE0k/veLc/nIpHj8SL3jG4CDmYGNAntVodEy+/E23HfzZxQ==", + "license": "MIT", + "peerDependencies": { + "@pixi/display": "6.5.10" + } + }, + "node_modules/@pixi/canvas-extract": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/canvas-extract/-/canvas-extract-6.5.10.tgz", + "integrity": "sha512-HEgZYvomZx3slLUDbX/tyn2+x8PprFUI5FdRHIN72uED34O09RrbvtQgymrCJCs/aZg+cxd85LRdmNIBn/LyLA==", + "license": "MIT", + "peerDependencies": { + "@pixi/canvas-renderer": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/canvas-renderer": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/canvas-renderer/-/canvas-renderer-6.5.10.tgz", + "integrity": "sha512-DzRJLtjt4fuxMj8kgwBxJgmdf3hmuzC8nTElEHbDH07FbVJSwD9GzNIxFli82jrKUo1nyMBoI4bUU+D+MOhAFw==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/settings": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/compressed-textures": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/compressed-textures/-/compressed-textures-6.5.10.tgz", + "integrity": "sha512-41NT5mkfam47DrkB8xMp3HUZDt7139JMB6rVNOmb3u2vm+2mdy9tzi5s9nN7bG9xgXlchxcFzytTURk+jwXVJA==", + "peer": true, + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/loaders": "6.5.10", + "@pixi/settings": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/constants": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/constants/-/constants-6.5.10.tgz", + "integrity": "sha512-PUF2Y9YISRu5eVrVVHhHCWpc/KmxQTg3UH8rIUs8UI9dCK41/wsPd3pEahzf7H47v7x1HCohVZcFO3XQc1bUDw==", + "license": "MIT" + }, + "node_modules/@pixi/core": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/core/-/core-6.5.10.tgz", + "integrity": "sha512-Gdzp5ENypyglvsh5Gv3teUZnZnmizo4xOsL+QqmWALdFlJXJwLJMVhKVThV/q/095XR6i4Ou54oshn+m4EkuFw==", + "license": "MIT", + "dependencies": { + "@types/offscreencanvas": "^2019.6.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/pixijs" + }, + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/extensions": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/runner": "6.5.10", + "@pixi/settings": "6.5.10", + "@pixi/ticker": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/display": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/display/-/display-6.5.10.tgz", + "integrity": "sha512-NxFdDDxlbH5fQkzGHraLGoTMucW9pVgXqQm13TSmkA3NWIi/SItHL4qT2SI8nmclT9Vid1VDEBCJFAbdeuQw1Q==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/settings": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/events": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/events/-/events-6.5.10.tgz", + "integrity": "sha512-LRKZ4tkilgTKRI4hmYEBhEzUbDMOf9YBnBPXDJgfe08k5/taVPVvEhMn4cs5UKTf9ALxTF+EOzrg8n2+kfMuJA==", + "license": "MIT", + "peerDependencies": { + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/extensions": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/extensions/-/extensions-6.5.10.tgz", + "integrity": "sha512-EIUGza+E+sCy3dupuIjvRK/WyVyfSzHb5XsxRaxNrPwvG1iIUIqNqZ3owLYCo4h17fJWrj/yXVufNNtUKQccWQ==", + "license": "MIT" + }, + "node_modules/@pixi/extract": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/extract/-/extract-6.5.10.tgz", + "integrity": "sha512-hXFIc4EGs14GFfXAjT1+6mzopzCMWeXeai38/Yod3vuBXkkp8+ksen6kE09vTnB9l1IpcIaCM+XZEokuqoGX2A==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/filter-alpha": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-6.5.10.tgz", + "integrity": "sha512-GWHLJvY0QOIDRjVx0hdUff6nl/PePQg84i8XXPmANrvA+gJ/eSRTQRmQcdgInQfawENADB/oRqpcCct6IAcKpQ==", + "license": "MIT", + "peerDependencies": { + "@pixi/core": "6.5.10" + } + }, + "node_modules/@pixi/filter-color-matrix": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-6.5.10.tgz", + "integrity": "sha512-C2S44/EoWTrhqedLWOZTq9GZV5loEq1+MhyK9AUzEubWGMHhou1Juhn2mRZ7R6flKPCRQNKrXpStUwCAouud3Q==", + "license": "MIT", + "peerDependencies": { + "@pixi/core": "6.5.10" + } + }, + "node_modules/@pixi/graphics": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-6.5.10.tgz", + "integrity": "sha512-KPHGJ910fi8bRQQ+VcTIgrK+bKIm8yAQaZKPqMtm14HzHPGcES6HkgeNY1sd7m8J4aS9btm5wOSyFu0p5IzTpA==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/sprite": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/graphics-extras": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/graphics-extras/-/graphics-extras-6.5.10.tgz", + "integrity": "sha512-PgaOKubX+3GobTqDtTRnF50AqA+z06kr/WNWXoT5/fcWMcW5rwcUpsL00R9ZTi37ohoZUMjAyfLUr7sIUQpzdA==", + "license": "MIT", + "peerDependencies": { + "@pixi/graphics": "6.5.10", + "@pixi/math": "6.5.10" + } + }, + "node_modules/@pixi/interaction": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/interaction/-/interaction-6.5.10.tgz", + "integrity": "sha512-v809pJmXA2B9dV/vdrDMUqJT+fBB/ARZli2YRmI2dPbEbkaYr8FNmxCAJnwT8o+ymTx044Ie820hn9tVrtMtfA==", + "license": "MIT", + "peerDependencies": { + "@pixi/core": "6.5.10", + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/ticker": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/loaders": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/loaders/-/loaders-6.5.10.tgz", + "integrity": "sha512-AuK7mXBmyVsDFL9DDFPB8sqP8fwQ2NOktvu98bQuJl0/p/UeK/0OAQnF3wcf3FeBv5YGXfNHL21c2DCisjKfTg==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/math": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/math/-/math-6.5.10.tgz", + "integrity": "sha512-fxeu7ykVbMGxGV2S3qRTupHToeo1hdWBm8ihyURn3BMqJZe2SkZEECPd5RyvIuuNUtjRnmhkZRnF3Jsz2S+L0g==", + "license": "MIT" + }, + "node_modules/@pixi/math-extras": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/math-extras/-/math-extras-6.5.10.tgz", + "integrity": "sha512-TG2zzvdV0F7FmZtsjSrW12ub+QUZadBRCQZt0IaxTl6VBhysBaYhPILC5YpfGhim1uuF1L8W0LLWaGLI8T3VNg==", + "license": "MIT", + "peerDependencies": { + "@pixi/math": "6.5.10" + } + }, + "node_modules/@pixi/mixin-cache-as-bitmap": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.5.10.tgz", + "integrity": "sha512-HV4qPZt8R7uuPZf1XE5S0e3jbN4+/EqgAIkueIyK3Em+0IO1rCmIbzzYxFPxkElMUu5VvN1r4hXK846z9ITnhw==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/settings": "6.5.10", + "@pixi/sprite": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/mixin-get-child-by-name": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.5.10.tgz", + "integrity": "sha512-YYd9wjnI/4aKY0H5Ij413UppVZn3YE1No2CZrNevV6WbhylsJucowY3hJihtl9mxkpwtaUIyWMjmphkbOinbzA==", + "license": "MIT", + "peerDependencies": { + "@pixi/display": "6.5.10" + } + }, + "node_modules/@pixi/mixin-get-global-position": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.5.10.tgz", + "integrity": "sha512-A83gTZP9CdQAyrAvOZl1P707Q0QvIC0V8UnBAMd4GxuhMOXJtXVPCdmfPVXUrfoywgnH+/Bgimq5xhsXTf8Hzg==", + "license": "MIT", + "peerDependencies": { + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10" + } + }, + "node_modules/@pixi/polyfill": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/polyfill/-/polyfill-6.5.10.tgz", + "integrity": "sha512-KDTWyr285VvPM8GGTVIZAhmxGrOlTznUGK/9kWS3GtrogwLWn41S/86Yej1gYvotVyUomCcOok33Jzahb+vX1w==", + "license": "MIT", + "dependencies": { + "object-assign": "^4.1.1", + "promise-polyfill": "^8.2.0" + } + }, + "node_modules/@pixi/runner": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/runner/-/runner-6.5.10.tgz", + "integrity": "sha512-4HiHp6diCmigJT/DSbnqQP62OfWKmZB7zPWMdV1AEdr4YT1QxzXAW1wHg7dkoEfyTHqZKl0tm/zcqKq/iH7tMA==", + "license": "MIT" + }, + "node_modules/@pixi/settings": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/settings/-/settings-6.5.10.tgz", + "integrity": "sha512-ypAS5L7pQ2Qb88yQK72bXtc7sD8OrtLWNXdZ/gnw5kwSWCFaOSoqhKqJCXrR5DQtN98+RQefwbEAmMvqobhFyw==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10" + } + }, + "node_modules/@pixi/sprite": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/sprite/-/sprite-6.5.10.tgz", + "integrity": "sha512-UiK+8LgM9XQ/SBDKjRgZ8WggdOSlFRXqiWjEZVmNkiyU8HvXeFzWPRhpc8RR1zDwAUhZWKtMhF8X/ba9m+z2lg==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/settings": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/sprite-tiling": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/sprite-tiling/-/sprite-tiling-6.5.10.tgz", + "integrity": "sha512-lDFcPuwExrdJhli+WmjPivChjeCG6NiRl36iQ8n2zVi/MYVv9qfKCA6IdU7HBWk1AZdsg6KUTpwfmVLUI+qz3w==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/core": "6.5.10", + "@pixi/display": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/sprite": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/spritesheet": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/spritesheet/-/spritesheet-6.5.10.tgz", + "integrity": "sha512-7uOZ1cYyYtPb0ZEgXV1SZ8ujtluZNY0TL5z3+Qc8cgGGZK/MaWG7N6Wf+uR4BR2x8FLNwcyN5IjbQDKCpblrmg==", + "license": "MIT", + "peerDependencies": { + "@pixi/core": "6.5.10", + "@pixi/loaders": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/text": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/text/-/text-6.5.10.tgz", + "integrity": "sha512-ikwkonLJ+6QmEVW8Ji9fS5CjrKNbU4mHzYuwRQas/VJQuSWgd0myCcaw6ZbF1oSfQe70HgbNOR0sH8Q3Com0qg==", + "license": "MIT", + "peerDependencies": { + "@pixi/core": "6.5.10", + "@pixi/math": "6.5.10", + "@pixi/settings": "6.5.10", + "@pixi/sprite": "6.5.10", + "@pixi/utils": "6.5.10" + } + }, + "node_modules/@pixi/ticker": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/ticker/-/ticker-6.5.10.tgz", + "integrity": "sha512-UqX1XYtzqFSirmTOy8QAK4Ccg4KkIZztrBdRPKwFSOEiKAJoGDCSBmyQBo/9aYQKGObbNnrJ7Hxv3/ucg3/1GA==", + "license": "MIT", + "peerDependencies": { + "@pixi/extensions": "6.5.10", + "@pixi/settings": "6.5.10" + } + }, + "node_modules/@pixi/tilemap": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@pixi/tilemap/-/tilemap-3.2.2.tgz", + "integrity": "sha512-svdmMyJP63vdae3t66tCmE8IWeO/6lD1xXU+5gzfxqxJS5seTp2bm8mQok2c8PF0O6l/NYlLz6BRklOuEuHboQ==", + "license": "MIT", + "peerDependencies": { + "@pixi/constants": "^6.0.4", + "@pixi/core": "^6.0.4", + "@pixi/display": "^6.0.4", + "@pixi/graphics": "^6.0.4", + "@pixi/math": "^6.0.4", + "@pixi/utils": "^6.0.4" + } + }, + "node_modules/@pixi/utils": { + "version": "6.5.10", + "resolved": "https://registry.npmjs.org/@pixi/utils/-/utils-6.5.10.tgz", + "integrity": "sha512-4f4qDMmAz9IoSAe08G2LAxUcEtG9jSdudfsMQT2MG+OpfToirboE6cNoO0KnLCvLzDVE/mfisiQ9uJbVA9Ssdw==", + "license": "MIT", + "dependencies": { + "@types/earcut": "^2.1.0", + "earcut": "^2.2.4", + "eventemitter3": "^3.1.0", + "url": "^0.11.0" + }, + "peerDependencies": { + "@pixi/constants": "6.5.10", + "@pixi/settings": "6.5.10" + } + }, + "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/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@reach/observe-rect": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", + "integrity": "sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ==", + "license": "MIT" + }, + "node_modules/@react-aria/ssr": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.7.0.tgz", + "integrity": "sha512-bfufjg4ESE5giN+Fxj1XIzS5f/YIhqcGc+Ve+vUUKU8xZ8t/Xtjlv8F3kjqDBQdk//n3mluFY7xG1wQVB9rMLQ==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" + } + }, + "node_modules/@restart/hooks": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.11.tgz", + "integrity": "sha512-Ft/ncTULZN6ldGHiF/k5qt72O8JyRMOeg0tApvCni8LkoiEahO+z3TNxfXIVGy890YtWVDvJAl662dVJSJXvMw==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@restart/ui": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.6.tgz", + "integrity": "sha512-eC3puKuWE1SRYbojWHXnvCNHGgf3uzHCb6JOhnF4OXPibOIPEkR1sqDSkL643ydigxwh+ruCa1CmYHlzk7ikKA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.21.0", + "@popperjs/core": "^2.11.6", + "@react-aria/ssr": "^3.5.0", + "@restart/hooks": "^0.4.9", + "@types/warning": "^3.0.0", + "dequal": "^2.0.3", + "dom-helpers": "^5.2.0", + "uncontrollable": "^8.0.1", + "warning": "^4.0.3" + }, + "peerDependencies": { + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + } + }, + "node_modules/@restart/ui/node_modules/uncontrollable": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-8.0.2.tgz", + "integrity": "sha512-/GDx+K1STGtpgTsj5Dj3J51YaKxZDblbCQHTH1zHLuoBEWodj6MjtRVv3TUijj1JYLRLSFsFzN8NV4M3QV4d9w==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.14.0" + } + }, + "node_modules/@swc/helpers": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", + "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@swc/helpers/node_modules/tslib": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", + "license": "0BSD" + }, + "node_modules/@tanstack/react-virtual": { + "version": "3.0.0-alpha.0", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.0.0-alpha.0.tgz", + "integrity": "sha512-WpHU/dt34NwZZ8qtiE05TF+nX/b1W6qrWZarO+s8jJFpPVicrTbJKp5Bjt4eSJuk7aYw272oEfsH3ABBRgj+3A==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.16.7", + "@reach/observe-rect": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": ">=16" + } + }, + "node_modules/@types/earcut": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/earcut/-/earcut-2.1.1.tgz", + "integrity": "sha512-w8oigUCDjElRHRRrMvn/spybSMyX8MTkKA5Dv+tS1IE/TgmNZPqUYtvYBXGY8cieSE66gm+szeK+bnbxC2xHTQ==", + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.16.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.19.tgz", + "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/offscreencanvas": { + "version": "2019.7.0", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.0.tgz", + "integrity": "sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==", + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.2.15", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.15.tgz", + "integrity": "sha512-oEjE7TQt1fFTFSbf8kkNuc798ahTUzn3Le67/PWjE8MAfYAD/qB7O8hSTcromLFqHCt9bcdOg5GXMokzTjJ5SA==", + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.2.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.7.tgz", + "integrity": "sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-slider": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/react-slider/-/react-slider-1.3.1.tgz", + "integrity": "sha512-4X2yK7RyCIy643YCFL+bc6XNmcnBtt8n88uuyihvcn5G7Lut23eNQU3q3KmwF7MWIfKfsW5NxCjw0SeDZRtgaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.6.tgz", + "integrity": "sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==", + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.3", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", + "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", + "license": "MIT" + }, + "node_modules/@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/validator": { + "version": "13.11.9", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.9.tgz", + "integrity": "sha512-FCTsikRozryfayPuiI46QzH3fnrOoctTjvOYZkho9BTFLCOZ2rgZJHMOVgCOfttjPJcgOx52EpkY0CMfy87MIw==", + "dev": true + }, + "node_modules/@types/warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz", + "integrity": "sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA==", + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-3.1.0.tgz", + "integrity": "sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.20.12", + "@babel/plugin-transform-react-jsx-self": "^7.18.6", + "@babel/plugin-transform-react-jsx-source": "^7.19.6", + "magic-string": "^0.27.0", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.1.0-beta.0" + } + }, + "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/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "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, + "license": "ISC", + "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/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", + "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "dev": true, + "dependencies": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, + "node_modules/ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", + "dev": true, + "license": "ISC" + }, + "node_modules/autoprefixer": { + "version": "10.4.17", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", + "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", + "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.22.2", + "caniuse-lite": "^1.0.30001578", + "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/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axe-core": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz", + "integrity": "sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/axobject-query": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", + "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "dequal": "^2.0.3" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "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, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", + "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", + "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.30001580", + "electron-to-chromium": "^1.4.648", + "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-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/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "node_modules/camel-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "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.30001695", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001695.tgz", + "integrity": "sha512-vHyLade6wTgI2u1ec3WQBxv+2BrTERV28UXQu9LO6lZ9pYeMk34vjXFLOxo1A4UBA8XTL4njRQZdno/yYaSmWw==", + "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/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chance": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.9.tgz", + "integrity": "sha512-TfxnA/DcZXRTA4OekA2zL9GH8qscbbl6X0ZqU4tXhGveVY/mXWvEQLt5GwZcYXTEyEFflVtj+pG8nc8EwSm1RQ==", + "dev": true + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "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/class-validator": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", + "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", + "dev": true, + "dependencies": { + "@types/validator": "^13.7.10", + "libphonenumber-js": "^1.10.14", + "validator": "^13.7.0" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==", + "license": "MIT" + }, + "node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "dev": true, + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "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, + "license": "MIT", + "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, + "license": "MIT" + }, + "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/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "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, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "dev": true, + "engines": { + "node": "*" + } + }, + "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/csstype": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", + "license": "MIT" + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "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/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dot-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==", + "license": "ISC" + }, + "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.649", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.649.tgz", + "integrity": "sha512-dq/owIaALxZGqWm5RXpKQ4baX6aDC19e2Z16c8SXYN+I71PyEKjbVqQUgm7kcuk8CRqljTKXbolo0XXDjxnh2w==", + "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, + "license": "MIT" + }, + "node_modules/es-abstract": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.18.15", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.15.tgz", + "integrity": "sha512-3WOOLhrvuTGPRzQPU6waSDWrDTnQriia72McWcn6UCi43GhCHrXH4S59hKMeez+IITmdUuUyvbU9JIp+t3xlPQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.15", + "@esbuild/android-arm64": "0.18.15", + "@esbuild/android-x64": "0.18.15", + "@esbuild/darwin-arm64": "0.18.15", + "@esbuild/darwin-x64": "0.18.15", + "@esbuild/freebsd-arm64": "0.18.15", + "@esbuild/freebsd-x64": "0.18.15", + "@esbuild/linux-arm": "0.18.15", + "@esbuild/linux-arm64": "0.18.15", + "@esbuild/linux-ia32": "0.18.15", + "@esbuild/linux-loong64": "0.18.15", + "@esbuild/linux-mips64el": "0.18.15", + "@esbuild/linux-ppc64": "0.18.15", + "@esbuild/linux-riscv64": "0.18.15", + "@esbuild/linux-s390x": "0.18.15", + "@esbuild/linux-x64": "0.18.15", + "@esbuild/netbsd-x64": "0.18.15", + "@esbuild/openbsd-x64": "0.18.15", + "@esbuild/sunos-x64": "0.18.15", + "@esbuild/win32-arm64": "0.18.15", + "@esbuild/win32-ia32": "0.18.15", + "@esbuild/win32-x64": "0.18.15" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.45.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", + "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.6.0", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", + "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.7", + "aria-query": "^5.1.3", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.6.2", + "axobject-query": "^3.1.1", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "has": "^1.0.3", + "jsx-ast-utils": "^3.3.3", + "language-tags": "=1.0.5", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.0.tgz", + "integrity": "sha512-qewL/8P34WkY8jAqdQxsiL82pDUeT7nhs8IsuXgfgnsEloKCT4miAV9N9kGtx7/KM9NH/NCGUE7Edt9iGxLXFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", + "doctrine": "^2.1.0", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.4", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.8" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", + "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.9.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/eslint-plugin-tailwindcss": { + "version": "3.15.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.15.1.tgz", + "integrity": "sha512-4RXRMIaMG07C2TBEW1k0VM4+dDazz1kxcZhkK4zirvmHGZTA4jnlSO2kq5mamuSPi+Wo17dh2SlC8IyFBuCd7Q==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.5", + "postcss": "^8.4.4" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "tailwindcss": "^3.4.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", + "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eslint/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, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", + "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "dev": true, + "license": "MIT", + "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/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "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, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "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.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/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "license": "MIT", + "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/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gifuct-js": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/gifuct-js/-/gifuct-js-2.1.2.tgz", + "integrity": "sha512-rI2asw77u0mGgwhV3qA+OEgYqaDn5UNqgs+Bx0FGwSpuqfYn+Ir6RQY5ENNQ8SbIiG/m5gVa7CD5RriO4f4Lsg==", + "license": "MIT", + "dependencies": { + "js-binary-schema-parser": "^2.0.3" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "license": "ISC", + "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/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, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/howler": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.3.tgz", + "integrity": "sha512-QM0FFkw0LRX1PR8pNzJVAY25JhIWvbKMBFM4gqk+QdV+kPXOhleWGCB6AiAF/goGjIHK2e/nIElplvjQwhr0jg==", + "license": "MIT" + }, + "node_modules/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==", + "dev": true, + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "^5.2.2", + "commander": "^8.3.0", + "he": "^1.2.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.10.0" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/html-minifier-terser/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.1.tgz", + "integrity": "sha512-lj9cnmB/kVS0QHsJnYKD1uo3o39nrbKxszjnqS9Fr6NB7bZzW45U6WSGBPKXDL/CvDKqDNPA4r3DoDQ8GTxo2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "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==", + "dev": true, + "license": "ISC", + "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==", + "dev": true, + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/inversify": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/inversify/-/inversify-6.0.1.tgz", + "integrity": "sha512-B3ex30927698TJENHR++8FfEaJGqoWOgI6ZY5Ht/nLUsFCwHn6akbwtnUAPCgUepAnTpe2qHxhDNjoKLyz6rgQ==", + "dev": true + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "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, + "license": "MIT", + "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-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "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-obfuscator": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.1.0.tgz", + "integrity": "sha512-ckC0VFKQ0/sFtLH9apW/ZLfsP8LuZqZhVEM4VTJ5KLzyLaodW6C1lTU8808eboDmddKyvd2uyRx5bzc0Me0GYg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@javascript-obfuscator/escodegen": "2.3.0", + "@javascript-obfuscator/estraverse": "5.4.0", + "acorn": "8.8.2", + "assert": "2.0.0", + "chalk": "4.1.2", + "chance": "1.1.9", + "class-validator": "0.14.0", + "commander": "10.0.0", + "eslint-scope": "7.1.1", + "eslint-visitor-keys": "3.3.0", + "fast-deep-equal": "3.1.3", + "inversify": "6.0.1", + "js-string-escape": "1.0.1", + "md5": "2.3.0", + "mkdirp": "2.1.3", + "multimatch": "5.0.0", + "opencollective-postinstall": "2.0.3", + "process": "0.11.10", + "reflect-metadata": "0.1.13", + "source-map-support": "0.5.21", + "string-template": "1.0.0", + "stringz": "2.1.0", + "tslib": "2.5.0" + }, + "bin": { + "javascript-obfuscator": "bin/javascript-obfuscator" + }, + "engines": { + "node": "^12.22.0 || ^14.0.0 || ^16.0.0 || ^17.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/javascript-obfuscator" + } + }, + "node_modules/javascript-obfuscator/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/javascript-obfuscator/node_modules/commander": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.0.tgz", + "integrity": "sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/javascript-obfuscator/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/javascript-obfuscator/node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/javascript-obfuscator/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, + "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/js-binary-schema-parser": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/js-binary-schema-parser/-/js-binary-schema-parser-2.0.3.tgz", + "integrity": "sha512-xezGJmOb4lk/M1ZZLTR/jaBHQ4gG/lqQnJqdIv4721DMggsa1bDVlHXNeHYogaIEHD9vCRv0fcL4hMA+Coarkg==", + "license": "MIT" + }, + "node_modules/js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsx-ast-utils": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.4.tgz", + "integrity": "sha512-fX2TVdCViod6HwKEtSWGHs57oFhVfCMwieb9PuRDgjDPh5XeqJiHFFFJCHxU5cnTc3Bu/GRL+kPiFmw8XWOfKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/language-subtag-registry": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", + "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "language-subtag-registry": "~0.3.2" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/libphonenumber-js": { + "version": "1.10.61", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.61.tgz", + "integrity": "sha512-TsQsyzDttDvvzWNkbp/i0fVbzTGJIG0mUu/uNalIaRQEYeJxVQ/FPg+EJgSqfSXezREjM0V3RZ8cLVsKYhhw0Q==", + "dev": true + }, + "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/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lower-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "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, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "dev": true, + "dependencies": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, + "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, + "license": "MIT", + "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, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "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": "2.1.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", + "integrity": "sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==", + "dev": true, + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/multimatch": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz", + "integrity": "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==", + "dev": true, + "dependencies": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": 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/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true, + "license": "MIT" + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/no-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "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/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, + "license": "MIT", + "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==", + "license": "MIT", + "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/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", + "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.hasown": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", + "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "dev": true, + "bin": { + "opencollective-postinstall": "index.js" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, + "node_modules/param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/param-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/pascal-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "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, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.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/path-scurry/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/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "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==", + "dev": 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==", + "dev": 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.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "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.15", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "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/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/promise-polyfill": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.3.0.tgz", + "integrity": "sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==", + "license": "MIT" + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types-extra": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz", + "integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==", + "license": "MIT", + "dependencies": { + "react-is": "^16.3.2", + "warning": "^4.0.0" + }, + "peerDependencies": { + "react": ">=0.14.0" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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" + } + ], + "license": "MIT" + }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-bootstrap": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.8.0.tgz", + "integrity": "sha512-e/aNtxl0Z2ozrIaR82jr6Zz7ss9GSoaXpQaxmvtDUsTZIq/XalkduR/ZXP6vbQHz2T4syvjA+4FbtwELxxmpww==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.21.0", + "@restart/hooks": "^0.4.9", + "@restart/ui": "^1.6.3", + "@types/react-transition-group": "^4.4.5", + "classnames": "^2.3.2", + "dom-helpers": "^5.2.1", + "invariant": "^2.2.4", + "prop-types": "^15.8.1", + "prop-types-extra": "^1.1.0", + "react-transition-group": "^4.4.5", + "uncontrollable": "^7.2.1", + "warning": "^4.0.3" + }, + "peerDependencies": { + "@types/react": ">=16.14.8", + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, + "node_modules/react-icons": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.10.1.tgz", + "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==", + "license": "MIT", + "peerDependencies": { + "react": "*" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", + "license": "MIT" + }, + "node_modules/react-refresh": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", + "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-slider": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/react-slider/-/react-slider-2.0.6.tgz", + "integrity": "sha512-gJxG1HwmuMTJ+oWIRCmVWvgwotNCbByTwRkFZC6U4MBsHqJBmxwbYRJUmxy4Tke1ef8r9jfXjgkmY/uHOCEvbA==", + "license": "MIT", + "dependencies": { + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^16 || ^17 || ^18" + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.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, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "license": "MIT" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "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-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "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, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "3.26.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.3.tgz", + "integrity": "sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==", + "dev": true, + "license": "MIT", + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "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" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sass": { + "version": "1.64.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.64.0.tgz", + "integrity": "sha512-m7YtAGmQta9uANIUJwXesAJMSncqH+3INc8kdVXs6eV6GUC8Qu2IYKQSN8PRLgiQfpca697G94klm2leYMxSHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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, + "license": "MIT", + "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": 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-template": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz", + "integrity": "sha512-SLqR3GBUXuoPP5MmYtD7ompvXiG87QjT6lzOszyXjTM86Uu7At7vNnt2xgyTLq5o9T4IxTYFyGxcULqpsmsfdg==", + "dev": true + }, + "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/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/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/string-width/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/string.prototype.matchall": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", + "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/stringz": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/stringz/-/stringz-2.1.0.tgz", + "integrity": "sha512-KlywLT+MZ+v0IRepfMxRtnSvDCMc3nR1qqCs3m/qIbSOWkNZYT8XHQA31rS3TnKp0c5xjZu3M4GY/2aRKSi/6A==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2" + } + }, + "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, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/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/sucrase/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "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.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", + "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", + "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.19.1", + "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.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", + "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", + "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/terser/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/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "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/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "license": "MIT", + "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, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "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/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uncontrollable": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.2.1.tgz", + "integrity": "sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.6.3", + "@types/react": ">=16.9.11", + "invariant": "^2.2.4", + "react-lifecycles-compat": "^3.0.4" + }, + "peerDependencies": { + "react": ">=15.0.0" + } + }, + "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/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/url": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.1.tgz", + "integrity": "sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA==", + "license": "MIT", + "dependencies": { + "punycode": "^1.4.1", + "qs": "^6.11.0" + } + }, + "node_modules/use-between": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/use-between/-/use-between-1.3.5.tgz", + "integrity": "sha512-IP9eJfszZr0aah/6i/pzaM7n/QgMPwWKJ+mnWqT5O0qFhLnztPbkVC6L7zI6ygeBIMJHfmUGvsw0b28pyrEGSA==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "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/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vite": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.5.tgz", + "integrity": "sha512-4m5kEtAWHYr0O1Fu7rZp64CfO1PsRGZlD3TAB32UmQlpd7qg15VF7ROqGN5CyqN7HFuwr7ICNM2+fDWRqFEKaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.26", + "rollup": "^3.25.2" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-plugin-javascript-obfuscator": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vite-plugin-javascript-obfuscator/-/vite-plugin-javascript-obfuscator-3.1.0.tgz", + "integrity": "sha512-sf4JFlG1iUPl7bLXHGOy+bKWOQUFyXzJFWa+n2S2xMMvyfM+V9R40HhpZoIF1eAjifArM1SF7fbSFIaTuUIbPA==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.3", + "javascript-obfuscator": "^4.1.0" + } + }, + "node_modules/vite-plugin-minify": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/vite-plugin-minify/-/vite-plugin-minify-1.5.2.tgz", + "integrity": "sha512-clf3THHlet1jD35y8+mbw/xgACbdUQ1Eyc9zZFiqaxVOZLSC3UbrkOYOG+Nf4cleRjWgb8czbXrnQiWZICVh3Q==", + "dev": true, + "dependencies": { + "html-minifier-terser": "^6.1.0" + }, + "peerDependencies": { + "vite": "*" + } + }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "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, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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/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/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/wrap-ansi/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/wrap-ansi/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/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index 057bdeafe..2d4aabf75 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "private": true, "scripts": { "start": "vite", - "build": "vite build", - "build:prod": "npx browserslist@latest --update-db && yarn build", - "eslint": "eslint src --ext .ts,.tsx" + "build": "set \"GENERATE_SOURCEMAP=false\" && vite build", + "build:prod": "set \"GENERATE_SOURCEMAP=false\" && npx browserslist@latest --update-db && yarn build", + "lint": "eslint --fix '**/*.{tsx,ts}'" }, "dependencies": { "@nitrots/nitro-renderer": "^1.6.6", @@ -17,7 +17,6 @@ "react-dom": "^18.2.0", "react-icons": "^4.7.1", "react-slider": "^2.0.0", - "react-youtube": "^7.13.1", "typescript": "^4.3.5", "use-between": "^1.3.4" }, @@ -29,12 +28,17 @@ "@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/parser": "^5.30.7", "@vitejs/plugin-react": "^3.0.0", + "autoprefixer": "^10.4.17", "eslint": "^8.20.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsx-a11y": "^6.6.0", "eslint-plugin-react": "^7.30.1", - "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-tailwindcss": "^3.15.1", + "postcss": "^8.4.33", "sass": "^1.56.2", - "vite": "^4.4.5" + "tailwindcss": "^3.4.1", + "vite": "^4.4.5", + "vite-plugin-javascript-obfuscator": "^3.1.0", + "vite-plugin-minify": "^1.5.2" } } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 000000000..33ad091d2 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/src/assets/webfonts/Ubuntu-C.ttf b/public/client-assets/fonts/Ubuntu-C.ttf similarity index 100% rename from src/assets/webfonts/Ubuntu-C.ttf rename to public/client-assets/fonts/Ubuntu-C.ttf diff --git a/public/client-assets/fonts/ubuntu.ttf b/public/client-assets/fonts/ubuntu.ttf new file mode 100644 index 000000000..b9e688e79 Binary files /dev/null and b/public/client-assets/fonts/ubuntu.ttf differ diff --git a/public/client-assets/fonts/ubuntu.woff b/public/client-assets/fonts/ubuntu.woff new file mode 100644 index 000000000..ee30297dc Binary files /dev/null and b/public/client-assets/fonts/ubuntu.woff differ diff --git a/public/client-assets/fonts/ubuntu.woff2 b/public/client-assets/fonts/ubuntu.woff2 new file mode 100644 index 000000000..76000bad2 Binary files /dev/null and b/public/client-assets/fonts/ubuntu.woff2 differ diff --git a/public/client-assets/fonts/volter/volter-bold.woff b/public/client-assets/fonts/volter/volter-bold.woff new file mode 100644 index 000000000..0adce04ab Binary files /dev/null and b/public/client-assets/fonts/volter/volter-bold.woff differ diff --git a/public/client-assets/fonts/volter/volter.woff b/public/client-assets/fonts/volter/volter.woff new file mode 100644 index 000000000..2ca07e045 Binary files /dev/null and b/public/client-assets/fonts/volter/volter.woff differ diff --git a/public/client-assets/images/achievements/achievement-bg.png b/public/client-assets/images/achievements/achievement-bg.png new file mode 100644 index 000000000..596a07de8 Binary files /dev/null and b/public/client-assets/images/achievements/achievement-bg.png differ diff --git a/public/client-assets/images/achievements/achievement-dark-bg.png b/public/client-assets/images/achievements/achievement-dark-bg.png new file mode 100644 index 000000000..4176551e8 Binary files /dev/null and b/public/client-assets/images/achievements/achievement-dark-bg.png differ diff --git a/public/client-assets/images/achievements/progress-bar-percent-bg.png b/public/client-assets/images/achievements/progress-bar-percent-bg.png new file mode 100644 index 000000000..6d5762941 Binary files /dev/null and b/public/client-assets/images/achievements/progress-bar-percent-bg.png differ diff --git a/public/client-assets/images/avatar-editor/spritesheet-dark.png b/public/client-assets/images/avatar-editor/spritesheet-dark.png new file mode 100644 index 000000000..60e54cd0e Binary files /dev/null and b/public/client-assets/images/avatar-editor/spritesheet-dark.png differ diff --git a/public/client-assets/images/avatar-editor/spritesheet.png b/public/client-assets/images/avatar-editor/spritesheet.png new file mode 100644 index 000000000..c526822f5 Binary files /dev/null and b/public/client-assets/images/avatar-editor/spritesheet.png differ diff --git a/src/assets/images/chat/chatbubbles/bubble_0.png b/public/client-assets/images/bubbles/bubble_0.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_0.png rename to public/client-assets/images/bubbles/bubble_0.png diff --git a/src/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png b/public/client-assets/images/bubbles/bubble_0_1_33_34_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_0_1_33_34_pointer.png rename to public/client-assets/images/bubbles/bubble_0_1_33_34_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_0_transparent.png b/public/client-assets/images/bubbles/bubble_0_transparent.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_0_transparent.png rename to public/client-assets/images/bubbles/bubble_0_transparent.png diff --git a/src/assets/images/chat/chatbubbles/bubble_1.png b/public/client-assets/images/bubbles/bubble_1.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_1.png rename to public/client-assets/images/bubbles/bubble_1.png diff --git a/src/assets/images/chat/chatbubbles/bubble_10.png b/public/client-assets/images/bubbles/bubble_10.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_10.png rename to public/client-assets/images/bubbles/bubble_10.png diff --git a/src/assets/images/chat/chatbubbles/bubble_10_pointer.png b/public/client-assets/images/bubbles/bubble_10_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_10_pointer.png rename to public/client-assets/images/bubbles/bubble_10_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_11.png b/public/client-assets/images/bubbles/bubble_11.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_11.png rename to public/client-assets/images/bubbles/bubble_11.png diff --git a/src/assets/images/chat/chatbubbles/bubble_11_pointer.png b/public/client-assets/images/bubbles/bubble_11_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_11_pointer.png rename to public/client-assets/images/bubbles/bubble_11_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_12.png b/public/client-assets/images/bubbles/bubble_12.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_12.png rename to public/client-assets/images/bubbles/bubble_12.png diff --git a/src/assets/images/chat/chatbubbles/bubble_12_pointer.png b/public/client-assets/images/bubbles/bubble_12_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_12_pointer.png rename to public/client-assets/images/bubbles/bubble_12_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_13.png b/public/client-assets/images/bubbles/bubble_13.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_13.png rename to public/client-assets/images/bubbles/bubble_13.png diff --git a/src/assets/images/chat/chatbubbles/bubble_13_pointer.png b/public/client-assets/images/bubbles/bubble_13_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_13_pointer.png rename to public/client-assets/images/bubbles/bubble_13_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_14.png b/public/client-assets/images/bubbles/bubble_14.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_14.png rename to public/client-assets/images/bubbles/bubble_14.png diff --git a/src/assets/images/chat/chatbubbles/bubble_14_pointer.png b/public/client-assets/images/bubbles/bubble_14_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_14_pointer.png rename to public/client-assets/images/bubbles/bubble_14_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_15.png b/public/client-assets/images/bubbles/bubble_15.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_15.png rename to public/client-assets/images/bubbles/bubble_15.png diff --git a/src/assets/images/chat/chatbubbles/bubble_15_pointer.png b/public/client-assets/images/bubbles/bubble_15_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_15_pointer.png rename to public/client-assets/images/bubbles/bubble_15_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_16.png b/public/client-assets/images/bubbles/bubble_16.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_16.png rename to public/client-assets/images/bubbles/bubble_16.png diff --git a/src/assets/images/chat/chatbubbles/bubble_16_pointer.png b/public/client-assets/images/bubbles/bubble_16_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_16_pointer.png rename to public/client-assets/images/bubbles/bubble_16_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_17.png b/public/client-assets/images/bubbles/bubble_17.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_17.png rename to public/client-assets/images/bubbles/bubble_17.png diff --git a/src/assets/images/chat/chatbubbles/bubble_17_pointer.png b/public/client-assets/images/bubbles/bubble_17_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_17_pointer.png rename to public/client-assets/images/bubbles/bubble_17_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_18.png b/public/client-assets/images/bubbles/bubble_18.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_18.png rename to public/client-assets/images/bubbles/bubble_18.png diff --git a/src/assets/images/chat/chatbubbles/bubble_18_pointer.png b/public/client-assets/images/bubbles/bubble_18_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_18_pointer.png rename to public/client-assets/images/bubbles/bubble_18_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_19.png b/public/client-assets/images/bubbles/bubble_19.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_19.png rename to public/client-assets/images/bubbles/bubble_19.png diff --git a/src/assets/images/chat/chatbubbles/bubble_19_20_pointer.png b/public/client-assets/images/bubbles/bubble_19_20_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_19_20_pointer.png rename to public/client-assets/images/bubbles/bubble_19_20_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_2.png b/public/client-assets/images/bubbles/bubble_2.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_2.png rename to public/client-assets/images/bubbles/bubble_2.png diff --git a/src/assets/images/chat/chatbubbles/bubble_20.png b/public/client-assets/images/bubbles/bubble_20.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_20.png rename to public/client-assets/images/bubbles/bubble_20.png diff --git a/src/assets/images/chat/chatbubbles/bubble_21.png b/public/client-assets/images/bubbles/bubble_21.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_21.png rename to public/client-assets/images/bubbles/bubble_21.png diff --git a/src/assets/images/chat/chatbubbles/bubble_21_pointer.png b/public/client-assets/images/bubbles/bubble_21_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_21_pointer.png rename to public/client-assets/images/bubbles/bubble_21_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_22.png b/public/client-assets/images/bubbles/bubble_22.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_22.png rename to public/client-assets/images/bubbles/bubble_22.png diff --git a/src/assets/images/chat/chatbubbles/bubble_22_pointer.png b/public/client-assets/images/bubbles/bubble_22_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_22_pointer.png rename to public/client-assets/images/bubbles/bubble_22_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_23.png b/public/client-assets/images/bubbles/bubble_23.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_23.png rename to public/client-assets/images/bubbles/bubble_23.png diff --git a/src/assets/images/chat/chatbubbles/bubble_23_37_pointer.png b/public/client-assets/images/bubbles/bubble_23_37_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_23_37_pointer.png rename to public/client-assets/images/bubbles/bubble_23_37_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_24.png b/public/client-assets/images/bubbles/bubble_24.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_24.png rename to public/client-assets/images/bubbles/bubble_24.png diff --git a/src/assets/images/chat/chatbubbles/bubble_24_pointer.png b/public/client-assets/images/bubbles/bubble_24_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_24_pointer.png rename to public/client-assets/images/bubbles/bubble_24_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_25.png b/public/client-assets/images/bubbles/bubble_25.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_25.png rename to public/client-assets/images/bubbles/bubble_25.png diff --git a/src/assets/images/chat/chatbubbles/bubble_25_pointer.png b/public/client-assets/images/bubbles/bubble_25_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_25_pointer.png rename to public/client-assets/images/bubbles/bubble_25_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_26.png b/public/client-assets/images/bubbles/bubble_26.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_26.png rename to public/client-assets/images/bubbles/bubble_26.png diff --git a/src/assets/images/chat/chatbubbles/bubble_26_pointer.png b/public/client-assets/images/bubbles/bubble_26_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_26_pointer.png rename to public/client-assets/images/bubbles/bubble_26_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_27.png b/public/client-assets/images/bubbles/bubble_27.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_27.png rename to public/client-assets/images/bubbles/bubble_27.png diff --git a/src/assets/images/chat/chatbubbles/bubble_27_pointer.png b/public/client-assets/images/bubbles/bubble_27_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_27_pointer.png rename to public/client-assets/images/bubbles/bubble_27_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_28.png b/public/client-assets/images/bubbles/bubble_28.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_28.png rename to public/client-assets/images/bubbles/bubble_28.png diff --git a/src/assets/images/chat/chatbubbles/bubble_28_pointer.png b/public/client-assets/images/bubbles/bubble_28_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_28_pointer.png rename to public/client-assets/images/bubbles/bubble_28_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_29.png b/public/client-assets/images/bubbles/bubble_29.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_29.png rename to public/client-assets/images/bubbles/bubble_29.png diff --git a/src/assets/images/chat/chatbubbles/bubble_29_pointer.png b/public/client-assets/images/bubbles/bubble_29_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_29_pointer.png rename to public/client-assets/images/bubbles/bubble_29_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_2_31_pointer.png b/public/client-assets/images/bubbles/bubble_2_31_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_2_31_pointer.png rename to public/client-assets/images/bubbles/bubble_2_31_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_3.png b/public/client-assets/images/bubbles/bubble_3.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_3.png rename to public/client-assets/images/bubbles/bubble_3.png diff --git a/src/assets/images/chat/chatbubbles/bubble_30.png b/public/client-assets/images/bubbles/bubble_30.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_30.png rename to public/client-assets/images/bubbles/bubble_30.png diff --git a/src/assets/images/chat/chatbubbles/bubble_30_pointer.png b/public/client-assets/images/bubbles/bubble_30_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_30_pointer.png rename to public/client-assets/images/bubbles/bubble_30_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_32.png b/public/client-assets/images/bubbles/bubble_32.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_32.png rename to public/client-assets/images/bubbles/bubble_32.png diff --git a/src/assets/images/chat/chatbubbles/bubble_32_pointer.png b/public/client-assets/images/bubbles/bubble_32_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_32_pointer.png rename to public/client-assets/images/bubbles/bubble_32_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_33_34.png b/public/client-assets/images/bubbles/bubble_33_34.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_33_34.png rename to public/client-assets/images/bubbles/bubble_33_34.png diff --git a/src/assets/images/chat/chatbubbles/bubble_33_extra.png b/public/client-assets/images/bubbles/bubble_33_extra.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_33_extra.png rename to public/client-assets/images/bubbles/bubble_33_extra.png diff --git a/src/assets/images/chat/chatbubbles/bubble_34_extra.png b/public/client-assets/images/bubbles/bubble_34_extra.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_34_extra.png rename to public/client-assets/images/bubbles/bubble_34_extra.png diff --git a/src/assets/images/chat/chatbubbles/bubble_35.png b/public/client-assets/images/bubbles/bubble_35.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_35.png rename to public/client-assets/images/bubbles/bubble_35.png diff --git a/src/assets/images/chat/chatbubbles/bubble_35_pointer.png b/public/client-assets/images/bubbles/bubble_35_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_35_pointer.png rename to public/client-assets/images/bubbles/bubble_35_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_36.png b/public/client-assets/images/bubbles/bubble_36.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_36.png rename to public/client-assets/images/bubbles/bubble_36.png diff --git a/src/assets/images/chat/chatbubbles/bubble_36_extra.png b/public/client-assets/images/bubbles/bubble_36_extra.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_36_extra.png rename to public/client-assets/images/bubbles/bubble_36_extra.png diff --git a/src/assets/images/chat/chatbubbles/bubble_36_pointer.png b/public/client-assets/images/bubbles/bubble_36_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_36_pointer.png rename to public/client-assets/images/bubbles/bubble_36_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_37.png b/public/client-assets/images/bubbles/bubble_37.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_37.png rename to public/client-assets/images/bubbles/bubble_37.png diff --git a/src/assets/images/chat/chatbubbles/bubble_38.png b/public/client-assets/images/bubbles/bubble_38.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_38.png rename to public/client-assets/images/bubbles/bubble_38.png diff --git a/src/assets/images/chat/chatbubbles/bubble_38_extra.png b/public/client-assets/images/bubbles/bubble_38_extra.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_38_extra.png rename to public/client-assets/images/bubbles/bubble_38_extra.png diff --git a/src/assets/images/chat/chatbubbles/bubble_38_pointer.png b/public/client-assets/images/bubbles/bubble_38_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_38_pointer.png rename to public/client-assets/images/bubbles/bubble_38_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_3_pointer.png b/public/client-assets/images/bubbles/bubble_3_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_3_pointer.png rename to public/client-assets/images/bubbles/bubble_3_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_4.png b/public/client-assets/images/bubbles/bubble_4.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_4.png rename to public/client-assets/images/bubbles/bubble_4.png diff --git a/src/assets/images/chat/chatbubbles/bubble_4_pointer.png b/public/client-assets/images/bubbles/bubble_4_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_4_pointer.png rename to public/client-assets/images/bubbles/bubble_4_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_5.png b/public/client-assets/images/bubbles/bubble_5.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_5.png rename to public/client-assets/images/bubbles/bubble_5.png diff --git a/src/assets/images/chat/chatbubbles/bubble_5_pointer.png b/public/client-assets/images/bubbles/bubble_5_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_5_pointer.png rename to public/client-assets/images/bubbles/bubble_5_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_6.png b/public/client-assets/images/bubbles/bubble_6.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_6.png rename to public/client-assets/images/bubbles/bubble_6.png diff --git a/src/assets/images/chat/chatbubbles/bubble_6_pointer.png b/public/client-assets/images/bubbles/bubble_6_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_6_pointer.png rename to public/client-assets/images/bubbles/bubble_6_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_7.png b/public/client-assets/images/bubbles/bubble_7.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_7.png rename to public/client-assets/images/bubbles/bubble_7.png diff --git a/src/assets/images/chat/chatbubbles/bubble_7_pointer.png b/public/client-assets/images/bubbles/bubble_7_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_7_pointer.png rename to public/client-assets/images/bubbles/bubble_7_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_8.png b/public/client-assets/images/bubbles/bubble_8.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_8.png rename to public/client-assets/images/bubbles/bubble_8.png diff --git a/src/assets/images/chat/chatbubbles/bubble_8_pointer.png b/public/client-assets/images/bubbles/bubble_8_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_8_pointer.png rename to public/client-assets/images/bubbles/bubble_8_pointer.png diff --git a/src/assets/images/chat/chatbubbles/bubble_9.png b/public/client-assets/images/bubbles/bubble_9.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_9.png rename to public/client-assets/images/bubbles/bubble_9.png diff --git a/src/assets/images/chat/chatbubbles/bubble_9_pointer.png b/public/client-assets/images/bubbles/bubble_9_pointer.png similarity index 100% rename from src/assets/images/chat/chatbubbles/bubble_9_pointer.png rename to public/client-assets/images/bubbles/bubble_9_pointer.png diff --git a/public/client-assets/images/buttons/ghost-bg.png b/public/client-assets/images/buttons/ghost-bg.png new file mode 100644 index 000000000..35f7c0d9c Binary files /dev/null and b/public/client-assets/images/buttons/ghost-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-active-end-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-end-bg.png new file mode 100644 index 000000000..6c3af8119 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-end-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-active-end-dark-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-end-dark-bg.png new file mode 100644 index 000000000..2144d0603 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-end-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-active-mid-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-mid-bg.png new file mode 100644 index 000000000..1a6f4fca9 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-mid-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-active-mid-dark-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-mid-dark-bg.png new file mode 100644 index 000000000..5e8b51360 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-mid-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-active-start-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-start-bg.png new file mode 100644 index 000000000..d517a89a1 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-start-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-active-start-dark-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-start-dark-bg.png new file mode 100644 index 000000000..72f394c58 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-active-start-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-end-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-end-bg.png new file mode 100644 index 000000000..df49f3d43 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-end-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-end-dark-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-end-dark-bg.png new file mode 100644 index 000000000..cbf5bd611 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-end-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-mid-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-mid-bg.png new file mode 100644 index 000000000..347488024 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-mid-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-mid-dark-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-mid-dark-bg.png new file mode 100644 index 000000000..34fd2508a Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-mid-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-start-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-start-bg.png new file mode 100644 index 000000000..8bb000c28 Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-start-bg.png differ diff --git a/public/client-assets/images/buttons/groups/horizontal/group-primary-start-dark-bg.png b/public/client-assets/images/buttons/groups/horizontal/group-primary-start-dark-bg.png new file mode 100644 index 000000000..2b2f60a5e Binary files /dev/null and b/public/client-assets/images/buttons/groups/horizontal/group-primary-start-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-active-end-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-active-end-bg.png new file mode 100644 index 000000000..8a225eee3 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-active-end-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-active-end-dark-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-active-end-dark-bg.png new file mode 100644 index 000000000..cc967fc21 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-active-end-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-active-mid-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-active-mid-bg.png new file mode 100644 index 000000000..44755fa01 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-active-mid-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-active-mid-dark-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-active-mid-dark-bg.png new file mode 100644 index 000000000..1479b0ae4 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-active-mid-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-active-start-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-active-start-bg.png new file mode 100644 index 000000000..d533e314b Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-active-start-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-active-start-dark-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-active-start-dark-bg.png new file mode 100644 index 000000000..afcdfc8fc Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-active-start-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-end-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-end-bg.png new file mode 100644 index 000000000..1bb83992c Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-end-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-end-dark-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-end-dark-bg.png new file mode 100644 index 000000000..bfdc326bf Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-end-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-mid-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-mid-bg.png new file mode 100644 index 000000000..51323ce13 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-mid-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-mid-dark-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-mid-dark-bg.png new file mode 100644 index 000000000..d62871f75 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-mid-dark-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-start-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-start-bg.png new file mode 100644 index 000000000..99e8de5d9 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-start-bg.png differ diff --git a/public/client-assets/images/buttons/groups/vertical/group-primary-start-dark-bg.png b/public/client-assets/images/buttons/groups/vertical/group-primary-start-dark-bg.png new file mode 100644 index 000000000..3524a6bd6 Binary files /dev/null and b/public/client-assets/images/buttons/groups/vertical/group-primary-start-dark-bg.png differ diff --git a/public/client-assets/images/buttons/orange-active-bg.png b/public/client-assets/images/buttons/orange-active-bg.png new file mode 100644 index 000000000..6e19118ca Binary files /dev/null and b/public/client-assets/images/buttons/orange-active-bg.png differ diff --git a/public/client-assets/images/buttons/orange-bg.png b/public/client-assets/images/buttons/orange-bg.png new file mode 100644 index 000000000..0dd2320a8 Binary files /dev/null and b/public/client-assets/images/buttons/orange-bg.png differ diff --git a/public/client-assets/images/buttons/orange-disabled-bg.png b/public/client-assets/images/buttons/orange-disabled-bg.png new file mode 100644 index 000000000..81a9453e4 Binary files /dev/null and b/public/client-assets/images/buttons/orange-disabled-bg.png differ diff --git a/public/client-assets/images/buttons/primary-active-bg.png b/public/client-assets/images/buttons/primary-active-bg.png new file mode 100644 index 000000000..dea2d7437 Binary files /dev/null and b/public/client-assets/images/buttons/primary-active-bg.png differ diff --git a/public/client-assets/images/buttons/primary-active-dark-bg.png b/public/client-assets/images/buttons/primary-active-dark-bg.png new file mode 100644 index 000000000..2b4c4d43e Binary files /dev/null and b/public/client-assets/images/buttons/primary-active-dark-bg.png differ diff --git a/public/client-assets/images/buttons/primary-bg.png b/public/client-assets/images/buttons/primary-bg.png new file mode 100644 index 000000000..6e3eab880 Binary files /dev/null and b/public/client-assets/images/buttons/primary-bg.png differ diff --git a/public/client-assets/images/buttons/primary-dark-bg.png b/public/client-assets/images/buttons/primary-dark-bg.png new file mode 100644 index 000000000..aaba3261e Binary files /dev/null and b/public/client-assets/images/buttons/primary-dark-bg.png differ diff --git a/public/client-assets/images/buttons/success-active-bg.png b/public/client-assets/images/buttons/success-active-bg.png new file mode 100644 index 000000000..57620f115 Binary files /dev/null and b/public/client-assets/images/buttons/success-active-bg.png differ diff --git a/public/client-assets/images/buttons/success-bg.png b/public/client-assets/images/buttons/success-bg.png new file mode 100644 index 000000000..157670aa8 Binary files /dev/null and b/public/client-assets/images/buttons/success-bg.png differ diff --git a/public/client-assets/images/buttons/volter-bg.png b/public/client-assets/images/buttons/volter-bg.png new file mode 100644 index 000000000..d543490d8 Binary files /dev/null and b/public/client-assets/images/buttons/volter-bg.png differ diff --git a/public/client-assets/images/buttons/volter-bold-bg.png b/public/client-assets/images/buttons/volter-bold-bg.png new file mode 100644 index 000000000..c767cf207 Binary files /dev/null and b/public/client-assets/images/buttons/volter-bold-bg.png differ diff --git a/public/client-assets/images/buttons/volter-bold-dark-bg.png b/public/client-assets/images/buttons/volter-bold-dark-bg.png new file mode 100644 index 000000000..7675e7dcd Binary files /dev/null and b/public/client-assets/images/buttons/volter-bold-dark-bg.png differ diff --git a/public/client-assets/images/buttons/volter-dark-bg.png b/public/client-assets/images/buttons/volter-dark-bg.png new file mode 100644 index 000000000..736a7eb0b Binary files /dev/null and b/public/client-assets/images/buttons/volter-dark-bg.png differ diff --git a/public/client-assets/images/buttons/wired-active-bg.png b/public/client-assets/images/buttons/wired-active-bg.png new file mode 100644 index 000000000..48097811d Binary files /dev/null and b/public/client-assets/images/buttons/wired-active-bg.png differ diff --git a/public/client-assets/images/buttons/wired-bg.png b/public/client-assets/images/buttons/wired-bg.png new file mode 100644 index 000000000..278e06559 Binary files /dev/null and b/public/client-assets/images/buttons/wired-bg.png differ diff --git a/public/client-assets/images/buttons/wired-hover-bg.png b/public/client-assets/images/buttons/wired-hover-bg.png new file mode 100644 index 000000000..307cbbe6c Binary files /dev/null and b/public/client-assets/images/buttons/wired-hover-bg.png differ diff --git a/public/client-assets/images/camera/spritesheet.png b/public/client-assets/images/camera/spritesheet.png new file mode 100644 index 000000000..2a55603d2 Binary files /dev/null and b/public/client-assets/images/camera/spritesheet.png differ diff --git a/src/assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png b/public/client-assets/images/camera/thumbnail-camera.png similarity index 100% rename from src/assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png rename to public/client-assets/images/camera/thumbnail-camera.png diff --git a/public/client-assets/images/catalogue/bundle-text2-bg.png b/public/client-assets/images/catalogue/bundle-text2-bg.png new file mode 100644 index 000000000..1504e98d1 Binary files /dev/null and b/public/client-assets/images/catalogue/bundle-text2-bg.png differ diff --git a/public/client-assets/images/catalogue/child-item-bg.png b/public/client-assets/images/catalogue/child-item-bg.png new file mode 100644 index 000000000..ecb66d52e Binary files /dev/null and b/public/client-assets/images/catalogue/child-item-bg.png differ diff --git a/public/client-assets/images/catalogue/child-item-dark-bg.png b/public/client-assets/images/catalogue/child-item-dark-bg.png new file mode 100644 index 000000000..91ba462eb Binary files /dev/null and b/public/client-assets/images/catalogue/child-item-dark-bg.png differ diff --git a/public/client-assets/images/catalogue/currency-bg.png b/public/client-assets/images/catalogue/currency-bg.png new file mode 100644 index 000000000..6e3eab880 Binary files /dev/null and b/public/client-assets/images/catalogue/currency-bg.png differ diff --git a/public/client-assets/images/catalogue/currency-credits-bg.png b/public/client-assets/images/catalogue/currency-credits-bg.png new file mode 100644 index 000000000..2e5643fed Binary files /dev/null and b/public/client-assets/images/catalogue/currency-credits-bg.png differ diff --git a/public/client-assets/images/catalogue/currency-dark-bg.png b/public/client-assets/images/catalogue/currency-dark-bg.png new file mode 100644 index 000000000..aaba3261e Binary files /dev/null and b/public/client-assets/images/catalogue/currency-dark-bg.png differ diff --git a/public/client-assets/images/catalogue/currency-diamonds-bg.png b/public/client-assets/images/catalogue/currency-diamonds-bg.png new file mode 100644 index 000000000..3c522a28e Binary files /dev/null and b/public/client-assets/images/catalogue/currency-diamonds-bg.png differ diff --git a/public/client-assets/images/catalogue/currency-duckets-bg.png b/public/client-assets/images/catalogue/currency-duckets-bg.png new file mode 100644 index 000000000..a5f499ce0 Binary files /dev/null and b/public/client-assets/images/catalogue/currency-duckets-bg.png differ diff --git a/public/client-assets/images/catalogue/feature-text-bg.png b/public/client-assets/images/catalogue/feature-text-bg.png new file mode 100644 index 000000000..125e1d587 Binary files /dev/null and b/public/client-assets/images/catalogue/feature-text-bg.png differ diff --git a/src/assets/images/gift/gift_tag.png b/public/client-assets/images/catalogue/gift-tag-bg.png similarity index 100% rename from src/assets/images/gift/gift_tag.png rename to public/client-assets/images/catalogue/gift-tag-bg.png diff --git a/public/client-assets/images/catalogue/gift-tag-dark-bg.png b/public/client-assets/images/catalogue/gift-tag-dark-bg.png new file mode 100644 index 000000000..154aa48d9 Binary files /dev/null and b/public/client-assets/images/catalogue/gift-tag-dark-bg.png differ diff --git a/public/client-assets/images/catalogue/hc-item-bg.png b/public/client-assets/images/catalogue/hc-item-bg.png new file mode 100644 index 000000000..47406784e Binary files /dev/null and b/public/client-assets/images/catalogue/hc-item-bg.png differ diff --git a/public/client-assets/images/catalogue/hc-item-dark-bg.png b/public/client-assets/images/catalogue/hc-item-dark-bg.png new file mode 100644 index 000000000..ca8aa2612 Binary files /dev/null and b/public/client-assets/images/catalogue/hc-item-dark-bg.png differ diff --git a/public/client-assets/images/catalogue/info-bg.png b/public/client-assets/images/catalogue/info-bg.png new file mode 100644 index 000000000..0a89c379c Binary files /dev/null and b/public/client-assets/images/catalogue/info-bg.png differ diff --git a/public/client-assets/images/catalogue/info-dark-bg.png b/public/client-assets/images/catalogue/info-dark-bg.png new file mode 100644 index 000000000..7536c4ef7 Binary files /dev/null and b/public/client-assets/images/catalogue/info-dark-bg.png differ diff --git a/public/client-assets/images/catalogue/redeem-bg.png b/public/client-assets/images/catalogue/redeem-bg.png new file mode 100644 index 000000000..05ac5c97e Binary files /dev/null and b/public/client-assets/images/catalogue/redeem-bg.png differ diff --git a/public/client-assets/images/catalogue/track-preview-bg.png b/public/client-assets/images/catalogue/track-preview-bg.png new file mode 100644 index 000000000..3fb261f4b Binary files /dev/null and b/public/client-assets/images/catalogue/track-preview-bg.png differ diff --git a/public/client-assets/images/common/badge-bg.png b/public/client-assets/images/common/badge-bg.png new file mode 100644 index 000000000..f35f86c11 Binary files /dev/null and b/public/client-assets/images/common/badge-bg.png differ diff --git a/public/client-assets/images/common/card-bg.png b/public/client-assets/images/common/card-bg.png new file mode 100644 index 000000000..e072ecd37 Binary files /dev/null and b/public/client-assets/images/common/card-bg.png differ diff --git a/public/client-assets/images/common/card-dark-bg.png b/public/client-assets/images/common/card-dark-bg.png new file mode 100644 index 000000000..93111275f Binary files /dev/null and b/public/client-assets/images/common/card-dark-bg.png differ diff --git a/public/client-assets/images/common/card-green-bg.png b/public/client-assets/images/common/card-green-bg.png new file mode 100644 index 000000000..b78efc1f7 Binary files /dev/null and b/public/client-assets/images/common/card-green-bg.png differ diff --git a/public/client-assets/images/common/card-orange-bg.png b/public/client-assets/images/common/card-orange-bg.png new file mode 100644 index 000000000..efe17aece Binary files /dev/null and b/public/client-assets/images/common/card-orange-bg.png differ diff --git a/public/client-assets/images/common/caret-bg.png b/public/client-assets/images/common/caret-bg.png new file mode 100644 index 000000000..95ac9197b Binary files /dev/null and b/public/client-assets/images/common/caret-bg.png differ diff --git a/public/client-assets/images/common/caret-dark-bg.png b/public/client-assets/images/common/caret-dark-bg.png new file mode 100644 index 000000000..6212e7219 Binary files /dev/null and b/public/client-assets/images/common/caret-dark-bg.png differ diff --git a/public/client-assets/images/common/caret-green-bg.png b/public/client-assets/images/common/caret-green-bg.png new file mode 100644 index 000000000..63c060766 Binary files /dev/null and b/public/client-assets/images/common/caret-green-bg.png differ diff --git a/public/client-assets/images/common/caret-orange-bg.png b/public/client-assets/images/common/caret-orange-bg.png new file mode 100644 index 000000000..94282469c Binary files /dev/null and b/public/client-assets/images/common/caret-orange-bg.png differ diff --git a/public/client-assets/images/common/input-bg.png b/public/client-assets/images/common/input-bg.png new file mode 100644 index 000000000..4a11a658e Binary files /dev/null and b/public/client-assets/images/common/input-bg.png differ diff --git a/public/client-assets/images/common/input-checked-bg.png b/public/client-assets/images/common/input-checked-bg.png new file mode 100644 index 000000000..1c62ebe40 Binary files /dev/null and b/public/client-assets/images/common/input-checked-bg.png differ diff --git a/public/client-assets/images/common/input-checked-dark-bg.png b/public/client-assets/images/common/input-checked-dark-bg.png new file mode 100644 index 000000000..262bce680 Binary files /dev/null and b/public/client-assets/images/common/input-checked-dark-bg.png differ diff --git a/public/client-assets/images/common/input-dark-bg.png b/public/client-assets/images/common/input-dark-bg.png new file mode 100644 index 000000000..1eb88c495 Binary files /dev/null and b/public/client-assets/images/common/input-dark-bg.png differ diff --git a/public/client-assets/images/common/item-active-bg.png b/public/client-assets/images/common/item-active-bg.png new file mode 100644 index 000000000..dea2d7437 Binary files /dev/null and b/public/client-assets/images/common/item-active-bg.png differ diff --git a/public/client-assets/images/common/item-active-dark-bg.png b/public/client-assets/images/common/item-active-dark-bg.png new file mode 100644 index 000000000..2b4c4d43e Binary files /dev/null and b/public/client-assets/images/common/item-active-dark-bg.png differ diff --git a/public/client-assets/images/common/item-bg.png b/public/client-assets/images/common/item-bg.png new file mode 100644 index 000000000..6e3eab880 Binary files /dev/null and b/public/client-assets/images/common/item-bg.png differ diff --git a/public/client-assets/images/common/item-dark-bg.png b/public/client-assets/images/common/item-dark-bg.png new file mode 100644 index 000000000..aaba3261e Binary files /dev/null and b/public/client-assets/images/common/item-dark-bg.png differ diff --git a/public/client-assets/images/common/item-green-bg.png b/public/client-assets/images/common/item-green-bg.png new file mode 100644 index 000000000..76a031ddf Binary files /dev/null and b/public/client-assets/images/common/item-green-bg.png differ diff --git a/public/client-assets/images/common/item-green-no-border-bg.png b/public/client-assets/images/common/item-green-no-border-bg.png new file mode 100644 index 000000000..b74c69a4f Binary files /dev/null and b/public/client-assets/images/common/item-green-no-border-bg.png differ diff --git a/public/client-assets/images/common/item-no-border-bg.png b/public/client-assets/images/common/item-no-border-bg.png new file mode 100644 index 000000000..f362d428c Binary files /dev/null and b/public/client-assets/images/common/item-no-border-bg.png differ diff --git a/public/client-assets/images/common/item-no-border-dark-bg.png b/public/client-assets/images/common/item-no-border-dark-bg.png new file mode 100644 index 000000000..2dd5b876d Binary files /dev/null and b/public/client-assets/images/common/item-no-border-dark-bg.png differ diff --git a/public/client-assets/images/common/popover-bg.png b/public/client-assets/images/common/popover-bg.png new file mode 100644 index 000000000..26aab9a48 Binary files /dev/null and b/public/client-assets/images/common/popover-bg.png differ diff --git a/public/client-assets/images/common/popover-dark-bg.png b/public/client-assets/images/common/popover-dark-bg.png new file mode 100644 index 000000000..ba50ba7bd Binary files /dev/null and b/public/client-assets/images/common/popover-dark-bg.png differ diff --git a/public/client-assets/images/common/previewer-bg.png b/public/client-assets/images/common/previewer-bg.png new file mode 100644 index 000000000..c678de6cb Binary files /dev/null and b/public/client-assets/images/common/previewer-bg.png differ diff --git a/public/client-assets/images/common/previewer-dark-bg.png b/public/client-assets/images/common/previewer-dark-bg.png new file mode 100644 index 000000000..74c74221a Binary files /dev/null and b/public/client-assets/images/common/previewer-dark-bg.png differ diff --git a/public/client-assets/images/crafting/bg.png b/public/client-assets/images/crafting/bg.png new file mode 100644 index 000000000..f955c25f4 Binary files /dev/null and b/public/client-assets/images/crafting/bg.png differ diff --git a/public/client-assets/images/floor-plan/spritesheet.png b/public/client-assets/images/floor-plan/spritesheet.png new file mode 100644 index 000000000..ba359cd3d Binary files /dev/null and b/public/client-assets/images/floor-plan/spritesheet.png differ diff --git a/public/client-assets/images/gamecenter/basejump/game_icon.png b/public/client-assets/images/gamecenter/basejump/game_icon.png new file mode 100644 index 000000000..b34c37775 Binary files /dev/null and b/public/client-assets/images/gamecenter/basejump/game_icon.png differ diff --git a/public/client-assets/images/gamecenter/basejump/game_logo.png b/public/client-assets/images/gamecenter/basejump/game_logo.png new file mode 100644 index 000000000..01de81821 Binary files /dev/null and b/public/client-assets/images/gamecenter/basejump/game_logo.png differ diff --git a/public/client-assets/images/gamecenter/basejump/game_theme.png b/public/client-assets/images/gamecenter/basejump/game_theme.png new file mode 100644 index 000000000..0ce92de25 Binary files /dev/null and b/public/client-assets/images/gamecenter/basejump/game_theme.png differ diff --git a/public/client-assets/images/gamecenter/basejump/game_theme_bg.png b/public/client-assets/images/gamecenter/basejump/game_theme_bg.png new file mode 100644 index 000000000..348eaff0c Binary files /dev/null and b/public/client-assets/images/gamecenter/basejump/game_theme_bg.png differ diff --git a/public/client-assets/images/gamecenter/basejump/game_theme_left.png b/public/client-assets/images/gamecenter/basejump/game_theme_left.png new file mode 100644 index 000000000..8cabe2275 Binary files /dev/null and b/public/client-assets/images/gamecenter/basejump/game_theme_left.png differ diff --git a/public/client-assets/images/gamecenter/basejump/game_theme_right.png b/public/client-assets/images/gamecenter/basejump/game_theme_right.png new file mode 100644 index 000000000..8218d32ea Binary files /dev/null and b/public/client-assets/images/gamecenter/basejump/game_theme_right.png differ diff --git a/public/client-assets/images/gamecenter/game-item-bg.png b/public/client-assets/images/gamecenter/game-item-bg.png new file mode 100644 index 000000000..5e5310172 Binary files /dev/null and b/public/client-assets/images/gamecenter/game-item-bg.png differ diff --git a/src/assets/images/gamecenter/selectedIcon.png b/public/client-assets/images/gamecenter/game-item-selected-bg.png similarity index 67% rename from src/assets/images/gamecenter/selectedIcon.png rename to public/client-assets/images/gamecenter/game-item-selected-bg.png index 718e48b8b..bd59afd25 100644 Binary files a/src/assets/images/gamecenter/selectedIcon.png and b/public/client-assets/images/gamecenter/game-item-selected-bg.png differ diff --git a/public/client-assets/images/gamecenter/snowwar/game_icon.png b/public/client-assets/images/gamecenter/snowwar/game_icon.png new file mode 100644 index 000000000..5a96adf35 Binary files /dev/null and b/public/client-assets/images/gamecenter/snowwar/game_icon.png differ diff --git a/public/client-assets/images/gamecenter/snowwar/game_logo.png b/public/client-assets/images/gamecenter/snowwar/game_logo.png new file mode 100644 index 000000000..9af67ddc3 Binary files /dev/null and b/public/client-assets/images/gamecenter/snowwar/game_logo.png differ diff --git a/public/client-assets/images/gamecenter/snowwar/game_theme.png b/public/client-assets/images/gamecenter/snowwar/game_theme.png new file mode 100644 index 000000000..e8082f0e8 Binary files /dev/null and b/public/client-assets/images/gamecenter/snowwar/game_theme.png differ diff --git a/public/client-assets/images/gamecenter/snowwar/game_theme_bg.png b/public/client-assets/images/gamecenter/snowwar/game_theme_bg.png new file mode 100644 index 000000000..b76489016 Binary files /dev/null and b/public/client-assets/images/gamecenter/snowwar/game_theme_bg.png differ diff --git a/public/client-assets/images/gamecenter/snowwar/game_theme_left.png b/public/client-assets/images/gamecenter/snowwar/game_theme_left.png new file mode 100644 index 000000000..e01b1380a Binary files /dev/null and b/public/client-assets/images/gamecenter/snowwar/game_theme_left.png differ diff --git a/public/client-assets/images/gamecenter/snowwar/icon.png b/public/client-assets/images/gamecenter/snowwar/icon.png new file mode 100644 index 000000000..e69de29bb diff --git a/public/client-assets/images/groups/hc-required-bg.png b/public/client-assets/images/groups/hc-required-bg.png new file mode 100644 index 000000000..5358880d5 Binary files /dev/null and b/public/client-assets/images/groups/hc-required-bg.png differ diff --git a/public/client-assets/images/groups/purchase-bg.png b/public/client-assets/images/groups/purchase-bg.png new file mode 100644 index 000000000..f72b813a7 Binary files /dev/null and b/public/client-assets/images/groups/purchase-bg.png differ diff --git a/public/client-assets/images/groups/purchase-disabled-bg.png b/public/client-assets/images/groups/purchase-disabled-bg.png new file mode 100644 index 000000000..d1c3fd8ca Binary files /dev/null and b/public/client-assets/images/groups/purchase-disabled-bg.png differ diff --git a/public/client-assets/images/groups/spritesheet-dark.png b/public/client-assets/images/groups/spritesheet-dark.png new file mode 100644 index 000000000..dae61f30b Binary files /dev/null and b/public/client-assets/images/groups/spritesheet-dark.png differ diff --git a/public/client-assets/images/groups/spritesheet.png b/public/client-assets/images/groups/spritesheet.png new file mode 100644 index 000000000..9cfa0bbe7 Binary files /dev/null and b/public/client-assets/images/groups/spritesheet.png differ diff --git a/public/client-assets/images/hc-center/avatar.png b/public/client-assets/images/hc-center/avatar.png new file mode 100644 index 000000000..4bb7ff035 Binary files /dev/null and b/public/client-assets/images/hc-center/avatar.png differ diff --git a/public/client-assets/images/hc-center/benefits-bg.png b/public/client-assets/images/hc-center/benefits-bg.png new file mode 100644 index 000000000..082d6c54a Binary files /dev/null and b/public/client-assets/images/hc-center/benefits-bg.png differ diff --git a/public/client-assets/images/hc-center/benefits-promo.png b/public/client-assets/images/hc-center/benefits-promo.png new file mode 100644 index 000000000..438b6044d Binary files /dev/null and b/public/client-assets/images/hc-center/benefits-promo.png differ diff --git a/public/client-assets/images/hc-center/benefits-vip-bg.png b/public/client-assets/images/hc-center/benefits-vip-bg.png new file mode 100644 index 000000000..05ac5c97e Binary files /dev/null and b/public/client-assets/images/hc-center/benefits-vip-bg.png differ diff --git a/public/client-assets/images/hc-center/benefits-vip-promo.png b/public/client-assets/images/hc-center/benefits-vip-promo.png new file mode 100644 index 000000000..df1bd715c Binary files /dev/null and b/public/client-assets/images/hc-center/benefits-vip-promo.png differ diff --git a/public/client-assets/images/help/bully-self.png b/public/client-assets/images/help/bully-self.png new file mode 100644 index 000000000..58d6a76d7 Binary files /dev/null and b/public/client-assets/images/help/bully-self.png differ diff --git a/public/client-assets/images/help/bully.png b/public/client-assets/images/help/bully.png new file mode 100644 index 000000000..165563c49 Binary files /dev/null and b/public/client-assets/images/help/bully.png differ diff --git a/public/client-assets/images/help/chat-bg.png b/public/client-assets/images/help/chat-bg.png new file mode 100644 index 000000000..963ea5e75 Binary files /dev/null and b/public/client-assets/images/help/chat-bg.png differ diff --git a/public/client-assets/images/help/chat-dark-bg.png b/public/client-assets/images/help/chat-dark-bg.png new file mode 100644 index 000000000..4848856f9 Binary files /dev/null and b/public/client-assets/images/help/chat-dark-bg.png differ diff --git a/public/client-assets/images/help/confused.png b/public/client-assets/images/help/confused.png new file mode 100644 index 000000000..bc5af1f66 Binary files /dev/null and b/public/client-assets/images/help/confused.png differ diff --git a/public/client-assets/images/help/emergency-bg.png b/public/client-assets/images/help/emergency-bg.png new file mode 100644 index 000000000..bdbdedbe8 Binary files /dev/null and b/public/client-assets/images/help/emergency-bg.png differ diff --git a/public/client-assets/images/help/emergency-dark-bg.png b/public/client-assets/images/help/emergency-dark-bg.png new file mode 100644 index 000000000..34d2078eb Binary files /dev/null and b/public/client-assets/images/help/emergency-dark-bg.png differ diff --git a/public/client-assets/images/help/help-request-dark.png b/public/client-assets/images/help/help-request-dark.png new file mode 100644 index 000000000..6b233382b Binary files /dev/null and b/public/client-assets/images/help/help-request-dark.png differ diff --git a/public/client-assets/images/help/help-request-pending.png b/public/client-assets/images/help/help-request-pending.png new file mode 100644 index 000000000..bd35fd8a8 Binary files /dev/null and b/public/client-assets/images/help/help-request-pending.png differ diff --git a/public/client-assets/images/help/help-request.png b/public/client-assets/images/help/help-request.png new file mode 100644 index 000000000..76d4c9820 Binary files /dev/null and b/public/client-assets/images/help/help-request.png differ diff --git a/public/client-assets/images/help/need-help-dark.png b/public/client-assets/images/help/need-help-dark.png new file mode 100644 index 000000000..a444b0292 Binary files /dev/null and b/public/client-assets/images/help/need-help-dark.png differ diff --git a/public/client-assets/images/help/need-help.png b/public/client-assets/images/help/need-help.png new file mode 100644 index 000000000..153aab35b Binary files /dev/null and b/public/client-assets/images/help/need-help.png differ diff --git a/public/client-assets/images/help/reporter.png b/public/client-assets/images/help/reporter.png new file mode 100644 index 000000000..c2cd1aa3a Binary files /dev/null and b/public/client-assets/images/help/reporter.png differ diff --git a/public/client-assets/images/help/selected-chat-bg.png b/public/client-assets/images/help/selected-chat-bg.png new file mode 100644 index 000000000..9054a1e59 Binary files /dev/null and b/public/client-assets/images/help/selected-chat-bg.png differ diff --git a/public/client-assets/images/help/selected-chat-dark-bg.png b/public/client-assets/images/help/selected-chat-dark-bg.png new file mode 100644 index 000000000..63e28a2cd Binary files /dev/null and b/public/client-assets/images/help/selected-chat-dark-bg.png differ diff --git a/public/client-assets/images/help/solved-dark.png b/public/client-assets/images/help/solved-dark.png new file mode 100644 index 000000000..3f800d183 Binary files /dev/null and b/public/client-assets/images/help/solved-dark.png differ diff --git a/public/client-assets/images/help/solved.png b/public/client-assets/images/help/solved.png new file mode 100644 index 000000000..ee9fbef27 Binary files /dev/null and b/public/client-assets/images/help/solved.png differ diff --git a/public/client-assets/images/highscore/spritesheet.png b/public/client-assets/images/highscore/spritesheet.png new file mode 100644 index 000000000..9db320de6 Binary files /dev/null and b/public/client-assets/images/highscore/spritesheet.png differ diff --git a/public/client-assets/images/hotelview/arrow-down.gif b/public/client-assets/images/hotelview/arrow-down.gif new file mode 100644 index 000000000..5ee75d7dd Binary files /dev/null and b/public/client-assets/images/hotelview/arrow-down.gif differ diff --git a/public/client-assets/images/hotelview/hotelview_dec.png b/public/client-assets/images/hotelview/hotelview_dec.png new file mode 100644 index 000000000..98d4a2858 Binary files /dev/null and b/public/client-assets/images/hotelview/hotelview_dec.png differ diff --git a/public/client-assets/images/hotelview/hotelview_default.png b/public/client-assets/images/hotelview/hotelview_default.png new file mode 100644 index 000000000..09a688f2d Binary files /dev/null and b/public/client-assets/images/hotelview/hotelview_default.png differ diff --git a/public/client-assets/images/hotelview/rooms/dec-central-terrace.gif b/public/client-assets/images/hotelview/rooms/dec-central-terrace.gif new file mode 100644 index 000000000..d6f127d43 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-central-terrace.gif differ diff --git a/public/client-assets/images/hotelview/rooms/dec-park.gif b/public/client-assets/images/hotelview/rooms/dec-park.gif new file mode 100644 index 000000000..868c353b6 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-park.gif differ diff --git a/public/client-assets/images/hotelview/rooms/dec-peaceful-park.gif b/public/client-assets/images/hotelview/rooms/dec-peaceful-park.gif new file mode 100644 index 000000000..37f01bb30 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-peaceful-park.gif differ diff --git a/public/client-assets/images/hotelview/rooms/dec-picnic.gif b/public/client-assets/images/hotelview/rooms/dec-picnic.gif new file mode 100644 index 000000000..5b73b9655 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-picnic.gif differ diff --git a/public/client-assets/images/hotelview/rooms/dec-pool.gif b/public/client-assets/images/hotelview/rooms/dec-pool.gif new file mode 100644 index 000000000..5a65bdd0c Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-pool.gif differ diff --git a/public/client-assets/images/hotelview/rooms/dec-reception.gif b/public/client-assets/images/hotelview/rooms/dec-reception.gif new file mode 100644 index 000000000..5887d1b97 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-reception.gif differ diff --git a/public/client-assets/images/hotelview/rooms/dec-rooftop-pool.gif b/public/client-assets/images/hotelview/rooms/dec-rooftop-pool.gif new file mode 100644 index 000000000..dd532e344 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-rooftop-pool.gif differ diff --git a/public/client-assets/images/hotelview/rooms/dec-rooftop.gif b/public/client-assets/images/hotelview/rooms/dec-rooftop.gif new file mode 100644 index 000000000..f7affed37 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/dec-rooftop.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-central-terrace.gif b/public/client-assets/images/hotelview/rooms/default-central-terrace.gif new file mode 100644 index 000000000..7c68b33e3 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-central-terrace.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-park.gif b/public/client-assets/images/hotelview/rooms/default-park.gif new file mode 100644 index 000000000..f15e9a457 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-park.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-peaceful-park.gif b/public/client-assets/images/hotelview/rooms/default-peaceful-park.gif new file mode 100644 index 000000000..9bde74aca Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-peaceful-park.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-picnic.gif b/public/client-assets/images/hotelview/rooms/default-picnic.gif new file mode 100644 index 000000000..974be1e44 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-picnic.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-pool.gif b/public/client-assets/images/hotelview/rooms/default-pool.gif new file mode 100644 index 000000000..b62370923 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-pool.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-reception.gif b/public/client-assets/images/hotelview/rooms/default-reception.gif new file mode 100644 index 000000000..4f470dbfa Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-reception.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-rooftop-pool.gif b/public/client-assets/images/hotelview/rooms/default-rooftop-pool.gif new file mode 100644 index 000000000..b5183c86d Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-rooftop-pool.gif differ diff --git a/public/client-assets/images/hotelview/rooms/default-rooftop.gif b/public/client-assets/images/hotelview/rooms/default-rooftop.gif new file mode 100644 index 000000000..9bb7a5e99 Binary files /dev/null and b/public/client-assets/images/hotelview/rooms/default-rooftop.gif differ diff --git a/public/client-assets/images/illumina-logo.png b/public/client-assets/images/illumina-logo.png new file mode 100644 index 000000000..6f43db42d Binary files /dev/null and b/public/client-assets/images/illumina-logo.png differ diff --git a/public/client-assets/images/infostand/badge-details-bg.png b/public/client-assets/images/infostand/badge-details-bg.png new file mode 100644 index 000000000..23128d924 Binary files /dev/null and b/public/client-assets/images/infostand/badge-details-bg.png differ diff --git a/public/client-assets/images/infostand/badge-details-dark-bg.png b/public/client-assets/images/infostand/badge-details-dark-bg.png new file mode 100644 index 000000000..af7e20dd5 Binary files /dev/null and b/public/client-assets/images/infostand/badge-details-dark-bg.png differ diff --git a/public/client-assets/images/infostand/bot-bg.png b/public/client-assets/images/infostand/bot-bg.png new file mode 100644 index 000000000..67fa1dc5c Binary files /dev/null and b/public/client-assets/images/infostand/bot-bg.png differ diff --git a/public/client-assets/images/infostand/pet-energy-bg.png b/public/client-assets/images/infostand/pet-energy-bg.png new file mode 100644 index 000000000..1c9350e00 Binary files /dev/null and b/public/client-assets/images/infostand/pet-energy-bg.png differ diff --git a/public/client-assets/images/infostand/pet-experience-bg.png b/public/client-assets/images/infostand/pet-experience-bg.png new file mode 100644 index 000000000..2d3a4b87c Binary files /dev/null and b/public/client-assets/images/infostand/pet-experience-bg.png differ diff --git a/public/client-assets/images/infostand/pet-happiness-bg.png b/public/client-assets/images/infostand/pet-happiness-bg.png new file mode 100644 index 000000000..48fca8736 Binary files /dev/null and b/public/client-assets/images/infostand/pet-happiness-bg.png differ diff --git a/src/assets/images/inventory/empty.png b/public/client-assets/images/inventory/empty.png similarity index 100% rename from src/assets/images/inventory/empty.png rename to public/client-assets/images/inventory/empty.png diff --git a/public/client-assets/images/loading/loading-bg.png b/public/client-assets/images/loading/loading-bg.png new file mode 100644 index 000000000..397f87fb7 Binary files /dev/null and b/public/client-assets/images/loading/loading-bg.png differ diff --git a/public/client-assets/images/loading/photos/photo-1.png b/public/client-assets/images/loading/photos/photo-1.png new file mode 100644 index 000000000..08f8a1f58 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-1.png differ diff --git a/public/client-assets/images/loading/photos/photo-10.png b/public/client-assets/images/loading/photos/photo-10.png new file mode 100644 index 000000000..5bbf0edc8 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-10.png differ diff --git a/public/client-assets/images/loading/photos/photo-2.png b/public/client-assets/images/loading/photos/photo-2.png new file mode 100644 index 000000000..7d3444990 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-2.png differ diff --git a/public/client-assets/images/loading/photos/photo-3.png b/public/client-assets/images/loading/photos/photo-3.png new file mode 100644 index 000000000..3ced2bfd1 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-3.png differ diff --git a/public/client-assets/images/loading/photos/photo-4.png b/public/client-assets/images/loading/photos/photo-4.png new file mode 100644 index 000000000..8a8983d45 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-4.png differ diff --git a/public/client-assets/images/loading/photos/photo-5.png b/public/client-assets/images/loading/photos/photo-5.png new file mode 100644 index 000000000..1572a12a3 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-5.png differ diff --git a/public/client-assets/images/loading/photos/photo-6.png b/public/client-assets/images/loading/photos/photo-6.png new file mode 100644 index 000000000..00a332c8c Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-6.png differ diff --git a/public/client-assets/images/loading/photos/photo-7.png b/public/client-assets/images/loading/photos/photo-7.png new file mode 100644 index 000000000..f81b26163 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-7.png differ diff --git a/public/client-assets/images/loading/photos/photo-8.png b/public/client-assets/images/loading/photos/photo-8.png new file mode 100644 index 000000000..82b792370 Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-8.png differ diff --git a/public/client-assets/images/loading/photos/photo-9.png b/public/client-assets/images/loading/photos/photo-9.png new file mode 100644 index 000000000..643dcaa6c Binary files /dev/null and b/public/client-assets/images/loading/photos/photo-9.png differ diff --git a/public/client-assets/images/loading/progress-bar-bg.png b/public/client-assets/images/loading/progress-bar-bg.png new file mode 100644 index 000000000..73a2663aa Binary files /dev/null and b/public/client-assets/images/loading/progress-bar-bg.png differ diff --git a/public/client-assets/images/loading/progress-bar-percent-bg.png b/public/client-assets/images/loading/progress-bar-percent-bg.png new file mode 100644 index 000000000..6fbf7242a Binary files /dev/null and b/public/client-assets/images/loading/progress-bar-percent-bg.png differ diff --git a/public/client-assets/images/messenger/caret-left-dark.png b/public/client-assets/images/messenger/caret-left-dark.png new file mode 100644 index 000000000..bd30551d2 Binary files /dev/null and b/public/client-assets/images/messenger/caret-left-dark.png differ diff --git a/public/client-assets/images/messenger/caret-left.png b/public/client-assets/images/messenger/caret-left.png new file mode 100644 index 000000000..8ef4b7ad0 Binary files /dev/null and b/public/client-assets/images/messenger/caret-left.png differ diff --git a/public/client-assets/images/messenger/caret-right-dark.png b/public/client-assets/images/messenger/caret-right-dark.png new file mode 100644 index 000000000..4d11d15ea Binary files /dev/null and b/public/client-assets/images/messenger/caret-right-dark.png differ diff --git a/public/client-assets/images/messenger/caret-right.png b/public/client-assets/images/messenger/caret-right.png new file mode 100644 index 000000000..f0006e2d4 Binary files /dev/null and b/public/client-assets/images/messenger/caret-right.png differ diff --git a/public/client-assets/images/messenger/message-bg.png b/public/client-assets/images/messenger/message-bg.png new file mode 100644 index 000000000..587474c89 Binary files /dev/null and b/public/client-assets/images/messenger/message-bg.png differ diff --git a/public/client-assets/images/messenger/message-dark-bg.png b/public/client-assets/images/messenger/message-dark-bg.png new file mode 100644 index 000000000..cfffd45d9 Binary files /dev/null and b/public/client-assets/images/messenger/message-dark-bg.png differ diff --git a/public/client-assets/images/nitropedia/content-bg.png b/public/client-assets/images/nitropedia/content-bg.png new file mode 100644 index 000000000..596a07de8 Binary files /dev/null and b/public/client-assets/images/nitropedia/content-bg.png differ diff --git a/public/client-assets/images/nitropedia/content-dark-bg.png b/public/client-assets/images/nitropedia/content-dark-bg.png new file mode 100644 index 000000000..4176551e8 Binary files /dev/null and b/public/client-assets/images/nitropedia/content-dark-bg.png differ diff --git a/public/client-assets/images/notifications/frank-alert-dark.png b/public/client-assets/images/notifications/frank-alert-dark.png new file mode 100644 index 000000000..e1fae9ae9 Binary files /dev/null and b/public/client-assets/images/notifications/frank-alert-dark.png differ diff --git a/public/client-assets/images/notifications/frank-alert.png b/public/client-assets/images/notifications/frank-alert.png new file mode 100644 index 000000000..909e79aed Binary files /dev/null and b/public/client-assets/images/notifications/frank-alert.png differ diff --git a/src/assets/images/room-widgets/exchange-credit/exchange-credit-image.png b/public/client-assets/images/notifications/frank-exchange.png similarity index 100% rename from src/assets/images/room-widgets/exchange-credit/exchange-credit-image.png rename to public/client-assets/images/notifications/frank-exchange.png diff --git a/public/client-assets/images/notifications/notification-bg.png b/public/client-assets/images/notifications/notification-bg.png new file mode 100644 index 000000000..ac3408723 Binary files /dev/null and b/public/client-assets/images/notifications/notification-bg.png differ diff --git a/public/client-assets/images/offers/content-bg.png b/public/client-assets/images/offers/content-bg.png new file mode 100644 index 000000000..6e76f00f8 Binary files /dev/null and b/public/client-assets/images/offers/content-bg.png differ diff --git a/public/client-assets/images/offers/price-bg.png b/public/client-assets/images/offers/price-bg.png new file mode 100644 index 000000000..7122b7e02 Binary files /dev/null and b/public/client-assets/images/offers/price-bg.png differ diff --git a/public/client-assets/images/offers/time-bg.png b/public/client-assets/images/offers/time-bg.png new file mode 100644 index 000000000..dc020f676 Binary files /dev/null and b/public/client-assets/images/offers/time-bg.png differ diff --git a/public/client-assets/images/profile/default-thumbnail.png b/public/client-assets/images/profile/default-thumbnail.png new file mode 100644 index 000000000..d444bf4ff Binary files /dev/null and b/public/client-assets/images/profile/default-thumbnail.png differ diff --git a/public/client-assets/images/profile/motto-bg.png b/public/client-assets/images/profile/motto-bg.png new file mode 100644 index 000000000..b60f938de Binary files /dev/null and b/public/client-assets/images/profile/motto-bg.png differ diff --git a/public/client-assets/images/profile/motto-caret-bg.png b/public/client-assets/images/profile/motto-caret-bg.png new file mode 100644 index 000000000..2fb01227a Binary files /dev/null and b/public/client-assets/images/profile/motto-caret-bg.png differ diff --git a/public/client-assets/images/profile/relationship-bg.png b/public/client-assets/images/profile/relationship-bg.png new file mode 100644 index 000000000..6474f35f3 Binary files /dev/null and b/public/client-assets/images/profile/relationship-bg.png differ diff --git a/public/client-assets/images/profile/relationship-dark-bg.png b/public/client-assets/images/profile/relationship-dark-bg.png new file mode 100644 index 000000000..603a7c772 Binary files /dev/null and b/public/client-assets/images/profile/relationship-dark-bg.png differ diff --git a/public/client-assets/images/profile/spritesheet.png b/public/client-assets/images/profile/spritesheet.png new file mode 100644 index 000000000..2f5f8d2e8 Binary files /dev/null and b/public/client-assets/images/profile/spritesheet.png differ diff --git a/public/client-assets/images/purse/purse-bg.png b/public/client-assets/images/purse/purse-bg.png new file mode 100644 index 000000000..4c529275c Binary files /dev/null and b/public/client-assets/images/purse/purse-bg.png differ diff --git a/public/client-assets/images/room-tools/bg.png b/public/client-assets/images/room-tools/bg.png new file mode 100644 index 000000000..3ecd88793 Binary files /dev/null and b/public/client-assets/images/room-tools/bg.png differ diff --git a/public/client-assets/images/room-tools/icon-bg.png b/public/client-assets/images/room-tools/icon-bg.png new file mode 100644 index 000000000..92b5ddc2f Binary files /dev/null and b/public/client-assets/images/room-tools/icon-bg.png differ diff --git a/public/client-assets/images/room-widgets/dimmer/door.png b/public/client-assets/images/room-widgets/dimmer/door.png new file mode 100644 index 000000000..05e1171f4 Binary files /dev/null and b/public/client-assets/images/room-widgets/dimmer/door.png differ diff --git a/public/client-assets/images/room-widgets/dimmer/slider-spritesheet-dark.png b/public/client-assets/images/room-widgets/dimmer/slider-spritesheet-dark.png new file mode 100644 index 000000000..45466b084 Binary files /dev/null and b/public/client-assets/images/room-widgets/dimmer/slider-spritesheet-dark.png differ diff --git a/public/client-assets/images/room-widgets/dimmer/slider-spritesheet.png b/public/client-assets/images/room-widgets/dimmer/slider-spritesheet.png new file mode 100644 index 000000000..2cbe51ab6 Binary files /dev/null and b/public/client-assets/images/room-widgets/dimmer/slider-spritesheet.png differ diff --git a/public/client-assets/images/room-widgets/friend-furni/spritesheet.png b/public/client-assets/images/room-widgets/friend-furni/spritesheet.png new file mode 100644 index 000000000..86e4c6b0b Binary files /dev/null and b/public/client-assets/images/room-widgets/friend-furni/spritesheet.png differ diff --git a/src/assets/images/room-widgets/furni-context-menu/monsterplant-preview.png b/public/client-assets/images/room-widgets/furni-context/monsterplant-preview.png similarity index 100% rename from src/assets/images/room-widgets/furni-context-menu/monsterplant-preview.png rename to public/client-assets/images/room-widgets/furni-context/monsterplant-preview.png diff --git a/src/assets/images/room-widgets/avatar-info/preview-background.png b/public/client-assets/images/room-widgets/furni-context/preview-bg.png similarity index 100% rename from src/assets/images/room-widgets/avatar-info/preview-background.png rename to public/client-assets/images/room-widgets/furni-context/preview-bg.png diff --git a/src/assets/images/room-widgets/mannequin-widget/mannequin-spritesheet.png b/public/client-assets/images/room-widgets/mannequin/spritesheet.png similarity index 100% rename from src/assets/images/room-widgets/mannequin-widget/mannequin-spritesheet.png rename to public/client-assets/images/room-widgets/mannequin/spritesheet.png diff --git a/src/assets/images/pets/pet-package/gnome.png b/public/client-assets/images/room-widgets/pet-package/gnome.png similarity index 100% rename from src/assets/images/pets/pet-package/gnome.png rename to public/client-assets/images/room-widgets/pet-package/gnome.png diff --git a/src/assets/images/pets/pet-package/leprechaun_box.png b/public/client-assets/images/room-widgets/pet-package/leprechaun_box.png similarity index 100% rename from src/assets/images/pets/pet-package/leprechaun_box.png rename to public/client-assets/images/room-widgets/pet-package/leprechaun_box.png diff --git a/src/assets/images/pets/pet-package/petbox_epic.png b/public/client-assets/images/room-widgets/pet-package/petbox_epic.png similarity index 100% rename from src/assets/images/pets/pet-package/petbox_epic.png rename to public/client-assets/images/room-widgets/pet-package/petbox_epic.png diff --git a/src/assets/images/pets/pet-package/pterosaur_egg.png b/public/client-assets/images/room-widgets/pet-package/pterosaur_egg.png similarity index 100% rename from src/assets/images/pets/pet-package/pterosaur_egg.png rename to public/client-assets/images/room-widgets/pet-package/pterosaur_egg.png diff --git a/src/assets/images/pets/pet-package/val11_present.png b/public/client-assets/images/room-widgets/pet-package/val11_present.png similarity index 100% rename from src/assets/images/pets/pet-package/val11_present.png rename to public/client-assets/images/room-widgets/pet-package/val11_present.png diff --git a/src/assets/images/pets/pet-package/velociraptor_egg.png b/public/client-assets/images/room-widgets/pet-package/velociraptor_egg.png similarity index 100% rename from src/assets/images/pets/pet-package/velociraptor_egg.png rename to public/client-assets/images/room-widgets/pet-package/velociraptor_egg.png diff --git a/public/client-assets/images/room-widgets/poll/poll-bg.png b/public/client-assets/images/room-widgets/poll/poll-bg.png new file mode 100644 index 000000000..1687b386e Binary files /dev/null and b/public/client-assets/images/room-widgets/poll/poll-bg.png differ diff --git a/public/client-assets/images/room-widgets/poll/poll-dislike-bg.png b/public/client-assets/images/room-widgets/poll/poll-dislike-bg.png new file mode 100644 index 000000000..179f01766 Binary files /dev/null and b/public/client-assets/images/room-widgets/poll/poll-dislike-bg.png differ diff --git a/public/client-assets/images/room-widgets/poll/poll-like-bg.png b/public/client-assets/images/room-widgets/poll/poll-like-bg.png new file mode 100644 index 000000000..14621c347 Binary files /dev/null and b/public/client-assets/images/room-widgets/poll/poll-like-bg.png differ diff --git a/public/client-assets/images/room-widgets/stickie/spritesheet.png b/public/client-assets/images/room-widgets/stickie/spritesheet.png new file mode 100644 index 000000000..f52e1fc3e Binary files /dev/null and b/public/client-assets/images/room-widgets/stickie/spritesheet.png differ diff --git a/src/assets/images/room-widgets/trophy-widget/trophy-spritesheet.png b/public/client-assets/images/room-widgets/trophy/spritesheet.png similarity index 100% rename from src/assets/images/room-widgets/trophy-widget/trophy-spritesheet.png rename to public/client-assets/images/room-widgets/trophy/spritesheet.png diff --git a/public/client-assets/images/rooms/create-room.png b/public/client-assets/images/rooms/create-room.png new file mode 100644 index 000000000..0f442991b Binary files /dev/null and b/public/client-assets/images/rooms/create-room.png differ diff --git a/public/client-assets/images/rooms/default-thumbnail.png b/public/client-assets/images/rooms/default-thumbnail.png new file mode 100644 index 000000000..4e0f4068e Binary files /dev/null and b/public/client-assets/images/rooms/default-thumbnail.png differ diff --git a/public/client-assets/images/rooms/grid-even-bg.png b/public/client-assets/images/rooms/grid-even-bg.png new file mode 100644 index 000000000..f655a14e8 Binary files /dev/null and b/public/client-assets/images/rooms/grid-even-bg.png differ diff --git a/public/client-assets/images/rooms/grid-even-dark-bg.png b/public/client-assets/images/rooms/grid-even-dark-bg.png new file mode 100644 index 000000000..93884b6c4 Binary files /dev/null and b/public/client-assets/images/rooms/grid-even-dark-bg.png differ diff --git a/public/client-assets/images/rooms/grid-odd-bg.png b/public/client-assets/images/rooms/grid-odd-bg.png new file mode 100644 index 000000000..5a11750bd Binary files /dev/null and b/public/client-assets/images/rooms/grid-odd-bg.png differ diff --git a/public/client-assets/images/rooms/grid-odd-dark-bg.png b/public/client-assets/images/rooms/grid-odd-dark-bg.png new file mode 100644 index 000000000..ad7759b71 Binary files /dev/null and b/public/client-assets/images/rooms/grid-odd-dark-bg.png differ diff --git a/public/client-assets/images/rooms/random-room.png b/public/client-assets/images/rooms/random-room.png new file mode 100644 index 000000000..79fb18995 Binary files /dev/null and b/public/client-assets/images/rooms/random-room.png differ diff --git a/public/client-assets/images/rooms/rectangle-thumbnail-bg.png b/public/client-assets/images/rooms/rectangle-thumbnail-bg.png new file mode 100644 index 000000000..3fc401926 Binary files /dev/null and b/public/client-assets/images/rooms/rectangle-thumbnail-bg.png differ diff --git a/public/client-assets/images/rooms/rectangle-thumbnail-dark-bg.png b/public/client-assets/images/rooms/rectangle-thumbnail-dark-bg.png new file mode 100644 index 000000000..f5185388f Binary files /dev/null and b/public/client-assets/images/rooms/rectangle-thumbnail-dark-bg.png differ diff --git a/public/client-assets/images/rooms/rectangle-thumbnail-room-name-bg.png b/public/client-assets/images/rooms/rectangle-thumbnail-room-name-bg.png new file mode 100644 index 000000000..3f26e5183 Binary files /dev/null and b/public/client-assets/images/rooms/rectangle-thumbnail-room-name-bg.png differ diff --git a/public/client-assets/images/rooms/room-bg.png b/public/client-assets/images/rooms/room-bg.png new file mode 100644 index 000000000..ca9d5f5ea Binary files /dev/null and b/public/client-assets/images/rooms/room-bg.png differ diff --git a/public/client-assets/images/rooms/room-dark-bg.png b/public/client-assets/images/rooms/room-dark-bg.png new file mode 100644 index 000000000..e1484f6a2 Binary files /dev/null and b/public/client-assets/images/rooms/room-dark-bg.png differ diff --git a/public/client-assets/images/rooms/thumbnail-bg.png b/public/client-assets/images/rooms/thumbnail-bg.png new file mode 100644 index 000000000..5f58d97ce Binary files /dev/null and b/public/client-assets/images/rooms/thumbnail-bg.png differ diff --git a/public/client-assets/images/rooms/thumbnail-dark-bg.png b/public/client-assets/images/rooms/thumbnail-dark-bg.png new file mode 100644 index 000000000..4aa12e49d Binary files /dev/null and b/public/client-assets/images/rooms/thumbnail-dark-bg.png differ diff --git a/public/client-assets/images/rooms/thumbnail-mini-bg.png b/public/client-assets/images/rooms/thumbnail-mini-bg.png new file mode 100644 index 000000000..f3b2ab674 Binary files /dev/null and b/public/client-assets/images/rooms/thumbnail-mini-bg.png differ diff --git a/public/client-assets/images/rooms/thumbnail-mini-dark-bg.png b/public/client-assets/images/rooms/thumbnail-mini-dark-bg.png new file mode 100644 index 000000000..7a1a4edb2 Binary files /dev/null and b/public/client-assets/images/rooms/thumbnail-mini-dark-bg.png differ diff --git a/public/client-assets/images/rooms/thumbnail-no-count-bg.png b/public/client-assets/images/rooms/thumbnail-no-count-bg.png new file mode 100644 index 000000000..51a01734f Binary files /dev/null and b/public/client-assets/images/rooms/thumbnail-no-count-bg.png differ diff --git a/public/client-assets/images/rooms/thumbnail-no-count-dark-bg.png b/public/client-assets/images/rooms/thumbnail-no-count-dark-bg.png new file mode 100644 index 000000000..5ab251be6 Binary files /dev/null and b/public/client-assets/images/rooms/thumbnail-no-count-dark-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-thumb-active-bg.png b/public/client-assets/images/scrollbar/scrollbar-thumb-active-bg.png new file mode 100644 index 000000000..d038f855d Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-thumb-active-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-thumb-active-dark-bg.png b/public/client-assets/images/scrollbar/scrollbar-thumb-active-dark-bg.png new file mode 100644 index 000000000..7d90b6adb Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-thumb-active-dark-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-thumb-bg.png b/public/client-assets/images/scrollbar/scrollbar-thumb-bg.png new file mode 100644 index 000000000..b76a453a3 Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-thumb-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-thumb-dark-bg.png b/public/client-assets/images/scrollbar/scrollbar-thumb-dark-bg.png new file mode 100644 index 000000000..c081c25a0 Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-thumb-dark-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-thumb-hover-bg.png b/public/client-assets/images/scrollbar/scrollbar-thumb-hover-bg.png new file mode 100644 index 000000000..b01328be4 Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-thumb-hover-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-thumb-hover-dark-bg.png b/public/client-assets/images/scrollbar/scrollbar-thumb-hover-dark-bg.png new file mode 100644 index 000000000..28530b58d Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-thumb-hover-dark-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-track-bg.png b/public/client-assets/images/scrollbar/scrollbar-track-bg.png new file mode 100644 index 000000000..72bab883d Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-track-bg.png differ diff --git a/public/client-assets/images/scrollbar/scrollbar-track-dark-bg.png b/public/client-assets/images/scrollbar/scrollbar-track-dark-bg.png new file mode 100644 index 000000000..b76295e25 Binary files /dev/null and b/public/client-assets/images/scrollbar/scrollbar-track-dark-bg.png differ diff --git a/public/client-assets/images/settings/sound-spritesheet.png b/public/client-assets/images/settings/sound-spritesheet.png new file mode 100644 index 000000000..509802fd5 Binary files /dev/null and b/public/client-assets/images/settings/sound-spritesheet.png differ diff --git a/public/client-assets/images/spritesheet-dark.png b/public/client-assets/images/spritesheet-dark.png new file mode 100644 index 000000000..8b07e4f36 Binary files /dev/null and b/public/client-assets/images/spritesheet-dark.png differ diff --git a/public/client-assets/images/spritesheet.png b/public/client-assets/images/spritesheet.png new file mode 100644 index 000000000..b57b7e6f0 Binary files /dev/null and b/public/client-assets/images/spritesheet.png differ diff --git a/public/client-assets/images/toolbar/chat-bg.png b/public/client-assets/images/toolbar/chat-bg.png new file mode 100644 index 000000000..394e9aefd Binary files /dev/null and b/public/client-assets/images/toolbar/chat-bg.png differ diff --git a/public/client-assets/images/toolbar/friends-bg.png b/public/client-assets/images/toolbar/friends-bg.png new file mode 100644 index 000000000..2cfe22565 Binary files /dev/null and b/public/client-assets/images/toolbar/friends-bg.png differ diff --git a/public/client-assets/images/toolbar/toolbar-bg.png b/public/client-assets/images/toolbar/toolbar-bg.png new file mode 100644 index 000000000..fcdbd3568 Binary files /dev/null and b/public/client-assets/images/toolbar/toolbar-bg.png differ diff --git a/public/client-assets/images/toolbar/toolbar-me-bg.png b/public/client-assets/images/toolbar/toolbar-me-bg.png new file mode 100644 index 000000000..50ac8c8bb Binary files /dev/null and b/public/client-assets/images/toolbar/toolbar-me-bg.png differ diff --git a/public/client-assets/images/toolbar/vertical/end-bg.png b/public/client-assets/images/toolbar/vertical/end-bg.png new file mode 100644 index 000000000..3e57d9534 Binary files /dev/null and b/public/client-assets/images/toolbar/vertical/end-bg.png differ diff --git a/public/client-assets/images/toolbar/vertical/line-bg.png b/public/client-assets/images/toolbar/vertical/line-bg.png new file mode 100644 index 000000000..b9486cb7e Binary files /dev/null and b/public/client-assets/images/toolbar/vertical/line-bg.png differ diff --git a/public/client-assets/images/toolbar/vertical/mid-bg.png b/public/client-assets/images/toolbar/vertical/mid-bg.png new file mode 100644 index 000000000..e447f672a Binary files /dev/null and b/public/client-assets/images/toolbar/vertical/mid-bg.png differ diff --git a/public/client-assets/images/toolbar/vertical/start-bg.png b/public/client-assets/images/toolbar/vertical/start-bg.png new file mode 100644 index 000000000..f9e3a3a41 Binary files /dev/null and b/public/client-assets/images/toolbar/vertical/start-bg.png differ diff --git a/src/assets/images/unique/numbers.png b/public/client-assets/images/unique/numbers.png similarity index 100% rename from src/assets/images/unique/numbers.png rename to public/client-assets/images/unique/numbers.png diff --git a/public/client-assets/images/wireds/card-bg.png b/public/client-assets/images/wireds/card-bg.png new file mode 100644 index 000000000..0ab43387f Binary files /dev/null and b/public/client-assets/images/wireds/card-bg.png differ diff --git a/public/client-assets/images/wireds/header-bg.png b/public/client-assets/images/wireds/header-bg.png new file mode 100644 index 000000000..30f7fe16e Binary files /dev/null and b/public/client-assets/images/wireds/header-bg.png differ diff --git a/public/client-assets/images/wireds/range-spritesheet.png b/public/client-assets/images/wireds/range-spritesheet.png new file mode 100644 index 000000000..6b65a1c91 Binary files /dev/null and b/public/client-assets/images/wireds/range-spritesheet.png differ diff --git a/public/renderer-config.json.example b/public/renderer-config.json.example index dbcbcc8c6..dee2c0e5a 100644 --- a/public/renderer-config.json.example +++ b/public/renderer-config.json.example @@ -105,8 +105,11 @@ "${asset.url}/bundled/generic/avatar_additions.nitro", "${asset.url}/bundled/generic/group_badge.nitro", "${asset.url}/bundled/generic/floor_editor.nitro", - "${images.url}/loading_icon.png", - "${images.url}/clear_icon.png", - "${images.url}/big_arrow.png" + "/client-assets/images/common/card-bg.png", + "/client-assets/images/common/card-dark-bg.png", + "/client-assets/images/spritesheet.png", + "/client-assets/images/spritesheet-dark.png", + "/client-assets/images/hotelview/hotelview_default.png", + "/client-assets/images/hotelview/hotelview_dec.png" ] } diff --git a/public/ui-config.json.example b/public/ui-config.json.example index 2187bc03b..72c9df210 100644 --- a/public/ui-config.json.example +++ b/public/ui-config.json.example @@ -1,4 +1,147 @@ { + "illumina.hotel.name": "Habbo", + "illumina.main.theme": "light", + "illumina.high.contrast": false, + "illumina.overlay.radial": false, + "illumina.mod_tools.closable": true, + "illumina.camera.enabled": true, + "illumina.help_settings.disabled": false, + "illumina.purchase.popup": true, + "illumina.hide.purse": false, + "illumina.random.figure.enabled": false, + "illumina.loading.reload.button.url": "default", + "illumina.toolbar.type": "default", + "illumina.navigator.type": "default", + "illumina.navigator.banner": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEictve3dYsxlCRN7dsmAtLFRc9V-gPf_D0fHJd0pj1p8GYtBSD03xmUNeX4XblrXYb3UT8UP5zVl3Pm2a9SYYyvuSSksceJxvcxfSKjd4UgVF_Mz84iG3QNEza6H3qt1L-HD7pVDqubB-E/s1600/TopStories_picnic.gif", + "illumina.loading.logo": "/client-assets/images/illumina-logo.png", + "illumina.loading.text": "Please wait! Habbo is loading...", + "illumina.loading.images": [ + "/client-assets/images/loading/photos/photo-1.png", + "/client-assets/images/loading/photos/photo-2.png", + "/client-assets/images/loading/photos/photo-3.png", + "/client-assets/images/loading/photos/photo-4.png", + "/client-assets/images/loading/photos/photo-5.png", + "/client-assets/images/loading/photos/photo-6.png", + "/client-assets/images/loading/photos/photo-7.png", + "/client-assets/images/loading/photos/photo-8.png", + "/client-assets/images/loading/photos/photo-9.png", + "/client-assets/images/loading/photos/photo-10.png" + ], + "illumina.gamecenter.game_list": [ + { + "enabled": false, + "gameId": 0, + "gameNameId": "snowwar", + "bgColor": "#93d4f3", + "assetUrl": "/client-assets/images/gamecenter/snowwar/", + "apiKey": "YOUR SNOWSTORM API KEY" + }, + { + "enabled": true, + "gameId": 3, + "gameNameId": "basejump", + "bgColor": "#68bbd2", + "assetUrl": "/client-assets/images/gamecenter/basejump/", + "theme": "default", + "apiKey": "YOUR THEFASTFOODGAME.COM API KEY" + } + ], + "illumina.interactive.hotelview": { + "enabled": true, + "theme": "default", + "show.drape": true, + "drape.image": "${image.library.url}reception/drape.png", + "rooms": [ + { + "id": "rooftop", + "style": { + "width": "120px", + "height": "164px", + "top": "91px", + "left": "368px" + }, + "roomId": -1, + "show": true + }, + { + "id": "rooftop-pool", + "style": { + "width": "183px", + "height": "164px", + "top": "312px", + "left": "520px" + }, + "roomId": -1, + "show": true + }, + { + "id": "pool", + "style": { + "width": "433px", + "height": "361px", + "top": "477px", + "left": "628px" + }, + "roomId": -1, + "show": true + }, + { + "id": "picnic", + "style": { + "width": "576px", + "height": "436px", + "top": "489px", + "left": "-128px" + }, + "roomId": -1, + "show": true + }, + { + "id": "peaceful-park", + "style": { + "width": "384px", + "height": "269px", + "top": "359px", + "left": "723px" + }, + "roomId": -1, + "show": true + }, + { + "id": "park", + "style": { + "width": "236px", + "height": "181px", + "top": "333px", + "left": "686px" + }, + "roomId": -1, + "show": true + }, + { + "id": "reception", + "style": { + "width": "73px", + "height": "65px", + "top": "637px", + "left": "459px" + }, + "roomId": -1, + "show": true + }, + { + "id": "central-terrace", + "style": { + "width": "305px", + "height": "134px", + "top": "388px", + "left": "290px" + }, + "roomId": -1, + "show": true + } + ] + }, "image.library.notifications.url": "${image.library.url}notifications/%image%.png", "achievements.images.url": "${image.library.url}Quests/%image%.png", "camera.url": "https://camera.url", diff --git a/src/App.scss b/src/App.scss deleted file mode 100644 index 2000adecf..000000000 --- a/src/App.scss +++ /dev/null @@ -1,102 +0,0 @@ -$toolbar-me-zindex: 90; -$chatinput-zindex: 80; -$toolbar-zindex: 70; -$rightside-zindex: 69; -$notification-center-zindex: 68; -$toolbar-memenu-zindex: 60; -$roomtools-zindex: 50; -$context-menu-zindex: 40; -$infostand-zindex: 30; -$quiz-zindex: 21; -$chat-zindex: 20; -$highscore-zindex: 19; - -$grid-bg-color: #cdd3d9; -$grid-border-color: $muted; -$grid-active-bg-color: #ececec; -$grid-active-border-color: $white; - -$toolbar-height: 55px; - -$achievement-width: 375px; -$achievement-height: 405px; - -$avatar-editor-width: 620px; -$avatar-editor-height: 374px; - -$catalog-width: 630px; -$catalog-height: 400px; - -$inventory-width: 528px; -$inventory-height: 320px; - -$navigator-width: 420px; -$navigator-height: 440px; - -$chat-input-style-selector-widget-width: 210px; -$chat-input-style-selector-widget-height: 200px; - -$user-profile-width: 470px; -$user-profile-height: 460px; - -$nitro-widget-custom-stack-height-width: 275px; -$nitro-widget-custom-stack-height-height: 220px; - -$nitro-widget-exchange-credit-width: 375px; -$nitro-widget-exchange-credit-height: 150px; - -$nitro-widget-crafting-width: 500px; -$nitro-widget-crafting-height: 300px; - -$chat-history-width: 300px; -$chat-history-height: 300px; - -$friends-list-width: 250px; -$friends-list-height: 300px; - -$help-width: 450px; -$help-height: 290px; - -$nitropedia-width: 400px; -$nitropedia-height: 400px; - -$messenger-width: 500px; -$messenger-height: 370px; - -$marketplace-post-offer-width: 430px; -$marketplace-post-offer-height: 250px; - -$camera-editor-width: 600px; -$camera-editor-height: 500px; - -$camera-checkout-width: 350px; - -$room-info-width: 325px; - -$nitro-group-creator-width: 383px; -$nitro-mod-tools-width: 175px; - -$nitro-group-manager-width: 390px; -$nitro-group-manager-height: 355px; - -$nitro-chooser-width: 200px; -$nitro-chooser-height: 200px; - -$nitro-doorbell-width: 300px; -$nitro-doorbell-height: 200px; - -$nitro-guide-tool-width: 250px; - -$nitro-floor-editor-width: 760px; -$nitro-floor-editor-height: 500px; - -$nitro-calendar-width: 850px; -$nitro-calendar-height: 400px; - -.nitro-app { - width: 100%; - height: 100%; -} - -@import './common'; -@import './components'; diff --git a/src/App.tsx b/src/App.tsx index 072b05dda..cebe3ccba 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,141 +1,156 @@ -import { ConfigurationEvent, GetAssetManager, HabboWebTools, LegacyExternalInterface, Nitro, NitroCommunicationDemoEvent, NitroConfiguration, NitroEvent, NitroLocalizationEvent, NitroVersion, RoomEngineEvent } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useEffect, useState } from 'react'; -import { GetCommunication, GetConfiguration, GetNitroInstance, GetUIVersion } from './api'; -import { Base, TransitionAnimation, TransitionAnimationTypes } from './common'; -import { LoadingView } from './components/loading/LoadingView'; -import { MainView } from './components/main/MainView'; -import { useConfigurationEvent, useLocalizationEvent, useMainEvent, useRoomEngineEvent } from './hooks'; +import { ConfigurationEvent, GetAssetManager, HabboWebTools, LegacyExternalInterface, Nitro, NitroCommunicationDemoEvent, NitroConfiguration, NitroEvent, NitroLocalizationEvent, NitroVersion, RoomEngineEvent } from "@nitrots/nitro-renderer" +import { FC, useCallback, useEffect, useState } from "react" +import { GetCommunication, GetConfiguration, GetIlluminaVersion, GetNitroInstance, GetUIVersion } from "./api" +import { TransitionAnimation, TransitionAnimationTypes } from "./common" +import { LoadingView } from "./components/loading/LoadingView" +import { MainView } from "./components/main/MainView" +import { useConfigurationEvent, useLocalizationEvent, useMainEvent, useRoomEngineEvent } from "./hooks" -NitroVersion.UI_VERSION = GetUIVersion(); +NitroVersion.UI_VERSION = GetUIVersion() export const App: FC<{}> = props => { - const [ isReady, setIsReady ] = useState(false); - const [ isError, setIsError ] = useState(false); - const [ message, setMessage ] = useState('Getting Ready'); - const [ percent, setPercent ] = useState(0); - const [ imageRendering, setImageRendering ] = useState(true); + const [ isReady, setIsReady ] = useState(false) + const [ isError, setIsError ] = useState(false) + const [ message, setMessage ] = useState("Getting Ready") + const [ percent, setPercent ] = useState(0) + const [ imageRendering, setImageRendering ] = useState(true) + const [ isDarkMode, setIsDarkMode ] = useState(false) + + const defaultTheme: boolean = GetConfiguration("illumina.main.theme") === "dark" + const isHighContrast: boolean = GetConfiguration("illumina.high.contrast") + + console.log(`%c Illumina UI - ${ "v" + GetIlluminaVersion() } \n%c by cowboystyle \n%c https://discord.gg/yMRWuSekS8`, "font-size: 16px; border font-weight: bold;", "font-size: 12px;", "font-size: 12px;") if(!GetNitroInstance()) { //@ts-ignore - if(!NitroConfig) throw new Error('NitroConfig is not defined!'); + if(!NitroConfig) throw new Error("NitroConfig is not defined!") - Nitro.bootstrap(); + Nitro.bootstrap() } const handler = useCallback(async (event: NitroEvent) => { switch(event.type) { - case ConfigurationEvent.LOADED: - GetNitroInstance().localization.init(); - setPercent(prevValue => (prevValue + 20)); - return; - case ConfigurationEvent.FAILED: - setIsError(true); - setMessage('Configuration Failed'); - return; - case Nitro.WEBGL_UNAVAILABLE: - setIsError(true); - setMessage('WebGL Required'); - return; - case Nitro.WEBGL_CONTEXT_LOST: - setIsError(true); - setMessage('WebGL Context Lost - Reloading'); - - setTimeout(() => window.location.reload(), 1500); - return; - case NitroCommunicationDemoEvent.CONNECTION_HANDSHAKING: - setPercent(prevValue => (prevValue + 20)); - return; - case NitroCommunicationDemoEvent.CONNECTION_HANDSHAKE_FAILED: - setIsError(true); - setMessage('Handshake Failed'); - return; - case NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED: - setPercent(prevValue => (prevValue + 20)); - - GetNitroInstance().init(); - - if(LegacyExternalInterface.available) LegacyExternalInterface.call('legacyTrack', 'authentication', 'authok', []); - return; - case NitroCommunicationDemoEvent.CONNECTION_ERROR: - setIsError(true); - setMessage('Connection Error'); - return; - case NitroCommunicationDemoEvent.CONNECTION_CLOSED: - //if(GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose(); - //setIsError(true); - setMessage('Connection Error'); - - HabboWebTools.send(-1, 'client.init.handshake.fail'); - return; - case RoomEngineEvent.ENGINE_INITIALIZED: - setPercent(prevValue => (prevValue + 20)); - - setTimeout(() => setIsReady(true), 300); - return; - case NitroLocalizationEvent.LOADED: { - const assetUrls = GetConfiguration('preload.assets.urls'); - const urls: string[] = []; - - if(assetUrls && assetUrls.length) for(const url of assetUrls) urls.push(NitroConfiguration.interpolate(url)); - - const status = await GetAssetManager().downloadAssets(urls); + case ConfigurationEvent.LOADED: + GetNitroInstance().localization.init() + setPercent(prevValue => (prevValue + 20)) + return + case ConfigurationEvent.FAILED: + setIsError(true) + setMessage("Configuration Failed") + return + case Nitro.WEBGL_UNAVAILABLE: + setIsError(true) + setMessage("WebGL Required") + return + case Nitro.WEBGL_CONTEXT_LOST: + setIsError(true) + setMessage("WebGL Context Lost - Reloading") + + setTimeout(() => window.location.reload(), 1500) + return + case NitroCommunicationDemoEvent.CONNECTION_HANDSHAKING: + setPercent(prevValue => (prevValue + 20)) + return + case NitroCommunicationDemoEvent.CONNECTION_HANDSHAKE_FAILED: + setIsError(true) + setMessage("Handshake Failed") + return + case NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED: + setPercent(prevValue => (prevValue + 20)) + + GetNitroInstance().init() + + if(LegacyExternalInterface.available) LegacyExternalInterface.call("legacyTrack", "authentication", "authok", []) + return + case NitroCommunicationDemoEvent.CONNECTION_ERROR: + setIsError(true) + setMessage("Connection Error") + return + case NitroCommunicationDemoEvent.CONNECTION_CLOSED: + //if(GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose(); + setIsError(true) + setMessage("Connection Closed") + + HabboWebTools.send(-1, "client.init.handshake.fail") + return + case RoomEngineEvent.ENGINE_INITIALIZED: + setPercent(prevValue => (prevValue + 20)) + + setTimeout(() => setIsReady(true), 300) + return + case NitroLocalizationEvent.LOADED: { + const assetUrls = GetConfiguration("preload.assets.urls") + const urls: string[] = [] + + if(assetUrls && assetUrls.length) for(const url of assetUrls) urls.push(NitroConfiguration.interpolate(url)) + + const status = await GetAssetManager().downloadAssets(urls) - if(status) - { - GetCommunication().init(); - - setPercent(prevValue => (prevValue + 20)) - } - else - { - setIsError(true); - setMessage('Assets Failed'); - } - return; + if(status) + { + GetCommunication().init() + + setPercent(prevValue => (prevValue + 20)) + } else + { + setIsError(true) + setMessage("Assets Failed") } + return + } } - }, []); - - useMainEvent(Nitro.WEBGL_UNAVAILABLE, handler); - useMainEvent(Nitro.WEBGL_CONTEXT_LOST, handler); - useMainEvent(NitroCommunicationDemoEvent.CONNECTION_HANDSHAKING, handler); - useMainEvent(NitroCommunicationDemoEvent.CONNECTION_HANDSHAKE_FAILED, handler); - useMainEvent(NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED, handler); - useMainEvent(NitroCommunicationDemoEvent.CONNECTION_ERROR, handler); - useMainEvent(NitroCommunicationDemoEvent.CONNECTION_CLOSED, handler); - useRoomEngineEvent(RoomEngineEvent.ENGINE_INITIALIZED, handler); - useLocalizationEvent(NitroLocalizationEvent.LOADED, handler); - useConfigurationEvent(ConfigurationEvent.LOADED, handler); - useConfigurationEvent(ConfigurationEvent.FAILED, handler); + }, [ ]) + + useMainEvent(Nitro.WEBGL_UNAVAILABLE, handler) + useMainEvent(Nitro.WEBGL_CONTEXT_LOST, handler) + useMainEvent(NitroCommunicationDemoEvent.CONNECTION_HANDSHAKING, handler) + useMainEvent(NitroCommunicationDemoEvent.CONNECTION_HANDSHAKE_FAILED, handler) + useMainEvent(NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED, handler) + useMainEvent(NitroCommunicationDemoEvent.CONNECTION_ERROR, handler) + useMainEvent(NitroCommunicationDemoEvent.CONNECTION_CLOSED, handler) + useRoomEngineEvent(RoomEngineEvent.ENGINE_INITIALIZED, handler) + useLocalizationEvent(NitroLocalizationEvent.LOADED, handler) + useConfigurationEvent(ConfigurationEvent.LOADED, handler) + useConfigurationEvent(ConfigurationEvent.FAILED, handler) useEffect(() => { - GetNitroInstance().core.configuration.init(); - - const resize = (event: UIEvent) => setImageRendering(!(window.devicePixelRatio % 1)); + GetNitroInstance().core.configuration.init() + const resize = (event: UIEvent) => setImageRendering(!(window.devicePixelRatio % 1)) - window.addEventListener('resize', resize); + window.addEventListener("resize", resize) - resize(null); + resize(null) return () => { - window.removeEventListener('resize', resize); + window.removeEventListener("resize", resize) + } + }, []) + + useEffect(() => { + const savedTheme = localStorage.getItem("isDarkMode") + if(savedTheme === null) { + setIsDarkMode(defaultTheme) + } else if(savedTheme === "true") { + setIsDarkMode(true) + } else { + setIsDarkMode(false) } - }, []); + }, [ isDarkMode, defaultTheme ]) return ( - +
{ (!isReady || isError) && } - - - ); +
+
+ ) } diff --git a/src/api/GetRendererVersion.ts b/src/api/GetRendererVersion.ts index bb9e46181..0ea45b1eb 100644 --- a/src/api/GetRendererVersion.ts +++ b/src/api/GetRendererVersion.ts @@ -1,3 +1,3 @@ -import { NitroVersion } from '@nitrots/nitro-renderer'; +import { NitroVersion } from "@nitrots/nitro-renderer" -export const GetRendererVersion = () => NitroVersion.RENDERER_VERSION; +export const GetRendererVersion = () => NitroVersion.RENDERER_VERSION diff --git a/src/api/GetUIVersion.ts b/src/api/GetUIVersion.ts index bdbe92238..04fc4c6e7 100644 --- a/src/api/GetUIVersion.ts +++ b/src/api/GetUIVersion.ts @@ -1 +1,2 @@ -export const GetUIVersion = () => '2.2.0'; +export const GetUIVersion = () => "2.2.0" +export const GetIlluminaVersion = () => "1.1.7" diff --git a/src/api/achievements/AchievementCategory.ts b/src/api/achievements/AchievementCategory.ts index 906d8da4b..0996a710f 100644 --- a/src/api/achievements/AchievementCategory.ts +++ b/src/api/achievements/AchievementCategory.ts @@ -1,40 +1,40 @@ -import { AchievementData } from '@nitrots/nitro-renderer'; -import { AchievementUtilities } from './AchievementUtilities'; -import { IAchievementCategory } from './IAchievementCategory'; +import { AchievementData } from "@nitrots/nitro-renderer" +import { AchievementUtilities } from "./AchievementUtilities" +import { IAchievementCategory } from "./IAchievementCategory" export class AchievementCategory implements IAchievementCategory { - private _code: string; - private _achievements: AchievementData[]; + private _code: string + private _achievements: AchievementData[] constructor(code: string) { - this._code = code; - this._achievements = []; + this._code = code + this._achievements = [] } public getProgress(): number { - return AchievementUtilities.getAchievementCategoryProgress(this); + return AchievementUtilities.getAchievementCategoryProgress(this) } public getMaxProgress(): number { - return AchievementUtilities.getAchievementCategoryMaxProgress(this); + return AchievementUtilities.getAchievementCategoryMaxProgress(this) } public get code(): string { - return this._code; + return this._code } public get achievements(): AchievementData[] { - return this._achievements; + return this._achievements } public set achievements(achievements: AchievementData[]) { - this._achievements = achievements; + this._achievements = achievements } } diff --git a/src/api/achievements/AchievementUtilities.ts b/src/api/achievements/AchievementUtilities.ts index b581f979e..291a25971 100644 --- a/src/api/achievements/AchievementUtilities.ts +++ b/src/api/achievements/AchievementUtilities.ts @@ -1,97 +1,97 @@ -import { AchievementData } from '@nitrots/nitro-renderer'; -import { GetConfiguration, GetLocalization } from '../nitro'; -import { IAchievementCategory } from './IAchievementCategory'; +import { AchievementData } from "@nitrots/nitro-renderer" +import { GetConfiguration, GetLocalization } from "../nitro" +import { IAchievementCategory } from "./IAchievementCategory" export class AchievementUtilities { public static getAchievementBadgeCode(achievement: AchievementData): string { - if(!achievement) return null; + if(!achievement) return null - let badgeId = achievement.badgeId; + let badgeId = achievement.badgeId - if(!achievement.finalLevel) badgeId = GetLocalization().getPreviousLevelBadgeId(badgeId); + if(!achievement.finalLevel) badgeId = GetLocalization().getPreviousLevelBadgeId(badgeId) - return badgeId; + return badgeId } public static getAchievementCategoryImageUrl(category: IAchievementCategory, progress: number = null, icon: boolean = false): string { - const imageUrl = GetConfiguration('achievements.images.url'); + const imageUrl = GetConfiguration("achievements.images.url") - let imageName = icon ? 'achicon_' : 'achcategory_'; + let imageName = icon ? "achicon_" : "achcategory_" - imageName += category.code; + imageName += category.code - if(progress !== null) imageName += `_${ ((progress > 0) ? 'active' : 'inactive') }`; + if(progress !== null) imageName += `_${ ((progress > 0) ? "active" : "inactive") }` - return imageUrl.replace('%image%', imageName); + return imageUrl.replace("%image%", imageName) } public static getAchievementCategoryMaxProgress(category: IAchievementCategory): number { - if(!category) return 0; + if(!category) return 0 - let progress = 0; + let progress = 0 for(const achievement of category.achievements) { - progress += achievement.levelCount; + progress += achievement.levelCount } - return progress; + return progress } public static getAchievementCategoryProgress(category: IAchievementCategory): number { - if(!category) return 0; + if(!category) return 0 - let progress = 0; + let progress = 0 - for(const achievement of category.achievements) progress += (achievement.finalLevel ? achievement.level : (achievement.level - 1)); + for(const achievement of category.achievements) progress += (achievement.finalLevel ? achievement.level : (achievement.level - 1)) - return progress; + return progress } public static getAchievementCategoryTotalUnseen(category: IAchievementCategory): number { - if(!category) return 0; + if(!category) return 0 - let unseen = 0; + let unseen = 0 - for(const achievement of category.achievements) ((achievement.unseen > 0) && unseen++); + for(const achievement of category.achievements) ((achievement.unseen > 0) && unseen++) - return unseen; + return unseen } public static getAchievementHasStarted(achievement: AchievementData): boolean { - if(!achievement) return false; + if(!achievement) return false - if(achievement.finalLevel || ((achievement.level - 1) > 0)) return true; + if(achievement.finalLevel || ((achievement.level - 1) > 0)) return true - return false; + return false } public static getAchievementIsIgnored(achievement: AchievementData): boolean { - if(!achievement) return false; + if(!achievement) return false - const ignored = GetConfiguration('achievements.unseen.ignored'); - const value = achievement.badgeId.replace(/[0-9]/g, ''); - const index = ignored.indexOf(value); + const ignored = GetConfiguration("achievements.unseen.ignored") + const value = achievement.badgeId.replace(/[0-9]/g, "") + const index = ignored.indexOf(value) - if(index >= 0) return true; + if(index >= 0) return true - return false; + return false } public static getAchievementLevel(achievement: AchievementData): number { - if(!achievement) return 0; + if(!achievement) return 0 - if(achievement.finalLevel) return achievement.level; + if(achievement.finalLevel) return achievement.level - return (achievement.level - 1); + return (achievement.level - 1) } } diff --git a/src/api/achievements/IAchievementCategory.ts b/src/api/achievements/IAchievementCategory.ts index a049d464a..1e9e21367 100644 --- a/src/api/achievements/IAchievementCategory.ts +++ b/src/api/achievements/IAchievementCategory.ts @@ -1,4 +1,4 @@ -import { AchievementData } from '@nitrots/nitro-renderer'; +import { AchievementData } from "@nitrots/nitro-renderer" export interface IAchievementCategory { diff --git a/src/api/achievements/index.ts b/src/api/achievements/index.ts index a3d44b73f..e52177733 100644 --- a/src/api/achievements/index.ts +++ b/src/api/achievements/index.ts @@ -1,3 +1,3 @@ -export * from './AchievementCategory'; -export * from './AchievementUtilities'; -export * from './IAchievementCategory'; +export * from "./AchievementCategory" +export * from "./AchievementUtilities" +export * from "./IAchievementCategory" diff --git a/src/api/avatar/AvatarEditorAction.ts b/src/api/avatar/AvatarEditorAction.ts index 064d6dffc..9ab946b29 100644 --- a/src/api/avatar/AvatarEditorAction.ts +++ b/src/api/avatar/AvatarEditorAction.ts @@ -1,7 +1,7 @@ export class AvatarEditorAction { - public static ACTION_SAVE: string = 'AEA_ACTION_SAVE'; - public static ACTION_CLEAR: string = 'AEA_ACTION_CLEAR'; - public static ACTION_RESET: string = 'AEA_ACTION_RESET'; - public static ACTION_RANDOMIZE: string = 'AEA_ACTION_RANDOMIZE'; + public static ACTION_SAVE: string = "AEA_ACTION_SAVE" + public static ACTION_CLEAR: string = "AEA_ACTION_CLEAR" + public static ACTION_RESET: string = "AEA_ACTION_RESET" + public static ACTION_RANDOMIZE: string = "AEA_ACTION_RANDOMIZE" } diff --git a/src/api/avatar/AvatarEditorGridColorItem.ts b/src/api/avatar/AvatarEditorGridColorItem.ts index dee3daef9..558e5e782 100644 --- a/src/api/avatar/AvatarEditorGridColorItem.ts +++ b/src/api/avatar/AvatarEditorGridColorItem.ts @@ -1,65 +1,65 @@ -import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer'; +import { ColorConverter, IPartColor } from "@nitrots/nitro-renderer" export class AvatarEditorGridColorItem { - private _partColor: IPartColor; - private _isDisabled: boolean; - private _isHC: boolean; - private _isSelected: boolean; - private _notifier: () => void; + private _partColor: IPartColor + private _isDisabled: boolean + private _isHC: boolean + private _isSelected: boolean + private _notifier: () => void constructor(partColor: IPartColor, isDisabled: boolean = false) { - this._partColor = partColor; - this._isDisabled = isDisabled; - this._isHC = (this._partColor.clubLevel > 0); - this._isSelected = false; + this._partColor = partColor + this._isDisabled = isDisabled + this._isHC = (this._partColor.clubLevel > 0) + this._isSelected = false } public dispose(): void { - this._partColor = null; + this._partColor = null } public get partColor(): IPartColor { - return this._partColor; + return this._partColor } public get color(): string { - return ColorConverter.int2rgb(this._partColor.rgb); + return ColorConverter.int2rgb(this._partColor.rgb) } public get isDisabled(): boolean { - return this._isDisabled; + return this._isDisabled } public get isHC(): boolean { - return this._isHC; + return this._isHC } public get isSelected(): boolean { - return this._isSelected; + return this._isSelected } public set isSelected(flag: boolean) { - this._isSelected = flag; + this._isSelected = flag - if(this.notify) this.notify(); + if(this.notify) this.notify() } public get notify(): () => void { - return this._notifier; + return this._notifier } public set notify(notifier: () => void) { - this._notifier = notifier; + this._notifier = notifier } } diff --git a/src/api/avatar/AvatarEditorGridPartItem.ts b/src/api/avatar/AvatarEditorGridPartItem.ts index a3b16616d..23a1c10e8 100644 --- a/src/api/avatar/AvatarEditorGridPartItem.ts +++ b/src/api/avatar/AvatarEditorGridPartItem.ts @@ -1,11 +1,11 @@ -import { AvatarFigurePartType, IAvatarImageListener, IAvatarRenderManager, IFigurePart, IFigurePartSet, IGraphicAsset, IPartColor, NitroAlphaFilter, NitroContainer, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer'; -import { GetAvatarRenderManager } from '../nitro'; -import { FigureData } from './FigureData'; +import { AvatarFigurePartType, IAvatarImageListener, IAvatarRenderManager, IFigurePart, IFigurePartSet, IGraphicAsset, IPartColor, NitroAlphaFilter, NitroContainer, NitroSprite, TextureUtils } from "@nitrots/nitro-renderer" +import { GetAvatarRenderManager } from "../nitro" +import { FigureData } from "./FigureData" export class AvatarEditorGridPartItem implements IAvatarImageListener { - private static ALPHA_FILTER: NitroAlphaFilter = new NitroAlphaFilter(0.2); - private static THUMB_DIRECTIONS: number[] = [ 2, 6, 0, 4, 3, 1 ]; + private static ALPHA_FILTER: NitroAlphaFilter = new NitroAlphaFilter(0.2) + private static THUMB_DIRECTIONS: number[] = [ 2, 6, 0, 4, 3, 1 ] private static DRAW_ORDER: string[] = [ AvatarFigurePartType.LEFT_HAND_ITEM, AvatarFigurePartType.LEFT_HAND, @@ -31,307 +31,307 @@ export class AvatarEditorGridPartItem implements IAvatarImageListener AvatarFigurePartType.EYE_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY_EXTRA, - AvatarFigurePartType.RIGHT_HAND_ITEM, - ]; - - private _renderManager: IAvatarRenderManager; - private _partSet: IFigurePartSet; - private _partColors: IPartColor[]; - private _useColors: boolean; - private _isDisabled: boolean; - private _thumbContainer: NitroContainer; - private _imageUrl: string; - private _maxColorIndex: number; - private _isValidFigure: boolean; - private _isHC: boolean; - private _isSellable: boolean; - private _isClear: boolean; - private _isSelected: boolean; - private _disposed: boolean; - private _isInitalized: boolean; - private _notifier: () => void; + AvatarFigurePartType.RIGHT_HAND_ITEM + ] + + private _renderManager: IAvatarRenderManager + private _partSet: IFigurePartSet + private _partColors: IPartColor[] + private _useColors: boolean + private _isDisabled: boolean + private _thumbContainer: NitroContainer + private _imageUrl: string + private _maxColorIndex: number + private _isValidFigure: boolean + private _isHC: boolean + private _isSellable: boolean + private _isClear: boolean + private _isSelected: boolean + private _disposed: boolean + private _isInitalized: boolean + private _notifier: () => void constructor(partSet: IFigurePartSet, partColors: IPartColor[], useColors: boolean = true, isDisabled: boolean = false) { - this._renderManager = GetAvatarRenderManager(); - this._partSet = partSet; - this._partColors = partColors; - this._useColors = useColors; - this._isDisabled = isDisabled; - this._thumbContainer = null; - this._imageUrl = null; - this._maxColorIndex = 0; - this._isValidFigure = false; - this._isHC = false; - this._isSellable = false; - this._isClear = false; - this._isSelected = false; - this._disposed = false; - this._isInitalized = false; + this._renderManager = GetAvatarRenderManager() + this._partSet = partSet + this._partColors = partColors + this._useColors = useColors + this._isDisabled = isDisabled + this._thumbContainer = null + this._imageUrl = null + this._maxColorIndex = 0 + this._isValidFigure = false + this._isHC = false + this._isSellable = false + this._isClear = false + this._isSelected = false + this._disposed = false + this._isInitalized = false if(partSet) { - const colors = partSet.parts; + const colors = partSet.parts - for(const color of colors) this._maxColorIndex = Math.max(this._maxColorIndex, color.colorLayerIndex); + for(const color of colors) this._maxColorIndex = Math.max(this._maxColorIndex, color.colorLayerIndex) } } public init(): void { - if(this._isInitalized) return; + if(this._isInitalized) return - this._isInitalized = true; + this._isInitalized = true - this.update(); + this.update() } public dispose(): void { - if(this._disposed) return; + if(this._disposed) return - this._renderManager = null; - this._partSet = null; - this._partColors = null; - this._imageUrl = null; - this._disposed = true; - this._isInitalized = false; + this._renderManager = null + this._partSet = null + this._partColors = null + this._imageUrl = null + this._disposed = true + this._isInitalized = false if(this._thumbContainer) { - this._thumbContainer.destroy(); + this._thumbContainer.destroy() - this._thumbContainer = null; + this._thumbContainer = null } } public update(): void { - this.updateThumbVisualization(); + this.updateThumbVisualization() } private analyzeFigure(): boolean { - if(!this._renderManager || !this._partSet || !this._partSet.parts || !this._partSet.parts.length) return false; + if(!this._renderManager || !this._partSet || !this._partSet.parts || !this._partSet.parts.length) return false - const figureContainer = this._renderManager.createFigureContainer(((this.partSet.type + '-') + this.partSet.id)); + const figureContainer = this._renderManager.createFigureContainer(((this.partSet.type + "-") + this.partSet.id)) if(!this._renderManager.isFigureContainerReady(figureContainer)) { - this._renderManager.downloadAvatarFigure(figureContainer, this); + this._renderManager.downloadAvatarFigure(figureContainer, this) - return false; + return false } - this._isValidFigure = true; + this._isValidFigure = true - return true; + return true } private renderThumb(): NitroContainer { - if(!this._renderManager || !this._partSet) return null; + if(!this._renderManager || !this._partSet) return null if(!this._isValidFigure) { - if(!this.analyzeFigure()) return null; + if(!this.analyzeFigure()) return null } - const parts = this._partSet.parts.concat().sort(this.sortByDrawOrder); - const container = new NitroContainer(); + const parts = this._partSet.parts.concat().sort(this.sortByDrawOrder) + const container = new NitroContainer() for(const part of parts) { - if(!part) continue; + if(!part) continue - let asset: IGraphicAsset = null; - let direction = 0; - let hasAsset = false; + let asset: IGraphicAsset = null + let direction = 0 + let hasAsset = false while(!hasAsset && (direction < AvatarEditorGridPartItem.THUMB_DIRECTIONS.length)) { - const assetName = ((((((((((FigureData.SCALE + '_') + FigureData.STD) + '_') + part.type) + '_') + part.id) + '_') + AvatarEditorGridPartItem.THUMB_DIRECTIONS[direction]) + '_') + FigureData.DEFAULT_FRAME); + const assetName = ((((((((((FigureData.SCALE + "_") + FigureData.STD) + "_") + part.type) + "_") + part.id) + "_") + AvatarEditorGridPartItem.THUMB_DIRECTIONS[direction]) + "_") + FigureData.DEFAULT_FRAME) - asset = this._renderManager.getAssetByName(assetName); + asset = this._renderManager.getAssetByName(assetName) if(asset && asset.texture) { - hasAsset = true; + hasAsset = true } else { - direction++; + direction++ } } - if(!hasAsset) continue; + if(!hasAsset) continue - const x = asset.offsetX; - const y = asset.offsetY; - let partColor: IPartColor = null; + const x = asset.offsetX + const y = asset.offsetY + let partColor: IPartColor = null if(this._useColors && (part.colorLayerIndex > 0)) { - const color = this._partColors[(part.colorLayerIndex - 1)]; + const color = this._partColors[(part.colorLayerIndex - 1)] - if(color) partColor = color; + if(color) partColor = color } - const sprite = new NitroSprite(asset.texture); + const sprite = new NitroSprite(asset.texture) - sprite.position.set(x, y); + sprite.position.set(x, y) - if(partColor) sprite.tint = partColor.rgb; + if(partColor) sprite.tint = partColor.rgb - container.addChild(sprite); + container.addChild(sprite) } - return container; + return container } private updateThumbVisualization(): void { - if(!this._isInitalized) return; + if(!this._isInitalized) return - let container = this._thumbContainer; + let container = this._thumbContainer - if(!container) container = this.renderThumb(); + if(!container) container = this.renderThumb() - if(!container) return; + if(!container) return if(this._partSet) { - this._isHC = (this._partSet.clubLevel > 0); - this._isSellable = this._partSet.isSellable; + this._isHC = (this._partSet.clubLevel > 0) + this._isSellable = this._partSet.isSellable } else { - this._isHC = false; - this._isSellable = false; + this._isHC = false + this._isSellable = false } - if(this._isDisabled) this.setAlpha(container, 0.2); + if(this._isDisabled) this.setAlpha(container, 0.2) - this._imageUrl = TextureUtils.generateImageUrl(container); + this._imageUrl = TextureUtils.generateImageUrl(container) - if(this.notify) this.notify(); + if(this.notify) this.notify() } private setAlpha(container: NitroContainer, alpha: number): NitroContainer { - container.filters = [ AvatarEditorGridPartItem.ALPHA_FILTER ]; + container.filters = [ AvatarEditorGridPartItem.ALPHA_FILTER ] - return container; + return container } private sortByDrawOrder(a: IFigurePart, b: IFigurePart): number { - const indexA = AvatarEditorGridPartItem.DRAW_ORDER.indexOf(a.type); - const indexB = AvatarEditorGridPartItem.DRAW_ORDER.indexOf(b.type); + const indexA = AvatarEditorGridPartItem.DRAW_ORDER.indexOf(a.type) + const indexB = AvatarEditorGridPartItem.DRAW_ORDER.indexOf(b.type) - if(indexA < indexB) return -1; + if(indexA < indexB) return -1 - if(indexA > indexB) return 1; + if(indexA > indexB) return 1 - if(a.index < b.index) return -1; + if(a.index < b.index) return -1 - if(a.index > b.index) return 1; + if(a.index > b.index) return 1 - return 0; + return 0 } public resetFigure(figure: string): void { - if(!this.analyzeFigure()) return; + if(!this.analyzeFigure()) return - this.update(); + this.update() } public get disposed(): boolean { - return this._disposed; + return this._disposed } public get id(): number { - if(!this._partSet) return -1; + if(!this._partSet) return -1 - return this._partSet.id; + return this._partSet.id } public get partSet(): IFigurePartSet { - return this._partSet; + return this._partSet } public set partColors(partColors: IPartColor[]) { - this._partColors = partColors; + this._partColors = partColors - this.update(); + this.update() } public get isDisabled(): boolean { - return this._isDisabled; + return this._isDisabled } public set thumbContainer(container: NitroContainer) { - this._thumbContainer = container; + this._thumbContainer = container - this.update(); + this.update() } public get imageUrl(): string { - return this._imageUrl; + return this._imageUrl } public get maxColorIndex(): number { - return this._maxColorIndex; + return this._maxColorIndex } public get isHC(): boolean { - return this._isHC; + return this._isHC } public get isSellable(): boolean { - return this._isSellable; + return this._isSellable } public get isClear(): boolean { - return this._isClear; + return this._isClear } public set isClear(flag: boolean) { - this._isClear = flag; + this._isClear = flag } public get isSelected(): boolean { - return this._isSelected; + return this._isSelected } public set isSelected(flag: boolean) { - this._isSelected = flag; + this._isSelected = flag - if(this.notify) this.notify(); + if(this.notify) this.notify() } public get notify(): () => void { - return this._notifier; + return this._notifier } public set notify(notifier: () => void) { - this._notifier = notifier; + this._notifier = notifier } } diff --git a/src/api/avatar/AvatarEditorUtilities.ts b/src/api/avatar/AvatarEditorUtilities.ts index 3626ab8e0..e05d75437 100644 --- a/src/api/avatar/AvatarEditorUtilities.ts +++ b/src/api/avatar/AvatarEditorUtilities.ts @@ -1,166 +1,166 @@ -import { IPartColor } from '@nitrots/nitro-renderer'; -import { GetAvatarPalette, GetAvatarRenderManager, GetAvatarSetType, GetClubMemberLevel, GetConfiguration } from '../nitro'; -import { AvatarEditorGridColorItem } from './AvatarEditorGridColorItem'; -import { AvatarEditorGridPartItem } from './AvatarEditorGridPartItem'; -import { CategoryBaseModel } from './CategoryBaseModel'; -import { CategoryData } from './CategoryData'; -import { FigureData } from './FigureData'; +import { IPartColor } from "@nitrots/nitro-renderer" +import { GetAvatarPalette, GetAvatarRenderManager, GetAvatarSetType, GetClubMemberLevel, GetConfiguration } from "../nitro" +import { AvatarEditorGridColorItem } from "./AvatarEditorGridColorItem" +import { AvatarEditorGridPartItem } from "./AvatarEditorGridPartItem" +import { CategoryBaseModel } from "./CategoryBaseModel" +import { CategoryData } from "./CategoryData" +import { FigureData } from "./FigureData" export class AvatarEditorUtilities { - private static MAX_PALETTES: number = 2; + private static MAX_PALETTES: number = 2 - public static CURRENT_FIGURE: FigureData = null; - public static FIGURE_SET_IDS: number[] = []; - public static BOUND_FURNITURE_NAMES: string[] = []; + public static CURRENT_FIGURE: FigureData = null + public static FIGURE_SET_IDS: number[] = [] + public static BOUND_FURNITURE_NAMES: string[] = [] public static getGender(gender: string): string { switch(gender) { - case FigureData.MALE: - case 'm': - case 'M': - gender = FigureData.MALE; - break; - case FigureData.FEMALE: - case 'f': - case 'F': - gender = FigureData.FEMALE; - break; - default: - gender = FigureData.MALE; + case FigureData.MALE: + case "m": + case "M": + gender = FigureData.MALE + break + case FigureData.FEMALE: + case "f": + case "F": + gender = FigureData.FEMALE + break + default: + gender = FigureData.MALE } - return gender; + return gender } public static hasFigureSetId(setId: number): boolean { - return (this.FIGURE_SET_IDS.indexOf(setId) >= 0); + return (this.FIGURE_SET_IDS.indexOf(setId) >= 0) } public static createCategory(model: CategoryBaseModel, name: string): CategoryData { - if(!model || !name || !this.CURRENT_FIGURE) return null; + if(!model || !name || !this.CURRENT_FIGURE) return null - const partItems: AvatarEditorGridPartItem[] = []; - const colorItems: AvatarEditorGridColorItem[][] = []; + const partItems: AvatarEditorGridPartItem[] = [] + const colorItems: AvatarEditorGridColorItem[][] = [] - let i = 0; + let i = 0 while(i < this.MAX_PALETTES) { - colorItems.push([]); + colorItems.push([]) - i++; + i++ } - const setType = GetAvatarSetType(name); + const setType = GetAvatarSetType(name) - if(!setType) return null; + if(!setType) return null - const palette = GetAvatarPalette(setType.paletteID); + const palette = GetAvatarPalette(setType.paletteID) - if(!palette) return null; + if(!palette) return null - let colorIds = this.CURRENT_FIGURE.getColorIds(name); + let colorIds = this.CURRENT_FIGURE.getColorIds(name) - if(!colorIds) colorIds = []; + if(!colorIds) colorIds = [] - const partColors: IPartColor[] = new Array(colorIds.length); - const clubItemsDimmed = this.clubItemsDimmed; - const clubMemberLevel = GetClubMemberLevel(); + const partColors: IPartColor[] = new Array(colorIds.length) + const clubItemsDimmed = this.clubItemsDimmed + const clubMemberLevel = GetClubMemberLevel() for(const partColor of palette.colors.getValues()) { if(partColor.isSelectable && (clubItemsDimmed || (clubMemberLevel >= partColor.clubLevel))) { - let i = 0; + let i = 0 while(i < this.MAX_PALETTES) { - const isDisabled = (clubMemberLevel < partColor.clubLevel); - const colorItem = new AvatarEditorGridColorItem(partColor, isDisabled); + const isDisabled = (clubMemberLevel < partColor.clubLevel) + const colorItem = new AvatarEditorGridColorItem(partColor, isDisabled) - colorItems[i].push(colorItem); + colorItems[i].push(colorItem) - i++; + i++ } if(name !== FigureData.FACE) { - let i = 0; + let i = 0 while(i < colorIds.length) { - if(partColor.id === colorIds[i]) partColors[i] = partColor; + if(partColor.id === colorIds[i]) partColors[i] = partColor - i++; + i++ } } } } - let mandatorySetIds: string[] = []; + let mandatorySetIds: string[] = [] if(clubItemsDimmed) { - mandatorySetIds = GetAvatarRenderManager().getMandatoryAvatarPartSetIds(this.CURRENT_FIGURE.gender, 2); + mandatorySetIds = GetAvatarRenderManager().getMandatoryAvatarPartSetIds(this.CURRENT_FIGURE.gender, 2) } else { - mandatorySetIds = GetAvatarRenderManager().getMandatoryAvatarPartSetIds(this.CURRENT_FIGURE.gender, clubMemberLevel); + mandatorySetIds = GetAvatarRenderManager().getMandatoryAvatarPartSetIds(this.CURRENT_FIGURE.gender, clubMemberLevel) } - const isntMandatorySet = (mandatorySetIds.indexOf(name) === -1); + const isntMandatorySet = (mandatorySetIds.indexOf(name) === -1) if(isntMandatorySet) { - const partItem = new AvatarEditorGridPartItem(null, null, false); + const partItem = new AvatarEditorGridPartItem(null, null, false) - partItem.isClear = true; + partItem.isClear = true - partItems.push(partItem); + partItems.push(partItem) } - const usesColors = (name !== FigureData.FACE); - const partSets = setType.partSets; - const totalPartSets = partSets.length; + const usesColors = (name !== FigureData.FACE) + const partSets = setType.partSets + const totalPartSets = partSets.length - i = (totalPartSets - 1); + i = (totalPartSets - 1) while(i >= 0) { - const partSet = partSets.getWithIndex(i); + const partSet = partSets.getWithIndex(i) - let isValidGender = false; + let isValidGender = false if(partSet.gender === FigureData.UNISEX) { - isValidGender = true; + isValidGender = true } else if(partSet.gender === this.CURRENT_FIGURE.gender) { - isValidGender = true; + isValidGender = true } if(partSet.isSelectable && isValidGender && (clubItemsDimmed || (clubMemberLevel >= partSet.clubLevel))) { - const isDisabled = (clubMemberLevel < partSet.clubLevel); + const isDisabled = (clubMemberLevel < partSet.clubLevel) - let isValid = true; + let isValid = true - if(partSet.isSellable) isValid = this.hasFigureSetId(partSet.id); + if(partSet.isSellable) isValid = this.hasFigureSetId(partSet.id) - if(isValid) partItems.push(new AvatarEditorGridPartItem(partSet, partColors, usesColors, isDisabled)); + if(isValid) partItems.push(new AvatarEditorGridPartItem(partSet, partColors, usesColors, isDisabled)) } - i--; + i-- } - partItems.sort(this.clubItemsFirst ? this.clubSorter : this.noobSorter); + partItems.sort(this.clubItemsFirst ? this.clubSorter : this.noobSorter) // if(this._forceSellableClothingVisibility || GetNitroInstance().getConfiguration("avatareditor.support.sellablefurni", false)) // { @@ -173,105 +173,105 @@ export class AvatarEditorUtilities // _local_3.push(_local_7); // } - i = 0; + i = 0 while(i < this.MAX_PALETTES) { - colorItems[i].sort(this.colorSorter); + colorItems[i].sort(this.colorSorter) - i++; + i++ } - return new CategoryData(name, partItems, colorItems); + return new CategoryData(name, partItems, colorItems) } public static clubSorter(a: AvatarEditorGridPartItem, b: AvatarEditorGridPartItem): number { - const clubLevelA = (!a.partSet ? 9999999999 : a.partSet.clubLevel); - const clubLevelB = (!b.partSet ? 9999999999 : b.partSet.clubLevel); - const isSellableA = (!a.partSet ? false : a.partSet.isSellable); - const isSellableB = (!b.partSet ? false : b.partSet.isSellable); + const clubLevelA = (!a.partSet ? 9999999999 : a.partSet.clubLevel) + const clubLevelB = (!b.partSet ? 9999999999 : b.partSet.clubLevel) + const isSellableA = (!a.partSet ? false : a.partSet.isSellable) + const isSellableB = (!b.partSet ? false : b.partSet.isSellable) - if(isSellableA && !isSellableB) return 1; + if(isSellableA && !isSellableB) return 1 - if(isSellableB && !isSellableA) return -1; + if(isSellableB && !isSellableA) return -1 - if(clubLevelA > clubLevelB) return -1; + if(clubLevelA > clubLevelB) return -1 - if(clubLevelA < clubLevelB) return 1; + if(clubLevelA < clubLevelB) return 1 - if(a.partSet.id > b.partSet.id) return -1; + if(a.partSet.id > b.partSet.id) return -1 - if(a.partSet.id < b.partSet.id) return 1; + if(a.partSet.id < b.partSet.id) return 1 - return 0; + return 0 } public static colorSorter(a: AvatarEditorGridColorItem, b: AvatarEditorGridColorItem): number { - const clubLevelA = (!a.partColor ? -1 : a.partColor.clubLevel); - const clubLevelB = (!b.partColor ? -1 : b.partColor.clubLevel); + const clubLevelA = (!a.partColor ? -1 : a.partColor.clubLevel) + const clubLevelB = (!b.partColor ? -1 : b.partColor.clubLevel) - if(clubLevelA < clubLevelB) return -1; + if(clubLevelA < clubLevelB) return -1 - if(clubLevelA > clubLevelB) return 1; + if(clubLevelA > clubLevelB) return 1 - if(a.partColor.index < b.partColor.index) return -1; + if(a.partColor.index < b.partColor.index) return -1 - if(a.partColor.index > b.partColor.index) return 1; + if(a.partColor.index > b.partColor.index) return 1 - return 0; + return 0 } public static noobSorter(a: AvatarEditorGridPartItem, b: AvatarEditorGridPartItem): number { - const clubLevelA = (!a.partSet ? -1 : a.partSet.clubLevel); - const clubLevelB = (!b.partSet ? -1 : b.partSet.clubLevel); - const isSellableA = (!a.partSet ? false : a.partSet.isSellable); - const isSellableB = (!b.partSet ? false : b.partSet.isSellable); + const clubLevelA = (!a.partSet ? -1 : a.partSet.clubLevel) + const clubLevelB = (!b.partSet ? -1 : b.partSet.clubLevel) + const isSellableA = (!a.partSet ? false : a.partSet.isSellable) + const isSellableB = (!b.partSet ? false : b.partSet.isSellable) - if(isSellableA && !isSellableB) return 1; + if(isSellableA && !isSellableB) return 1 - if(isSellableB && !isSellableA) return -1; + if(isSellableB && !isSellableA) return -1 - if(clubLevelA < clubLevelB) return -1; + if(clubLevelA < clubLevelB) return -1 - if(clubLevelA > clubLevelB) return 1; + if(clubLevelA > clubLevelB) return 1 - if(a.partSet.id < b.partSet.id) return -1; + if(a.partSet.id < b.partSet.id) return -1 - if(a.partSet.id > b.partSet.id) return 1; + if(a.partSet.id > b.partSet.id) return 1 - return 0; + return 0 } public static avatarSetFirstSelectableColor(name: string): number { - const setType = GetAvatarSetType(name); + const setType = GetAvatarSetType(name) - if(!setType) return -1; + if(!setType) return -1 - const palette = GetAvatarPalette(setType.paletteID); + const palette = GetAvatarPalette(setType.paletteID) - if(!palette) return -1; + if(!palette) return -1 for(const color of palette.colors.getValues()) { - if(!color.isSelectable || (GetClubMemberLevel() < color.clubLevel)) continue; + if(!color.isSelectable || (GetClubMemberLevel() < color.clubLevel)) continue - return color.id; + return color.id } - return -1; + return -1 } public static get clubItemsFirst(): boolean { - return GetConfiguration('avatareditor.show.clubitems.first', true); + return GetConfiguration("avatareditor.show.clubitems.first", true) } public static get clubItemsDimmed(): boolean { - return GetConfiguration('avatareditor.show.clubitems.dimmed', true); + return GetConfiguration("avatareditor.show.clubitems.dimmed", true) } } diff --git a/src/api/avatar/BodyModel.ts b/src/api/avatar/BodyModel.ts index 7cdb34cee..50b112020 100644 --- a/src/api/avatar/BodyModel.ts +++ b/src/api/avatar/BodyModel.ts @@ -1,76 +1,76 @@ -import { AvatarEditorFigureCategory, AvatarScaleType, AvatarSetType } from '@nitrots/nitro-renderer'; -import { GetAvatarRenderManager } from '../nitro'; -import { AvatarEditorUtilities } from './AvatarEditorUtilities'; -import { CategoryBaseModel } from './CategoryBaseModel'; -import { FigureData } from './FigureData'; +import { AvatarEditorFigureCategory, AvatarScaleType, AvatarSetType } from "@nitrots/nitro-renderer" +import { GetAvatarRenderManager } from "../nitro" +import { AvatarEditorUtilities } from "./AvatarEditorUtilities" +import { CategoryBaseModel } from "./CategoryBaseModel" +import { FigureData } from "./FigureData" export class BodyModel extends CategoryBaseModel { - private _imageCallBackHandled: boolean = false; + private _imageCallBackHandled: boolean = false public init(): void { - super.init(); + super.init() - this.addCategory(FigureData.FACE); + this.addCategory(FigureData.FACE) - this._isInitalized = true; + this._isInitalized = true } public selectColor(category: string, colorIndex: number, paletteId: number): void { - super.selectColor(category, colorIndex, paletteId); + super.selectColor(category, colorIndex, paletteId) - this.updateSelectionsFromFigure(FigureData.FACE); + this.updateSelectionsFromFigure(FigureData.FACE) } protected updateSelectionsFromFigure(name: string): void { - if(!this._categories || !AvatarEditorUtilities.CURRENT_FIGURE) return; + if(!this._categories || !AvatarEditorUtilities.CURRENT_FIGURE) return - const category = this._categories.get(name); + const category = this._categories.get(name) - if(!category) return; + if(!category) return - const setId = AvatarEditorUtilities.CURRENT_FIGURE.getPartSetId(name); + const setId = AvatarEditorUtilities.CURRENT_FIGURE.getPartSetId(name) - let colorIds = AvatarEditorUtilities.CURRENT_FIGURE.getColorIds(name); + let colorIds = AvatarEditorUtilities.CURRENT_FIGURE.getColorIds(name) - if(!colorIds) colorIds = []; + if(!colorIds) colorIds = [] - category.selectPartId(setId); - category.selectColorIds(colorIds); + category.selectPartId(setId) + category.selectColorIds(colorIds) for(const part of category.parts) { const resetFigure = (figure: string) => { - const figureString = AvatarEditorUtilities.CURRENT_FIGURE.getFigureStringWithFace(part.id); - const avatarImage = GetAvatarRenderManager().createAvatarImage(figureString, AvatarScaleType.LARGE, null, { resetFigure, dispose: null, disposed: false }); + const figureString = AvatarEditorUtilities.CURRENT_FIGURE.getFigureStringWithFace(part.id) + const avatarImage = GetAvatarRenderManager().createAvatarImage(figureString, AvatarScaleType.LARGE, null, { resetFigure, dispose: null, disposed: false }) - const sprite = avatarImage.getImageAsSprite(AvatarSetType.HEAD); + const sprite = avatarImage.getImageAsSprite(AvatarSetType.HEAD) if(sprite) { - sprite.y = 10; + sprite.y = 10 - part.thumbContainer = sprite; + part.thumbContainer = sprite - setTimeout(() => avatarImage.dispose(), 0); + setTimeout(() => avatarImage.dispose(), 0) } } - resetFigure(null); + resetFigure(null) } } public get canSetGender(): boolean { - return true; + return true } public get name(): string { - return AvatarEditorFigureCategory.GENERIC; + return AvatarEditorFigureCategory.GENERIC } } diff --git a/src/api/avatar/CategoryBaseModel.ts b/src/api/avatar/CategoryBaseModel.ts index 34dd93309..7b7b7975e 100644 --- a/src/api/avatar/CategoryBaseModel.ts +++ b/src/api/avatar/CategoryBaseModel.ts @@ -1,246 +1,246 @@ -import { AvatarEditorUtilities } from './AvatarEditorUtilities'; -import { CategoryData } from './CategoryData'; -import { IAvatarEditorCategoryModel } from './IAvatarEditorCategoryModel'; +import { AvatarEditorUtilities } from "./AvatarEditorUtilities" +import { CategoryData } from "./CategoryData" +import { IAvatarEditorCategoryModel } from "./IAvatarEditorCategoryModel" export class CategoryBaseModel implements IAvatarEditorCategoryModel { - protected _categories: Map; - protected _isInitalized: boolean; - protected _maxPaletteCount: number; - private _disposed: boolean; + protected _categories: Map + protected _isInitalized: boolean + protected _maxPaletteCount: number + private _disposed: boolean constructor() { - this._isInitalized = false; - this._maxPaletteCount = 0; + this._isInitalized = false + this._maxPaletteCount = 0 } public dispose(): void { - this._categories = null; - this._disposed = true; + this._categories = null + this._disposed = true } public get disposed(): boolean { - return this._disposed; + return this._disposed } public init(): void { - if(!this._categories) this._categories = new Map(); + if(!this._categories) this._categories = new Map() } public reset(): void { - this._isInitalized = false; + this._isInitalized = false if(this._categories) { - for(const category of this._categories.values()) (category && category.dispose()); + for(const category of this._categories.values()) (category && category.dispose()) } - this._categories = new Map(); + this._categories = new Map() } protected addCategory(name: string): void { - let existing = this._categories.get(name); + let existing = this._categories.get(name) - if(existing) return; + if(existing) return - existing = AvatarEditorUtilities.createCategory(this, name); + existing = AvatarEditorUtilities.createCategory(this, name) - if(!existing) return; + if(!existing) return - this._categories.set(name, existing); + this._categories.set(name, existing) - this.updateSelectionsFromFigure(name); + this.updateSelectionsFromFigure(name) } protected updateSelectionsFromFigure(figure: string): void { - const category = this._categories.get(figure); + const category = this._categories.get(figure) - if(!category) return; + if(!category) return - const setId = AvatarEditorUtilities.CURRENT_FIGURE.getPartSetId(figure); + const setId = AvatarEditorUtilities.CURRENT_FIGURE.getPartSetId(figure) - let colorIds = AvatarEditorUtilities.CURRENT_FIGURE.getColorIds(figure); + let colorIds = AvatarEditorUtilities.CURRENT_FIGURE.getColorIds(figure) - if(!colorIds) colorIds = []; + if(!colorIds) colorIds = [] - category.selectPartId(setId); - category.selectColorIds(colorIds); + category.selectPartId(setId) + category.selectColorIds(colorIds) } public hasClubSelectionsOverLevel(level: number): boolean { - if(!this._categories) return false; + if(!this._categories) return false for(const category of this._categories.values()) { - if(!category) continue; + if(!category) continue - if(category.hasClubSelectionsOverLevel(level)) return true; + if(category.hasClubSelectionsOverLevel(level)) return true } - return false; + return false } public hasInvalidSelectedItems(ownedItems: number[]): boolean { - if(!this._categories) return false; + if(!this._categories) return false for(const category of this._categories.values()) { - if(category.hasInvalidSelectedItems(ownedItems)) return true; + if(category.hasInvalidSelectedItems(ownedItems)) return true } - return false; + return false } public stripClubItemsOverLevel(level: number): boolean { - if(!this._categories) return false; + if(!this._categories) return false - let didStrip = false; + let didStrip = false for(const [ name, category ] of this._categories.entries()) { - let isValid = false; + let isValid = false - if(category.stripClubItemsOverLevel(level)) isValid = true; + if(category.stripClubItemsOverLevel(level)) isValid = true - if(category.stripClubColorsOverLevel(level)) isValid = true; + if(category.stripClubColorsOverLevel(level)) isValid = true if(isValid) { - const partItem = category.getCurrentPart(); + const partItem = category.getCurrentPart() if(partItem && AvatarEditorUtilities.CURRENT_FIGURE) { - AvatarEditorUtilities.CURRENT_FIGURE.savePartData(name, partItem.id, category.getSelectedColorIds(), true); + AvatarEditorUtilities.CURRENT_FIGURE.savePartData(name, partItem.id, category.getSelectedColorIds(), true) } - didStrip = true; + didStrip = true } } - return didStrip; + return didStrip } public stripInvalidSellableItems(): boolean { - if(!this._categories) return false; + if(!this._categories) return false - let didStrip = false; + let didStrip = false for(const [ name, category ] of this._categories.entries()) { - const isValid = false; + const isValid = false // if(category._Str_8360(this._Str_2278.manager.inventory)) _local_6 = true; if(isValid) { - const partItem = category.getCurrentPart(); + const partItem = category.getCurrentPart() if(partItem && AvatarEditorUtilities.CURRENT_FIGURE) { - AvatarEditorUtilities.CURRENT_FIGURE.savePartData(name, partItem.id, category.getSelectedColorIds(), true); + AvatarEditorUtilities.CURRENT_FIGURE.savePartData(name, partItem.id, category.getSelectedColorIds(), true) } - didStrip = true; + didStrip = true } } - return didStrip; + return didStrip } public selectPart(category: string, partIndex: number): void { - const categoryData = this._categories.get(category); + const categoryData = this._categories.get(category) - if(!categoryData) return; + if(!categoryData) return - const selectedPartIndex = categoryData.selectedPartIndex; + const selectedPartIndex = categoryData.selectedPartIndex - categoryData.selectPartIndex(partIndex); + categoryData.selectPartIndex(partIndex) - const partItem = categoryData.getCurrentPart(); + const partItem = categoryData.getCurrentPart() - if(!partItem) return; + if(!partItem) return if(partItem.isDisabled) { - categoryData.selectPartIndex(selectedPartIndex); + categoryData.selectPartIndex(selectedPartIndex) // open hc window - return; + return } - this._maxPaletteCount = partItem.maxColorIndex; + this._maxPaletteCount = partItem.maxColorIndex - AvatarEditorUtilities.CURRENT_FIGURE.savePartData(category, partItem.id, categoryData.getSelectedColorIds(), true); + AvatarEditorUtilities.CURRENT_FIGURE.savePartData(category, partItem.id, categoryData.getSelectedColorIds(), true) } public selectColor(category: string, colorIndex: number, paletteId: number): void { - const categoryData = this._categories.get(category); + const categoryData = this._categories.get(category) - if(!categoryData) return; + if(!categoryData) return - const paletteIndex = categoryData.getCurrentColorIndex(paletteId); + const paletteIndex = categoryData.getCurrentColorIndex(paletteId) - categoryData.selectColorIndex(colorIndex, paletteId); + categoryData.selectColorIndex(colorIndex, paletteId) - const colorItem = categoryData.getSelectedColor(paletteId); + const colorItem = categoryData.getSelectedColor(paletteId) if(colorItem.isDisabled) { - categoryData.selectColorIndex(paletteIndex, paletteId); + categoryData.selectColorIndex(paletteIndex, paletteId) // open hc window - return; + return } - AvatarEditorUtilities.CURRENT_FIGURE.savePartSetColourId(category, categoryData.getSelectedColorIds(), true); + AvatarEditorUtilities.CURRENT_FIGURE.savePartSetColourId(category, categoryData.getSelectedColorIds(), true) } public getCategoryData(category: string): CategoryData { - if(!this._isInitalized) this.init(); + if(!this._isInitalized) this.init() - if(!this._categories) return null; + if(!this._categories) return null - return this._categories.get(category); + return this._categories.get(category) } public get categories(): Map { - return this._categories; + return this._categories } public get canSetGender(): boolean { - return false; + return false } public get maxPaletteCount(): number { - return (this._maxPaletteCount || 1); + return (this._maxPaletteCount || 1) } public set maxPaletteCount(count: number) { - this._maxPaletteCount = count; + this._maxPaletteCount = count } public get name(): string { - return null; + return null } } diff --git a/src/api/avatar/CategoryData.ts b/src/api/avatar/CategoryData.ts index db82f0127..b13b4b024 100644 --- a/src/api/avatar/CategoryData.ts +++ b/src/api/avatar/CategoryData.ts @@ -1,51 +1,51 @@ -import { IPartColor } from '@nitrots/nitro-renderer'; -import { AvatarEditorGridColorItem } from './AvatarEditorGridColorItem'; -import { AvatarEditorGridPartItem } from './AvatarEditorGridPartItem'; +import { IPartColor } from "@nitrots/nitro-renderer" +import { AvatarEditorGridColorItem } from "./AvatarEditorGridColorItem" +import { AvatarEditorGridPartItem } from "./AvatarEditorGridPartItem" export class CategoryData { - private _name: string; - private _parts: AvatarEditorGridPartItem[]; - private _palettes: AvatarEditorGridColorItem[][]; - private _selectedPartIndex: number = -1; - private _paletteIndexes: number[]; + private _name: string + private _parts: AvatarEditorGridPartItem[] + private _palettes: AvatarEditorGridColorItem[][] + private _selectedPartIndex: number = -1 + private _paletteIndexes: number[] constructor(name: string, partItems: AvatarEditorGridPartItem[], colorItems: AvatarEditorGridColorItem[][]) { - this._name = name; - this._parts = partItems; - this._palettes = colorItems; - this._selectedPartIndex = -1; + this._name = name + this._parts = partItems + this._palettes = colorItems + this._selectedPartIndex = -1 } private static defaultColorId(palettes: AvatarEditorGridColorItem[], clubLevel: number): number { - if(!palettes || !palettes.length) return -1; + if(!palettes || !palettes.length) return -1 - let i = 0; + let i = 0 while(i < palettes.length) { - const colorItem = palettes[i]; + const colorItem = palettes[i] if(colorItem.partColor && (colorItem.partColor.clubLevel <= clubLevel)) { - return colorItem.partColor.id; + return colorItem.partColor.id } - i++; + i++ } - return -1; + return -1 } public init(): void { for(const part of this._parts) { - if(!part) continue; + if(!part) continue - part.init(); + part.init() } } @@ -53,400 +53,400 @@ export class CategoryData { if(this._parts) { - for(const part of this._parts) part.dispose(); + for(const part of this._parts) part.dispose() - this._parts = null; + this._parts = null } if(this._palettes) { - for(const palette of this._palettes) for(const colorItem of palette) colorItem.dispose(); + for(const palette of this._palettes) for(const colorItem of palette) colorItem.dispose() - this._palettes = null; + this._palettes = null } - this._selectedPartIndex = -1; - this._paletteIndexes = null; + this._selectedPartIndex = -1 + this._paletteIndexes = null } public selectPartId(partId: number): void { - if(!this._parts) return; + if(!this._parts) return - let i = 0; + let i = 0 while(i < this._parts.length) { - const partItem = this._parts[i]; + const partItem = this._parts[i] if(partItem.id === partId) { - this.selectPartIndex(i); + this.selectPartIndex(i) - return; + return } - i++; + i++ } } public selectColorIds(colorIds: number[]): void { - if(!colorIds || !this._palettes) return; + if(!colorIds || !this._palettes) return - this._paletteIndexes = new Array(colorIds.length); + this._paletteIndexes = new Array(colorIds.length) - let i = 0; + let i = 0 while(i < this._palettes.length) { - const palette = this.getPalette(i); + const palette = this.getPalette(i) if(palette) { - let colorId = 0; + let colorId = 0 if(colorIds.length > i) { - colorId = colorIds[i]; + colorId = colorIds[i] } else { - const colorItem = palette[0]; + const colorItem = palette[0] - if(colorItem && colorItem.partColor) colorId = colorItem.partColor.id; + if(colorItem && colorItem.partColor) colorId = colorItem.partColor.id } - let j = 0; + let j = 0 while(j < palette.length) { - const colorItem = palette[j]; + const colorItem = palette[j] if(colorItem.partColor.id === colorId) { - this._paletteIndexes[i] = j; + this._paletteIndexes[i] = j - colorItem.isSelected = true; + colorItem.isSelected = true } else { - colorItem.isSelected = false; + colorItem.isSelected = false } - j++; + j++ } } - i++; + i++ } - this.updatePartColors(); + this.updatePartColors() } public selectPartIndex(partIndex: number): AvatarEditorGridPartItem { - if(!this._parts) return null; + if(!this._parts) return null if((this._selectedPartIndex >= 0) && (this._parts.length > this._selectedPartIndex)) { - const partItem = this._parts[this._selectedPartIndex]; + const partItem = this._parts[this._selectedPartIndex] - if(partItem) partItem.isSelected = false; + if(partItem) partItem.isSelected = false } if(this._parts.length > partIndex) { - const partItem = this._parts[partIndex]; + const partItem = this._parts[partIndex] if(partItem) { - partItem.isSelected = true; + partItem.isSelected = true - this._selectedPartIndex = partIndex; + this._selectedPartIndex = partIndex - return partItem; + return partItem } } - return null; + return null } public selectColorIndex(colorIndex: number, paletteId: number): AvatarEditorGridColorItem { - const palette = this.getPalette(paletteId); + const palette = this.getPalette(paletteId) - if(!palette) return null; + if(!palette) return null - if(palette.length <= colorIndex) return null; + if(palette.length <= colorIndex) return null - this.deselectColorIndex(this._paletteIndexes[paletteId], paletteId); + this.deselectColorIndex(this._paletteIndexes[paletteId], paletteId) - this._paletteIndexes[paletteId] = colorIndex; + this._paletteIndexes[paletteId] = colorIndex - const colorItem = palette[colorIndex]; + const colorItem = palette[colorIndex] - if(!colorItem) return null; + if(!colorItem) return null - colorItem.isSelected = true; + colorItem.isSelected = true - this.updatePartColors(); + this.updatePartColors() - return colorItem; + return colorItem } public getCurrentColorIndex(k: number): number { - return this._paletteIndexes[k]; + return this._paletteIndexes[k] } private deselectColorIndex(colorIndex: number, paletteIndex: number): void { - const palette = this.getPalette(paletteIndex); + const palette = this.getPalette(paletteIndex) - if(!palette) return; + if(!palette) return - if(palette.length <= colorIndex) return; + if(palette.length <= colorIndex) return - const colorItem = palette[colorIndex]; + const colorItem = palette[colorIndex] - if(!colorItem) return; + if(!colorItem) return - colorItem.isSelected = false; + colorItem.isSelected = false } public getSelectedColorIds(): number[] { - if(!this._paletteIndexes || !this._paletteIndexes.length) return null; + if(!this._paletteIndexes || !this._paletteIndexes.length) return null - if(!this._palettes || !this._palettes.length) return null; + if(!this._palettes || !this._palettes.length) return null - const palette = this._palettes[0]; + const palette = this._palettes[0] - if(!palette || (!palette.length)) return null; + if(!palette || (!palette.length)) return null - const colorItem = palette[0]; + const colorItem = palette[0] - if(!colorItem || !colorItem.partColor) return null; + if(!colorItem || !colorItem.partColor) return null - const colorId = colorItem.partColor.id; - const colorIds: number[] = []; + const colorId = colorItem.partColor.id + const colorIds: number[] = [] - let i = 0; + let i = 0 while(i < this._paletteIndexes.length) { - const paletteSet = this._palettes[i]; + const paletteSet = this._palettes[i] if(!((!(paletteSet)) || (paletteSet.length <= i))) { if(paletteSet.length > this._paletteIndexes[i]) { - const color = paletteSet[this._paletteIndexes[i]]; + const color = paletteSet[this._paletteIndexes[i]] if(color && color.partColor) { - colorIds.push(color.partColor.id); + colorIds.push(color.partColor.id) } else { - colorIds.push(colorId); + colorIds.push(colorId) } } else { - colorIds.push(colorId); + colorIds.push(colorId) } } - i++; + i++ } - const partItem = this.getCurrentPart(); + const partItem = this.getCurrentPart() - if(!partItem) return null; + if(!partItem) return null - return colorIds.slice(0, Math.max(partItem.maxColorIndex, 1)); + return colorIds.slice(0, Math.max(partItem.maxColorIndex, 1)) } private getSelectedColors(): IPartColor[] { - const partColors: IPartColor[] = []; + const partColors: IPartColor[] = [] - let i = 0; + let i = 0 while(i < this._paletteIndexes.length) { - const colorItem = this.getSelectedColor(i); + const colorItem = this.getSelectedColor(i) if(colorItem) { - partColors.push(colorItem.partColor); + partColors.push(colorItem.partColor) } else { - partColors.push(null); + partColors.push(null) } - i++; + i++ } - return partColors; + return partColors } public getSelectedColor(paletteId: number): AvatarEditorGridColorItem { - const palette = this.getPalette(paletteId); + const palette = this.getPalette(paletteId) - if(!palette || (palette.length <= this._paletteIndexes[paletteId])) return null; + if(!palette || (palette.length <= this._paletteIndexes[paletteId])) return null - return palette[this._paletteIndexes[paletteId]]; + return palette[this._paletteIndexes[paletteId]] } public getSelectedColorId(paletteId: number): number { - const colorItem = this.getSelectedColor(paletteId); + const colorItem = this.getSelectedColor(paletteId) - if(colorItem && (colorItem.partColor)) return colorItem.partColor.id; + if(colorItem && (colorItem.partColor)) return colorItem.partColor.id - return 0; + return 0 } public getPalette(paletteId: number): AvatarEditorGridColorItem[] { if(!this._paletteIndexes || !this._palettes || (this._palettes.length <= paletteId)) { - return null; + return null } - return this._palettes[paletteId]; + return this._palettes[paletteId] } public getCurrentPart(): AvatarEditorGridPartItem { - return this._parts[this._selectedPartIndex] as AvatarEditorGridPartItem; + return this._parts[this._selectedPartIndex] as AvatarEditorGridPartItem } private updatePartColors(): void { - const partColors = this.getSelectedColors(); + const partColors = this.getSelectedColors() for(const partItem of this._parts) { - if(partItem) partItem.partColors = partColors; + if(partItem) partItem.partColors = partColors } } public hasClubSelectionsOverLevel(level: number): boolean { - let hasInvalidSelections = false; + let hasInvalidSelections = false - const partColors = this.getSelectedColors(); + const partColors = this.getSelectedColors() if(partColors) { - let i = 0; + let i = 0 while(i < partColors.length) { - const partColor = partColors[i]; + const partColor = partColors[i] - if(partColor && (partColor.clubLevel > level)) hasInvalidSelections = true; + if(partColor && (partColor.clubLevel > level)) hasInvalidSelections = true - i++; + i++ } } - const partItem = this.getCurrentPart(); + const partItem = this.getCurrentPart() if(partItem && partItem.partSet) { - const partSet = partItem.partSet; + const partSet = partItem.partSet - if(partSet && (partSet.clubLevel > level)) hasInvalidSelections = true; + if(partSet && (partSet.clubLevel > level)) hasInvalidSelections = true } - return hasInvalidSelections; + return hasInvalidSelections } public hasInvalidSelectedItems(ownedItems: number[]): boolean { - const part = this.getCurrentPart(); + const part = this.getCurrentPart() - if(!part) return false; + if(!part) return false - const partSet = part.partSet; + const partSet = part.partSet - if(!partSet || !partSet.isSellable) return; + if(!partSet || !partSet.isSellable) return - return (ownedItems.indexOf(partSet.id) > -1); + return (ownedItems.indexOf(partSet.id) > -1) } public stripClubItemsOverLevel(level: number): boolean { - const partItem = this.getCurrentPart(); + const partItem = this.getCurrentPart() if(partItem && partItem.partSet) { - const partSet = partItem.partSet; + const partSet = partItem.partSet if(partSet.clubLevel > level) { - const newPartItem = this.selectPartIndex(0); + const newPartItem = this.selectPartIndex(0) - if(newPartItem && !newPartItem.partSet) this.selectPartIndex(1); + if(newPartItem && !newPartItem.partSet) this.selectPartIndex(1) - return true; + return true } } - return false; + return false } public stripClubColorsOverLevel(level: number): boolean { - const colorIds: number[] = []; - const partColors = this.getSelectedColors(); - const colorItems = this.getPalette(0); + const colorIds: number[] = [] + const partColors = this.getSelectedColors() + const colorItems = this.getPalette(0) - let didStrip = false; + let didStrip = false - const colorId = CategoryData.defaultColorId(colorItems, level); + const colorId = CategoryData.defaultColorId(colorItems, level) - if(colorId === -1) return false; + if(colorId === -1) return false - let i = 0; + let i = 0 while(i < partColors.length) { - const partColor = partColors[i]; + const partColor = partColors[i] if(!partColor) { - colorIds.push(colorId); + colorIds.push(colorId) - didStrip = true; + didStrip = true } else { if(partColor.clubLevel > level) { - colorIds.push(colorId); + colorIds.push(colorId) - didStrip = true; + didStrip = true } else { - colorIds.push(partColor.id); + colorIds.push(partColor.id) } } - i++; + i++ } - if(didStrip) this.selectColorIds(colorIds); + if(didStrip) this.selectColorIds(colorIds) - return didStrip; + return didStrip } // public stripInvalidSellableItems(k:IHabboInventory): boolean @@ -472,16 +472,16 @@ export class CategoryData public get name(): string { - return this._name; + return this._name } public get parts(): AvatarEditorGridPartItem[] { - return this._parts; + return this._parts } public get selectedPartIndex(): number { - return this._selectedPartIndex; + return this._selectedPartIndex } } diff --git a/src/api/avatar/FigureData.ts b/src/api/avatar/FigureData.ts index 78014d11e..ccd7bd16b 100644 --- a/src/api/avatar/FigureData.ts +++ b/src/api/avatar/FigureData.ts @@ -1,287 +1,287 @@ -import { AvatarEditorUtilities } from './AvatarEditorUtilities'; +import { AvatarEditorUtilities } from "./AvatarEditorUtilities" export class FigureData { - private static DEFAULT_DIRECTION: number = 4; - - public static MALE: string = 'M'; - public static FEMALE: string = 'F'; - public static UNISEX: string = 'U'; - public static SCALE: string = 'h'; - public static STD: string = 'std'; - public static DEFAULT_FRAME: string = '0'; - public static FACE: string = 'hd'; - public static HAIR: string = 'hr'; - public static HAT: string = 'ha'; - public static HEAD_ACCESSORIES: string = 'he'; - public static EYE_ACCESSORIES: string = 'ea'; - public static FACE_ACCESSORIES: string = 'fa'; - public static JACKET: string = 'cc'; - public static SHIRT: string = 'ch'; - public static CHEST_ACCESSORIES: string = 'ca'; - public static CHEST_PRINTS: string = 'cp'; - public static TROUSERS: string = 'lg'; - public static SHOES: string = 'sh'; - public static TROUSER_ACCESSORIES: string = 'wa'; - public static SET_TYPES = [ FigureData.FACE, FigureData.HAIR, FigureData.HAT, FigureData.HEAD_ACCESSORIES, FigureData.EYE_ACCESSORIES, FigureData.FACE_ACCESSORIES, FigureData.JACKET, FigureData.SHIRT, FigureData.CHEST_ACCESSORIES, FigureData.CHEST_PRINTS, FigureData.TROUSERS, FigureData.SHOES, FigureData.TROUSERS ]; - - private _data: Map; - private _colors: Map; - private _gender: string = 'M'; - private _direction: number = FigureData.DEFAULT_DIRECTION; - private _avatarEffectType: number = -1; - private _notifier: () => void = null; + private static DEFAULT_DIRECTION: number = 4 + + public static MALE: string = "M" + public static FEMALE: string = "F" + public static UNISEX: string = "U" + public static SCALE: string = "h" + public static STD: string = "std" + public static DEFAULT_FRAME: string = "0" + public static FACE: string = "hd" + public static HAIR: string = "hr" + public static HAT: string = "ha" + public static HEAD_ACCESSORIES: string = "he" + public static EYE_ACCESSORIES: string = "ea" + public static FACE_ACCESSORIES: string = "fa" + public static JACKET: string = "cc" + public static SHIRT: string = "ch" + public static CHEST_ACCESSORIES: string = "ca" + public static CHEST_PRINTS: string = "cp" + public static TROUSERS: string = "lg" + public static SHOES: string = "sh" + public static TROUSER_ACCESSORIES: string = "wa" + public static SET_TYPES = [ FigureData.FACE, FigureData.HAIR, FigureData.HAT, FigureData.HEAD_ACCESSORIES, FigureData.EYE_ACCESSORIES, FigureData.FACE_ACCESSORIES, FigureData.JACKET, FigureData.SHIRT, FigureData.CHEST_ACCESSORIES, FigureData.CHEST_PRINTS, FigureData.TROUSERS, FigureData.SHOES, FigureData.TROUSERS ] + + private _data: Map + private _colors: Map + private _gender: string = "M" + private _direction: number = FigureData.DEFAULT_DIRECTION + private _avatarEffectType: number = -1 + private _notifier: () => void = null public loadAvatarData(figureString: string, gender: string): void { - this._data = new Map(); - this._colors = new Map(); - this._gender = gender; + this._data = new Map() + this._colors = new Map() + this._gender = gender - this.parseFigureString(figureString); - this.updateView(); + this.parseFigureString(figureString) + this.updateView() } private parseFigureString(figure: string): void { - if(!figure) return; + if(!figure) return - const sets = figure.split('.'); + const sets = figure.split(".") - if(!sets || !sets.length) return; + if(!sets || !sets.length) return for(const set of sets) { - const parts = set.split('-'); + const parts = set.split("-") - if(!parts.length) continue; + if(!parts.length) continue - const setType = parts[0]; - const setId = parseInt(parts[1]); - const colorIds: number[] = []; + const setType = parts[0] + const setId = parseInt(parts[1]) + const colorIds: number[] = [] - let offset = 2; + let offset = 2 while(offset < parts.length) { - colorIds.push(parseInt(parts[offset])); + colorIds.push(parseInt(parts[offset])) - offset++; + offset++ } - if(!colorIds.length) colorIds.push(0); + if(!colorIds.length) colorIds.push(0) - this.savePartSetId(setType, setId, false); - this.savePartSetColourId(setType, colorIds, false); + this.savePartSetId(setType, setId, false) + this.savePartSetColourId(setType, colorIds, false) } } public getPartSetId(setType: string): number { - const existing = this._data.get(setType); + const existing = this._data.get(setType) - if(existing !== undefined) return existing; + if(existing !== undefined) return existing - return -1; + return -1 } public getColorIds(setType: string): number[] { - const existing = this._colors.get(setType); + const existing = this._colors.get(setType) - if(existing !== undefined) return existing; + if(existing !== undefined) return existing - return [ AvatarEditorUtilities.avatarSetFirstSelectableColor(setType) ]; + return [ AvatarEditorUtilities.avatarSetFirstSelectableColor(setType) ] } public getFigureString(): string { - let figureString = ''; - const setParts: string[] = []; + let figureString = "" + const setParts: string[] = [] for(const [ setType, setId ] of this._data.entries()) { - const colorIds = this._colors.get(setType); + const colorIds = this._colors.get(setType) - let setPart = ((setType + '-') + setId); + let setPart = ((setType + "-") + setId) if(colorIds && colorIds.length) { - let i = 0; + let i = 0 while(i < colorIds.length) { - setPart = (setPart + ('-' + colorIds[i])); + setPart = (setPart + ("-" + colorIds[i])) - i++; + i++ } } - setParts.push(setPart); + setParts.push(setPart) } - let i = 0; + let i = 0 while(i < setParts.length) { - figureString = (figureString + setParts[i]); + figureString = (figureString + setParts[i]) - if(i < (setParts.length - 1)) figureString = (figureString + '.'); + if(i < (setParts.length - 1)) figureString = (figureString + ".") - i++; + i++ } - return figureString; + return figureString } public savePartData(setType: string, partId: number, colorIds: number[], update: boolean = false): void { - this.savePartSetId(setType, partId, update); - this.savePartSetColourId(setType, colorIds, update); + this.savePartSetId(setType, partId, update) + this.savePartSetColourId(setType, colorIds, update) } private savePartSetId(setType: string, partId: number, update: boolean = true): void { switch(setType) { - case FigureData.FACE: - case FigureData.HAIR: - case FigureData.HAT: - case FigureData.HEAD_ACCESSORIES: - case FigureData.EYE_ACCESSORIES: - case FigureData.FACE_ACCESSORIES: - case FigureData.SHIRT: - case FigureData.JACKET: - case FigureData.CHEST_ACCESSORIES: - case FigureData.CHEST_PRINTS: - case FigureData.TROUSERS: - case FigureData.SHOES: - case FigureData.TROUSER_ACCESSORIES: - if(partId >= 0) - { - this._data.set(setType, partId); - } - else - { - this._data.delete(setType); - } - break; + case FigureData.FACE: + case FigureData.HAIR: + case FigureData.HAT: + case FigureData.HEAD_ACCESSORIES: + case FigureData.EYE_ACCESSORIES: + case FigureData.FACE_ACCESSORIES: + case FigureData.SHIRT: + case FigureData.JACKET: + case FigureData.CHEST_ACCESSORIES: + case FigureData.CHEST_PRINTS: + case FigureData.TROUSERS: + case FigureData.SHOES: + case FigureData.TROUSER_ACCESSORIES: + if(partId >= 0) + { + this._data.set(setType, partId) + } + else + { + this._data.delete(setType) + } + break } - if(update) this.updateView(); + if(update) this.updateView() } public savePartSetColourId(setType: string, colorIds: number[], update: boolean = true): void { switch(setType) { - case FigureData.FACE: - case FigureData.HAIR: - case FigureData.HAT: - case FigureData.HEAD_ACCESSORIES: - case FigureData.EYE_ACCESSORIES: - case FigureData.FACE_ACCESSORIES: - case FigureData.SHIRT: - case FigureData.JACKET: - case FigureData.CHEST_ACCESSORIES: - case FigureData.CHEST_PRINTS: - case FigureData.TROUSERS: - case FigureData.SHOES: - case FigureData.TROUSER_ACCESSORIES: - this._colors.set(setType, colorIds); - break; + case FigureData.FACE: + case FigureData.HAIR: + case FigureData.HAT: + case FigureData.HEAD_ACCESSORIES: + case FigureData.EYE_ACCESSORIES: + case FigureData.FACE_ACCESSORIES: + case FigureData.SHIRT: + case FigureData.JACKET: + case FigureData.CHEST_ACCESSORIES: + case FigureData.CHEST_PRINTS: + case FigureData.TROUSERS: + case FigureData.SHOES: + case FigureData.TROUSER_ACCESSORIES: + this._colors.set(setType, colorIds) + break } - if(update) this.updateView(); + if(update) this.updateView() } public getFigureStringWithFace(k: number, override = true): string { - let figureString = ''; + let figureString = "" - const setTypes: string[] = [ FigureData.FACE ]; - const figureSets: string[] = []; + const setTypes: string[] = [ FigureData.FACE ] + const figureSets: string[] = [] for(const setType of setTypes) { - const colors = this._colors.get(setType); + const colors = this._colors.get(setType) - if(!colors) continue; + if(!colors) continue - let setId = this._data.get(setType); + let setId = this._data.get(setType) - if((setType === FigureData.FACE) && override) setId = k; + if((setType === FigureData.FACE) && override) setId = k - let figureSet = ((setType + '-') + setId); + let figureSet = ((setType + "-") + setId) if(setId >= 0) { - let i = 0; + let i = 0 while(i < colors.length) { - figureSet = (figureSet + ('-' + colors[i])); + figureSet = (figureSet + ("-" + colors[i])) - i++; + i++ } } - figureSets.push(figureSet); + figureSets.push(figureSet) } - let i = 0; + let i = 0 while(i < figureSets.length) { - figureString = (figureString + figureSets[i]); + figureString = (figureString + figureSets[i]) - if(i < (figureSets.length - 1)) figureString = (figureString + '.'); + if(i < (figureSets.length - 1)) figureString = (figureString + ".") - i++; + i++ } - return figureString; + return figureString } public updateView(): void { - if(this.notify) this.notify(); + if(this.notify) this.notify() } public get gender(): string { - return this._gender; + return this._gender } public get direction(): number { - return this._direction; + return this._direction } public set direction(direction: number) { - this._direction = direction; + this._direction = direction - this.updateView(); + this.updateView() } public set avatarEffectType(k: number) { - this._avatarEffectType = k; + this._avatarEffectType = k } public get avatarEffectType(): number { - return this._avatarEffectType; + return this._avatarEffectType } public get notify(): () => void { - return this._notifier; + return this._notifier } public set notify(notifier: () => void) { - this._notifier = notifier; + this._notifier = notifier } } diff --git a/src/api/avatar/FigureGenerator.ts b/src/api/avatar/FigureGenerator.ts index b83a6616b..f70f76518 100644 --- a/src/api/avatar/FigureGenerator.ts +++ b/src/api/avatar/FigureGenerator.ts @@ -1,90 +1,90 @@ -import { AvatarFigureContainer, IFigurePartSet, IPalette, IPartColor, SetType } from '@nitrots/nitro-renderer'; -import { GetAvatarRenderManager } from '../nitro'; -import { Randomizer } from '../utils'; -import { FigureData } from './FigureData'; +import { AvatarFigureContainer, IFigurePartSet, IPalette, IPartColor, SetType } from "@nitrots/nitro-renderer" +import { GetAvatarRenderManager } from "../nitro" +import { Randomizer } from "../utils" +import { FigureData } from "./FigureData" function getTotalColors(partSet: IFigurePartSet): number { - const parts = partSet.parts; + const parts = partSet.parts - let totalColors = 0; + let totalColors = 0 - for(const part of parts) totalColors = Math.max(totalColors, part.colorLayerIndex); + for(const part of parts) totalColors = Math.max(totalColors, part.colorLayerIndex) - return totalColors; + return totalColors } function getRandomSetTypes(requiredSets: string[], options: string[]): string[] { - options = options.filter(option => (requiredSets.indexOf(option) === -1)); + options = options.filter(option => (requiredSets.indexOf(option) === -1)) - return [ ...requiredSets, ...Randomizer.getRandomElements(options, (Randomizer.getRandomNumber(options.length) + 1)) ]; + return [ ...requiredSets, ...Randomizer.getRandomElements(options, (Randomizer.getRandomNumber(options.length) + 1)) ] } function getRandomPartSet(setType: SetType, gender: string, clubLevel: number = 0, figureSetIds: number[] = []): IFigurePartSet { - if(!setType) return null; + if(!setType) return null const options = setType.partSets.getValues().filter(option => { - if(!option.isSelectable || ((option.gender !== 'U') && (option.gender !== gender)) || (option.clubLevel > clubLevel) || (option.isSellable && (figureSetIds.indexOf(option.id) === -1))) return null; + if(!option.isSelectable || ((option.gender !== "U") && (option.gender !== gender)) || (option.clubLevel > clubLevel) || (option.isSellable && (figureSetIds.indexOf(option.id) === -1))) return null - return option; - }); + return option + }) - if(!options || !options.length) return null; + if(!options || !options.length) return null - return Randomizer.getRandomElement(options); + return Randomizer.getRandomElement(options) } function getRandomColors(palette: IPalette, partSet: IFigurePartSet, clubLevel: number = 0): IPartColor[] { - if(!palette) return []; + if(!palette) return [] const options = palette.colors.getValues().filter(option => { - if(!option.isSelectable || (option.clubLevel > clubLevel)) return null; + if(!option.isSelectable || (option.clubLevel > clubLevel)) return null - return option; - }); + return option + }) - if(!options || !options.length) return null; + if(!options || !options.length) return null - return Randomizer.getRandomElements(options, getTotalColors(partSet)); + return Randomizer.getRandomElements(options, getTotalColors(partSet)) } export function generateRandomFigure(figureData: FigureData, gender: string, clubLevel: number = 0, figureSetIds: number[] = [], ignoredSets: string[] = []): string { - const structure = GetAvatarRenderManager().structure; - const figureContainer = new AvatarFigureContainer(''); - const requiredSets = getRandomSetTypes(structure.getMandatorySetTypeIds(gender, clubLevel), FigureData.SET_TYPES); + const structure = GetAvatarRenderManager().structure + const figureContainer = new AvatarFigureContainer("") + const requiredSets = getRandomSetTypes(structure.getMandatorySetTypeIds(gender, clubLevel), FigureData.SET_TYPES) for(const setType of ignoredSets) { - const partSetId = figureData.getPartSetId(setType); - const colors = figureData.getColorIds(setType); + const partSetId = figureData.getPartSetId(setType) + const colors = figureData.getColorIds(setType) - figureContainer.updatePart(setType, partSetId, colors); + figureContainer.updatePart(setType, partSetId, colors) } for(const type of requiredSets) { - if(figureContainer.hasPartType(type)) continue; + if(figureContainer.hasPartType(type)) continue - const setType = (structure.figureData.getSetType(type) as SetType); - const selectedSet = getRandomPartSet(setType, gender, clubLevel, figureSetIds); + const setType = (structure.figureData.getSetType(type) as SetType) + const selectedSet = getRandomPartSet(setType, gender, clubLevel, figureSetIds) - if(!selectedSet) continue; + if(!selectedSet) continue - let selectedColors: number[] = []; + let selectedColors: number[] = [] if(selectedSet.isColorable) { - selectedColors = getRandomColors(structure.figureData.getPalette(setType.paletteID), selectedSet, clubLevel).map(color => color.id); + selectedColors = getRandomColors(structure.figureData.getPalette(setType.paletteID), selectedSet, clubLevel).map(color => color.id) } - figureContainer.updatePart(setType.type, selectedSet.id, selectedColors); + figureContainer.updatePart(setType.type, selectedSet.id, selectedColors) } - return figureContainer.getFigureString(); + return figureContainer.getFigureString() } diff --git a/src/api/avatar/HeadModel.ts b/src/api/avatar/HeadModel.ts index 5dc30cdb4..f037105a8 100644 --- a/src/api/avatar/HeadModel.ts +++ b/src/api/avatar/HeadModel.ts @@ -1,24 +1,24 @@ -import { AvatarEditorFigureCategory } from '@nitrots/nitro-renderer'; -import { CategoryBaseModel } from './CategoryBaseModel'; -import { FigureData } from './FigureData'; +import { AvatarEditorFigureCategory } from "@nitrots/nitro-renderer" +import { CategoryBaseModel } from "./CategoryBaseModel" +import { FigureData } from "./FigureData" export class HeadModel extends CategoryBaseModel { public init(): void { - super.init(); + super.init() - this.addCategory(FigureData.HAIR); - this.addCategory(FigureData.HAT); - this.addCategory(FigureData.HEAD_ACCESSORIES); - this.addCategory(FigureData.EYE_ACCESSORIES); - this.addCategory(FigureData.FACE_ACCESSORIES); + this.addCategory(FigureData.HAIR) + this.addCategory(FigureData.HAT) + this.addCategory(FigureData.HEAD_ACCESSORIES) + this.addCategory(FigureData.EYE_ACCESSORIES) + this.addCategory(FigureData.FACE_ACCESSORIES) - this._isInitalized = true; + this._isInitalized = true } public get name(): string { - return AvatarEditorFigureCategory.HEAD; + return AvatarEditorFigureCategory.HEAD } } diff --git a/src/api/avatar/IAvatarEditorCategoryModel.ts b/src/api/avatar/IAvatarEditorCategoryModel.ts index dc9affae7..f2057d62e 100644 --- a/src/api/avatar/IAvatarEditorCategoryModel.ts +++ b/src/api/avatar/IAvatarEditorCategoryModel.ts @@ -1,4 +1,4 @@ -import { CategoryData } from './CategoryData'; +import { CategoryData } from "./CategoryData" export interface IAvatarEditorCategoryModel { diff --git a/src/api/avatar/LegModel.ts b/src/api/avatar/LegModel.ts index 563393021..5880b7a9b 100644 --- a/src/api/avatar/LegModel.ts +++ b/src/api/avatar/LegModel.ts @@ -1,22 +1,22 @@ -import { AvatarEditorFigureCategory } from '@nitrots/nitro-renderer'; -import { CategoryBaseModel } from './CategoryBaseModel'; -import { FigureData } from './FigureData'; +import { AvatarEditorFigureCategory } from "@nitrots/nitro-renderer" +import { CategoryBaseModel } from "./CategoryBaseModel" +import { FigureData } from "./FigureData" export class LegModel extends CategoryBaseModel { public init(): void { - super.init(); + super.init() - this.addCategory(FigureData.TROUSERS); - this.addCategory(FigureData.SHOES); - this.addCategory(FigureData.TROUSER_ACCESSORIES); + this.addCategory(FigureData.TROUSERS) + this.addCategory(FigureData.SHOES) + this.addCategory(FigureData.TROUSER_ACCESSORIES) - this._isInitalized = true; + this._isInitalized = true } public get name(): string { - return AvatarEditorFigureCategory.LEGS; + return AvatarEditorFigureCategory.LEGS } } diff --git a/src/api/avatar/TorsoModel.ts b/src/api/avatar/TorsoModel.ts index 43e48cf75..d192d2dea 100644 --- a/src/api/avatar/TorsoModel.ts +++ b/src/api/avatar/TorsoModel.ts @@ -1,23 +1,23 @@ -import { AvatarEditorFigureCategory } from '@nitrots/nitro-renderer'; -import { CategoryBaseModel } from './CategoryBaseModel'; -import { FigureData } from './FigureData'; +import { AvatarEditorFigureCategory } from "@nitrots/nitro-renderer" +import { CategoryBaseModel } from "./CategoryBaseModel" +import { FigureData } from "./FigureData" export class TorsoModel extends CategoryBaseModel { public init(): void { - super.init(); + super.init() - this.addCategory(FigureData.SHIRT); - this.addCategory(FigureData.CHEST_PRINTS); - this.addCategory(FigureData.JACKET); - this.addCategory(FigureData.CHEST_ACCESSORIES); + this.addCategory(FigureData.SHIRT) + this.addCategory(FigureData.CHEST_PRINTS) + this.addCategory(FigureData.JACKET) + this.addCategory(FigureData.CHEST_ACCESSORIES) - this._isInitalized = true; + this._isInitalized = true } public get name(): string { - return AvatarEditorFigureCategory.TORSO; + return AvatarEditorFigureCategory.TORSO } } diff --git a/src/api/avatar/index.ts b/src/api/avatar/index.ts index 37b307218..66268b40b 100644 --- a/src/api/avatar/index.ts +++ b/src/api/avatar/index.ts @@ -1,13 +1,13 @@ -export * from './AvatarEditorAction'; -export * from './AvatarEditorGridColorItem'; -export * from './AvatarEditorGridPartItem'; -export * from './AvatarEditorUtilities'; -export * from './BodyModel'; -export * from './CategoryBaseModel'; -export * from './CategoryData'; -export * from './FigureData'; -export * from './FigureGenerator'; -export * from './HeadModel'; -export * from './IAvatarEditorCategoryModel'; -export * from './LegModel'; -export * from './TorsoModel'; +export * from "./AvatarEditorAction" +export * from "./AvatarEditorGridColorItem" +export * from "./AvatarEditorGridPartItem" +export * from "./AvatarEditorUtilities" +export * from "./BodyModel" +export * from "./CategoryBaseModel" +export * from "./CategoryData" +export * from "./FigureData" +export * from "./FigureGenerator" +export * from "./HeadModel" +export * from "./IAvatarEditorCategoryModel" +export * from "./LegModel" +export * from "./TorsoModel" diff --git a/src/api/camera/CameraEditorTabs.ts b/src/api/camera/CameraEditorTabs.ts index 6e894e740..fb25b0f9a 100644 --- a/src/api/camera/CameraEditorTabs.ts +++ b/src/api/camera/CameraEditorTabs.ts @@ -1,5 +1,5 @@ export class CameraEditorTabs { - public static readonly COLORMATRIX: string = 'colormatrix'; - public static readonly COMPOSITE: string = 'composite'; + public static readonly COLORMATRIX: string = "colormatrix" + public static readonly COMPOSITE: string = "composite" } diff --git a/src/api/camera/CameraPicture.ts b/src/api/camera/CameraPicture.ts index fe8c22108..03332d870 100644 --- a/src/api/camera/CameraPicture.ts +++ b/src/api/camera/CameraPicture.ts @@ -1,4 +1,4 @@ -import { NitroTexture } from '@nitrots/nitro-renderer'; +import { NitroTexture } from "@nitrots/nitro-renderer" export class CameraPicture { diff --git a/src/api/camera/index.ts b/src/api/camera/index.ts index 93c6ccb9a..86cb3ec47 100644 --- a/src/api/camera/index.ts +++ b/src/api/camera/index.ts @@ -1,3 +1,3 @@ -export * from './CameraEditorTabs'; -export * from './CameraPicture'; -export * from './CameraPictureThumbnail'; +export * from "./CameraEditorTabs" +export * from "./CameraPicture" +export * from "./CameraPictureThumbnail" diff --git a/src/api/campaign/CalendarItem.ts b/src/api/campaign/CalendarItem.ts index d3634b3dd..9e0f79e50 100644 --- a/src/api/campaign/CalendarItem.ts +++ b/src/api/campaign/CalendarItem.ts @@ -1,30 +1,30 @@ -import { ICalendarItem } from './ICalendarItem'; +import { ICalendarItem } from "./ICalendarItem" export class CalendarItem implements ICalendarItem { - private _productName: string; - private _customImage: string; - private _furnitureClassName: string; + private _productName: string + private _customImage: string + private _furnitureClassName: string constructor(productName: string, customImage: string, furnitureClassName: string) { - this._productName = productName; - this._customImage = customImage; - this._furnitureClassName = furnitureClassName; + this._productName = productName + this._customImage = customImage + this._furnitureClassName = furnitureClassName } public get productName(): string { - return this._productName; + return this._productName } public get customImage(): string { - return this._customImage; + return this._customImage } public get furnitureClassName(): string { - return this._furnitureClassName; + return this._furnitureClassName } } diff --git a/src/api/campaign/CalendarItemState.ts b/src/api/campaign/CalendarItemState.ts index 1b91ca3ff..1640ba11a 100644 --- a/src/api/campaign/CalendarItemState.ts +++ b/src/api/campaign/CalendarItemState.ts @@ -1,7 +1,7 @@ export class CalendarItemState { - public static readonly STATE_UNLOCKED = 1; - public static readonly STATE_LOCKED_AVAILABLE = 2; - public static readonly STATE_LOCKED_EXPIRED = 3; - public static readonly STATE_LOCKED_FUTURE = 4; + public static readonly STATE_UNLOCKED = 1 + public static readonly STATE_LOCKED_AVAILABLE = 2 + public static readonly STATE_LOCKED_EXPIRED = 3 + public static readonly STATE_LOCKED_FUTURE = 4 } diff --git a/src/api/campaign/index.ts b/src/api/campaign/index.ts index a86e40c42..c4df717c6 100644 --- a/src/api/campaign/index.ts +++ b/src/api/campaign/index.ts @@ -1,3 +1,3 @@ -export * from './CalendarItem'; -export * from './CalendarItemState'; -export * from './ICalendarItem'; +export * from "./CalendarItem" +export * from "./CalendarItemState" +export * from "./ICalendarItem" diff --git a/src/api/catalog/BuilderFurniPlaceableStatus.ts b/src/api/catalog/BuilderFurniPlaceableStatus.ts index 40eb6f65c..51dc8684d 100644 --- a/src/api/catalog/BuilderFurniPlaceableStatus.ts +++ b/src/api/catalog/BuilderFurniPlaceableStatus.ts @@ -1,10 +1,10 @@ export class BuilderFurniPlaceableStatus { - public static OKAY: number = 0; - public static MISSING_OFFER: number = 1; - public static FURNI_LIMIT_REACHED: number = 2; - public static NOT_IN_ROOM: number = 3; - public static NOT_ROOM_OWNER: number = 4; - public static GUILD_ROOM: number = 5; - public static VISITORS_IN_ROOM: number = 6; + public static OKAY: number = 0 + public static MISSING_OFFER: number = 1 + public static FURNI_LIMIT_REACHED: number = 2 + public static NOT_IN_ROOM: number = 3 + public static NOT_ROOM_OWNER: number = 4 + public static GUILD_ROOM: number = 5 + public static VISITORS_IN_ROOM: number = 6 } diff --git a/src/api/catalog/CatalogNode.ts b/src/api/catalog/CatalogNode.ts index 893aa323b..71e11d344 100644 --- a/src/api/catalog/CatalogNode.ts +++ b/src/api/catalog/CatalogNode.ts @@ -1,124 +1,124 @@ -import { NodeData } from '@nitrots/nitro-renderer'; -import { ICatalogNode } from './ICatalogNode'; +import { NodeData } from "@nitrots/nitro-renderer" +import { ICatalogNode } from "./ICatalogNode" export class CatalogNode implements ICatalogNode { - private _depth: number = 0; - private _localization: string = ''; - private _pageId: number = -1; - private _pageName: string = ''; - private _iconId: number = 0; - private _children: ICatalogNode[]; - private _offerIds: number[]; - private _parent: ICatalogNode; - private _isVisible: boolean; - private _isActive: boolean; - private _isOpen: boolean; + private _depth: number = 0 + private _localization: string = "" + private _pageId: number = -1 + private _pageName: string = "" + private _iconId: number = 0 + private _children: ICatalogNode[] + private _offerIds: number[] + private _parent: ICatalogNode + private _isVisible: boolean + private _isActive: boolean + private _isOpen: boolean constructor(node: NodeData, depth: number, parent: ICatalogNode) { - this._depth = depth; - this._parent = parent; - this._localization = node.localization; - this._pageId = node.pageId; - this._pageName = node.pageName; - this._iconId = node.icon; - this._children = []; - this._offerIds = node.offerIds; - this._isVisible = node.visible; - this._isActive = false; - this._isOpen = false; + this._depth = depth + this._parent = parent + this._localization = node.localization + this._pageId = node.pageId + this._pageName = node.pageName + this._iconId = node.icon + this._children = [] + this._offerIds = node.offerIds + this._isVisible = node.visible + this._isActive = false + this._isOpen = false } public activate(): void { - this._isActive = true; + this._isActive = true } public deactivate(): void { - this._isActive = false; + this._isActive = false } public open(): void { - this._isOpen = true; + this._isOpen = true } public close(): void { - this._isOpen = false; + this._isOpen = false } public addChild(child: ICatalogNode):void { - if(!child) return; + if(!child) return - this._children.push(child); + this._children.push(child) } public get depth(): number { - return this._depth; + return this._depth } public get isBranch(): boolean { - return (this._children.length > 0); + return (this._children.length > 0) } public get isLeaf(): boolean { - return (this._children.length === 0); + return (this._children.length === 0) } public get localization(): string { - return this._localization; + return this._localization } public get pageId(): number { - return this._pageId; + return this._pageId } public get pageName(): string { - return this._pageName; + return this._pageName } public get iconId(): number { - return this._iconId; + return this._iconId } public get children(): ICatalogNode[] { - return this._children; + return this._children } public get offerIds(): number[] { - return this._offerIds; + return this._offerIds } public get parent(): ICatalogNode { - return this._parent; + return this._parent } public get isVisible(): boolean { - return this._isVisible; + return this._isVisible } public get isActive(): boolean { - return this._isActive; + return this._isActive } public get isOpen(): boolean { - return this._isOpen; + return this._isOpen } } diff --git a/src/api/catalog/CatalogPage.ts b/src/api/catalog/CatalogPage.ts index 1e806094b..cb5369013 100644 --- a/src/api/catalog/CatalogPage.ts +++ b/src/api/catalog/CatalogPage.ts @@ -1,59 +1,59 @@ -import { ICatalogPage } from './ICatalogPage'; -import { IPageLocalization } from './IPageLocalization'; -import { IPurchasableOffer } from './IPurchasableOffer'; +import { ICatalogPage } from "./ICatalogPage" +import { IPageLocalization } from "./IPageLocalization" +import { IPurchasableOffer } from "./IPurchasableOffer" export class CatalogPage implements ICatalogPage { - public static MODE_NORMAL: number = 0; + public static MODE_NORMAL: number = 0 - private _pageId: number; - private _layoutCode: string; - private _localization: IPageLocalization; - private _offers: IPurchasableOffer[]; - private _acceptSeasonCurrencyAsCredits: boolean; - private _mode: number; + private _pageId: number + private _layoutCode: string + private _localization: IPageLocalization + private _offers: IPurchasableOffer[] + private _acceptSeasonCurrencyAsCredits: boolean + private _mode: number constructor(pageId: number, layoutCode: string, localization: IPageLocalization, offers: IPurchasableOffer[], acceptSeasonCurrencyAsCredits: boolean, mode: number = -1) { - this._pageId = pageId; - this._layoutCode = layoutCode; - this._localization = localization; - this._offers = offers; - this._acceptSeasonCurrencyAsCredits = acceptSeasonCurrencyAsCredits; + this._pageId = pageId + this._layoutCode = layoutCode + this._localization = localization + this._offers = offers + this._acceptSeasonCurrencyAsCredits = acceptSeasonCurrencyAsCredits - for(const offer of offers) (offer.page = this); + for(const offer of offers) (offer.page = this) - if(mode === -1) this._mode = CatalogPage.MODE_NORMAL; - else this._mode = mode; + if(mode === -1) this._mode = CatalogPage.MODE_NORMAL + else this._mode = mode } public get pageId(): number { - return this._pageId; + return this._pageId } public get layoutCode(): string { - return this._layoutCode; + return this._layoutCode } public get localization(): IPageLocalization { - return this._localization; + return this._localization } public get offers(): IPurchasableOffer[] { - return this._offers; + return this._offers } public get acceptSeasonCurrencyAsCredits(): boolean { - return this._acceptSeasonCurrencyAsCredits; + return this._acceptSeasonCurrencyAsCredits } public get mode(): number { - return this._mode; + return this._mode } } diff --git a/src/api/catalog/CatalogPageName.ts b/src/api/catalog/CatalogPageName.ts index 8e4c7b64c..10d3547d4 100644 --- a/src/api/catalog/CatalogPageName.ts +++ b/src/api/catalog/CatalogPageName.ts @@ -1,26 +1,26 @@ export class CatalogPageName { - public static DUCKET_INFO: string = 'ducket_info'; - public static CREDITS: string = 'credits'; - public static AVATAR_EFFECTS: string = 'avatar_effects'; - public static HC_MEMBERSHIP: string = 'hc_membership'; - public static CLUB_GIFTS: string = 'club_gifts'; - public static LIMITED_SOLD: string = 'limited_sold'; - public static PET_ACCESSORIES: string = 'pet_accessories'; - public static TRAX_SONGS: string = 'trax_songs'; - public static NEW_ADDITIONS: string = 'new_additions'; - public static QUEST_SHELL: string = 'quest_shell'; - public static QUEST_SNOWFLAKES: string = 'quest_snowflakes'; - public static VAL_QUESTS: string = 'val_quests'; - public static GUILD_CUSTOM_FURNI: string = 'guild_custom_furni'; - public static GIFT_SHOP: string = 'gift_shop'; - public static HORSE_STYLES: string = 'horse_styles'; - public static HORSE_SHOE: string = 'horse_shoe'; - public static SET_EASTER: string = 'set_easter'; - public static ECOTRON_TRANSFORM: string = 'ecotron_transform'; - public static LOYALTY_INFO: string = 'loyalty_info'; - public static ROOM_BUNDLES: string = 'room_bundles'; - public static ROOM_BUNDLES_MOBILE: string = 'room_bundles_mobile'; - public static HABBO_CLUB_DESKTOP: string = 'habbo_club_desktop'; - public static MOBILE_SUBSCRIPTIONS: string = 'mobile_subscriptions'; + public static DUCKET_INFO: string = "ducket_info" + public static CREDITS: string = "credits" + public static AVATAR_EFFECTS: string = "avatar_effects" + public static HC_MEMBERSHIP: string = "hc_membership" + public static CLUB_GIFTS: string = "club_gifts" + public static LIMITED_SOLD: string = "limited_sold" + public static PET_ACCESSORIES: string = "pet_accessories" + public static TRAX_SONGS: string = "trax_songs" + public static NEW_ADDITIONS: string = "new_additions" + public static QUEST_SHELL: string = "quest_shell" + public static QUEST_SNOWFLAKES: string = "quest_snowflakes" + public static VAL_QUESTS: string = "val_quests" + public static GUILD_CUSTOM_FURNI: string = "guild_custom_furni" + public static GIFT_SHOP: string = "gift_shop" + public static HORSE_STYLES: string = "horse_styles" + public static HORSE_SHOE: string = "horse_shoe" + public static SET_EASTER: string = "set_easter" + public static ECOTRON_TRANSFORM: string = "ecotron_transform" + public static LOYALTY_INFO: string = "loyalty_info" + public static ROOM_BUNDLES: string = "room_bundles" + public static ROOM_BUNDLES_MOBILE: string = "room_bundles_mobile" + public static HABBO_CLUB_DESKTOP: string = "habbo_club_desktop" + public static MOBILE_SUBSCRIPTIONS: string = "mobile_subscriptions" } diff --git a/src/api/catalog/CatalogPetPalette.ts b/src/api/catalog/CatalogPetPalette.ts index d92c40dd5..d289d5fb5 100644 --- a/src/api/catalog/CatalogPetPalette.ts +++ b/src/api/catalog/CatalogPetPalette.ts @@ -1,4 +1,4 @@ -import { SellablePetPaletteData } from '@nitrots/nitro-renderer'; +import { SellablePetPaletteData } from "@nitrots/nitro-renderer" export class CatalogPetPalette { diff --git a/src/api/catalog/CatalogPurchaseState.ts b/src/api/catalog/CatalogPurchaseState.ts index b442f621c..24c5efc54 100644 --- a/src/api/catalog/CatalogPurchaseState.ts +++ b/src/api/catalog/CatalogPurchaseState.ts @@ -1,10 +1,10 @@ export class CatalogPurchaseState { - public static NONE = 0; - public static CONFIRM = 1; - public static PURCHASE = 2; - public static NO_CREDITS = 3; - public static NO_POINTS = 4; - public static SOLD_OUT = 5; - public static FAILED = 6; + public static NONE = 0 + public static CONFIRM = 1 + public static PURCHASE = 2 + public static NO_CREDITS = 3 + public static NO_POINTS = 4 + public static SOLD_OUT = 5 + public static FAILED = 6 } diff --git a/src/api/catalog/CatalogType.ts b/src/api/catalog/CatalogType.ts index 670ad6f84..876491435 100644 --- a/src/api/catalog/CatalogType.ts +++ b/src/api/catalog/CatalogType.ts @@ -1,5 +1,5 @@ export class CatalogType { - public static NORMAL: string = 'NORMAL'; - public static BUILDER: string = 'BUILDERS_CLUB'; + public static NORMAL: string = "NORMAL" + public static BUILDER: string = "BUILDERS_CLUB" } diff --git a/src/api/catalog/CatalogUtilities.ts b/src/api/catalog/CatalogUtilities.ts index 5ca8fed53..521b1b9e3 100644 --- a/src/api/catalog/CatalogUtilities.ts +++ b/src/api/catalog/CatalogUtilities.ts @@ -1,48 +1,48 @@ -import { SellablePetPaletteData } from '@nitrots/nitro-renderer'; -import { GetRoomEngine } from '../nitro'; -import { ICatalogNode } from './ICatalogNode'; +import { SellablePetPaletteData } from "@nitrots/nitro-renderer" +import { GetRoomEngine } from "../nitro" +import { ICatalogNode } from "./ICatalogNode" export const GetPixelEffectIcon = (id: number) => { - return ''; + return "" } export const GetSubscriptionProductIcon = (id: number) => { - return ''; + return "" } export const GetOfferNodes = (offerNodes: Map, offerId: number) => { - const nodes = offerNodes.get(offerId); - const allowedNodes: ICatalogNode[] = []; + const nodes = offerNodes.get(offerId) + const allowedNodes: ICatalogNode[] = [] if(nodes && nodes.length) { for(const node of nodes) { - if(!node.isVisible) continue; + if(!node.isVisible) continue - allowedNodes.push(node); + allowedNodes.push(node) } } - return allowedNodes; + return allowedNodes } export const FilterCatalogNode = (search: string, furniLines: string[], node: ICatalogNode, nodes: ICatalogNode[]) => { if(node.isVisible && (node.pageId > 0)) { - let nodeAdded = false; + let nodeAdded = false - const hayStack = [ node.pageName, node.localization ].join(' ').toLowerCase().replace(/ /gi, ''); + const hayStack = [ node.pageName, node.localization ].join(" ").toLowerCase().replace(/ /gi, "") if(hayStack.indexOf(search) > -1) { - nodes.push(node); + nodes.push(node) - nodeAdded = true; + nodeAdded = true } if(!nodeAdded) @@ -51,75 +51,75 @@ export const FilterCatalogNode = (search: string, furniLines: string[], node: IC { if(hayStack.indexOf(furniLine) >= 0) { - nodes.push(node); + nodes.push(node) - break; + break } } } } - for(const child of node.children) FilterCatalogNode(search, furniLines, child, nodes); + for(const child of node.children) FilterCatalogNode(search, furniLines, child, nodes) } export function GetPetIndexFromLocalization(localization: string) { - if(!localization.length) return 0; + if(!localization.length) return 0 - let index = (localization.length - 1); + let index = (localization.length - 1) while(index >= 0) { - if(isNaN(parseInt(localization.charAt(index)))) break; + if(isNaN(parseInt(localization.charAt(index)))) break - index--; + index-- } - if(index > 0) return parseInt(localization.substring(index + 1)); + if(index > 0) return parseInt(localization.substring(index + 1)) - return -1; + return -1 } export function GetPetAvailableColors(petIndex: number, palettes: SellablePetPaletteData[]): number[][] { switch(petIndex) { - case 0: - return [ [ 16743226 ], [ 16750435 ], [ 16764339 ], [ 0xF59500 ], [ 16498012 ], [ 16704690 ], [ 0xEDD400 ], [ 16115545 ], [ 16513201 ], [ 8694111 ], [ 11585939 ], [ 14413767 ], [ 6664599 ], [ 9553845 ], [ 12971486 ], [ 8358322 ], [ 10002885 ], [ 13292268 ], [ 10780600 ], [ 12623573 ], [ 14403561 ], [ 12418717 ], [ 14327229 ], [ 15517403 ], [ 14515069 ], [ 15764368 ], [ 16366271 ], [ 0xABABAB ], [ 0xD4D4D4 ], [ 0xFFFFFF ], [ 14256481 ], [ 14656129 ], [ 15848130 ], [ 14005087 ], [ 14337152 ], [ 15918540 ], [ 15118118 ], [ 15531929 ], [ 9764857 ], [ 11258085 ] ]; - case 1: - return [ [ 16743226 ], [ 16750435 ], [ 16764339 ], [ 0xF59500 ], [ 16498012 ], [ 16704690 ], [ 0xEDD400 ], [ 16115545 ], [ 16513201 ], [ 8694111 ], [ 11585939 ], [ 14413767 ], [ 6664599 ], [ 9553845 ], [ 12971486 ], [ 8358322 ], [ 10002885 ], [ 13292268 ], [ 10780600 ], [ 12623573 ], [ 14403561 ], [ 12418717 ], [ 14327229 ], [ 15517403 ], [ 14515069 ], [ 15764368 ], [ 16366271 ], [ 0xABABAB ], [ 0xD4D4D4 ], [ 0xFFFFFF ], [ 14256481 ], [ 14656129 ], [ 15848130 ], [ 14005087 ], [ 14337152 ], [ 15918540 ], [ 15118118 ], [ 15531929 ], [ 9764857 ], [ 11258085 ] ]; - case 2: - return [ [ 16579283 ], [ 15378351 ], [ 8830016 ], [ 15257125 ], [ 9340985 ], [ 8949607 ], [ 6198292 ], [ 8703620 ], [ 9889626 ], [ 8972045 ], [ 12161285 ], [ 13162269 ], [ 8620113 ], [ 12616503 ], [ 8628101 ], [ 0xD2FF00 ], [ 9764857 ] ]; - case 3: - return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ] ]; - case 4: - return [ [ 0xFFFFFF ], [ 16053490 ], [ 15464440 ], [ 16248792 ], [ 15396319 ], [ 15007487 ] ]; - case 5: - return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ] ]; - case 6: - return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ], [ 16767177 ], [ 16770205 ], [ 16751331 ] ]; - case 7: - return [ [ 0xCCCCCC ], [ 0xAEAEAE ], [ 16751331 ], [ 10149119 ], [ 16763290 ], [ 16743786 ] ]; - default: { - const colors: number[][] = []; - - for(const palette of palettes) - { - const petColorResult = GetRoomEngine().getPetColorResult(petIndex, palette.paletteId); + case 0: + return [ [ 16743226 ], [ 16750435 ], [ 16764339 ], [ 0xF59500 ], [ 16498012 ], [ 16704690 ], [ 0xEDD400 ], [ 16115545 ], [ 16513201 ], [ 8694111 ], [ 11585939 ], [ 14413767 ], [ 6664599 ], [ 9553845 ], [ 12971486 ], [ 8358322 ], [ 10002885 ], [ 13292268 ], [ 10780600 ], [ 12623573 ], [ 14403561 ], [ 12418717 ], [ 14327229 ], [ 15517403 ], [ 14515069 ], [ 15764368 ], [ 16366271 ], [ 0xABABAB ], [ 0xD4D4D4 ], [ 0xFFFFFF ], [ 14256481 ], [ 14656129 ], [ 15848130 ], [ 14005087 ], [ 14337152 ], [ 15918540 ], [ 15118118 ], [ 15531929 ], [ 9764857 ], [ 11258085 ] ] + case 1: + return [ [ 16743226 ], [ 16750435 ], [ 16764339 ], [ 0xF59500 ], [ 16498012 ], [ 16704690 ], [ 0xEDD400 ], [ 16115545 ], [ 16513201 ], [ 8694111 ], [ 11585939 ], [ 14413767 ], [ 6664599 ], [ 9553845 ], [ 12971486 ], [ 8358322 ], [ 10002885 ], [ 13292268 ], [ 10780600 ], [ 12623573 ], [ 14403561 ], [ 12418717 ], [ 14327229 ], [ 15517403 ], [ 14515069 ], [ 15764368 ], [ 16366271 ], [ 0xABABAB ], [ 0xD4D4D4 ], [ 0xFFFFFF ], [ 14256481 ], [ 14656129 ], [ 15848130 ], [ 14005087 ], [ 14337152 ], [ 15918540 ], [ 15118118 ], [ 15531929 ], [ 9764857 ], [ 11258085 ] ] + case 2: + return [ [ 16579283 ], [ 15378351 ], [ 8830016 ], [ 15257125 ], [ 9340985 ], [ 8949607 ], [ 6198292 ], [ 8703620 ], [ 9889626 ], [ 8972045 ], [ 12161285 ], [ 13162269 ], [ 8620113 ], [ 12616503 ], [ 8628101 ], [ 0xD2FF00 ], [ 9764857 ] ] + case 3: + return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ] ] + case 4: + return [ [ 0xFFFFFF ], [ 16053490 ], [ 15464440 ], [ 16248792 ], [ 15396319 ], [ 15007487 ] ] + case 5: + return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ] ] + case 6: + return [ [ 0xFFFFFF ], [ 0xEEEEEE ], [ 0xDDDDDD ], [ 16767177 ], [ 16770205 ], [ 16751331 ] ] + case 7: + return [ [ 0xCCCCCC ], [ 0xAEAEAE ], [ 16751331 ], [ 10149119 ], [ 16763290 ], [ 16743786 ] ] + default: { + const colors: number[][] = [] + + for(const palette of palettes) + { + const petColorResult = GetRoomEngine().getPetColorResult(petIndex, palette.paletteId) - if(!petColorResult) continue; + if(!petColorResult) continue - if(petColorResult.primaryColor === petColorResult.secondaryColor) - { - colors.push([ petColorResult.primaryColor ]); - } - else - { - colors.push([ petColorResult.primaryColor, petColorResult.secondaryColor ]); - } + if(petColorResult.primaryColor === petColorResult.secondaryColor) + { + colors.push([ petColorResult.primaryColor ]) + } + else + { + colors.push([ petColorResult.primaryColor, petColorResult.secondaryColor ]) } - - return colors; } + + return colors + } } } diff --git a/src/api/catalog/FurnitureOffer.ts b/src/api/catalog/FurnitureOffer.ts index 4c9c9f943..205b7a216 100644 --- a/src/api/catalog/FurnitureOffer.ts +++ b/src/api/catalog/FurnitureOffer.ts @@ -1,120 +1,120 @@ -import { GetProductOfferComposer, IFurnitureData } from '@nitrots/nitro-renderer'; -import { GetProductDataForLocalization, SendMessageComposer } from '..'; -import { ICatalogPage } from './ICatalogPage'; -import { IProduct } from './IProduct'; -import { IPurchasableOffer } from './IPurchasableOffer'; -import { Offer } from './Offer'; -import { Product } from './Product'; +import { GetProductOfferComposer, IFurnitureData } from "@nitrots/nitro-renderer" +import { GetProductDataForLocalization, SendMessageComposer } from ".." +import { ICatalogPage } from "./ICatalogPage" +import { IProduct } from "./IProduct" +import { IPurchasableOffer } from "./IPurchasableOffer" +import { Offer } from "./Offer" +import { Product } from "./Product" export class FurnitureOffer implements IPurchasableOffer { - private _furniData:IFurnitureData; - private _page: ICatalogPage; - private _product: IProduct; + private _furniData:IFurnitureData + private _page: ICatalogPage + private _product: IProduct constructor(furniData: IFurnitureData) { - this._furniData = furniData; - this._product = (new Product(this._furniData.type, this._furniData.id, this._furniData.customParams, 1, GetProductDataForLocalization(this._furniData.className), this._furniData) as IProduct); + this._furniData = furniData + this._product = (new Product(this._furniData.type, this._furniData.id, this._furniData.customParams, 1, GetProductDataForLocalization(this._furniData.className), this._furniData) as IProduct) } public activate(): void { - SendMessageComposer(new GetProductOfferComposer((this._furniData.rentOfferId > -1) ? this._furniData.rentOfferId : this._furniData.purchaseOfferId)); + SendMessageComposer(new GetProductOfferComposer((this._furniData.rentOfferId > -1) ? this._furniData.rentOfferId : this._furniData.purchaseOfferId)) } public get offerId(): number { - return (this.isRentOffer) ? this._furniData.rentOfferId : this._furniData.purchaseOfferId; + return (this.isRentOffer) ? this._furniData.rentOfferId : this._furniData.purchaseOfferId } public get priceInActivityPoints(): number { - return 0; + return 0 } public get activityPointType(): number { - return 0; + return 0 } public get priceInCredits(): number { - return 0; + return 0 } public get page(): ICatalogPage { - return this._page; + return this._page } public set page(page: ICatalogPage) { - this._page = page; + this._page = page } public get priceType(): string { - return ''; + return "" } public get product(): IProduct { - return this._product; + return this._product } public get products(): IProduct[] { - return [ this._product ]; + return [ this._product ] } public get localizationId(): string { - return 'roomItem.name.' + this._furniData.id; + return "roomItem.name." + this._furniData.id } public get bundlePurchaseAllowed(): boolean { - return false; + return false } public get isRentOffer(): boolean { - return (this._furniData.rentOfferId > -1); + return (this._furniData.rentOfferId > -1) } public get giftable(): boolean { - return false; + return false } public get pricingModel(): string { - return Offer.PRICING_MODEL_FURNITURE; + return Offer.PRICING_MODEL_FURNITURE } public get clubLevel(): number { - return 0; + return 0 } public get badgeCode(): string { - return ''; + return "" } public get localizationName(): string { - return this._furniData.name; + return this._furniData.name } public get localizationDescription(): string { - return this._furniData.description; + return this._furniData.description } public get isLazy(): boolean { - return true; + return true } } diff --git a/src/api/catalog/GetImageIconUrlForProduct.ts b/src/api/catalog/GetImageIconUrlForProduct.ts index 1e8d8c0b6..a42a028a7 100644 --- a/src/api/catalog/GetImageIconUrlForProduct.ts +++ b/src/api/catalog/GetImageIconUrlForProduct.ts @@ -1,19 +1,19 @@ -import { GetRoomEngine } from '../nitro'; -import { ProductTypeEnum } from './ProductTypeEnum'; +import { GetRoomEngine } from "../nitro" +import { ProductTypeEnum } from "./ProductTypeEnum" export const GetImageIconUrlForProduct = (productType: string, productClassId: number, extraData: string = null) => { - let imageUrl: string = null; + let imageUrl: string = null switch(productType.toLocaleLowerCase()) { - case ProductTypeEnum.FLOOR: - imageUrl = GetRoomEngine().getFurnitureFloorIconUrl(productClassId); - break; - case ProductTypeEnum.WALL: - imageUrl = GetRoomEngine().getFurnitureWallIconUrl(productClassId, extraData); - break; + case ProductTypeEnum.FLOOR: + imageUrl = GetRoomEngine().getFurnitureFloorIconUrl(productClassId) + break + case ProductTypeEnum.WALL: + imageUrl = GetRoomEngine().getFurnitureWallIconUrl(productClassId, extraData) + break } - return imageUrl; + return imageUrl } diff --git a/src/api/catalog/GiftWrappingConfiguration.ts b/src/api/catalog/GiftWrappingConfiguration.ts index 9d29b8c8e..05b976ea5 100644 --- a/src/api/catalog/GiftWrappingConfiguration.ts +++ b/src/api/catalog/GiftWrappingConfiguration.ts @@ -1,51 +1,51 @@ -import { GiftWrappingConfigurationParser } from '@nitrots/nitro-renderer'; +import { GiftWrappingConfigurationParser } from "@nitrots/nitro-renderer" export class GiftWrappingConfiguration { - private _isEnabled: boolean = false; - private _price: number = null; - private _stuffTypes: number[] = null; - private _boxTypes: number[] = null; - private _ribbonTypes: number[] = null; - private _defaultStuffTypes: number[] = null; + private _isEnabled: boolean = false + private _price: number = null + private _stuffTypes: number[] = null + private _boxTypes: number[] = null + private _ribbonTypes: number[] = null + private _defaultStuffTypes: number[] = null constructor(parser: GiftWrappingConfigurationParser) { - this._isEnabled = parser.isEnabled; - this._price = parser.price; - this._boxTypes = parser.boxTypes; - this._ribbonTypes = parser.ribbonTypes; - this._stuffTypes = parser.giftWrappers; - this._defaultStuffTypes = parser.giftFurnis; + this._isEnabled = parser.isEnabled + this._price = parser.price + this._boxTypes = parser.boxTypes + this._ribbonTypes = parser.ribbonTypes + this._stuffTypes = parser.giftWrappers + this._defaultStuffTypes = parser.giftFurnis } public get isEnabled(): boolean { - return this._isEnabled; + return this._isEnabled } public get price(): number { - return this._price; + return this._price } public get stuffTypes(): number[] { - return this._stuffTypes; + return this._stuffTypes } public get boxTypes(): number[] { - return this._boxTypes; + return this._boxTypes } public get ribbonTypes(): number[] { - return this._ribbonTypes; + return this._ribbonTypes } public get defaultStuffTypes(): number[] { - return this._defaultStuffTypes; + return this._defaultStuffTypes } } diff --git a/src/api/catalog/ICatalogOptions.ts b/src/api/catalog/ICatalogOptions.ts index 20356947d..156296125 100644 --- a/src/api/catalog/ICatalogOptions.ts +++ b/src/api/catalog/ICatalogOptions.ts @@ -1,6 +1,6 @@ -import { ClubGiftInfoParser, ClubOfferData, HabboGroupEntryData, MarketplaceConfigurationMessageParser } from '@nitrots/nitro-renderer'; -import { CatalogPetPalette } from './CatalogPetPalette'; -import { GiftWrappingConfiguration } from './GiftWrappingConfiguration'; +import { ClubGiftInfoParser, ClubOfferData, HabboGroupEntryData, MarketplaceConfigurationMessageParser } from "@nitrots/nitro-renderer" +import { CatalogPetPalette } from "./CatalogPetPalette" +import { GiftWrappingConfiguration } from "./GiftWrappingConfiguration" export interface ICatalogOptions { diff --git a/src/api/catalog/ICatalogPage.ts b/src/api/catalog/ICatalogPage.ts index ed11ba0d1..2d5ac5ef5 100644 --- a/src/api/catalog/ICatalogPage.ts +++ b/src/api/catalog/ICatalogPage.ts @@ -1,5 +1,5 @@ -import { IPageLocalization } from './IPageLocalization'; -import { IPurchasableOffer } from './IPurchasableOffer'; +import { IPageLocalization } from "./IPageLocalization" +import { IPurchasableOffer } from "./IPurchasableOffer" export interface ICatalogPage { diff --git a/src/api/catalog/IProduct.ts b/src/api/catalog/IProduct.ts index 4a1a392de..45073be30 100644 --- a/src/api/catalog/IProduct.ts +++ b/src/api/catalog/IProduct.ts @@ -1,5 +1,5 @@ -import { IFurnitureData, IProductData } from '@nitrots/nitro-renderer'; -import { IPurchasableOffer } from './IPurchasableOffer'; +import { IFurnitureData, IProductData } from "@nitrots/nitro-renderer" +import { IPurchasableOffer } from "./IPurchasableOffer" export interface IProduct { diff --git a/src/api/catalog/IPurchasableOffer.ts b/src/api/catalog/IPurchasableOffer.ts index b18286517..293423364 100644 --- a/src/api/catalog/IPurchasableOffer.ts +++ b/src/api/catalog/IPurchasableOffer.ts @@ -1,5 +1,5 @@ -import { ICatalogPage } from './ICatalogPage'; -import { IProduct } from './IProduct'; +import { ICatalogPage } from "./ICatalogPage" +import { IProduct } from "./IProduct" export interface IPurchasableOffer { diff --git a/src/api/catalog/IPurchaseOptions.ts b/src/api/catalog/IPurchaseOptions.ts index c9fab8927..0b680c274 100644 --- a/src/api/catalog/IPurchaseOptions.ts +++ b/src/api/catalog/IPurchaseOptions.ts @@ -1,4 +1,4 @@ -import { IObjectData } from '@nitrots/nitro-renderer'; +import { IObjectData } from "@nitrots/nitro-renderer" export interface IPurchaseOptions { diff --git a/src/api/catalog/MarketplaceOfferData.ts b/src/api/catalog/MarketplaceOfferData.ts index ba1fa88be..a4e083061 100644 --- a/src/api/catalog/MarketplaceOfferData.ts +++ b/src/api/catalog/MarketplaceOfferData.ts @@ -1,128 +1,128 @@ -import { IObjectData } from '@nitrots/nitro-renderer'; +import { IObjectData } from "@nitrots/nitro-renderer" export class MarketplaceOfferData { - public static readonly TYPE_FLOOR: number = 1; - public static readonly TYPE_WALL: number = 2; - - private _offerId: number; - private _furniId: number; - private _furniType: number; - private _extraData: string; - private _stuffData: IObjectData; - private _price: number; - private _averagePrice: number; - private _imageCallback: number; - private _status: number; - private _timeLeftMinutes: number = -1; - private _offerCount: number; - private _image: string; + public static readonly TYPE_FLOOR: number = 1 + public static readonly TYPE_WALL: number = 2 + + private _offerId: number + private _furniId: number + private _furniType: number + private _extraData: string + private _stuffData: IObjectData + private _price: number + private _averagePrice: number + private _imageCallback: number + private _status: number + private _timeLeftMinutes: number = -1 + private _offerCount: number + private _image: string constructor(offerId: number, furniId: number, furniType: number, extraData: string, stuffData: IObjectData, price: number, status: number, averagePrice: number, offerCount: number = -1) { - this._offerId = offerId; - this._furniId = furniId; - this._furniType = furniType; - this._extraData = extraData; - this._stuffData = stuffData; - this._price = price; - this._status = status; - this._averagePrice = averagePrice; - this._offerCount = offerCount; + this._offerId = offerId + this._furniId = furniId + this._furniType = furniType + this._extraData = extraData + this._stuffData = stuffData + this._price = price + this._status = status + this._averagePrice = averagePrice + this._offerCount = offerCount } public get offerId(): number { - return this._offerId; + return this._offerId } public set offerId(offerId: number) { - this._offerId = offerId; + this._offerId = offerId } public get furniId(): number { - return this._furniId; + return this._furniId } public get furniType(): number { - return this._furniType; + return this._furniType } public get extraData(): string { - return this._extraData; + return this._extraData } public get stuffData(): IObjectData { - return this._stuffData; + return this._stuffData } public get price(): number { - return this._price; + return this._price } public set price(price: number) { - this._price = price; + this._price = price } public get averagePrice(): number { - return this._averagePrice; + return this._averagePrice } public get image(): string { - return this._image; + return this._image } public set image(image: string) { - this._image = image; + this._image = image } public get imageCallback(): number { - return this._imageCallback; + return this._imageCallback } public set imageCallback(callback: number) { - this._imageCallback = callback; + this._imageCallback = callback } public get status(): number { - return this._status; + return this._status } public get timeLeftMinutes(): number { - return this._timeLeftMinutes; + return this._timeLeftMinutes } public set timeLeftMinutes(minutes: number) { - this._timeLeftMinutes = minutes; + this._timeLeftMinutes = minutes } public get offerCount(): number { - return this._offerCount; + return this._offerCount } public set offerCount(count: number) { - this._offerCount = count; + this._offerCount = count } public get isUniqueLimitedItem(): boolean { - return (this.stuffData && (this.stuffData.uniqueSeries > 0)); + return (this.stuffData && (this.stuffData.uniqueSeries > 0)) } } diff --git a/src/api/catalog/MarketplaceOfferState.ts b/src/api/catalog/MarketplaceOfferState.ts index 20c0e45bb..fafa2b6da 100644 --- a/src/api/catalog/MarketplaceOfferState.ts +++ b/src/api/catalog/MarketplaceOfferState.ts @@ -1,7 +1,7 @@ export class MarketPlaceOfferState { - public static readonly ONGOING = 1; - public static readonly ONGOING_OWN = 1; - public static readonly SOLD = 2; - public static readonly EXPIRED = 3; + public static readonly ONGOING = 1 + public static readonly ONGOING_OWN = 1 + public static readonly SOLD = 2 + public static readonly EXPIRED = 3 } diff --git a/src/api/catalog/MarketplaceSearchType.ts b/src/api/catalog/MarketplaceSearchType.ts index ac7a70199..4712f830d 100644 --- a/src/api/catalog/MarketplaceSearchType.ts +++ b/src/api/catalog/MarketplaceSearchType.ts @@ -1,6 +1,6 @@ export class MarketplaceSearchType { - public static readonly BY_ACTIVITY = 1; - public static readonly BY_VALUE = 2; - public static readonly ADVANCED = 3; + public static readonly BY_ACTIVITY = 1 + public static readonly BY_VALUE = 2 + public static readonly ADVANCED = 3 } diff --git a/src/api/catalog/Offer.ts b/src/api/catalog/Offer.ts index c14d6ac19..2b643e905 100644 --- a/src/api/catalog/Offer.ts +++ b/src/api/catalog/Offer.ts @@ -1,59 +1,59 @@ -import { GetFurnitureData, GetProductDataForLocalization, LocalizeText, ProductTypeEnum } from '..'; -import { ICatalogPage } from './ICatalogPage'; -import { IProduct } from './IProduct'; -import { IPurchasableOffer } from './IPurchasableOffer'; -import { Product } from './Product'; +import { GetFurnitureData, GetProductDataForLocalization, LocalizeText, ProductTypeEnum } from ".." +import { ICatalogPage } from "./ICatalogPage" +import { IProduct } from "./IProduct" +import { IPurchasableOffer } from "./IPurchasableOffer" +import { Product } from "./Product" export class Offer implements IPurchasableOffer { - public static PRICING_MODEL_UNKNOWN: string = 'pricing_model_unknown'; - public static PRICING_MODEL_SINGLE: string = 'pricing_model_single'; - public static PRICING_MODEL_MULTI: string = 'pricing_model_multi'; - public static PRICING_MODEL_BUNDLE: string = 'pricing_model_bundle'; - public static PRICING_MODEL_FURNITURE: string = 'pricing_model_furniture'; - public static PRICE_TYPE_NONE: string = 'price_type_none'; - public static PRICE_TYPE_CREDITS: string = 'price_type_credits'; - public static PRICE_TYPE_ACTIVITYPOINTS: string = 'price_type_activitypoints'; - public static PRICE_TYPE_CREDITS_ACTIVITYPOINTS: string = 'price_type_credits_and_activitypoints'; - - private _pricingModel: string; - private _priceType: string; - private _offerId: number; - private _localizationId: string; - private _priceInCredits: number; - private _priceInActivityPoints: number; - private _activityPointType: number; - private _giftable: boolean; - private _isRentOffer: boolean; - private _page: ICatalogPage; - private _clubLevel: number = 0; - private _products: IProduct[]; - private _badgeCode: string; - private _bundlePurchaseAllowed: boolean = false; + public static PRICING_MODEL_UNKNOWN: string = "pricing_model_unknown" + public static PRICING_MODEL_SINGLE: string = "pricing_model_single" + public static PRICING_MODEL_MULTI: string = "pricing_model_multi" + public static PRICING_MODEL_BUNDLE: string = "pricing_model_bundle" + public static PRICING_MODEL_FURNITURE: string = "pricing_model_furniture" + public static PRICE_TYPE_NONE: string = "price_type_none" + public static PRICE_TYPE_CREDITS: string = "price_type_credits" + public static PRICE_TYPE_ACTIVITYPOINTS: string = "price_type_activitypoints" + public static PRICE_TYPE_CREDITS_ACTIVITYPOINTS: string = "price_type_credits_and_activitypoints" + + private _pricingModel: string + private _priceType: string + private _offerId: number + private _localizationId: string + private _priceInCredits: number + private _priceInActivityPoints: number + private _activityPointType: number + private _giftable: boolean + private _isRentOffer: boolean + private _page: ICatalogPage + private _clubLevel: number = 0 + private _products: IProduct[] + private _badgeCode: string + private _bundlePurchaseAllowed: boolean = false constructor(offerId: number, localizationId: string, isRentOffer: boolean, priceInCredits: number, priceInActivityPoints: number, activityPointType: number, giftable: boolean, clubLevel: number, products: IProduct[], bundlePurchaseAllowed: boolean) { - this._offerId = offerId; - this._localizationId = localizationId; - this._isRentOffer = isRentOffer; - this._priceInCredits = priceInCredits; - this._priceInActivityPoints = priceInActivityPoints; - this._activityPointType = activityPointType; - this._giftable = giftable; - this._clubLevel = clubLevel; - this._products = products; - this._bundlePurchaseAllowed = bundlePurchaseAllowed; + this._offerId = offerId + this._localizationId = localizationId + this._isRentOffer = isRentOffer + this._priceInCredits = priceInCredits + this._priceInActivityPoints = priceInActivityPoints + this._activityPointType = activityPointType + this._giftable = giftable + this._clubLevel = clubLevel + this._products = products + this._bundlePurchaseAllowed = bundlePurchaseAllowed - this.setPricingModelForProducts(); - this.setPricingType(); + this.setPricingModelForProducts() + this.setPricingType() for(const product of products) { if(product.productType === ProductTypeEnum.BADGE) { - this._badgeCode = product.extraParam; + this._badgeCode = product.extraParam - break; + break } } } @@ -65,139 +65,139 @@ export class Offer implements IPurchasableOffer public get clubLevel(): number { - return this._clubLevel; + return this._clubLevel } public get page(): ICatalogPage { - return this._page; + return this._page } public set page(k: ICatalogPage) { - this._page = k; + this._page = k } public get offerId(): number { - return this._offerId; + return this._offerId } public get localizationId(): string { - return this._localizationId; + return this._localizationId } public get priceInCredits(): number { - return this._priceInCredits; + return this._priceInCredits } public get priceInActivityPoints(): number { - return this._priceInActivityPoints; + return this._priceInActivityPoints } public get activityPointType(): number { - return this._activityPointType; + return this._activityPointType } public get giftable(): boolean { - return this._giftable; + return this._giftable } public get product(): IProduct { - if(!this._products || !this._products.length) return null; + if(!this._products || !this._products.length) return null - if(this._products.length === 1) return this._products[0]; + if(this._products.length === 1) return this._products[0] - const products = Product.stripAddonProducts(this._products); + const products = Product.stripAddonProducts(this._products) - if(products.length) return products[0]; + if(products.length) return products[0] - return null; + return null } public get pricingModel(): string { - return this._pricingModel; + return this._pricingModel } public get priceType(): string { - return this._priceType; + return this._priceType } public get bundlePurchaseAllowed(): boolean { - return this._bundlePurchaseAllowed; + return this._bundlePurchaseAllowed } public get isRentOffer(): boolean { - return this._isRentOffer; + return this._isRentOffer } public get badgeCode(): string { - return this._badgeCode; + return this._badgeCode } public get localizationName(): string { - const productData = GetProductDataForLocalization(this._localizationId); + const productData = GetProductDataForLocalization(this._localizationId) - if(productData) return productData.name; + if(productData) return productData.name - return LocalizeText(this._localizationId); + return LocalizeText(this._localizationId) } public get localizationDescription(): string { - const productData = GetProductDataForLocalization(this._localizationId); + const productData = GetProductDataForLocalization(this._localizationId) - if(productData) return productData.description; + if(productData) return productData.description - return LocalizeText(this._localizationId); + return LocalizeText(this._localizationId) } public get isLazy(): boolean { - return false; + return false } public get products(): IProduct[] { - return this._products; + return this._products } private setPricingModelForProducts(): void { - const products = Product.stripAddonProducts(this._products); + const products = Product.stripAddonProducts(this._products) if(products.length === 1) { if(products[0].productCount === 1) { - this._pricingModel = Offer.PRICING_MODEL_SINGLE; + this._pricingModel = Offer.PRICING_MODEL_SINGLE } else { - this._pricingModel = Offer.PRICING_MODEL_MULTI; + this._pricingModel = Offer.PRICING_MODEL_MULTI } } else if(products.length > 1) { - this._pricingModel = Offer.PRICING_MODEL_BUNDLE; + this._pricingModel = Offer.PRICING_MODEL_BUNDLE } else { - this._pricingModel = Offer.PRICING_MODEL_UNKNOWN; + this._pricingModel = Offer.PRICING_MODEL_UNKNOWN } } @@ -205,41 +205,41 @@ export class Offer implements IPurchasableOffer { if((this._priceInCredits > 0) && (this._priceInActivityPoints > 0)) { - this._priceType = Offer.PRICE_TYPE_CREDITS_ACTIVITYPOINTS; + this._priceType = Offer.PRICE_TYPE_CREDITS_ACTIVITYPOINTS } else if(this._priceInCredits > 0) { - this._priceType = Offer.PRICE_TYPE_CREDITS; + this._priceType = Offer.PRICE_TYPE_CREDITS } else if(this._priceInActivityPoints > 0) { - this._priceType = Offer.PRICE_TYPE_ACTIVITYPOINTS; + this._priceType = Offer.PRICE_TYPE_ACTIVITYPOINTS } else { - this._priceType = Offer.PRICE_TYPE_NONE; + this._priceType = Offer.PRICE_TYPE_NONE } } public clone(): IPurchasableOffer { - const products: IProduct[] = []; - const productData = GetProductDataForLocalization(this.localizationId); + const products: IProduct[] = [] + const productData = GetProductDataForLocalization(this.localizationId) for(const product of this._products) { - const furnitureData = GetFurnitureData(product.productClassId, product.productType); + const furnitureData = GetFurnitureData(product.productClassId, product.productType) - products.push(new Product(product.productType, product.productClassId, product.extraParam, product.productCount, productData, furnitureData)); + products.push(new Product(product.productType, product.productClassId, product.extraParam, product.productCount, productData, furnitureData)) } - const offer = new Offer(this.offerId, this.localizationId, this.isRentOffer, this.priceInCredits, this.priceInActivityPoints, this.activityPointType, this.giftable, this.clubLevel, products, this.bundlePurchaseAllowed); + const offer = new Offer(this.offerId, this.localizationId, this.isRentOffer, this.priceInCredits, this.priceInActivityPoints, this.activityPointType, this.giftable, this.clubLevel, products, this.bundlePurchaseAllowed) - offer.page = this.page; + offer.page = this.page - return offer; + return offer } } diff --git a/src/api/catalog/PageLocalization.ts b/src/api/catalog/PageLocalization.ts index 91e3ce6f7..ed6b2e651 100644 --- a/src/api/catalog/PageLocalization.ts +++ b/src/api/catalog/PageLocalization.ts @@ -1,36 +1,36 @@ -import { GetConfiguration } from '../nitro'; -import { IPageLocalization } from './IPageLocalization'; +import { GetConfiguration } from "../nitro" +import { IPageLocalization } from "./IPageLocalization" export class PageLocalization implements IPageLocalization { - private _images: string[]; + private _images: string[] private _texts: string[] constructor(images: string[], texts: string[]) { - this._images = images; - this._texts = texts; + this._images = images + this._texts = texts } public getText(index: number): string { - let message = (this._texts[index] || ''); + let message = (this._texts[index] || "") - if(message && message.length) message = message.replace(/\r\n|\r|\n/g, '
'); + if(message && message.length) message = message.replace(/\r\n|\r|\n/g, "
") - return message; + return message } public getImage(index: number): string { - const imageName = (this._images[index] || ''); + const imageName = (this._images[index] || "") - if(!imageName || !imageName.length) return null; + if(!imageName || !imageName.length) return null - let assetUrl = GetConfiguration('catalog.asset.image.url'); + let assetUrl = GetConfiguration("catalog.asset.image.url") - assetUrl = assetUrl.replace('%name%', imageName); + assetUrl = assetUrl.replace("%name%", imageName) - return assetUrl; + return assetUrl } } diff --git a/src/api/catalog/PlacedObjectPurchaseData.ts b/src/api/catalog/PlacedObjectPurchaseData.ts index 84bad8cdc..42f49c4d9 100644 --- a/src/api/catalog/PlacedObjectPurchaseData.ts +++ b/src/api/catalog/PlacedObjectPurchaseData.ts @@ -1,5 +1,5 @@ -import { IFurnitureData, IProductData } from '@nitrots/nitro-renderer'; -import { IPurchasableOffer } from './IPurchasableOffer'; +import { IFurnitureData, IProductData } from "@nitrots/nitro-renderer" +import { IPurchasableOffer } from "./IPurchasableOffer" export class PlacedObjectPurchaseData { @@ -16,26 +16,26 @@ export class PlacedObjectPurchaseData public get offerId(): number { - return this.offer.offerId; + return this.offer.offerId } public get productClassId(): number { - return this.offer.product.productClassId; + return this.offer.product.productClassId } public get productData(): IProductData { - return this.offer.product.productData; + return this.offer.product.productData } public get furniData(): IFurnitureData { - return this.offer.product.furnitureData; + return this.offer.product.furnitureData } public get extraParam(): string { - return this.offer.product.extraParam; + return this.offer.product.extraParam } } diff --git a/src/api/catalog/Product.ts b/src/api/catalog/Product.ts index bfb760fc8..d6ee42d9b 100644 --- a/src/api/catalog/Product.ts +++ b/src/api/catalog/Product.ts @@ -1,143 +1,143 @@ -import { IFurnitureData, IObjectData, IProductData } from '@nitrots/nitro-renderer'; -import { GetConfiguration, GetRoomEngine, GetSessionDataManager } from '../nitro'; -import { GetPixelEffectIcon, GetSubscriptionProductIcon } from './CatalogUtilities'; -import { IProduct } from './IProduct'; -import { IPurchasableOffer } from './IPurchasableOffer'; -import { ProductTypeEnum } from './ProductTypeEnum'; +import { IFurnitureData, IObjectData, IProductData } from "@nitrots/nitro-renderer" +import { GetConfiguration, GetRoomEngine, GetSessionDataManager } from "../nitro" +import { GetPixelEffectIcon, GetSubscriptionProductIcon } from "./CatalogUtilities" +import { IProduct } from "./IProduct" +import { IPurchasableOffer } from "./IPurchasableOffer" +import { ProductTypeEnum } from "./ProductTypeEnum" export class Product implements IProduct { - public static EFFECT_CLASSID_NINJA_DISAPPEAR: number = 108; - - private _productType: string; - private _productClassId: number; - private _extraParam: string; - private _productCount: number; - private _productData: IProductData; - private _furnitureData: IFurnitureData; - private _isUniqueLimitedItem: boolean; - private _uniqueLimitedItemSeriesSize: number; - private _uniqueLimitedItemsLeft: number; + public static EFFECT_CLASSID_NINJA_DISAPPEAR: number = 108 + + private _productType: string + private _productClassId: number + private _extraParam: string + private _productCount: number + private _productData: IProductData + private _furnitureData: IFurnitureData + private _isUniqueLimitedItem: boolean + private _uniqueLimitedItemSeriesSize: number + private _uniqueLimitedItemsLeft: number constructor(productType: string, productClassId: number, extraParam: string, productCount: number, productData: IProductData, furnitureData: IFurnitureData, isUniqueLimitedItem: boolean = false, uniqueLimitedItemSeriesSize: number = 0, uniqueLimitedItemsLeft: number = 0) { - this._productType = productType.toLowerCase(); - this._productClassId = productClassId; - this._extraParam = extraParam; - this._productCount = productCount; - this._productData = productData; - this._furnitureData = furnitureData; - this._isUniqueLimitedItem = isUniqueLimitedItem; - this._uniqueLimitedItemSeriesSize = uniqueLimitedItemSeriesSize; - this._uniqueLimitedItemsLeft = uniqueLimitedItemsLeft; + this._productType = productType.toLowerCase() + this._productClassId = productClassId + this._extraParam = extraParam + this._productCount = productCount + this._productData = productData + this._furnitureData = furnitureData + this._isUniqueLimitedItem = isUniqueLimitedItem + this._uniqueLimitedItemSeriesSize = uniqueLimitedItemSeriesSize + this._uniqueLimitedItemsLeft = uniqueLimitedItemsLeft } public static stripAddonProducts(products: IProduct[]): IProduct[] { - if(products.length === 1) return products; + if(products.length === 1) return products - return products.filter(product => ((product.productType !== ProductTypeEnum.BADGE) && (product.productType !== ProductTypeEnum.EFFECT) && (product.productClassId !== Product.EFFECT_CLASSID_NINJA_DISAPPEAR))); + return products.filter(product => ((product.productType !== ProductTypeEnum.BADGE) && (product.productType !== ProductTypeEnum.EFFECT) && (product.productClassId !== Product.EFFECT_CLASSID_NINJA_DISAPPEAR))) } public getIconUrl(offer: IPurchasableOffer = null, stuffData: IObjectData = null): string { switch(this._productType) { - case ProductTypeEnum.FLOOR: - return GetRoomEngine().getFurnitureFloorIconUrl(this.productClassId); - case ProductTypeEnum.WALL: { - if(offer && this._furnitureData) + case ProductTypeEnum.FLOOR: + return GetRoomEngine().getFurnitureFloorIconUrl(this.productClassId) + case ProductTypeEnum.WALL: { + if(offer && this._furnitureData) + { + let iconName = "" + + switch(this._furnitureData.className) { - let iconName = ''; - - switch(this._furnitureData.className) - { - case 'floor': - iconName = [ 'th', this._furnitureData.className, offer.product.extraParam ].join('_'); - break; - case 'wallpaper': - iconName = [ 'th', 'wall', offer.product.extraParam ].join('_'); - break; - case 'landscape': - iconName = [ 'th', this._furnitureData.className, (offer.product.extraParam || '').replace('.', '_'), '001' ].join('_'); - break; - } - - if(iconName !== '') - { - const assetUrl = GetConfiguration('catalog.asset.url'); - - return `${ assetUrl }/${ iconName }.png`; - } + case "floor": + iconName = [ "th", this._furnitureData.className, offer.product.extraParam ].join("_") + break + case "wallpaper": + iconName = [ "th", "wall", offer.product.extraParam ].join("_") + break + case "landscape": + iconName = [ "th", this._furnitureData.className, (offer.product.extraParam || "").replace(".", "_"), "001" ].join("_") + break } - return GetRoomEngine().getFurnitureWallIconUrl(this.productClassId, this._extraParam); + if(iconName !== "") + { + const assetUrl = GetConfiguration("catalog.asset.url") + + return `${ assetUrl }/${ iconName }.png` + } } - case ProductTypeEnum.EFFECT: - return GetPixelEffectIcon(this.productClassId); - case ProductTypeEnum.HABBO_CLUB: - return GetSubscriptionProductIcon(this.productClassId); - case ProductTypeEnum.BADGE: - return GetSessionDataManager().getBadgeUrl(this._extraParam); - case ProductTypeEnum.ROBOT: - return null; + + return GetRoomEngine().getFurnitureWallIconUrl(this.productClassId, this._extraParam) + } + case ProductTypeEnum.EFFECT: + return GetPixelEffectIcon(this.productClassId) + case ProductTypeEnum.HABBO_CLUB: + return GetSubscriptionProductIcon(this.productClassId) + case ProductTypeEnum.BADGE: + return GetSessionDataManager().getBadgeUrl(this._extraParam) + case ProductTypeEnum.ROBOT: + return null } - return null; + return null } public get productType(): string { - return this._productType; + return this._productType } public get productClassId(): number { - return this._productClassId; + return this._productClassId } public get extraParam(): string { - return this._extraParam; + return this._extraParam } public set extraParam(extraParam: string) { - this._extraParam = extraParam; + this._extraParam = extraParam } public get productCount(): number { - return this._productCount; + return this._productCount } public get productData(): IProductData { - return this._productData; + return this._productData } public get furnitureData(): IFurnitureData { - return this._furnitureData; + return this._furnitureData } public get isUniqueLimitedItem(): boolean { - return this._isUniqueLimitedItem; + return this._isUniqueLimitedItem } public get uniqueLimitedItemSeriesSize(): number { - return this._uniqueLimitedItemSeriesSize; + return this._uniqueLimitedItemSeriesSize } public get uniqueLimitedItemsLeft(): number { - return this._uniqueLimitedItemsLeft; + return this._uniqueLimitedItemsLeft } public set uniqueLimitedItemsLeft(uniqueLimitedItemsLeft: number) { - this._uniqueLimitedItemsLeft = uniqueLimitedItemsLeft; + this._uniqueLimitedItemsLeft = uniqueLimitedItemsLeft } } diff --git a/src/api/catalog/ProductTypeEnum.ts b/src/api/catalog/ProductTypeEnum.ts index f24908163..b014496a3 100644 --- a/src/api/catalog/ProductTypeEnum.ts +++ b/src/api/catalog/ProductTypeEnum.ts @@ -1,11 +1,11 @@ export class ProductTypeEnum { - public static WALL: string = 'i'; - public static FLOOR: string = 's'; - public static EFFECT: string = 'e'; - public static HABBO_CLUB: string = 'h'; - public static BADGE: string = 'b'; - public static GAME_TOKEN: string = 'GAME_TOKEN'; - public static PET: string = 'p'; - public static ROBOT: string = 'r'; + public static WALL: string = "i" + public static FLOOR: string = "s" + public static EFFECT: string = "e" + public static HABBO_CLUB: string = "h" + public static BADGE: string = "b" + public static GAME_TOKEN: string = "GAME_TOKEN" + public static PET: string = "p" + public static ROBOT: string = "r" } diff --git a/src/api/catalog/RequestedPage.ts b/src/api/catalog/RequestedPage.ts index 8c227309c..318c8e58a 100644 --- a/src/api/catalog/RequestedPage.ts +++ b/src/api/catalog/RequestedPage.ts @@ -1,63 +1,63 @@ export class RequestedPage { - public static REQUEST_TYPE_NONE: number = 0; - public static REQUEST_TYPE_ID: number = 1; - public static REQUEST_TYPE_OFFER: number = 2; - public static REQUEST_TYPE_NAME: number = 3; + public static REQUEST_TYPE_NONE: number = 0 + public static REQUEST_TYPE_ID: number = 1 + public static REQUEST_TYPE_OFFER: number = 2 + public static REQUEST_TYPE_NAME: number = 3 - private _requestType: number; - private _requestById: number; - private _requestedByOfferId: number; - private _requestByName: string; + private _requestType: number + private _requestById: number + private _requestedByOfferId: number + private _requestByName: string constructor() { - this._requestType = RequestedPage.REQUEST_TYPE_NONE; + this._requestType = RequestedPage.REQUEST_TYPE_NONE } public resetRequest():void { - this._requestType = RequestedPage.REQUEST_TYPE_NONE; - this._requestById = -1; - this._requestedByOfferId = -1; - this._requestByName = null; + this._requestType = RequestedPage.REQUEST_TYPE_NONE + this._requestById = -1 + this._requestedByOfferId = -1 + this._requestByName = null } public get requestType(): number { - return this._requestType; + return this._requestType } public get requestById(): number { - return this._requestById; + return this._requestById } public set requestById(id: number) { - this._requestType = RequestedPage.REQUEST_TYPE_ID; - this._requestById = id; + this._requestType = RequestedPage.REQUEST_TYPE_ID + this._requestById = id } public get requestedByOfferId(): number { - return this._requestedByOfferId; + return this._requestedByOfferId } public set requestedByOfferId(offerId: number) { - this._requestType = RequestedPage.REQUEST_TYPE_OFFER; - this._requestedByOfferId = offerId; + this._requestType = RequestedPage.REQUEST_TYPE_OFFER + this._requestedByOfferId = offerId } public get requestByName(): string { - return this._requestByName; + return this._requestByName } public set requestByName(name: string) { - this._requestType = RequestedPage.REQUEST_TYPE_NAME; - this._requestByName = name; + this._requestType = RequestedPage.REQUEST_TYPE_NAME + this._requestByName = name } } diff --git a/src/api/catalog/SearchResult.ts b/src/api/catalog/SearchResult.ts index 419f3cf42..930d3232c 100644 --- a/src/api/catalog/SearchResult.ts +++ b/src/api/catalog/SearchResult.ts @@ -1,5 +1,5 @@ -import { ICatalogNode } from './ICatalogNode'; -import { IPurchasableOffer } from './IPurchasableOffer'; +import { ICatalogNode } from "./ICatalogNode" +import { IPurchasableOffer } from "./IPurchasableOffer" export class SearchResult { diff --git a/src/api/catalog/index.ts b/src/api/catalog/index.ts index 6c5b9e2ea..dcbaf3284 100644 --- a/src/api/catalog/index.ts +++ b/src/api/catalog/index.ts @@ -1,29 +1,29 @@ -export * from './BuilderFurniPlaceableStatus'; -export * from './CatalogNode'; -export * from './CatalogPage'; -export * from './CatalogPageName'; -export * from './CatalogPetPalette'; -export * from './CatalogPurchaseState'; -export * from './CatalogType'; -export * from './CatalogUtilities'; -export * from './FurnitureOffer'; -export * from './GetImageIconUrlForProduct'; -export * from './GiftWrappingConfiguration'; -export * from './ICatalogNode'; -export * from './ICatalogOptions'; -export * from './ICatalogPage'; -export * from './IMarketplaceSearchOptions'; -export * from './IPageLocalization'; -export * from './IProduct'; -export * from './IPurchasableOffer'; -export * from './IPurchaseOptions'; -export * from './MarketplaceOfferData'; -export * from './MarketplaceOfferState'; -export * from './MarketplaceSearchType'; -export * from './Offer'; -export * from './PageLocalization'; -export * from './PlacedObjectPurchaseData'; -export * from './Product'; -export * from './ProductTypeEnum'; -export * from './RequestedPage'; -export * from './SearchResult'; +export * from "./BuilderFurniPlaceableStatus" +export * from "./CatalogNode" +export * from "./CatalogPage" +export * from "./CatalogPageName" +export * from "./CatalogPetPalette" +export * from "./CatalogPurchaseState" +export * from "./CatalogType" +export * from "./CatalogUtilities" +export * from "./FurnitureOffer" +export * from "./GetImageIconUrlForProduct" +export * from "./GiftWrappingConfiguration" +export * from "./ICatalogNode" +export * from "./ICatalogOptions" +export * from "./ICatalogPage" +export * from "./IMarketplaceSearchOptions" +export * from "./IPageLocalization" +export * from "./IProduct" +export * from "./IPurchasableOffer" +export * from "./IPurchaseOptions" +export * from "./MarketplaceOfferData" +export * from "./MarketplaceOfferState" +export * from "./MarketplaceSearchType" +export * from "./Offer" +export * from "./PageLocalization" +export * from "./PlacedObjectPurchaseData" +export * from "./Product" +export * from "./ProductTypeEnum" +export * from "./RequestedPage" +export * from "./SearchResult" diff --git a/src/api/chat-history/ChatEntryType.ts b/src/api/chat-history/ChatEntryType.ts index 045f00ce9..ac5195c95 100644 --- a/src/api/chat-history/ChatEntryType.ts +++ b/src/api/chat-history/ChatEntryType.ts @@ -1,6 +1,6 @@ export class ChatEntryType { - public static TYPE_CHAT = 1; - public static TYPE_ROOM_INFO = 2; - public static TYPE_IM = 3; + public static TYPE_CHAT = 1 + public static TYPE_ROOM_INFO = 2 + public static TYPE_IM = 3 } diff --git a/src/api/chat-history/ChatHistoryCurrentDate.ts b/src/api/chat-history/ChatHistoryCurrentDate.ts index 6947bca4b..6f4f59531 100644 --- a/src/api/chat-history/ChatHistoryCurrentDate.ts +++ b/src/api/chat-history/ChatHistoryCurrentDate.ts @@ -1,6 +1,6 @@ export const ChatHistoryCurrentDate = () => { - const currentTime = new Date(); + const currentTime = new Date() - return `${ currentTime.getHours().toString().padStart(2, '0') }:${ currentTime.getMinutes().toString().padStart(2, '0') }`; + return `${ currentTime.getHours().toString().padStart(2, "0") }:${ currentTime.getMinutes().toString().padStart(2, "0") }` } diff --git a/src/api/chat-history/MessengerHistoryCurrentDate.ts b/src/api/chat-history/MessengerHistoryCurrentDate.ts index 3aeebc503..a4ce2e7da 100644 --- a/src/api/chat-history/MessengerHistoryCurrentDate.ts +++ b/src/api/chat-history/MessengerHistoryCurrentDate.ts @@ -1,6 +1,6 @@ export const MessengerHistoryCurrentDate = (secondsSinceNow: number = 0) => { - const currentTime = secondsSinceNow ? new Date(Date.now() - secondsSinceNow * 1000) : new Date(); + const currentTime = secondsSinceNow ? new Date(Date.now() - secondsSinceNow * 1000) : new Date() - return `${ currentTime.getHours().toString().padStart(2, '0') }:${ currentTime.getMinutes().toString().padStart(2, '0') }`; + return `${ currentTime.getHours().toString().padStart(2, "0") }:${ currentTime.getMinutes().toString().padStart(2, "0") }` } diff --git a/src/api/chat-history/index.ts b/src/api/chat-history/index.ts index a9893744b..9a7e3f457 100644 --- a/src/api/chat-history/index.ts +++ b/src/api/chat-history/index.ts @@ -1,5 +1,5 @@ -export * from './ChatEntryType'; -export * from './ChatHistoryCurrentDate'; -export * from './IChatEntry'; -export * from './IRoomHistoryEntry'; -export * from './MessengerHistoryCurrentDate'; +export * from "./ChatEntryType" +export * from "./ChatHistoryCurrentDate" +export * from "./IChatEntry" +export * from "./IRoomHistoryEntry" +export * from "./MessengerHistoryCurrentDate" diff --git a/src/api/events/DispatchEvent.ts b/src/api/events/DispatchEvent.ts index 79e2f5ce3..632e135eb 100644 --- a/src/api/events/DispatchEvent.ts +++ b/src/api/events/DispatchEvent.ts @@ -1,3 +1,3 @@ -import { IEventDispatcher, NitroEvent } from '@nitrots/nitro-renderer'; +import { IEventDispatcher, NitroEvent } from "@nitrots/nitro-renderer" -export const DispatchEvent = (eventDispatcher: IEventDispatcher, event: NitroEvent) => eventDispatcher.dispatchEvent(event); +export const DispatchEvent = (eventDispatcher: IEventDispatcher, event: NitroEvent) => eventDispatcher.dispatchEvent(event) diff --git a/src/api/events/DispatchMainEvent.ts b/src/api/events/DispatchMainEvent.ts index 385a888e6..0e571a69c 100644 --- a/src/api/events/DispatchMainEvent.ts +++ b/src/api/events/DispatchMainEvent.ts @@ -1,5 +1,5 @@ -import { NitroEvent } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from '../nitro'; -import { DispatchEvent } from './DispatchEvent'; +import { NitroEvent } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "../nitro" +import { DispatchEvent } from "./DispatchEvent" -export const DispatchMainEvent = (event: NitroEvent) => DispatchEvent(GetNitroInstance().events, event); +export const DispatchMainEvent = (event: NitroEvent) => DispatchEvent(GetNitroInstance().events, event) diff --git a/src/api/events/DispatchUiEvent.ts b/src/api/events/DispatchUiEvent.ts index 5200bb4ff..df78521b4 100644 --- a/src/api/events/DispatchUiEvent.ts +++ b/src/api/events/DispatchUiEvent.ts @@ -1,5 +1,5 @@ -import { NitroEvent } from '@nitrots/nitro-renderer'; -import { DispatchEvent } from './DispatchEvent'; -import { UI_EVENT_DISPATCHER } from './UI_EVENT_DISPATCHER'; +import { NitroEvent } from "@nitrots/nitro-renderer" +import { DispatchEvent } from "./DispatchEvent" +import { UI_EVENT_DISPATCHER } from "./UI_EVENT_DISPATCHER" -export const DispatchUiEvent = (event: NitroEvent) => DispatchEvent(UI_EVENT_DISPATCHER, event); +export const DispatchUiEvent = (event: NitroEvent) => DispatchEvent(UI_EVENT_DISPATCHER, event) diff --git a/src/api/events/UI_EVENT_DISPATCHER.ts b/src/api/events/UI_EVENT_DISPATCHER.ts index cb573117d..6720d5b21 100644 --- a/src/api/events/UI_EVENT_DISPATCHER.ts +++ b/src/api/events/UI_EVENT_DISPATCHER.ts @@ -1,3 +1,3 @@ -import { EventDispatcher, IEventDispatcher } from '@nitrots/nitro-renderer'; +import { EventDispatcher, IEventDispatcher } from "@nitrots/nitro-renderer" -export const UI_EVENT_DISPATCHER: IEventDispatcher = new EventDispatcher(); +export const UI_EVENT_DISPATCHER: IEventDispatcher = new EventDispatcher() diff --git a/src/api/events/index.ts b/src/api/events/index.ts index b7c22ee5a..0ef0e6923 100644 --- a/src/api/events/index.ts +++ b/src/api/events/index.ts @@ -1,4 +1,4 @@ -export * from './DispatchEvent'; -export * from './DispatchMainEvent'; -export * from './DispatchUiEvent'; -export * from './UI_EVENT_DISPATCHER'; +export * from "./DispatchEvent" +export * from "./DispatchMainEvent" +export * from "./DispatchUiEvent" +export * from "./UI_EVENT_DISPATCHER" diff --git a/src/api/friends/GetGroupChatData.ts b/src/api/friends/GetGroupChatData.ts index 75df9629b..b0769524b 100644 --- a/src/api/friends/GetGroupChatData.ts +++ b/src/api/friends/GetGroupChatData.ts @@ -1,13 +1,13 @@ -import { IGroupChatData } from './IGroupChatData'; +import { IGroupChatData } from "./IGroupChatData" export const GetGroupChatData = (extraData: string) => { - if(!extraData || !extraData.length) return null; + if(!extraData || !extraData.length) return null - const splitData = extraData.split('/'); - const username = splitData[0]; - const figure = splitData[1]; - const userId = parseInt(splitData[2]); + const splitData = extraData.split("/") + const username = splitData[0] + const figure = splitData[1] + const userId = parseInt(splitData[2]) - return ({ username: username, figure: figure, userId: userId } as IGroupChatData); + return ({ username: username, figure: figure, userId: userId } as IGroupChatData) } diff --git a/src/api/friends/MessengerFriend.ts b/src/api/friends/MessengerFriend.ts index b5cfc8873..dedf8d517 100644 --- a/src/api/friends/MessengerFriend.ts +++ b/src/api/friends/MessengerFriend.ts @@ -1,43 +1,43 @@ -import { FriendParser } from '@nitrots/nitro-renderer'; +import { FriendParser } from "@nitrots/nitro-renderer" export class MessengerFriend { - public static RELATIONSHIP_NONE: number = 0; - public static RELATIONSHIP_HEART: number = 1; - public static RELATIONSHIP_SMILE: number = 2; - public static RELATIONSHIP_BOBBA: number = 3; + public static RELATIONSHIP_NONE: number = 0 + public static RELATIONSHIP_HEART: number = 1 + public static RELATIONSHIP_SMILE: number = 2 + public static RELATIONSHIP_BOBBA: number = 3 - public id: number = -1; - public name: string = null; - public gender: number = 0; - public online: boolean = false; - public followingAllowed: boolean = false; - public figure: string = null; - public categoryId: number = 0; - public motto: string = null; - public realName: string = null; - public lastAccess: string = null; - public persistedMessageUser: boolean = false; - public vipMember: boolean = false; - public pocketHabboUser: boolean = false; - public relationshipStatus: number = -1; - public unread: number = 0; + public id: number = -1 + public name: string = null + public gender: number = 0 + public online: boolean = false + public followingAllowed: boolean = false + public figure: string = null + public categoryId: number = 0 + public motto: string = null + public realName: string = null + public lastAccess: string = null + public persistedMessageUser: boolean = false + public vipMember: boolean = false + public pocketHabboUser: boolean = false + public relationshipStatus: number = -1 + public unread: number = 0 public populate(parser: FriendParser): void { - this.id = parser.id; - this.name = parser.name; - this.gender = parser.gender; - this.online = parser.online; - this.followingAllowed = parser.followingAllowed; - this.figure = parser.figure; - this.categoryId = parser.categoryId; - this.motto = parser.motto; - this.realName = parser.realName; - this.lastAccess = parser.lastAccess; - this.persistedMessageUser = parser.persistedMessageUser; - this.vipMember = parser.vipMember; - this.pocketHabboUser = parser.pocketHabboUser; - this.relationshipStatus = parser.relationshipStatus; + this.id = parser.id + this.name = parser.name + this.gender = parser.gender + this.online = parser.online + this.followingAllowed = parser.followingAllowed + this.figure = parser.figure + this.categoryId = parser.categoryId + this.motto = parser.motto + this.realName = parser.realName + this.lastAccess = parser.lastAccess + this.persistedMessageUser = parser.persistedMessageUser + this.vipMember = parser.vipMember + this.pocketHabboUser = parser.pocketHabboUser + this.relationshipStatus = parser.relationshipStatus } } diff --git a/src/api/friends/MessengerGroupType.ts b/src/api/friends/MessengerGroupType.ts index d46a1b630..123537d44 100644 --- a/src/api/friends/MessengerGroupType.ts +++ b/src/api/friends/MessengerGroupType.ts @@ -1,5 +1,5 @@ export class MessengerGroupType { - public static readonly GROUP_CHAT = 0; - public static readonly PRIVATE_CHAT = 1; + public static readonly GROUP_CHAT = 0 + public static readonly PRIVATE_CHAT = 1 } diff --git a/src/api/friends/MessengerIconState.ts b/src/api/friends/MessengerIconState.ts index 63f8c133c..b3650cb94 100644 --- a/src/api/friends/MessengerIconState.ts +++ b/src/api/friends/MessengerIconState.ts @@ -1,6 +1,6 @@ export class MessengerIconState { - public static HIDDEN: number = 0; - public static SHOW: number = 1; - public static UNREAD: number = 2; + public static HIDDEN: number = 0 + public static SHOW: number = 1 + public static UNREAD: number = 2 } diff --git a/src/api/friends/MessengerRequest.ts b/src/api/friends/MessengerRequest.ts index 89ceec5be..6427ce32e 100644 --- a/src/api/friends/MessengerRequest.ts +++ b/src/api/friends/MessengerRequest.ts @@ -1,41 +1,41 @@ -import { FriendRequestData } from '@nitrots/nitro-renderer'; +import { FriendRequestData } from "@nitrots/nitro-renderer" export class MessengerRequest { - private _id: number; - private _name: string; - private _requesterUserId: number; - private _figureString: string; + private _id: number + private _name: string + private _requesterUserId: number + private _figureString: string public populate(data: FriendRequestData): boolean { - if(!data) return false; + if(!data) return false - this._id = data.requestId; - this._name = data.requesterName; - this._figureString = data.figureString; - this._requesterUserId = data.requesterUserId; + this._id = data.requestId + this._name = data.requesterName + this._figureString = data.figureString + this._requesterUserId = data.requesterUserId - return true; + return true } public get id(): number { - return this._id; + return this._id } public get name(): string { - return this._name; + return this._name } public get requesterUserId(): number { - return this._requesterUserId; + return this._requesterUserId } public get figureString(): string { - return this._figureString; + return this._figureString } } diff --git a/src/api/friends/MessengerSettings.ts b/src/api/friends/MessengerSettings.ts index e0fc8c24f..af711cbf2 100644 --- a/src/api/friends/MessengerSettings.ts +++ b/src/api/friends/MessengerSettings.ts @@ -1,4 +1,4 @@ -import { FriendCategoryData } from '@nitrots/nitro-renderer'; +import { FriendCategoryData } from "@nitrots/nitro-renderer" export class MessengerSettings { diff --git a/src/api/friends/MessengerThread.ts b/src/api/friends/MessengerThread.ts index 405ea3386..7f608ceb4 100644 --- a/src/api/friends/MessengerThread.ts +++ b/src/api/friends/MessengerThread.ts @@ -1,96 +1,96 @@ -import { GetGroupChatData } from './GetGroupChatData'; -import { MessengerFriend } from './MessengerFriend'; -import { MessengerGroupType } from './MessengerGroupType'; -import { MessengerThreadChat } from './MessengerThreadChat'; -import { MessengerThreadChatGroup } from './MessengerThreadChatGroup'; +import { GetGroupChatData } from "./GetGroupChatData" +import { MessengerFriend } from "./MessengerFriend" +import { MessengerGroupType } from "./MessengerGroupType" +import { MessengerThreadChat } from "./MessengerThreadChat" +import { MessengerThreadChatGroup } from "./MessengerThreadChatGroup" export class MessengerThread { - public static MESSAGE_RECEIVED: string = 'MT_MESSAGE_RECEIVED'; - public static THREAD_ID: number = 0; + public static MESSAGE_RECEIVED: string = "MT_MESSAGE_RECEIVED" + public static THREAD_ID: number = 0 - private _threadId: number; - private _participant: MessengerFriend; - private _groups: MessengerThreadChatGroup[]; - private _lastUpdated: Date; - private _unreadCount: number; + private _threadId: number + private _participant: MessengerFriend + private _groups: MessengerThreadChatGroup[] + private _lastUpdated: Date + private _unreadCount: number constructor(participant: MessengerFriend) { - this._threadId = ++MessengerThread.THREAD_ID; - this._participant = participant; - this._groups = []; - this._lastUpdated = new Date(); - this._unreadCount = 0; + this._threadId = ++MessengerThread.THREAD_ID + this._participant = participant + this._groups = [] + this._lastUpdated = new Date() + this._unreadCount = 0 } public addMessage(senderId: number, message: string, secondsSinceSent: number = 0, extraData: string = null, type: number = 0): MessengerThreadChat { - const isGroupChat = (senderId < 0 && extraData); - const userId = isGroupChat ? GetGroupChatData(extraData).userId : senderId; + const isGroupChat = (senderId < 0 && extraData) + const userId = isGroupChat ? GetGroupChatData(extraData).userId : senderId - const group = this.getLastGroup(userId); + const group = this.getLastGroup(userId) - if(!group) return; + if(!group) return - if(isGroupChat) group.type = MessengerGroupType.GROUP_CHAT; + if(isGroupChat) group.type = MessengerGroupType.GROUP_CHAT - const chat = new MessengerThreadChat(senderId, message, secondsSinceSent, extraData, type); + const chat = new MessengerThreadChat(senderId, message, secondsSinceSent, extraData, type) - group.addChat(chat); + group.addChat(chat) - this._lastUpdated = new Date(); + this._lastUpdated = new Date() - this._unreadCount++; + this._unreadCount++ - return chat; + return chat } private getLastGroup(userId: number): MessengerThreadChatGroup { - let group = this._groups[(this._groups.length - 1)]; + let group = this._groups[(this._groups.length - 1)] - if(group && (group.userId === userId)) return group; + if(group && (group.userId === userId)) return group - group = new MessengerThreadChatGroup(userId); + group = new MessengerThreadChatGroup(userId) - this._groups.push(group); + this._groups.push(group) - return group; + return group } public setRead(): void { - this._unreadCount = 0; + this._unreadCount = 0 } public get threadId(): number { - return this._threadId; + return this._threadId } public get participant(): MessengerFriend { - return this._participant; + return this._participant } public get groups(): MessengerThreadChatGroup[] { - return this._groups; + return this._groups } public get lastUpdated(): Date { - return this._lastUpdated; + return this._lastUpdated } public get unreadCount(): number { - return this._unreadCount; + return this._unreadCount } public get unread(): boolean { - return (this._unreadCount > 0); + return (this._unreadCount > 0) } } diff --git a/src/api/friends/MessengerThreadChat.ts b/src/api/friends/MessengerThreadChat.ts index 2927feccb..311ae9096 100644 --- a/src/api/friends/MessengerThreadChat.ts +++ b/src/api/friends/MessengerThreadChat.ts @@ -1,54 +1,54 @@ export class MessengerThreadChat { - public static CHAT: number = 0; - public static ROOM_INVITE: number = 1; - public static STATUS_NOTIFICATION: number = 2; - public static SECURITY_NOTIFICATION: number = 3; - - private _type: number; - private _senderId: number; - private _message: string; - private _secondsSinceSent: number; - private _extraData: string; - private _date: Date; + public static CHAT: number = 0 + public static ROOM_INVITE: number = 1 + public static STATUS_NOTIFICATION: number = 2 + public static SECURITY_NOTIFICATION: number = 3 + + private _type: number + private _senderId: number + private _message: string + private _secondsSinceSent: number + private _extraData: string + private _date: Date constructor(senderId: number, message: string, secondsSinceSent: number = 0, extraData: string = null, type: number = 0) { - this._type = type; - this._senderId = senderId; - this._message = message; - this._secondsSinceSent = secondsSinceSent; - this._extraData = extraData; - this._date = new Date(); + this._type = type + this._senderId = senderId + this._message = message + this._secondsSinceSent = secondsSinceSent + this._extraData = extraData + this._date = new Date() } public get type(): number { - return this._type; + return this._type } public get senderId(): number { - return this._senderId; + return this._senderId } public get message(): string { - return this._message; + return this._message } public get secondsSinceSent(): number { - return this._secondsSinceSent; + return this._secondsSinceSent } public get extraData(): string { - return this._extraData; + return this._extraData } public get date(): Date { - return this._date; + return this._date } } diff --git a/src/api/friends/MessengerThreadChatGroup.ts b/src/api/friends/MessengerThreadChatGroup.ts index 1668aedce..406fb3f55 100644 --- a/src/api/friends/MessengerThreadChatGroup.ts +++ b/src/api/friends/MessengerThreadChatGroup.ts @@ -1,41 +1,41 @@ -import { MessengerGroupType } from './MessengerGroupType'; -import { MessengerThreadChat } from './MessengerThreadChat'; +import { MessengerGroupType } from "./MessengerGroupType" +import { MessengerThreadChat } from "./MessengerThreadChat" export class MessengerThreadChatGroup { - private _userId: number; - private _chats: MessengerThreadChat[]; - private _type: number; + private _userId: number + private _chats: MessengerThreadChat[] + private _type: number constructor(userId: number, type = MessengerGroupType.PRIVATE_CHAT) { - this._userId = userId; - this._chats = []; - this._type = type; + this._userId = userId + this._chats = [] + this._type = type } public addChat(message: MessengerThreadChat): void { - this._chats.push(message); + this._chats.push(message) } public get userId(): number { - return this._userId; + return this._userId } public get chats(): MessengerThreadChat[] { - return this._chats; + return this._chats } public get type(): number { - return this._type; + return this._type } public set type(type: number) { - this._type = type; + this._type = type } } diff --git a/src/api/friends/OpenMessengerChat.ts b/src/api/friends/OpenMessengerChat.ts index 9270981c7..f7569d855 100644 --- a/src/api/friends/OpenMessengerChat.ts +++ b/src/api/friends/OpenMessengerChat.ts @@ -1,7 +1,7 @@ -import { CreateLinkEvent } from '..'; +import { CreateLinkEvent } from ".." export function OpenMessengerChat(friendId: number = 0): void { - if(friendId === 0) CreateLinkEvent('friends-messenger/toggle'); - else CreateLinkEvent(`friends-messenger/${ friendId }`); + if(friendId === 0) CreateLinkEvent("friends-messenger/toggle") + else CreateLinkEvent(`friends-messenger/${ friendId }`) } diff --git a/src/api/friends/index.ts b/src/api/friends/index.ts index ce1ed60a0..b09405921 100644 --- a/src/api/friends/index.ts +++ b/src/api/friends/index.ts @@ -1,11 +1,11 @@ -export * from './GetGroupChatData'; -export * from './IGroupChatData'; -export * from './MessengerFriend'; -export * from './MessengerGroupType'; -export * from './MessengerIconState'; -export * from './MessengerRequest'; -export * from './MessengerSettings'; -export * from './MessengerThread'; -export * from './MessengerThreadChat'; -export * from './MessengerThreadChatGroup'; -export * from './OpenMessengerChat'; +export * from "./GetGroupChatData" +export * from "./IGroupChatData" +export * from "./MessengerFriend" +export * from "./MessengerGroupType" +export * from "./MessengerIconState" +export * from "./MessengerRequest" +export * from "./MessengerSettings" +export * from "./MessengerThread" +export * from "./MessengerThreadChat" +export * from "./MessengerThreadChatGroup" +export * from "./OpenMessengerChat" diff --git a/src/api/groups/GetGroupInformation.ts b/src/api/groups/GetGroupInformation.ts index 6b4a48cb5..555b790d9 100644 --- a/src/api/groups/GetGroupInformation.ts +++ b/src/api/groups/GetGroupInformation.ts @@ -1,7 +1,7 @@ -import { GroupInformationComposer } from '@nitrots/nitro-renderer'; -import { SendMessageComposer } from '..'; +import { GroupInformationComposer } from "@nitrots/nitro-renderer" +import { SendMessageComposer } from ".." export function GetGroupInformation(groupId: number): void { - SendMessageComposer(new GroupInformationComposer(groupId, true)); + SendMessageComposer(new GroupInformationComposer(groupId, true)) } diff --git a/src/api/groups/GetGroupManager.ts b/src/api/groups/GetGroupManager.ts index d372ace29..249b14803 100644 --- a/src/api/groups/GetGroupManager.ts +++ b/src/api/groups/GetGroupManager.ts @@ -1,6 +1,6 @@ -import { CreateLinkEvent } from '..'; +import { CreateLinkEvent } from ".." export function GetGroupManager(groupId: number): void { - CreateLinkEvent(`groups/manage/${ groupId }`); + CreateLinkEvent(`groups/manage/${ groupId }`) } diff --git a/src/api/groups/GetGroupMembers.ts b/src/api/groups/GetGroupMembers.ts index 27fb6d574..30f286fcb 100644 --- a/src/api/groups/GetGroupMembers.ts +++ b/src/api/groups/GetGroupMembers.ts @@ -1,7 +1,7 @@ -import { CreateLinkEvent } from '..'; +import { CreateLinkEvent } from ".." export function GetGroupMembers(groupId: number, levelId?: number): void { - if(!levelId) CreateLinkEvent(`group-members/${ groupId }`); - else CreateLinkEvent(`group-members/${ groupId }/${ levelId }`); + if(!levelId) CreateLinkEvent(`group-members/${ groupId }`) + else CreateLinkEvent(`group-members/${ groupId }/${ levelId }`) } diff --git a/src/api/groups/GroupBadgePart.ts b/src/api/groups/GroupBadgePart.ts index 3b74875f4..72b1895f0 100644 --- a/src/api/groups/GroupBadgePart.ts +++ b/src/api/groups/GroupBadgePart.ts @@ -1,31 +1,31 @@ export class GroupBadgePart { - public static BASE: string = 'b'; - public static SYMBOL: string = 's'; + public static BASE: string = "b" + public static SYMBOL: string = "s" - public type: string; - public key: number; - public color: number; - public position: number; + public type: string + public key: number + public color: number + public position: number constructor(type: string, key?: number, color?: number, position?: number) { - this.type = type; - this.key = key ? key : 0; - this.color = color ? color : 0; - this.position = position ? position : 4; + this.type = type + this.key = key ? key : 0 + this.color = color ? color : 0 + this.position = position ? position : 4 } public get code(): string { - if((this.key === 0) && (this.type !== GroupBadgePart.BASE)) return null; + if((this.key === 0) && (this.type !== GroupBadgePart.BASE)) return null - return GroupBadgePart.getCode(this.type, this.key, this.color, this.position); + return GroupBadgePart.getCode(this.type, this.key, this.color, this.position) } public static getCode(type: string, key: number, color: number, position: number): string { - return type + (key < 10 ? '0' : '') + key + (color < 10 ? '0' : '') + color + position; + return type + (key < 10 ? "0" : "") + key + (color < 10 ? "0" : "") + color + position } } diff --git a/src/api/groups/GroupMembershipType.ts b/src/api/groups/GroupMembershipType.ts index 532c83641..2566c27cc 100644 --- a/src/api/groups/GroupMembershipType.ts +++ b/src/api/groups/GroupMembershipType.ts @@ -1,6 +1,6 @@ export class GroupMembershipType { - public static NOT_MEMBER: number = 0; - public static MEMBER: number = 1; - public static REQUEST_PENDING: number = 2; + public static NOT_MEMBER: number = 0 + public static MEMBER: number = 1 + public static REQUEST_PENDING: number = 2 } diff --git a/src/api/groups/GroupType.ts b/src/api/groups/GroupType.ts index 58ae72c63..9e29f6f44 100644 --- a/src/api/groups/GroupType.ts +++ b/src/api/groups/GroupType.ts @@ -1,6 +1,6 @@ export class GroupType { - public static REGULAR: number = 0; - public static EXCLUSIVE: number = 1; - public static PRIVATE: number = 2; + public static REGULAR: number = 0 + public static EXCLUSIVE: number = 1 + public static PRIVATE: number = 2 } diff --git a/src/api/groups/IGroupData.ts b/src/api/groups/IGroupData.ts index bb65b4912..1b47a2f33 100644 --- a/src/api/groups/IGroupData.ts +++ b/src/api/groups/IGroupData.ts @@ -1,4 +1,4 @@ -import { GroupBadgePart } from './GroupBadgePart'; +import { GroupBadgePart } from "./GroupBadgePart" export interface IGroupData { diff --git a/src/api/groups/ToggleFavoriteGroup.ts b/src/api/groups/ToggleFavoriteGroup.ts index a4b929c11..88403343b 100644 --- a/src/api/groups/ToggleFavoriteGroup.ts +++ b/src/api/groups/ToggleFavoriteGroup.ts @@ -1,7 +1,7 @@ -import { GroupFavoriteComposer, GroupUnfavoriteComposer, HabboGroupEntryData } from '@nitrots/nitro-renderer'; -import { SendMessageComposer } from '..'; +import { GroupFavoriteComposer, GroupUnfavoriteComposer, HabboGroupEntryData } from "@nitrots/nitro-renderer" +import { SendMessageComposer } from ".." export const ToggleFavoriteGroup = (group: HabboGroupEntryData) => { - SendMessageComposer(group.favourite ? new GroupUnfavoriteComposer(group.groupId) : new GroupFavoriteComposer(group.groupId)); + SendMessageComposer(group.favourite ? new GroupUnfavoriteComposer(group.groupId) : new GroupFavoriteComposer(group.groupId)) } diff --git a/src/api/groups/TryJoinGroup.ts b/src/api/groups/TryJoinGroup.ts index 4fbbcde6b..8169e4f67 100644 --- a/src/api/groups/TryJoinGroup.ts +++ b/src/api/groups/TryJoinGroup.ts @@ -1,4 +1,4 @@ -import { GroupJoinComposer } from '@nitrots/nitro-renderer'; -import { SendMessageComposer } from '..'; +import { GroupJoinComposer } from "@nitrots/nitro-renderer" +import { SendMessageComposer } from ".." -export const TryJoinGroup = (groupId: number) => SendMessageComposer(new GroupJoinComposer(groupId)); +export const TryJoinGroup = (groupId: number) => SendMessageComposer(new GroupJoinComposer(groupId)) diff --git a/src/api/groups/index.ts b/src/api/groups/index.ts index 4842948b3..e7fde4282 100644 --- a/src/api/groups/index.ts +++ b/src/api/groups/index.ts @@ -1,10 +1,10 @@ -export * from './GetGroupInformation'; -export * from './GetGroupManager'; -export * from './GetGroupMembers'; -export * from './GroupBadgePart'; -export * from './GroupMembershipType'; -export * from './GroupType'; -export * from './IGroupCustomize'; -export * from './IGroupData'; -export * from './ToggleFavoriteGroup'; -export * from './TryJoinGroup'; +export * from "./GetGroupInformation" +export * from "./GetGroupManager" +export * from "./GetGroupMembers" +export * from "./GroupBadgePart" +export * from "./GroupMembershipType" +export * from "./GroupType" +export * from "./IGroupCustomize" +export * from "./IGroupData" +export * from "./ToggleFavoriteGroup" +export * from "./TryJoinGroup" diff --git a/src/api/guide-tool/GuideSessionState.ts b/src/api/guide-tool/GuideSessionState.ts index c5e24f375..34c98874e 100644 --- a/src/api/guide-tool/GuideSessionState.ts +++ b/src/api/guide-tool/GuideSessionState.ts @@ -1,23 +1,23 @@ export class GuideSessionState { - public static readonly NONE: string = 'NONE'; - public static readonly ERROR: string = 'ERROR'; - public static readonly REJECTED: string = 'REJECTED'; - public static readonly USER_CREATE: string = 'USER_CREATE'; - public static readonly USER_PENDING: string = 'USER_PENDING'; - public static readonly USER_ONGOING: string = 'USER_ONGOING'; - public static readonly USER_FEEDBACK: string = 'USER_FEEDBACK'; - public static readonly USER_NO_HELPERS: string = 'USER_NO_HELPERS'; - public static readonly USER_SOMETHING_WRONG: string = 'USER_SOMETHING_WRONG'; - public static readonly USER_THANKS: string = 'USER_THANKS'; - public static readonly USER_GUIDE_DISCONNECTED: string = 'USER_GUIDE_DISCONNECTED'; - public static readonly GUIDE_TOOL_MENU: string = 'GUIDE_TOOL_MENU'; - public static readonly GUIDE_ACCEPT: string = 'GUIDE_ACCEPT'; - public static readonly GUIDE_ONGOING: string = 'GUIDE_ONGOING'; - public static readonly GUIDE_CLOSED: string = 'GUIDE_CLOSED'; - public static readonly GUARDIAN_CHAT_REVIEW_ACCEPT: string = 'GUARDIAN_CHAT_REVIEW_ACCEPT'; - public static readonly GUARDIAN_CHAT_REVIEW_WAIT_FOR_VOTERS: string = 'GUARDIAN_CHAT_REVIEW_WAIT_FOR_VOTERS'; - public static readonly GUARDIAN_CHAT_REVIEW_VOTE: string = 'GUARDIAN_CHAT_REVIEW_VOTE'; - public static readonly GUARDIAN_CHAT_REVIEW_WAIT_FOR_RESULTS: string = 'GUARDIAN_CHAT_REVIEW_WAIT_FOR_RESULTS'; - public static readonly GUARDIAN_CHAT_REVIEW_RESULTS: string = 'GUARDIAN_CHAT_REVIEW_RESULTS'; + public static readonly NONE: string = "NONE" + public static readonly ERROR: string = "ERROR" + public static readonly REJECTED: string = "REJECTED" + public static readonly USER_CREATE: string = "USER_CREATE" + public static readonly USER_PENDING: string = "USER_PENDING" + public static readonly USER_ONGOING: string = "USER_ONGOING" + public static readonly USER_FEEDBACK: string = "USER_FEEDBACK" + public static readonly USER_NO_HELPERS: string = "USER_NO_HELPERS" + public static readonly USER_SOMETHING_WRONG: string = "USER_SOMETHING_WRONG" + public static readonly USER_THANKS: string = "USER_THANKS" + public static readonly USER_GUIDE_DISCONNECTED: string = "USER_GUIDE_DISCONNECTED" + public static readonly GUIDE_TOOL_MENU: string = "GUIDE_TOOL_MENU" + public static readonly GUIDE_ACCEPT: string = "GUIDE_ACCEPT" + public static readonly GUIDE_ONGOING: string = "GUIDE_ONGOING" + public static readonly GUIDE_CLOSED: string = "GUIDE_CLOSED" + public static readonly GUARDIAN_CHAT_REVIEW_ACCEPT: string = "GUARDIAN_CHAT_REVIEW_ACCEPT" + public static readonly GUARDIAN_CHAT_REVIEW_WAIT_FOR_VOTERS: string = "GUARDIAN_CHAT_REVIEW_WAIT_FOR_VOTERS" + public static readonly GUARDIAN_CHAT_REVIEW_VOTE: string = "GUARDIAN_CHAT_REVIEW_VOTE" + public static readonly GUARDIAN_CHAT_REVIEW_WAIT_FOR_RESULTS: string = "GUARDIAN_CHAT_REVIEW_WAIT_FOR_RESULTS" + public static readonly GUARDIAN_CHAT_REVIEW_RESULTS: string = "GUARDIAN_CHAT_REVIEW_RESULTS" } diff --git a/src/api/guide-tool/GuideToolMessage.ts b/src/api/guide-tool/GuideToolMessage.ts index 381072667..333c2326e 100644 --- a/src/api/guide-tool/GuideToolMessage.ts +++ b/src/api/guide-tool/GuideToolMessage.ts @@ -1,21 +1,21 @@ export class GuideToolMessage { - private _message: string; - private _roomId: number; + private _message: string + private _roomId: number constructor(message: string, roomId?: number) { - this._message = message; - this._roomId = roomId; + this._message = message + this._roomId = roomId } public get message(): string { - return this._message; + return this._message } public get roomId(): number { - return this._roomId; + return this._roomId } } diff --git a/src/api/guide-tool/GuideToolMessageGroup.ts b/src/api/guide-tool/GuideToolMessageGroup.ts index bf03c9b9e..0f3d7e1fb 100644 --- a/src/api/guide-tool/GuideToolMessageGroup.ts +++ b/src/api/guide-tool/GuideToolMessageGroup.ts @@ -1,28 +1,28 @@ -import { GuideToolMessage } from './GuideToolMessage'; +import { GuideToolMessage } from "./GuideToolMessage" export class GuideToolMessageGroup { - private _userId: number; - private _messages: GuideToolMessage[]; + private _userId: number + private _messages: GuideToolMessage[] constructor(userId: number) { - this._userId = userId; - this._messages = []; + this._userId = userId + this._messages = [] } public addChat(message: GuideToolMessage): void { - this._messages.push(message); + this._messages.push(message) } public get userId(): number { - return this._userId; + return this._userId } public get messages(): GuideToolMessage[] { - return this._messages; + return this._messages } } diff --git a/src/api/guide-tool/index.ts b/src/api/guide-tool/index.ts index 1400adc9b..873ba6a65 100644 --- a/src/api/guide-tool/index.ts +++ b/src/api/guide-tool/index.ts @@ -1,3 +1,3 @@ -export * from './GuideSessionState'; -export * from './GuideToolMessage'; -export * from './GuideToolMessageGroup'; +export * from "./GuideSessionState" +export * from "./GuideToolMessage" +export * from "./GuideToolMessageGroup" diff --git a/src/api/hc-center/ClubStatus.ts b/src/api/hc-center/ClubStatus.ts index 8200b1488..72f8930b3 100644 --- a/src/api/hc-center/ClubStatus.ts +++ b/src/api/hc-center/ClubStatus.ts @@ -1,6 +1,6 @@ export class ClubStatus { - public static ACTIVE: string = 'active'; - public static NONE: string = 'none'; - public static EXPIRED: string = 'expired'; + public static ACTIVE: string = "active" + public static NONE: string = "none" + public static EXPIRED: string = "expired" } diff --git a/src/api/hc-center/GetClubBadge.ts b/src/api/hc-center/GetClubBadge.ts index 6b779e0fa..b2ecde84f 100644 --- a/src/api/hc-center/GetClubBadge.ts +++ b/src/api/hc-center/GetClubBadge.ts @@ -1,11 +1,11 @@ -const DEFAULT_BADGE: string = 'HC1'; -const BADGES: string[] = [ 'ACH_VipHC1', 'ACH_VipHC2', 'ACH_VipHC3', 'ACH_VipHC4', 'ACH_VipHC5', 'HC1', 'HC2', 'HC3', 'HC4', 'HC5' ]; +const DEFAULT_BADGE: string = "HC1" +const BADGES: string[] = [ "ACH_VipHC1", "ACH_VipHC2", "ACH_VipHC3", "ACH_VipHC4", "ACH_VipHC5", "HC1", "HC2", "HC3", "HC4", "HC5" ] export const GetClubBadge = (badgeCodes: string[]) => { - let badgeCode: string = null; + let badgeCode: string = null - BADGES.forEach(badge => ((badgeCodes.indexOf(badge) > -1) && (badgeCode = badge))); + BADGES.forEach(badge => ((badgeCodes.indexOf(badge) > -1) && (badgeCode = badge))) - return (badgeCode || DEFAULT_BADGE); + return (badgeCode || DEFAULT_BADGE) } diff --git a/src/api/hc-center/index.ts b/src/api/hc-center/index.ts index cee8f692d..948b03afc 100644 --- a/src/api/hc-center/index.ts +++ b/src/api/hc-center/index.ts @@ -1,2 +1,2 @@ -export * from './ClubStatus'; -export * from './GetClubBadge'; +export * from "./ClubStatus" +export * from "./GetClubBadge" diff --git a/src/api/help/CallForHelpResult.ts b/src/api/help/CallForHelpResult.ts index 37e7ea1b7..81f8e321a 100644 --- a/src/api/help/CallForHelpResult.ts +++ b/src/api/help/CallForHelpResult.ts @@ -1,5 +1,5 @@ export class CallForHelpResult { - public static readonly TOO_MANY_PENDING_CALLS_CODE = 1; - public static readonly HAS_ABUSIVE_CALL_CODE = 2; + public static readonly TOO_MANY_PENDING_CALLS_CODE = 1 + public static readonly HAS_ABUSIVE_CALL_CODE = 2 } diff --git a/src/api/help/GetCloseReasonKey.ts b/src/api/help/GetCloseReasonKey.ts index 520d14fd4..a1d0e6cf6 100644 --- a/src/api/help/GetCloseReasonKey.ts +++ b/src/api/help/GetCloseReasonKey.ts @@ -1,8 +1,8 @@ export const GetCloseReasonKey = (code: number) => { - if(code === 1) return 'useless'; + if(code === 1) return "useless" - if(code === 2) return 'abusive'; + if(code === 2) return "abusive" - return 'resolved'; + return "resolved" } diff --git a/src/api/help/IHelpReport.ts b/src/api/help/IHelpReport.ts index 861170728..d73e0fc35 100644 --- a/src/api/help/IHelpReport.ts +++ b/src/api/help/IHelpReport.ts @@ -1,4 +1,4 @@ -import { IChatEntry } from '../chat-history'; +import { IChatEntry } from "../chat-history" export interface IHelpReport { diff --git a/src/api/help/IReportedUser.ts b/src/api/help/IReportedUser.ts index 90a3887eb..af5c73d3c 100644 --- a/src/api/help/IReportedUser.ts +++ b/src/api/help/IReportedUser.ts @@ -2,4 +2,5 @@ export interface IReportedUser { id: number; username: string; + imageUrl: string; } diff --git a/src/api/help/ReportState.ts b/src/api/help/ReportState.ts index ae3a3bd3b..d6b1318a0 100644 --- a/src/api/help/ReportState.ts +++ b/src/api/help/ReportState.ts @@ -1,8 +1,9 @@ export class ReportState { - public static readonly SELECT_USER = 0; - public static readonly SELECT_CHATS = 1; - public static readonly SELECT_TOPICS = 2; - public static readonly INPUT_REPORT_MESSAGE = 3; - public static readonly REPORT_SUMMARY = 4; + public static readonly SELECT_USER = 0 + public static readonly SELECT_CHATS = 1 + public static readonly SELECT_TOPICS = 2 + public static readonly INPUT_REPORT_MESSAGE = 3 + public static readonly REPORT_SUMMARY = 4 + public static readonly THANKS = 5 } diff --git a/src/api/help/ReportType.ts b/src/api/help/ReportType.ts index 24eb7aecf..be7896545 100644 --- a/src/api/help/ReportType.ts +++ b/src/api/help/ReportType.ts @@ -1,11 +1,11 @@ export class ReportType { - public static readonly EMERGENCY = 1; - public static readonly GUIDE = 2; - public static readonly IM = 3; - public static readonly ROOM = 4; - public static readonly BULLY = 6; - public static readonly THREAD = 7; - public static readonly MESSAGE = 8; - public static readonly PHOTO = 9; + public static readonly EMERGENCY = 1 + public static readonly GUIDE = 2 + public static readonly IM = 3 + public static readonly ROOM = 4 + public static readonly BULLY = 6 + public static readonly THREAD = 7 + public static readonly MESSAGE = 8 + public static readonly PHOTO = 9 } diff --git a/src/api/help/index.ts b/src/api/help/index.ts index 6fa204550..7242d9326 100644 --- a/src/api/help/index.ts +++ b/src/api/help/index.ts @@ -1,6 +1,6 @@ -export * from './CallForHelpResult'; -export * from './GetCloseReasonKey'; -export * from './IHelpReport'; -export * from './IReportedUser'; -export * from './ReportState'; -export * from './ReportType'; +export * from "./CallForHelpResult" +export * from "./GetCloseReasonKey" +export * from "./IHelpReport" +export * from "./IReportedUser" +export * from "./ReportState" +export * from "./ReportType" diff --git a/src/api/index.ts b/src/api/index.ts index af964444c..e05c1e015 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,29 +1,29 @@ -export * from './achievements'; -export * from './avatar'; -export * from './camera'; -export * from './campaign'; -export * from './catalog'; -export * from './chat-history'; -export * from './events'; -export * from './friends'; -export * from './GetRendererVersion'; -export * from './GetUIVersion'; -export * from './groups'; -export * from './guide-tool'; -export * from './hc-center'; -export * from './help'; -export * from './inventory'; -export * from './mod-tools'; -export * from './navigator'; -export * from './nitro'; -export * from './nitro/avatar'; -export * from './nitro/camera'; -export * from './nitro/core'; -export * from './nitro/room'; -export * from './nitro/session'; -export * from './notification'; -export * from './purse'; -export * from './room'; -export * from './user'; -export * from './utils'; -export * from './wired'; +export * from "./achievements" +export * from "./avatar" +export * from "./camera" +export * from "./campaign" +export * from "./catalog" +export * from "./chat-history" +export * from "./events" +export * from "./friends" +export * from "./GetRendererVersion" +export * from "./GetUIVersion" +export * from "./groups" +export * from "./guide-tool" +export * from "./hc-center" +export * from "./help" +export * from "./inventory" +export * from "./mod-tools" +export * from "./navigator" +export * from "./nitro" +export * from "./nitro/avatar" +export * from "./nitro/camera" +export * from "./nitro/core" +export * from "./nitro/room" +export * from "./nitro/session" +export * from "./notification" +export * from "./purse" +export * from "./room" +export * from "./user" +export * from "./utils" +export * from "./wired" diff --git a/src/api/inventory/FurniCategory.ts b/src/api/inventory/FurniCategory.ts index 65289472c..3efd945d8 100644 --- a/src/api/inventory/FurniCategory.ts +++ b/src/api/inventory/FurniCategory.ts @@ -1,26 +1,26 @@ export class FurniCategory { - public static DEFAULT: number = 1; - public static WALL_PAPER: number = 2; - public static FLOOR: number = 3; - public static LANDSCAPE: number = 4; - public static POST_IT: number = 5; - public static POSTER: number = 6; - public static SOUND_SET: number = 7; - public static TRAX_SONG: number = 8; - public static PRESENT: number = 9; - public static ECOTRON_BOX: number = 10; - public static TROPHY: number = 11; - public static CREDIT_FURNI: number = 12; - public static PET_SHAMPOO: number = 13; - public static PET_CUSTOM_PART: number = 14; - public static PET_CUSTOM_PART_SHAMPOO: number = 15; - public static PET_SADDLE: number = 16; - public static GUILD_FURNI: number = 17; - public static GAME_FURNI: number = 18; - public static MONSTERPLANT_SEED: number = 19; - public static MONSTERPLANT_REVIVAL: number = 20; - public static MONSTERPLANT_REBREED: number = 21; - public static MONSTERPLANT_FERTILIZE: number = 22; - public static FIGURE_PURCHASABLE_SET: number = 23; + public static DEFAULT: number = 1 + public static WALL_PAPER: number = 2 + public static FLOOR: number = 3 + public static LANDSCAPE: number = 4 + public static POST_IT: number = 5 + public static POSTER: number = 6 + public static SOUND_SET: number = 7 + public static TRAX_SONG: number = 8 + public static PRESENT: number = 9 + public static ECOTRON_BOX: number = 10 + public static TROPHY: number = 11 + public static CREDIT_FURNI: number = 12 + public static PET_SHAMPOO: number = 13 + public static PET_CUSTOM_PART: number = 14 + public static PET_CUSTOM_PART_SHAMPOO: number = 15 + public static PET_SADDLE: number = 16 + public static GUILD_FURNI: number = 17 + public static GAME_FURNI: number = 18 + public static MONSTERPLANT_SEED: number = 19 + public static MONSTERPLANT_REVIVAL: number = 20 + public static MONSTERPLANT_REBREED: number = 21 + public static MONSTERPLANT_FERTILIZE: number = 22 + public static FIGURE_PURCHASABLE_SET: number = 23 } diff --git a/src/api/inventory/FurnitureItem.ts b/src/api/inventory/FurnitureItem.ts index f5f2f0fa1..9e3eefb85 100644 --- a/src/api/inventory/FurnitureItem.ts +++ b/src/api/inventory/FurnitureItem.ts @@ -1,245 +1,245 @@ -import { GetTickerTime, IFurnitureItemData, IObjectData } from '@nitrots/nitro-renderer'; -import { IFurnitureItem } from './IFurnitureItem'; +import { GetTickerTime, IFurnitureItemData, IObjectData } from "@nitrots/nitro-renderer" +import { IFurnitureItem } from "./IFurnitureItem" export class FurnitureItem implements IFurnitureItem { - private _expirationTimeStamp: number; - private _isWallItem: boolean; - private _songId: number; - private _locked: boolean; - private _id: number; - private _ref: number; - private _category: number; - private _type: number; - private _stuffData: IObjectData; - private _extra: number; - private _recyclable: boolean; - private _tradeable: boolean; - private _groupable: boolean; - private _sellable: boolean; - private _secondsToExpiration: number; - private _hasRentPeriodStarted: boolean; - private _creationDay: number; - private _creationMonth: number; - private _creationYear: number; - private _slotId: string; - private _isRented: boolean; - private _flatId: number; + private _expirationTimeStamp: number + private _isWallItem: boolean + private _songId: number + private _locked: boolean + private _id: number + private _ref: number + private _category: number + private _type: number + private _stuffData: IObjectData + private _extra: number + private _recyclable: boolean + private _tradeable: boolean + private _groupable: boolean + private _sellable: boolean + private _secondsToExpiration: number + private _hasRentPeriodStarted: boolean + private _creationDay: number + private _creationMonth: number + private _creationYear: number + private _slotId: string + private _isRented: boolean + private _flatId: number constructor(parser: IFurnitureItemData) { - if(!parser) return; + if(!parser) return - this._locked = false; - this._id = parser.itemId; - this._type = parser.spriteId; - this._ref = parser.ref; - this._category = parser.category; - this._groupable = ((parser.isGroupable) && (!(parser.rentable))); - this._tradeable = parser.tradable; - this._recyclable = parser.isRecycleable; - this._sellable = parser.sellable; - this._stuffData = parser.stuffData; - this._extra = parser.extra; - this._secondsToExpiration = parser.secondsToExpiration; - this._expirationTimeStamp = parser.expirationTimeStamp; - this._hasRentPeriodStarted = parser.hasRentPeriodStarted; - this._creationDay = parser.creationDay; - this._creationMonth = parser.creationMonth; - this._creationYear = parser.creationYear; - this._slotId = parser.slotId; - this._songId = parser.songId; - this._flatId = parser.flatId; - this._isRented = parser.rentable; - this._isWallItem = parser.isWallItem; + this._locked = false + this._id = parser.itemId + this._type = parser.spriteId + this._ref = parser.ref + this._category = parser.category + this._groupable = ((parser.isGroupable) && (!(parser.rentable))) + this._tradeable = parser.tradable + this._recyclable = parser.isRecycleable + this._sellable = parser.sellable + this._stuffData = parser.stuffData + this._extra = parser.extra + this._secondsToExpiration = parser.secondsToExpiration + this._expirationTimeStamp = parser.expirationTimeStamp + this._hasRentPeriodStarted = parser.hasRentPeriodStarted + this._creationDay = parser.creationDay + this._creationMonth = parser.creationMonth + this._creationYear = parser.creationYear + this._slotId = parser.slotId + this._songId = parser.songId + this._flatId = parser.flatId + this._isRented = parser.rentable + this._isWallItem = parser.isWallItem } public get rentable(): boolean { - return this._isRented; + return this._isRented } public get id(): number { - return this._id; + return this._id } public get ref(): number { - return this._ref; + return this._ref } public get category(): number { - return this._category; + return this._category } public get type(): number { - return this._type; + return this._type } public get stuffData(): IObjectData { - return this._stuffData; + return this._stuffData } public set stuffData(k: IObjectData) { - this._stuffData = k; + this._stuffData = k } public get extra(): number { - return this._extra; + return this._extra } public get recyclable(): boolean { - return this._recyclable; + return this._recyclable } public get isTradable(): boolean { - return this._tradeable; + return this._tradeable } public get isGroupable(): boolean { - return this._groupable; + return this._groupable } public get sellable(): boolean { - return this._sellable; + return this._sellable } public get secondsToExpiration(): number { - if(this._secondsToExpiration === -1) return -1; + if(this._secondsToExpiration === -1) return -1 - let time = -1; + let time = -1 if(this._hasRentPeriodStarted) { - time = (this._secondsToExpiration - ((GetTickerTime() - this._expirationTimeStamp) / 1000)); + time = (this._secondsToExpiration - ((GetTickerTime() - this._expirationTimeStamp) / 1000)) - if(time < 0) time = 0; + if(time < 0) time = 0 } else { - time = this._secondsToExpiration; + time = this._secondsToExpiration } - return time; + return time } public get creationDay(): number { - return this._creationDay; + return this._creationDay } public get creationMonth(): number { - return this._creationMonth; + return this._creationMonth } public get creationYear(): number { - return this._creationYear; + return this._creationYear } public get slotId(): string { - return this._slotId; + return this._slotId } public get songId(): number { - return this._songId; + return this._songId } public get locked(): boolean { - return this._locked; + return this._locked } public set locked(k: boolean) { - this._locked = k; + this._locked = k } public get flatId(): number { - return this._flatId; + return this._flatId } public get isWallItem(): boolean { - return this._isWallItem; + return this._isWallItem } public get hasRentPeriodStarted(): boolean { - return this._hasRentPeriodStarted; + return this._hasRentPeriodStarted } public get expirationTimeStamp(): number { - return this._expirationTimeStamp; + return this._expirationTimeStamp } public update(parser: IFurnitureItemData): void { - this._type = parser.spriteId; - this._ref = parser.ref; - this._category = parser.category; - this._groupable = (parser.isGroupable && !parser.rentable); - this._tradeable = parser.tradable; - this._recyclable = parser.isRecycleable; - this._sellable = parser.sellable; - this._stuffData = parser.stuffData; - this._extra = parser.extra; - this._secondsToExpiration = parser.secondsToExpiration; - this._expirationTimeStamp = parser.expirationTimeStamp; - this._hasRentPeriodStarted = parser.hasRentPeriodStarted; - this._creationDay = parser.creationDay; - this._creationMonth = parser.creationMonth; - this._creationYear = parser.creationYear; - this._slotId = parser.slotId; - this._songId = parser.songId; - this._flatId = parser.flatId; - this._isRented = parser.rentable; - this._isWallItem = parser.isWallItem; + this._type = parser.spriteId + this._ref = parser.ref + this._category = parser.category + this._groupable = (parser.isGroupable && !parser.rentable) + this._tradeable = parser.tradable + this._recyclable = parser.isRecycleable + this._sellable = parser.sellable + this._stuffData = parser.stuffData + this._extra = parser.extra + this._secondsToExpiration = parser.secondsToExpiration + this._expirationTimeStamp = parser.expirationTimeStamp + this._hasRentPeriodStarted = parser.hasRentPeriodStarted + this._creationDay = parser.creationDay + this._creationMonth = parser.creationMonth + this._creationYear = parser.creationYear + this._slotId = parser.slotId + this._songId = parser.songId + this._flatId = parser.flatId + this._isRented = parser.rentable + this._isWallItem = parser.isWallItem } public clone(): FurnitureItem { - const item = new FurnitureItem(null); - - item._expirationTimeStamp = this._expirationTimeStamp; - item._isWallItem = this._isWallItem; - item._songId = this._songId; - item._locked = this._locked; - item._id = this._id; - item._ref = this._ref; - item._category = this._category; - item._type = this._type; - item._stuffData = this._stuffData; - item._extra = this._extra; - item._recyclable = this._recyclable; - item._tradeable = this._tradeable; - item._groupable = this._groupable; - item._sellable = this._sellable; - item._secondsToExpiration = this._secondsToExpiration; - item._hasRentPeriodStarted = this._hasRentPeriodStarted; - item._creationDay = this._creationDay; - item._creationMonth = this._creationMonth; - item._creationYear = this._creationYear; - item._slotId = this._slotId; - item._isRented = this._isRented; - item._flatId = this._flatId; - - return item; + const item = new FurnitureItem(null) + + item._expirationTimeStamp = this._expirationTimeStamp + item._isWallItem = this._isWallItem + item._songId = this._songId + item._locked = this._locked + item._id = this._id + item._ref = this._ref + item._category = this._category + item._type = this._type + item._stuffData = this._stuffData + item._extra = this._extra + item._recyclable = this._recyclable + item._tradeable = this._tradeable + item._groupable = this._groupable + item._sellable = this._sellable + item._secondsToExpiration = this._secondsToExpiration + item._hasRentPeriodStarted = this._hasRentPeriodStarted + item._creationDay = this._creationDay + item._creationMonth = this._creationMonth + item._creationYear = this._creationYear + item._slotId = this._slotId + item._isRented = this._isRented + item._flatId = this._flatId + + return item } } diff --git a/src/api/inventory/FurnitureUtilities.ts b/src/api/inventory/FurnitureUtilities.ts index 741f1ea15..a058742f4 100644 --- a/src/api/inventory/FurnitureUtilities.ts +++ b/src/api/inventory/FurnitureUtilities.ts @@ -1,46 +1,46 @@ -import { FurnitureListItemParser, IObjectData } from '@nitrots/nitro-renderer'; -import { GetRoomEngine } from '../nitro'; -import { FurniCategory } from './FurniCategory'; -import { FurnitureItem } from './FurnitureItem'; -import { GroupItem } from './GroupItem'; +import { FurnitureListItemParser, IObjectData } from "@nitrots/nitro-renderer" +import { GetRoomEngine } from "../nitro" +import { FurniCategory } from "./FurniCategory" +import { FurnitureItem } from "./FurnitureItem" +import { GroupItem } from "./GroupItem" -export const createGroupItem = (type: number, category: number, stuffData: IObjectData, extra: number = NaN) => new GroupItem(type, category, GetRoomEngine(), stuffData, extra); +export const createGroupItem = (type: number, category: number, stuffData: IObjectData, extra: number = NaN) => new GroupItem(type, category, GetRoomEngine(), stuffData, extra) const addSingleFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) => { - const groupItems: GroupItem[] = []; + const groupItems: GroupItem[] = [] for(const groupItem of set) { - if(groupItem.type === item.type) groupItems.push(groupItem); + if(groupItem.type === item.type) groupItems.push(groupItem) } for(const groupItem of groupItems) { - if(groupItem.getItemById(item.id)) return groupItem; + if(groupItem.getItemById(item.id)) return groupItem } - const groupItem = createGroupItem(item.type, item.category, item.stuffData, item.extra); + const groupItem = createGroupItem(item.type, item.category, item.stuffData, item.extra) - groupItem.push(item); + groupItem.push(item) if(unseen) { - groupItem.hasUnseenItems = true; + groupItem.hasUnseenItems = true - set.unshift(groupItem); + set.unshift(groupItem) } else { - set.push(groupItem); + set.push(groupItem) } - return groupItem; + return groupItem } const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) => { - let existingGroup: GroupItem = null; + let existingGroup: GroupItem = null for(const groupItem of set) { @@ -50,9 +50,9 @@ const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen { if(groupItem.stuffData.getLegacyString() === item.stuffData.getLegacyString()) { - existingGroup = groupItem; + existingGroup = groupItem - break; + break } } @@ -60,113 +60,113 @@ const addGroupableFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen { if(item.stuffData.compare(groupItem.stuffData)) { - existingGroup = groupItem; + existingGroup = groupItem - break; + break } } else { - existingGroup = groupItem; + existingGroup = groupItem - break; + break } } } if(existingGroup) { - existingGroup.push(item); + existingGroup.push(item) if(unseen) { - existingGroup.hasUnseenItems = true; + existingGroup.hasUnseenItems = true - const index = set.indexOf(existingGroup); + const index = set.indexOf(existingGroup) - if(index >= 0) set.splice(index, 1); + if(index >= 0) set.splice(index, 1) - set.unshift(existingGroup); + set.unshift(existingGroup) } - return existingGroup; + return existingGroup } - existingGroup = createGroupItem(item.type, item.category, item.stuffData, item.extra); + existingGroup = createGroupItem(item.type, item.category, item.stuffData, item.extra) - existingGroup.push(item); + existingGroup.push(item) if(unseen) { - existingGroup.hasUnseenItems = true; + existingGroup.hasUnseenItems = true - set.unshift(existingGroup); + set.unshift(existingGroup) } else { - set.push(existingGroup); + set.push(existingGroup) } - return existingGroup; + return existingGroup } export const addFurnitureItem = (set: GroupItem[], item: FurnitureItem, unseen: boolean) => { if(!item.isGroupable) { - addSingleFurnitureItem(set, item, unseen); + addSingleFurnitureItem(set, item, unseen) } else { - addGroupableFurnitureItem(set, item, unseen); + addGroupableFurnitureItem(set, item, unseen) } } export const mergeFurniFragments = (fragment: Map, totalFragments: number, fragmentNumber: number, fragments: Map[]) => { - if(totalFragments === 1) return fragment; + if(totalFragments === 1) return fragment - fragments[fragmentNumber] = fragment; + fragments[fragmentNumber] = fragment for(const frag of fragments) { - if(!frag) return null; + if(!frag) return null } - const merged: Map = new Map(); + const merged: Map = new Map() for(const frag of fragments) { - for(const [ key, value ] of frag) merged.set(key, value); + for(const [ key, value ] of frag) merged.set(key, value) - frag.clear(); + frag.clear() } - fragments = null; + fragments = null - return merged; + return merged } export const getAllItemIds = (groupItems: GroupItem[]) => { - const itemIds: number[] = []; + const itemIds: number[] = [] for(const groupItem of groupItems) { - let totalCount = groupItem.getTotalCount(); + let totalCount = groupItem.getTotalCount() - if(groupItem.category === FurniCategory.POST_IT) totalCount = 1; + if(groupItem.category === FurniCategory.POST_IT) totalCount = 1 - let i = 0; + let i = 0 while(i < totalCount) { - itemIds.push(groupItem.getItemByIndex(i).id); + itemIds.push(groupItem.getItemByIndex(i).id) - i++; + i++ } } - return itemIds; + return itemIds } diff --git a/src/api/inventory/GroupItem.ts b/src/api/inventory/GroupItem.ts index 8569321eb..3a03af705 100644 --- a/src/api/inventory/GroupItem.ts +++ b/src/api/inventory/GroupItem.ts @@ -1,68 +1,68 @@ -import { IObjectData, IRoomEngine } from '@nitrots/nitro-renderer'; -import { LocalizeText } from '../utils'; -import { FurniCategory } from './FurniCategory'; -import { FurnitureItem } from './FurnitureItem'; -import { IFurnitureItem } from './IFurnitureItem'; +import { IObjectData, IRoomEngine } from "@nitrots/nitro-renderer" +import { LocalizeText } from "../utils" +import { FurniCategory } from "./FurniCategory" +import { FurnitureItem } from "./FurnitureItem" +import { IFurnitureItem } from "./IFurnitureItem" export class GroupItem { - private _type: number; - private _category: number; - private _roomEngine: IRoomEngine; - private _stuffData: IObjectData; - private _extra: number; - private _isWallItem: boolean; - private _iconUrl: string; - private _name: string; - private _description: string; - private _locked: boolean; - private _selected: boolean; - private _hasUnseenItems: boolean; - private _items: FurnitureItem[]; + private _type: number + private _category: number + private _roomEngine: IRoomEngine + private _stuffData: IObjectData + private _extra: number + private _isWallItem: boolean + private _iconUrl: string + private _name: string + private _description: string + private _locked: boolean + private _selected: boolean + private _hasUnseenItems: boolean + private _items: FurnitureItem[] constructor(type: number = -1, category: number = -1, roomEngine: IRoomEngine = null, stuffData: IObjectData = null, extra: number = -1) { - this._type = type; - this._category = category; - this._roomEngine = roomEngine; - this._stuffData = stuffData; - this._extra = extra; - this._isWallItem = false; - this._iconUrl = null; - this._name = null; - this._description = null; - this._locked = false; - this._selected = false; - this._hasUnseenItems = false; - this._items = []; + this._type = type + this._category = category + this._roomEngine = roomEngine + this._stuffData = stuffData + this._extra = extra + this._isWallItem = false + this._iconUrl = null + this._name = null + this._description = null + this._locked = false + this._selected = false + this._hasUnseenItems = false + this._items = [] } public clone(): GroupItem { - const groupItem = new GroupItem(); + const groupItem = new GroupItem() - groupItem._type = this._type; - groupItem._category = this._category; - groupItem._roomEngine = this._roomEngine; - groupItem._stuffData = this._stuffData; - groupItem._extra = this._extra; - groupItem._isWallItem = this._isWallItem; - groupItem._iconUrl = this._iconUrl; - groupItem._name = this._name; - groupItem._description = this._description; - groupItem._locked = this._locked; - groupItem._selected = this._selected; - groupItem._hasUnseenItems = this._hasUnseenItems; - groupItem._items = this._items; + groupItem._type = this._type + groupItem._category = this._category + groupItem._roomEngine = this._roomEngine + groupItem._stuffData = this._stuffData + groupItem._extra = this._extra + groupItem._isWallItem = this._isWallItem + groupItem._iconUrl = this._iconUrl + groupItem._name = this._name + groupItem._description = this._description + groupItem._locked = this._locked + groupItem._selected = this._selected + groupItem._hasUnseenItems = this._hasUnseenItems + groupItem._items = this._items - return groupItem; + return groupItem } public prepareGroup(): void { - this.setIcon(); - this.setName(); - this.setDescription(); + this.setIcon() + this.setName() + this.setDescription() } public dispose(): void @@ -72,390 +72,390 @@ export class GroupItem public getItemByIndex(index: number): FurnitureItem { - return this._items[index]; + return this._items[index] } public getItemById(id: number): FurnitureItem { for(const item of this._items) { - if(item.id !== id) continue; + if(item.id !== id) continue - return item; + return item } - return null; + return null } public getTradeItems(count: number): IFurnitureItem[] { - const items: IFurnitureItem[] = []; + const items: IFurnitureItem[] = [] - const furnitureItem = this.getLastItem(); + const furnitureItem = this.getLastItem() - if(!furnitureItem) return items; + if(!furnitureItem) return items - let found = 0; - let i = 0; + let found = 0 + let i = 0 while(i < this._items.length) { - if(found >= count) break; + if(found >= count) break - const item = this.getItemByIndex(i); + const item = this.getItemByIndex(i) if(!item.locked && item.isTradable && (item.type === furnitureItem.type)) { - items.push(item); + items.push(item) - found++; + found++ } - i++; + i++ } - return items; + return items } public push(item: FurnitureItem): void { - const items = [ ...this._items ]; + const items = [ ...this._items ] - let index = 0; + let index = 0 while(index < items.length) { - let existingItem = items[index]; + let existingItem = items[index] if(existingItem.id === item.id) { - existingItem = existingItem.clone(); + existingItem = existingItem.clone() - existingItem.locked = false; + existingItem.locked = false - items.splice(index, 1); + items.splice(index, 1) - items.push(existingItem); + items.push(existingItem) - this._items = items; + this._items = items - return; + return } - index++; + index++ } - items.push(item); + items.push(item) - this._items = items; + this._items = items - if(this._items.length === 1) this.prepareGroup(); + if(this._items.length === 1) this.prepareGroup() } public pop(): FurnitureItem { - const items = [ ...this._items ]; + const items = [ ...this._items ] - let item: FurnitureItem = null; + let item: FurnitureItem = null if(items.length > 0) { - const index = (items.length - 1); + const index = (items.length - 1) - item = items[index]; + item = items[index] - items.splice(index, 1); + items.splice(index, 1) } - this._items = items; + this._items = items - return item; + return item } public remove(k: number): FurnitureItem { - const items = [ ...this._items ]; + const items = [ ...this._items ] - let index = 0; + let index = 0 while(index < items.length) { - let existingItem = items[index]; + let existingItem = items[index] if(existingItem.id === k) { - items.splice(index, 1); + items.splice(index, 1) - this._items = items; + this._items = items - return existingItem; + return existingItem } - index++; + index++ } - return null; + return null } public getTotalCount(): number { if(this._category === FurniCategory.POST_IT) { - let count = 0; - let index = 0; + let count = 0 + let index = 0 while(index < this._items.length) { - const item = this.getItemByIndex(index); + const item = this.getItemByIndex(index) - count = (count + parseInt(item.stuffData.getLegacyString())); + count = (count + parseInt(item.stuffData.getLegacyString())) - index++; + index++ } - return count; + return count } - return this._items.length; + return this._items.length } public getUnlockedCount(): number { - if(this.category === FurniCategory.POST_IT) return this.getTotalCount(); + if(this.category === FurniCategory.POST_IT) return this.getTotalCount() - let count = 0; - let index = 0; + let count = 0 + let index = 0 while(index < this._items.length) { - const item = this.getItemByIndex(index); + const item = this.getItemByIndex(index) - if(!item.locked) count++; + if(!item.locked) count++ - index++; + index++ } - return count; + return count } public getLastItem(): FurnitureItem { - if(!this._items.length) return null; + if(!this._items.length) return null - const item = this.getItemByIndex((this._items.length - 1)); + const item = this.getItemByIndex((this._items.length - 1)) - return item; + return item } public unlockAllItems(): void { - const items = [ ...this._items ]; + const items = [ ...this._items ] - let index = 0; + let index = 0 while(index < items.length) { - const item = items[index]; + const item = items[index] if(item.locked) { - const newItem = item.clone(); + const newItem = item.clone() - newItem.locked = false; + newItem.locked = false - items[index] = newItem; + items[index] = newItem } - index++; + index++ } - this._items = items; + this._items = items } public lockItemIds(itemIds: number[]): boolean { - const items = [ ...this._items ]; + const items = [ ...this._items ] - let index = 0; - let updated = false; + let index = 0 + let updated = false while(index < items.length) { - const item = items[index]; - const locked = (itemIds.indexOf(item.ref) >= 0); + const item = items[index] + const locked = (itemIds.indexOf(item.ref) >= 0) if(item.locked !== locked) { - updated = true; + updated = true - const newItem = item.clone(); + const newItem = item.clone() - newItem.locked = locked; + newItem.locked = locked - items[index] = newItem; + items[index] = newItem } - index++; + index++ } - this._items = items; + this._items = items - return updated; + return updated } private setName(): void { - const k = this.getLastItem(); + const k = this.getLastItem() if(!k) { - this._name = ''; + this._name = "" - return; + return } - let key = ''; + let key = "" switch(this._category) { - case FurniCategory.POSTER: - key = (('poster_' + k.stuffData.getLegacyString()) + '_name'); - break; - case FurniCategory.TRAX_SONG: - this._name = 'SONG_NAME'; - return; - default: - if(this.isWallItem) - { - key = ('wallItem.name.' + k.type); - } - else - { - key = ('roomItem.name.' + k.type); - } + case FurniCategory.POSTER: + key = (("poster_" + k.stuffData.getLegacyString()) + "_name") + break + case FurniCategory.TRAX_SONG: + this._name = "SONG_NAME" + return + default: + if(this.isWallItem) + { + key = ("wallItem.name." + k.type) + } + else + { + key = ("roomItem.name." + k.type) + } } - this._name = LocalizeText(key); + this._name = LocalizeText(key) } private setDescription(): void { - this._description = ''; + this._description = "" } private setIcon(): void { - if(this._iconUrl) return; + if(this._iconUrl) return - let url = null; + let url = null if(this.isWallItem) { - url = this._roomEngine.getFurnitureWallIconUrl(this._type, this._stuffData.getLegacyString()); + url = this._roomEngine.getFurnitureWallIconUrl(this._type, this._stuffData.getLegacyString()) } else { - url = this._roomEngine.getFurnitureFloorIconUrl(this._type); + url = this._roomEngine.getFurnitureFloorIconUrl(this._type) } - if(!url) return; + if(!url) return - this._iconUrl = url; + this._iconUrl = url } public get type(): number { - return this._type; + return this._type } public get category(): number { - return this._category; + return this._category } public get stuffData(): IObjectData { - return this._stuffData; + return this._stuffData } public get extra(): number { - return this._extra; + return this._extra } public get iconUrl(): string { - return this._iconUrl; + return this._iconUrl } public get name(): string { - return this._name; + return this._name } public get description(): string { - return this._description; + return this._description } public get hasUnseenItems(): boolean { - return this._hasUnseenItems; + return this._hasUnseenItems } public set hasUnseenItems(flag: boolean) { - this._hasUnseenItems = flag; + this._hasUnseenItems = flag } public get locked(): boolean { - return this._locked; + return this._locked } public set locked(flag: boolean) { - this._locked = flag; + this._locked = flag } public get selected(): boolean { - return this._selected; + return this._selected } public set selected(flag: boolean) { - this._selected = flag; + this._selected = flag } public get isWallItem(): boolean { - const item = this.getItemByIndex(0); + const item = this.getItemByIndex(0) - return (item ? item.isWallItem : false); + return (item ? item.isWallItem : false) } public get isGroupable(): boolean { - const item = this.getItemByIndex(0); + const item = this.getItemByIndex(0) - return (item ? item.isGroupable : false); + return (item ? item.isGroupable : false) } public get isSellable(): boolean { - const item = this.getItemByIndex(0); + const item = this.getItemByIndex(0) - return (item ? item.sellable : false); + return (item ? item.sellable : false) } public get items(): FurnitureItem[] { - return this._items; + return this._items } public set items(items: FurnitureItem[]) { - this._items = items; + this._items = items } } diff --git a/src/api/inventory/IBotItem.ts b/src/api/inventory/IBotItem.ts index 0a370ba6c..89802195f 100644 --- a/src/api/inventory/IBotItem.ts +++ b/src/api/inventory/IBotItem.ts @@ -1,4 +1,4 @@ -import { BotData } from '@nitrots/nitro-renderer'; +import { BotData } from "@nitrots/nitro-renderer" export interface IBotItem { diff --git a/src/api/inventory/IFurnitureItem.ts b/src/api/inventory/IFurnitureItem.ts index 435597d25..286493f4e 100644 --- a/src/api/inventory/IFurnitureItem.ts +++ b/src/api/inventory/IFurnitureItem.ts @@ -1,4 +1,4 @@ -import { IObjectData } from '@nitrots/nitro-renderer'; +import { IObjectData } from "@nitrots/nitro-renderer" export interface IFurnitureItem { diff --git a/src/api/inventory/IPetItem.ts b/src/api/inventory/IPetItem.ts index 910d5dffe..66cbe0e7d 100644 --- a/src/api/inventory/IPetItem.ts +++ b/src/api/inventory/IPetItem.ts @@ -1,4 +1,4 @@ -import { PetData } from '@nitrots/nitro-renderer'; +import { PetData } from "@nitrots/nitro-renderer" export interface IPetItem { diff --git a/src/api/inventory/InventoryUtilities.ts b/src/api/inventory/InventoryUtilities.ts index e263b8c85..2fcd83422 100644 --- a/src/api/inventory/InventoryUtilities.ts +++ b/src/api/inventory/InventoryUtilities.ts @@ -1,117 +1,116 @@ -import { FurniturePlacePaintComposer, RoomObjectCategory, RoomObjectPlacementSource, RoomObjectType } from '@nitrots/nitro-renderer'; -import { CreateLinkEvent, GetRoomEngine, GetRoomSessionManager, SendMessageComposer } from '../nitro'; -import { FurniCategory } from './FurniCategory'; -import { GroupItem } from './GroupItem'; -import { IBotItem } from './IBotItem'; -import { IPetItem } from './IPetItem'; +import { FurniturePlacePaintComposer, RoomObjectCategory, RoomObjectPlacementSource, RoomObjectType } from "@nitrots/nitro-renderer" +import { CreateLinkEvent, GetRoomEngine, GetRoomSessionManager, SendMessageComposer } from "../nitro" +import { FurniCategory } from "./FurniCategory" +import { GroupItem } from "./GroupItem" +import { IBotItem } from "./IBotItem" +import { IPetItem } from "./IPetItem" -let objectMoverRequested = false; -let itemIdInPlacing = -1; +let objectMoverRequested = false +let itemIdInPlacing = -1 -export const isObjectMoverRequested = () => objectMoverRequested; +export const isObjectMoverRequested = () => objectMoverRequested -export const setObjectMoverRequested = (flag: boolean) => objectMoverRequested = flag; +export const setObjectMoverRequested = (flag: boolean) => objectMoverRequested = flag -export const getPlacingItemId = () => itemIdInPlacing; +export const getPlacingItemId = () => itemIdInPlacing -export const setPlacingItemId = (id: number) => (itemIdInPlacing = id); +export const setPlacingItemId = (id: number) => (itemIdInPlacing = id) export const cancelRoomObjectPlacement = () => { - if(getPlacingItemId() === -1) return; + if(getPlacingItemId() === -1) return - GetRoomEngine().cancelRoomObjectPlacement(); + GetRoomEngine().cancelRoomObjectPlacement() - setPlacingItemId(-1); - setObjectMoverRequested(false); + setPlacingItemId(-1) + setObjectMoverRequested(false) } export const attemptPetPlacement = (petItem: IPetItem, flag: boolean = false) => { - const petData = petItem.petData; + const petData = petItem.petData - if(!petData) return false; + if(!petData) return false - const session = GetRoomSessionManager().getSession(1); + const session = GetRoomSessionManager().getSession(1) - if(!session) return false; + if(!session) return false - if(!session.isRoomOwner && !session.allowPets) return false; + if(!session.isRoomOwner && !session.allowPets) return false - CreateLinkEvent('inventory/hide'); + CreateLinkEvent("inventory/hide") if(GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, -(petData.id), RoomObjectCategory.UNIT, RoomObjectType.PET, petData.figureData.figuredata)) { - setPlacingItemId(petData.id); - setObjectMoverRequested(true); + setPlacingItemId(petData.id) + setObjectMoverRequested(true) } - return true; + return true } export const attemptItemPlacement = (groupItem: GroupItem, flag: boolean = false) => { - if(!groupItem || !groupItem.getUnlockedCount()) return false; + if(!groupItem || !groupItem.getUnlockedCount()) return false - const item = groupItem.getLastItem(); + const item = groupItem.getLastItem() - if(!item) return false; + if(!item) return false if((item.category === FurniCategory.FLOOR) || (item.category === FurniCategory.WALL_PAPER) || (item.category === FurniCategory.LANDSCAPE)) { - if(flag) return false; + if(flag) return false - SendMessageComposer(new FurniturePlacePaintComposer(item.id)); + SendMessageComposer(new FurniturePlacePaintComposer(item.id)) - return false; + return false } else { - CreateLinkEvent('inventory/hide'); + CreateLinkEvent("inventory/hide") - let category = 0; - let isMoving = false; + let category = 0 + let isMoving = false - if(item.isWallItem) category = RoomObjectCategory.WALL; - else category = RoomObjectCategory.FLOOR; + if(item.isWallItem) category = RoomObjectCategory.WALL + else category = RoomObjectCategory.FLOOR if((item.category === FurniCategory.POSTER)) // or external image from furnidata { - isMoving = GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, item.id, category, item.type, item.stuffData.getLegacyString()); + isMoving = GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, item.id, category, item.type, item.stuffData.getLegacyString()) } else { - isMoving = GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, item.id, category, item.type, item.extra.toString(), item.stuffData); + isMoving = GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, item.id, category, item.type, item.extra.toString(), item.stuffData) } if(isMoving) { - setPlacingItemId(item.ref); - setObjectMoverRequested(true); + setPlacingItemId(item.ref) + setObjectMoverRequested(true) } } - return true; + return true } - export const attemptBotPlacement = (botItem: IBotItem, flag: boolean = false) => { - const botData = botItem.botData; + const botData = botItem.botData - if(!botData) return false; + if(!botData) return false - const session = GetRoomSessionManager().getSession(1); + const session = GetRoomSessionManager().getSession(1) - if(!session || !session.isRoomOwner) return false; + if(!session || !session.isRoomOwner) return false - CreateLinkEvent('inventory/hide'); + CreateLinkEvent("inventory/hide") if(GetRoomEngine().processRoomObjectPlacement(RoomObjectPlacementSource.INVENTORY, -(botData.id), RoomObjectCategory.UNIT, RoomObjectType.RENTABLE_BOT, botData.figure)) { - setPlacingItemId(botData.id); - setObjectMoverRequested(true); + setPlacingItemId(botData.id) + setObjectMoverRequested(true) } - return true; + return true } diff --git a/src/api/inventory/PetUtilities.ts b/src/api/inventory/PetUtilities.ts index 881a09e4f..13359e3c4 100644 --- a/src/api/inventory/PetUtilities.ts +++ b/src/api/inventory/PetUtilities.ts @@ -1,104 +1,104 @@ -import { PetData } from '@nitrots/nitro-renderer'; -import { CreateLinkEvent } from '../nitro'; -import { cancelRoomObjectPlacement, getPlacingItemId } from './InventoryUtilities'; -import { IPetItem } from './IPetItem'; -import { UnseenItemCategory } from './UnseenItemCategory'; +import { PetData } from "@nitrots/nitro-renderer" +import { CreateLinkEvent } from "../nitro" +import { cancelRoomObjectPlacement, getPlacingItemId } from "./InventoryUtilities" +import { IPetItem } from "./IPetItem" +import { UnseenItemCategory } from "./UnseenItemCategory" -export const getAllPetIds = (petItems: IPetItem[]) => petItems.map(item => item.petData.id); +export const getAllPetIds = (petItems: IPetItem[]) => petItems.map(item => item.petData.id) export const addSinglePetItem = (petData: PetData, set: IPetItem[], unseen: boolean = true) => { - const petItem = { petData }; + const petItem = { petData } if(unseen) { //petItem.isUnseen = true; - set.unshift(petItem); + set.unshift(petItem) } else { - set.push(petItem); + set.push(petItem) } - return petItem; + return petItem } export const removePetItemById = (id: number, set: IPetItem[]) => { - let index = 0; + let index = 0 while(index < set.length) { - const petItem = set[index]; + const petItem = set[index] if(petItem && (petItem.petData.id === id)) { if(getPlacingItemId() === petItem.petData.id) { - cancelRoomObjectPlacement(); + cancelRoomObjectPlacement() - CreateLinkEvent('inventory/open'); + CreateLinkEvent("inventory/open") } - set.splice(index, 1); + set.splice(index, 1) - return petItem; + return petItem } - index++; + index++ } - return null; + return null } export const processPetFragment = (set: IPetItem[], fragment: Map, isUnseen: (category: number, itemId: number) => boolean) => { - const existingIds = getAllPetIds(set); - const addedIds: number[] = []; - const removedIds: number[] = []; + const existingIds = getAllPetIds(set) + const addedIds: number[] = [] + const removedIds: number[] = [] - for(const key of fragment.keys()) (existingIds.indexOf(key) === -1) && addedIds.push(key); + for(const key of fragment.keys()) (existingIds.indexOf(key) === -1) && addedIds.push(key) - for(const itemId of existingIds) (!fragment.get(itemId)) && removedIds.push(itemId); + for(const itemId of existingIds) (!fragment.get(itemId)) && removedIds.push(itemId) - const emptyExistingSet = (existingIds.length === 0); + const emptyExistingSet = (existingIds.length === 0) - for(const id of removedIds) removePetItemById(id, set); + for(const id of removedIds) removePetItemById(id, set) for(const id of addedIds) { - const parser = fragment.get(id); + const parser = fragment.get(id) - if(!parser) continue; + if(!parser) continue - addSinglePetItem(parser, set, isUnseen(UnseenItemCategory.PET, parser.id)); + addSinglePetItem(parser, set, isUnseen(UnseenItemCategory.PET, parser.id)) } - return set; + return set } export const mergePetFragments = (fragment: Map, totalFragments: number, fragmentNumber: number, fragments: Map[]) => { - if(totalFragments === 1) return fragment; + if(totalFragments === 1) return fragment - fragments[fragmentNumber] = fragment; + fragments[fragmentNumber] = fragment for(const frag of fragments) { - if(!frag) return null; + if(!frag) return null } - const merged: Map = new Map(); + const merged: Map = new Map() for(const frag of fragments) { - for(const [ key, value ] of frag) merged.set(key, value); + for(const [ key, value ] of frag) merged.set(key, value) - frag.clear(); + frag.clear() } - fragments = null; + fragments = null - return merged; + return merged } diff --git a/src/api/inventory/PurchaseNotificationType.ts b/src/api/inventory/PurchaseNotificationType.ts new file mode 100644 index 000000000..eed35d58b --- /dev/null +++ b/src/api/inventory/PurchaseNotificationType.ts @@ -0,0 +1,10 @@ +export class PurchaseNotificationType +{ + public static SOLD_OUT: number = 0 + public static NOT_ENOUGH_CREDITS = 1 + public static NOT_ENOUGH_CREDITS_DUCKETS = 2 + public static NOT_ENOUGH_DUCKETS: number = 3 + public static NOT_ENOUGH_DIAMONDS: number = 4 + public static NOT_ENOUGH_CLOUDS: number = 5 + public static CONFIRM: number = 6 +} diff --git a/src/api/inventory/TradeState.ts b/src/api/inventory/TradeState.ts index 3df418ba9..e4debf89d 100644 --- a/src/api/inventory/TradeState.ts +++ b/src/api/inventory/TradeState.ts @@ -1,10 +1,10 @@ export class TradeState { - public static TRADING_STATE_READY: number = 0; - public static TRADING_STATE_RUNNING: number = 1; - public static TRADING_STATE_COUNTDOWN: number = 2; - public static TRADING_STATE_CONFIRMING: number = 3; - public static TRADING_STATE_CONFIRMED: number = 4; - public static TRADING_STATE_COMPLETED: number = 5; - public static TRADING_STATE_CANCELLED: number = 6; + public static TRADING_STATE_READY: number = 0 + public static TRADING_STATE_RUNNING: number = 1 + public static TRADING_STATE_COUNTDOWN: number = 2 + public static TRADING_STATE_CONFIRMING: number = 3 + public static TRADING_STATE_CONFIRMED: number = 4 + public static TRADING_STATE_COMPLETED: number = 5 + public static TRADING_STATE_CANCELLED: number = 6 } diff --git a/src/api/inventory/TradeUserData.ts b/src/api/inventory/TradeUserData.ts index 452c7ee56..e61e06a72 100644 --- a/src/api/inventory/TradeUserData.ts +++ b/src/api/inventory/TradeUserData.ts @@ -1,11 +1,11 @@ -import { AdvancedMap } from '@nitrots/nitro-renderer'; -import { GroupItem } from './GroupItem'; +import { AdvancedMap } from "@nitrots/nitro-renderer" +import { GroupItem } from "./GroupItem" export class TradeUserData { constructor( public userId: number = -1, - public userName: string = '', + public userName: string = "", public userItems: AdvancedMap = new AdvancedMap(), public itemCount: number = 0, public creditsCount: number = 0, diff --git a/src/api/inventory/TradingNotificationType.ts b/src/api/inventory/TradingNotificationType.ts index 4aed49059..b1e7f7db5 100644 --- a/src/api/inventory/TradingNotificationType.ts +++ b/src/api/inventory/TradingNotificationType.ts @@ -1,12 +1,12 @@ export class TradingNotificationType { - public static ALERT_SCAM: number = 0; - public static HOTEL_TRADING_DISABLED = 1; - public static YOU_NOT_ALLOWED: number = 2; - public static THEY_NOT_ALLOWED: number = 4; - public static ROOM_DISABLED: number = 6; - public static YOU_OPEN: number = 7; - public static THEY_OPEN: number = 8; - public static ERROR_WHILE_COMMIT: number = 9; - public static THEY_CANCELLED: number = 10; + public static ALERT_SCAM: number = 0 + public static HOTEL_TRADING_DISABLED = 1 + public static YOU_NOT_ALLOWED: number = 2 + public static THEY_NOT_ALLOWED: number = 4 + public static ROOM_DISABLED: number = 6 + public static YOU_OPEN: number = 7 + public static THEY_OPEN: number = 8 + public static ERROR_WHILE_COMMIT: number = 9 + public static THEY_CANCELLED: number = 10 } diff --git a/src/api/inventory/TradingUtilities.ts b/src/api/inventory/TradingUtilities.ts index 28ca8c885..bb3040643 100644 --- a/src/api/inventory/TradingUtilities.ts +++ b/src/api/inventory/TradingUtilities.ts @@ -1,71 +1,71 @@ -import { AdvancedMap, IObjectData, ItemDataStructure, StringDataType } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from '../nitro'; -import { FurniCategory } from './FurniCategory'; -import { FurnitureItem } from './FurnitureItem'; -import { createGroupItem } from './FurnitureUtilities'; -import { GroupItem } from './GroupItem'; +import { AdvancedMap, IObjectData, ItemDataStructure, StringDataType } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "../nitro" +import { FurniCategory } from "./FurniCategory" +import { FurnitureItem } from "./FurnitureItem" +import { createGroupItem } from "./FurnitureUtilities" +import { GroupItem } from "./GroupItem" -const isExternalImage = (spriteId: number) => GetSessionDataManager().getWallItemData(spriteId)?.isExternalImage || false; +const isExternalImage = (spriteId: number) => GetSessionDataManager().getWallItemData(spriteId)?.isExternalImage || false export const parseTradeItems = (items: ItemDataStructure[]) => { - const existingItems = new AdvancedMap(); - const totalItems = items.length; + const existingItems = new AdvancedMap() + const totalItems = items.length if(totalItems) { for(const item of items) { - const spriteId = item.spriteId; - const category = item.category; + const spriteId = item.spriteId + const category = item.category - let name = (item.furniType + spriteId); + let name = (item.furniType + spriteId) if(!item.isGroupable || isExternalImage(spriteId)) { - name = ('itemid' + item.itemId); + name = ("itemid" + item.itemId) } if(item.category === FurniCategory.POSTER) { - name = (item.itemId + 'poster' + item.stuffData.getLegacyString()); + name = (item.itemId + "poster" + item.stuffData.getLegacyString()) } else if(item.category === FurniCategory.GUILD_FURNI) { - name = ''; + name = "" } - let groupItem = ((item.isGroupable && !isExternalImage(item.spriteId)) ? existingItems.getValue(name) : null); + let groupItem = ((item.isGroupable && !isExternalImage(item.spriteId)) ? existingItems.getValue(name) : null) if(!groupItem) { - groupItem = createGroupItem(spriteId, category, item.stuffData); + groupItem = createGroupItem(spriteId, category, item.stuffData) - existingItems.add(name, groupItem); + existingItems.add(name, groupItem) } - groupItem.push(new FurnitureItem(item)); + groupItem.push(new FurnitureItem(item)) } } - return existingItems; + return existingItems } export const getGuildFurniType = (spriteId: number, stuffData: IObjectData) => { - let type = spriteId.toString(); + let type = spriteId.toString() - if(!(stuffData instanceof StringDataType)) return type; + if(!(stuffData instanceof StringDataType)) return type - let i = 1; + let i = 1 while(i < 5) { - type = (type + (',' + stuffData.getValue(i))); + type = (type + ("," + stuffData.getValue(i))) - i++; + i++ } - return type; + return type } diff --git a/src/api/inventory/UnseenItemCategory.ts b/src/api/inventory/UnseenItemCategory.ts index cbd7e9b78..3f02ce6c3 100644 --- a/src/api/inventory/UnseenItemCategory.ts +++ b/src/api/inventory/UnseenItemCategory.ts @@ -1,9 +1,9 @@ export class UnseenItemCategory { - public static FURNI: number = 1; - public static RENTABLE: number = 2; - public static PET: number = 3; - public static BADGE: number = 4; - public static BOT: number = 5; - public static GAMES: number = 6; + public static FURNI: number = 1 + public static RENTABLE: number = 2 + public static PET: number = 3 + public static BADGE: number = 4 + public static BOT: number = 5 + public static GAMES: number = 6 } diff --git a/src/api/inventory/index.ts b/src/api/inventory/index.ts index 76962cfe4..7206620ad 100644 --- a/src/api/inventory/index.ts +++ b/src/api/inventory/index.ts @@ -1,15 +1,15 @@ -export * from './FurniCategory'; -export * from './FurnitureItem'; -export * from './FurnitureUtilities'; -export * from './GroupItem'; -export * from './IBotItem'; -export * from './IFurnitureItem'; -export * from './InventoryUtilities'; -export * from './IPetItem'; -export * from './IUnseenItemTracker'; -export * from './PetUtilities'; -export * from './TradeState'; -export * from './TradeUserData'; -export * from './TradingNotificationType'; -export * from './TradingUtilities'; -export * from './UnseenItemCategory'; +export * from "./FurniCategory" +export * from "./FurnitureItem" +export * from "./FurnitureUtilities" +export * from "./GroupItem" +export * from "./IBotItem" +export * from "./IFurnitureItem" +export * from "./InventoryUtilities" +export * from "./IPetItem" +export * from "./IUnseenItemTracker" +export * from "./PetUtilities" +export * from "./TradeState" +export * from "./TradeUserData" +export * from "./TradingNotificationType" +export * from "./TradingUtilities" +export * from "./UnseenItemCategory" diff --git a/src/api/mod-tools/GetIssueCategoryName.ts b/src/api/mod-tools/GetIssueCategoryName.ts index 81a3f862b..861acc1c1 100644 --- a/src/api/mod-tools/GetIssueCategoryName.ts +++ b/src/api/mod-tools/GetIssueCategoryName.ts @@ -2,34 +2,34 @@ export const GetIssueCategoryName = (categoryId: number) => { switch(categoryId) { - case 1: - case 2: - return 'Normal'; - case 3: - return 'Automatic'; - case 4: - return 'Automatic IM'; - case 5: - return 'Guide System'; - case 6: - return 'IM'; - case 7: - return 'Room'; - case 8: - return 'Panic'; - case 9: - return 'Guardian'; - case 10: - return 'Automatic Helper'; - case 11: - return 'Discussion'; - case 12: - return 'Selfie'; - case 14: - return 'Photo'; - case 15: - return 'Ambassador'; + case 1: + case 2: + return "Normal" + case 3: + return "Automatic" + case 4: + return "Automatic IM" + case 5: + return "Guide System" + case 6: + return "IM" + case 7: + return "Room" + case 8: + return "Panic" + case 9: + return "Guardian" + case 10: + return "Automatic Helper" + case 11: + return "Discussion" + case 12: + return "Selfie" + case 14: + return "Photo" + case 15: + return "Ambassador" } - return 'Unknown'; + return "Unknown" } diff --git a/src/api/mod-tools/ModActionDefinition.ts b/src/api/mod-tools/ModActionDefinition.ts index b28aa9cec..39d6a5bca 100644 --- a/src/api/mod-tools/ModActionDefinition.ts +++ b/src/api/mod-tools/ModActionDefinition.ts @@ -1,49 +1,49 @@ export class ModActionDefinition { - public static ALERT: number = 1; - public static MUTE: number = 2; - public static BAN: number = 3; - public static KICK: number = 4; - public static TRADE_LOCK: number = 5; - public static MESSAGE: number = 6; + public static ALERT: number = 1 + public static MUTE: number = 2 + public static BAN: number = 3 + public static KICK: number = 4 + public static TRADE_LOCK: number = 5 + public static MESSAGE: number = 6 - private readonly _actionId: number; - private readonly _name: string; - private readonly _actionType: number; - private readonly _sanctionTypeId: number; - private readonly _actionLengthHours: number; + private readonly _actionId: number + private readonly _name: string + private readonly _actionType: number + private readonly _sanctionTypeId: number + private readonly _actionLengthHours: number constructor(actionId: number, actionName: string, actionType: number, sanctionTypeId: number, actionLengthHours:number) { - this._actionId = actionId; - this._name = actionName; - this._actionType = actionType; - this._sanctionTypeId = sanctionTypeId; - this._actionLengthHours = actionLengthHours; + this._actionId = actionId + this._name = actionName + this._actionType = actionType + this._sanctionTypeId = sanctionTypeId + this._actionLengthHours = actionLengthHours } public get actionId(): number { - return this._actionId; + return this._actionId } public get name(): string { - return this._name; + return this._name } public get actionType(): number { - return this._actionType; + return this._actionType } public get sanctionTypeId(): number { - return this._sanctionTypeId; + return this._sanctionTypeId } public get actionLengthHours(): number { - return this._actionLengthHours; + return this._actionLengthHours } } diff --git a/src/api/mod-tools/index.ts b/src/api/mod-tools/index.ts index 004bbaa32..c7de0a793 100644 --- a/src/api/mod-tools/index.ts +++ b/src/api/mod-tools/index.ts @@ -1,4 +1,4 @@ -export * from './GetIssueCategoryName'; -export * from './ISelectedUser'; -export * from './IUserInfo'; -export * from './ModActionDefinition'; +export * from "./GetIssueCategoryName" +export * from "./ISelectedUser" +export * from "./IUserInfo" +export * from "./ModActionDefinition" diff --git a/src/api/navigator/DoorStateType.ts b/src/api/navigator/DoorStateType.ts index 1f8a8efe4..5bb91ba97 100644 --- a/src/api/navigator/DoorStateType.ts +++ b/src/api/navigator/DoorStateType.ts @@ -1,12 +1,12 @@ export class DoorStateType { - public static NONE: number = 0; - public static START_DOORBELL: number = 1; - public static START_PASSWORD: number = 2; - public static STATE_PENDING_SERVER: number = 3; - public static UPDATE_STATE: number = 4; - public static STATE_WAITING: number = 5; - public static STATE_NO_ANSWER: number = 6; - public static STATE_WRONG_PASSWORD: number = 7; - public static STATE_ACCEPTED: number = 8; + public static NONE: number = 0 + public static START_DOORBELL: number = 1 + public static START_PASSWORD: number = 2 + public static STATE_PENDING_SERVER: number = 3 + public static UPDATE_STATE: number = 4 + public static STATE_WAITING: number = 5 + public static STATE_NO_ANSWER: number = 6 + public static STATE_WRONG_PASSWORD: number = 7 + public static STATE_ACCEPTED: number = 8 } diff --git a/src/api/navigator/INavigatorData.ts b/src/api/navigator/INavigatorData.ts index e50b6fe50..2ce8f0e55 100644 --- a/src/api/navigator/INavigatorData.ts +++ b/src/api/navigator/INavigatorData.ts @@ -1,4 +1,4 @@ -import { RoomDataParser } from '@nitrots/nitro-renderer'; +import { RoomDataParser } from "@nitrots/nitro-renderer" export interface INavigatorData { diff --git a/src/api/navigator/IRoomData.ts b/src/api/navigator/IRoomData.ts index 914631476..343b2aa49 100644 --- a/src/api/navigator/IRoomData.ts +++ b/src/api/navigator/IRoomData.ts @@ -1,5 +1,5 @@ -import { IRoomChatSettings } from './IRoomChatSettings'; -import { IRoomModerationSettings } from './IRoomModerationSettings'; +import { IRoomChatSettings } from "./IRoomChatSettings" +import { IRoomModerationSettings } from "./IRoomModerationSettings" export interface IRoomData { diff --git a/src/api/navigator/NavigatorSearchResultViewDisplayMode.ts b/src/api/navigator/NavigatorSearchResultViewDisplayMode.ts index b532d1af2..2d7aafaab 100644 --- a/src/api/navigator/NavigatorSearchResultViewDisplayMode.ts +++ b/src/api/navigator/NavigatorSearchResultViewDisplayMode.ts @@ -1,6 +1,6 @@ export class NavigatorSearchResultViewDisplayMode { - public static readonly LIST: number = 0; - public static readonly THUMBNAILS: number = 1; - public static readonly FORCED_THUMBNAILS: number = 2; + public static readonly LIST: number = 0 + public static readonly THUMBNAILS: number = 1 + public static readonly FORCED_THUMBNAILS: number = 2 } diff --git a/src/api/navigator/RoomInfoData.ts b/src/api/navigator/RoomInfoData.ts index fc0a93bd8..b776481dd 100644 --- a/src/api/navigator/RoomInfoData.ts +++ b/src/api/navigator/RoomInfoData.ts @@ -1,60 +1,60 @@ -import { RoomDataParser } from '@nitrots/nitro-renderer'; +import { RoomDataParser } from "@nitrots/nitro-renderer" export class RoomInfoData { - private _enteredGuestRoom: RoomDataParser = null; - private _createdRoomId: number = 0; - private _currentRoomId: number = 0; - private _currentRoomOwner: boolean = false; - private _canRate: boolean = false; + private _enteredGuestRoom: RoomDataParser = null + private _createdRoomId: number = 0 + private _currentRoomId: number = 0 + private _currentRoomOwner: boolean = false + private _canRate: boolean = false public get enteredGuestRoom(): RoomDataParser { - return this._enteredGuestRoom; + return this._enteredGuestRoom } public set enteredGuestRoom(data: RoomDataParser) { - this._enteredGuestRoom = data; + this._enteredGuestRoom = data } public get createdRoomId(): number { - return this._createdRoomId; + return this._createdRoomId } public set createdRoomId(id: number) { - this._createdRoomId = id; + this._createdRoomId = id } public get currentRoomId(): number { - return this._currentRoomId; + return this._currentRoomId } public set currentRoomId(id: number) { - this._currentRoomId = id; + this._currentRoomId = id } public get currentRoomOwner(): boolean { - return this._currentRoomOwner; + return this._currentRoomOwner } public set currentRoomOwner(flag: boolean) { - this._currentRoomOwner = flag; + this._currentRoomOwner = flag } public get canRate(): boolean { - return this._canRate; + return this._canRate } public set canRate(flag: boolean) { - this._canRate = flag; + this._canRate = flag } } diff --git a/src/api/navigator/RoomSettingsUtils.ts b/src/api/navigator/RoomSettingsUtils.ts index bc611dad7..125acd688 100644 --- a/src/api/navigator/RoomSettingsUtils.ts +++ b/src/api/navigator/RoomSettingsUtils.ts @@ -1,10 +1,10 @@ const BuildMaxVisitorsList = () => { - const list: number[] = []; + const list: number[] = [] - for(let i = 10; i <= 100; i = i + 10) list.push(i); + for(let i = 10; i <= 100; i = i + 10) list.push(i) - return list; + return list } -export const GetMaxVisitorsList = BuildMaxVisitorsList(); +export const GetMaxVisitorsList = BuildMaxVisitorsList() diff --git a/src/api/navigator/SearchFilterOptions.ts b/src/api/navigator/SearchFilterOptions.ts index aaf129026..02f3fadf3 100644 --- a/src/api/navigator/SearchFilterOptions.ts +++ b/src/api/navigator/SearchFilterOptions.ts @@ -1,24 +1,24 @@ -import { INavigatorSearchFilter } from './INavigatorSearchFilter'; +import { INavigatorSearchFilter } from "./INavigatorSearchFilter" export const SearchFilterOptions: INavigatorSearchFilter[] = [ { - name: 'anything', + name: "anything", query: null }, { - name: 'room.name', - query: 'roomname' + name: "room.name", + query: "roomname" }, { - name: 'owner', - query: 'owner' + name: "owner", + query: "owner" }, { - name: 'tag', - query: 'tag' + name: "tag", + query: "tag" }, { - name: 'group', - query: 'group' + name: "group", + query: "group" } -]; +] diff --git a/src/api/navigator/TryVisitRoom.ts b/src/api/navigator/TryVisitRoom.ts index 81138d6c2..d94923381 100644 --- a/src/api/navigator/TryVisitRoom.ts +++ b/src/api/navigator/TryVisitRoom.ts @@ -1,7 +1,7 @@ -import { GetGuestRoomMessageComposer } from '@nitrots/nitro-renderer'; -import { SendMessageComposer } from '../nitro'; +import { GetGuestRoomMessageComposer } from "@nitrots/nitro-renderer" +import { SendMessageComposer } from "../nitro" export function TryVisitRoom(roomId: number): void { - SendMessageComposer(new GetGuestRoomMessageComposer(roomId, false, true)); + SendMessageComposer(new GetGuestRoomMessageComposer(roomId, false, true)) } diff --git a/src/api/navigator/index.ts b/src/api/navigator/index.ts index bceb33e4e..82bdf2cd5 100644 --- a/src/api/navigator/index.ts +++ b/src/api/navigator/index.ts @@ -1,12 +1,12 @@ -export * from './DoorStateType'; -export * from './INavigatorData'; -export * from './INavigatorSearchFilter'; -export * from './IRoomChatSettings'; -export * from './IRoomData'; -export * from './IRoomModel'; -export * from './IRoomModerationSettings'; -export * from './NavigatorSearchResultViewDisplayMode'; -export * from './RoomInfoData'; -export * from './RoomSettingsUtils'; -export * from './SearchFilterOptions'; -export * from './TryVisitRoom'; +export * from "./DoorStateType" +export * from "./INavigatorData" +export * from "./INavigatorSearchFilter" +export * from "./IRoomChatSettings" +export * from "./IRoomData" +export * from "./IRoomModel" +export * from "./IRoomModerationSettings" +export * from "./NavigatorSearchResultViewDisplayMode" +export * from "./RoomInfoData" +export * from "./RoomSettingsUtils" +export * from "./SearchFilterOptions" +export * from "./TryVisitRoom" diff --git a/src/api/nitro/AddLinkEventTracker.ts b/src/api/nitro/AddLinkEventTracker.ts index 8b9f00f2a..06eb872ac 100644 --- a/src/api/nitro/AddLinkEventTracker.ts +++ b/src/api/nitro/AddLinkEventTracker.ts @@ -1,7 +1,7 @@ -import { ILinkEventTracker } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from './GetNitroInstance'; +import { ILinkEventTracker } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "./GetNitroInstance" export function AddEventLinkTracker(tracker: ILinkEventTracker): void { - GetNitroInstance().addLinkEventTracker(tracker); + GetNitroInstance().addLinkEventTracker(tracker) } diff --git a/src/api/nitro/CreateLinkEvent.ts b/src/api/nitro/CreateLinkEvent.ts index 2acfa86a6..951efbd72 100644 --- a/src/api/nitro/CreateLinkEvent.ts +++ b/src/api/nitro/CreateLinkEvent.ts @@ -1,8 +1,8 @@ -import { GetNitroInstance } from './GetNitroInstance'; +import { GetNitroInstance } from "./GetNitroInstance" export function CreateLinkEvent(link: string): void { - link = (link.startsWith('event:') ? link.substring(6) : link); + link = (link.startsWith("event:") ? link.substring(6) : link) - GetNitroInstance().createLinkEvent(link); + GetNitroInstance().createLinkEvent(link) } diff --git a/src/api/nitro/GetCommunication.ts b/src/api/nitro/GetCommunication.ts index 5dc576163..86a62a82a 100644 --- a/src/api/nitro/GetCommunication.ts +++ b/src/api/nitro/GetCommunication.ts @@ -1,7 +1,7 @@ -import { INitroCommunicationManager } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from './GetNitroInstance'; +import { INitroCommunicationManager } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "./GetNitroInstance" export function GetCommunication(): INitroCommunicationManager { - return GetNitroInstance()?.communication; + return GetNitroInstance()?.communication } diff --git a/src/api/nitro/GetConfiguration.ts b/src/api/nitro/GetConfiguration.ts index 800d1f16b..a34434b77 100644 --- a/src/api/nitro/GetConfiguration.ts +++ b/src/api/nitro/GetConfiguration.ts @@ -1,6 +1,6 @@ -import { NitroConfiguration } from '@nitrots/nitro-renderer'; +import { NitroConfiguration } from "@nitrots/nitro-renderer" export function GetConfiguration(key: string, value: T = null): T { - return NitroConfiguration.getValue(key, value); + return NitroConfiguration.getValue(key, value) } diff --git a/src/api/nitro/GetConnection.ts b/src/api/nitro/GetConnection.ts index ec39d8db7..43e052516 100644 --- a/src/api/nitro/GetConnection.ts +++ b/src/api/nitro/GetConnection.ts @@ -1,7 +1,7 @@ -import { IConnection } from '@nitrots/nitro-renderer'; -import { GetCommunication } from './GetCommunication'; +import { IConnection } from "@nitrots/nitro-renderer" +import { GetCommunication } from "./GetCommunication" export function GetConnection(): IConnection { - return GetCommunication()?.connection; + return GetCommunication()?.connection } diff --git a/src/api/nitro/GetLocalization.ts b/src/api/nitro/GetLocalization.ts index 7f105e6d0..557ae64a6 100644 --- a/src/api/nitro/GetLocalization.ts +++ b/src/api/nitro/GetLocalization.ts @@ -1,7 +1,7 @@ -import { INitroLocalizationManager } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from './GetNitroInstance'; +import { INitroLocalizationManager } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "./GetNitroInstance" export function GetLocalization(): INitroLocalizationManager { - return GetNitroInstance().localization; + return GetNitroInstance().localization } diff --git a/src/api/nitro/GetNitroInstance.ts b/src/api/nitro/GetNitroInstance.ts index 5e64a6578..27f276907 100644 --- a/src/api/nitro/GetNitroInstance.ts +++ b/src/api/nitro/GetNitroInstance.ts @@ -1,6 +1,6 @@ -import { INitro, Nitro } from '@nitrots/nitro-renderer'; +import { INitro, Nitro } from "@nitrots/nitro-renderer" export function GetNitroInstance(): INitro { - return Nitro.instance; + return Nitro.instance } diff --git a/src/api/nitro/OpenUrl.ts b/src/api/nitro/OpenUrl.ts index 096776d74..282824ad1 100644 --- a/src/api/nitro/OpenUrl.ts +++ b/src/api/nitro/OpenUrl.ts @@ -1,16 +1,16 @@ -import { HabboWebTools } from '@nitrots/nitro-renderer'; -import { CreateLinkEvent } from './CreateLinkEvent'; +import { HabboWebTools } from "@nitrots/nitro-renderer" +import { CreateLinkEvent } from "./CreateLinkEvent" export const OpenUrl = (url: string) => { - if(!url || !url.length) return; + if(!url || !url.length) return - if(url.startsWith('http')) + if(url.startsWith("http")) { - HabboWebTools.openWebPage(url); + HabboWebTools.openWebPage(url) } else { - CreateLinkEvent(url); + CreateLinkEvent(url) } } diff --git a/src/api/nitro/RemoveLinkEventTracker.ts b/src/api/nitro/RemoveLinkEventTracker.ts index d551c69fd..9aa2a0380 100644 --- a/src/api/nitro/RemoveLinkEventTracker.ts +++ b/src/api/nitro/RemoveLinkEventTracker.ts @@ -1,7 +1,7 @@ -import { ILinkEventTracker } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from './GetNitroInstance'; +import { ILinkEventTracker } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "./GetNitroInstance" export function RemoveLinkEventTracker(tracker: ILinkEventTracker): void { - GetNitroInstance().removeLinkEventTracker(tracker); + GetNitroInstance().removeLinkEventTracker(tracker) } diff --git a/src/api/nitro/SendMessageComposer.ts b/src/api/nitro/SendMessageComposer.ts index dd54c02cf..44edfff8e 100644 --- a/src/api/nitro/SendMessageComposer.ts +++ b/src/api/nitro/SendMessageComposer.ts @@ -1,4 +1,4 @@ -import { IMessageComposer } from '@nitrots/nitro-renderer'; -import { GetConnection } from './GetConnection'; +import { IMessageComposer } from "@nitrots/nitro-renderer" +import { GetConnection } from "./GetConnection" -export const SendMessageComposer = (event: IMessageComposer) => GetConnection().send(event); +export const SendMessageComposer = (event: IMessageComposer) => GetConnection().send(event) diff --git a/src/api/nitro/avatar/GetAvatarPalette.ts b/src/api/nitro/avatar/GetAvatarPalette.ts index a46acb24e..8ebc84c4f 100644 --- a/src/api/nitro/avatar/GetAvatarPalette.ts +++ b/src/api/nitro/avatar/GetAvatarPalette.ts @@ -1,7 +1,7 @@ -import { IPalette } from '@nitrots/nitro-renderer'; -import { GetAvatarRenderManager } from './GetAvatarRenderManager'; +import { IPalette } from "@nitrots/nitro-renderer" +import { GetAvatarRenderManager } from "./GetAvatarRenderManager" export function GetAvatarPalette(paletteId: number): IPalette { - return GetAvatarRenderManager().structureData.getPalette(paletteId); + return GetAvatarRenderManager().structureData.getPalette(paletteId) } diff --git a/src/api/nitro/avatar/GetAvatarRenderManager.ts b/src/api/nitro/avatar/GetAvatarRenderManager.ts index 460f010f6..526c73acf 100644 --- a/src/api/nitro/avatar/GetAvatarRenderManager.ts +++ b/src/api/nitro/avatar/GetAvatarRenderManager.ts @@ -1,7 +1,7 @@ -import { IAvatarRenderManager } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from '../GetNitroInstance'; +import { IAvatarRenderManager } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "../GetNitroInstance" export function GetAvatarRenderManager(): IAvatarRenderManager { - return GetNitroInstance().avatar; + return GetNitroInstance().avatar } diff --git a/src/api/nitro/avatar/GetAvatarSetType.ts b/src/api/nitro/avatar/GetAvatarSetType.ts index ad95f44f1..a02b1f500 100644 --- a/src/api/nitro/avatar/GetAvatarSetType.ts +++ b/src/api/nitro/avatar/GetAvatarSetType.ts @@ -1,7 +1,7 @@ -import { ISetType } from '@nitrots/nitro-renderer'; -import { GetAvatarRenderManager } from './GetAvatarRenderManager'; +import { ISetType } from "@nitrots/nitro-renderer" +import { GetAvatarRenderManager } from "./GetAvatarRenderManager" export function GetAvatarSetType(setType: string): ISetType { - return GetAvatarRenderManager().structureData.getSetType(setType); + return GetAvatarRenderManager().structureData.getSetType(setType) } diff --git a/src/api/nitro/avatar/index.ts b/src/api/nitro/avatar/index.ts index 258a1cedd..ae0384adf 100644 --- a/src/api/nitro/avatar/index.ts +++ b/src/api/nitro/avatar/index.ts @@ -1,3 +1,3 @@ -export * from './GetAvatarPalette'; -export * from './GetAvatarRenderManager'; -export * from './GetAvatarSetType'; +export * from "./GetAvatarPalette" +export * from "./GetAvatarRenderManager" +export * from "./GetAvatarSetType" diff --git a/src/api/nitro/camera/GetRoomCameraWidgetManager.ts b/src/api/nitro/camera/GetRoomCameraWidgetManager.ts index 392495d3e..68efae3fa 100644 --- a/src/api/nitro/camera/GetRoomCameraWidgetManager.ts +++ b/src/api/nitro/camera/GetRoomCameraWidgetManager.ts @@ -1,7 +1,7 @@ -import { IRoomCameraWidgetManager } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from '../GetNitroInstance'; +import { IRoomCameraWidgetManager } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "../GetNitroInstance" export function GetRoomCameraWidgetManager(): IRoomCameraWidgetManager { - return GetNitroInstance().cameraManager; + return GetNitroInstance().cameraManager } diff --git a/src/api/nitro/camera/index.ts b/src/api/nitro/camera/index.ts index 3c2707c17..2af44803f 100644 --- a/src/api/nitro/camera/index.ts +++ b/src/api/nitro/camera/index.ts @@ -1 +1 @@ -export * from './GetRoomCameraWidgetManager'; +export * from "./GetRoomCameraWidgetManager" diff --git a/src/api/nitro/core/GetConfigurationManager.ts b/src/api/nitro/core/GetConfigurationManager.ts index 66ce153f1..a1db7584a 100644 --- a/src/api/nitro/core/GetConfigurationManager.ts +++ b/src/api/nitro/core/GetConfigurationManager.ts @@ -1,7 +1,7 @@ -import { IConfigurationManager } from '@nitrots/nitro-renderer'; -import { GetNitroCore } from './GetNitroCore'; +import { IConfigurationManager } from "@nitrots/nitro-renderer" +import { GetNitroCore } from "./GetNitroCore" export function GetConfigurationManager(): IConfigurationManager { - return GetNitroCore().configuration; + return GetNitroCore().configuration } diff --git a/src/api/nitro/core/GetNitroCore.ts b/src/api/nitro/core/GetNitroCore.ts index ef34b663e..89ad71038 100644 --- a/src/api/nitro/core/GetNitroCore.ts +++ b/src/api/nitro/core/GetNitroCore.ts @@ -1,7 +1,7 @@ -import { INitroCore } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from '..'; +import { INitroCore } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from ".." export function GetNitroCore(): INitroCore { - return GetNitroInstance().core; + return GetNitroInstance().core } diff --git a/src/api/nitro/core/index.ts b/src/api/nitro/core/index.ts index 3322c9cbe..49ef59dea 100644 --- a/src/api/nitro/core/index.ts +++ b/src/api/nitro/core/index.ts @@ -1,2 +1,2 @@ -export * from './GetConfigurationManager'; -export * from './GetNitroCore'; +export * from "./GetConfigurationManager" +export * from "./GetNitroCore" diff --git a/src/api/nitro/index.ts b/src/api/nitro/index.ts index c43e958d9..978b19af3 100644 --- a/src/api/nitro/index.ts +++ b/src/api/nitro/index.ts @@ -1,15 +1,15 @@ -export * from './AddLinkEventTracker'; -export * from './avatar'; -export * from './camera'; -export * from './core'; -export * from './CreateLinkEvent'; -export * from './GetCommunication'; -export * from './GetConfiguration'; -export * from './GetConnection'; -export * from './GetLocalization'; -export * from './GetNitroInstance'; -export * from './OpenUrl'; -export * from './RemoveLinkEventTracker'; -export * from './room'; -export * from './SendMessageComposer'; -export * from './session'; +export * from "./AddLinkEventTracker" +export * from "./avatar" +export * from "./camera" +export * from "./core" +export * from "./CreateLinkEvent" +export * from "./GetCommunication" +export * from "./GetConfiguration" +export * from "./GetConnection" +export * from "./GetLocalization" +export * from "./GetNitroInstance" +export * from "./OpenUrl" +export * from "./RemoveLinkEventTracker" +export * from "./room" +export * from "./SendMessageComposer" +export * from "./session" diff --git a/src/api/nitro/room/DispatchMouseEvent.ts b/src/api/nitro/room/DispatchMouseEvent.ts index 51111acad..f1a1ba0c8 100644 --- a/src/api/nitro/room/DispatchMouseEvent.ts +++ b/src/api/nitro/room/DispatchMouseEvent.ts @@ -1,55 +1,55 @@ -import { MouseEventType } from '@nitrots/nitro-renderer'; -import { GetRoomEngine } from './GetRoomEngine'; +import { MouseEventType } from "@nitrots/nitro-renderer" +import { GetRoomEngine } from "./GetRoomEngine" -let didMouseMove = false; -let lastClick = 0; -let clickCount = 0; +let didMouseMove = false +let lastClick = 0 +let clickCount = 0 export const DispatchMouseEvent = (event: MouseEvent, canvasId: number = 1) => { - const x = event.clientX; - const y = event.clientY; + const x = event.clientX + const y = event.clientY - let eventType = event.type; + let eventType = event.type if(eventType === MouseEventType.MOUSE_CLICK) { if(lastClick) { - clickCount = 1; + clickCount = 1 - if(lastClick >= Date.now() - 300) clickCount++; + if(lastClick >= Date.now() - 300) clickCount++ } - lastClick = Date.now(); + lastClick = Date.now() if(clickCount === 2) { - if(!didMouseMove) eventType = MouseEventType.DOUBLE_CLICK; + if(!didMouseMove) eventType = MouseEventType.DOUBLE_CLICK - clickCount = 0; - lastClick = null; + clickCount = 0 + lastClick = null } } switch(eventType) { - case MouseEventType.MOUSE_CLICK: - break; - case MouseEventType.DOUBLE_CLICK: - break; - case MouseEventType.MOUSE_MOVE: - didMouseMove = true; - break; - case MouseEventType.MOUSE_DOWN: - didMouseMove = false; - break; - case MouseEventType.MOUSE_UP: - break; - case MouseEventType.RIGHT_CLICK: - break; - default: return; + case MouseEventType.MOUSE_CLICK: + break + case MouseEventType.DOUBLE_CLICK: + break + case MouseEventType.MOUSE_MOVE: + didMouseMove = true + break + case MouseEventType.MOUSE_DOWN: + didMouseMove = false + break + case MouseEventType.MOUSE_UP: + break + case MouseEventType.RIGHT_CLICK: + break + default: return } - GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, event.altKey, (event.ctrlKey || event.metaKey), event.shiftKey, false); + GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, event.altKey, (event.ctrlKey || event.metaKey), event.shiftKey, false) } diff --git a/src/api/nitro/room/DispatchTouchEvent.ts b/src/api/nitro/room/DispatchTouchEvent.ts index 501754451..77cd593ec 100644 --- a/src/api/nitro/room/DispatchTouchEvent.ts +++ b/src/api/nitro/room/DispatchTouchEvent.ts @@ -1,82 +1,82 @@ -import { MouseEventType, TouchEventType } from '@nitrots/nitro-renderer'; -import { GetRoomEngine } from './GetRoomEngine'; +import { MouseEventType, TouchEventType } from "@nitrots/nitro-renderer" +import { GetRoomEngine } from "./GetRoomEngine" -let didMouseMove = false; -let lastClick = 0; -let clickCount = 0; +let didMouseMove = false +let lastClick = 0 +let clickCount = 0 export const DispatchTouchEvent = (event: TouchEvent, canvasId: number = 1, longTouch: boolean = false, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false) => { - let x = 0; - let y = 0; + let x = 0 + let y = 0 if(event.touches[0]) { - x = event.touches[0].clientX; - y = event.touches[0].clientY; + x = event.touches[0].clientX + y = event.touches[0].clientY } else if(event.changedTouches[0]) { - x = event.changedTouches[0].clientX; - y = event.changedTouches[0].clientY; + x = event.changedTouches[0].clientX + y = event.changedTouches[0].clientY } - let eventType = event.type; + let eventType = event.type - if(longTouch) eventType = TouchEventType.TOUCH_LONG; + if(longTouch) eventType = TouchEventType.TOUCH_LONG if(eventType === MouseEventType.MOUSE_CLICK || eventType === TouchEventType.TOUCH_END) { - eventType = MouseEventType.MOUSE_CLICK; + eventType = MouseEventType.MOUSE_CLICK if(lastClick) { - clickCount = 1; + clickCount = 1 - if(lastClick >= (Date.now() - 300)) clickCount++; + if(lastClick >= (Date.now() - 300)) clickCount++ } - lastClick = Date.now(); + lastClick = Date.now() if(clickCount === 2) { - if(!didMouseMove) eventType = MouseEventType.DOUBLE_CLICK; + if(!didMouseMove) eventType = MouseEventType.DOUBLE_CLICK - clickCount = 0; - lastClick = null; + clickCount = 0 + lastClick = null } } switch(eventType) { - case MouseEventType.MOUSE_CLICK: - break; - case MouseEventType.DOUBLE_CLICK: - break; - case TouchEventType.TOUCH_START: - eventType = MouseEventType.MOUSE_DOWN; - - didMouseMove = false; - break; - case TouchEventType.TOUCH_MOVE: - eventType = MouseEventType.MOUSE_MOVE; - - didMouseMove = true; - break; - case TouchEventType.TOUCH_END: - eventType = MouseEventType.MOUSE_UP; - break; - case TouchEventType.TOUCH_LONG: - eventType = MouseEventType.MOUSE_DOWN_LONG; - break; - default: return; + case MouseEventType.MOUSE_CLICK: + break + case MouseEventType.DOUBLE_CLICK: + break + case TouchEventType.TOUCH_START: + eventType = MouseEventType.MOUSE_DOWN + + didMouseMove = false + break + case TouchEventType.TOUCH_MOVE: + eventType = MouseEventType.MOUSE_MOVE + + didMouseMove = true + break + case TouchEventType.TOUCH_END: + eventType = MouseEventType.MOUSE_UP + break + case TouchEventType.TOUCH_LONG: + eventType = MouseEventType.MOUSE_DOWN_LONG + break + default: return } if (eventType === TouchEventType.TOUCH_START) { - GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false); + GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false) } - GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false); + GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false) } diff --git a/src/api/nitro/room/GetOwnRoomObject.ts b/src/api/nitro/room/GetOwnRoomObject.ts index b8d036467..83e8392a3 100644 --- a/src/api/nitro/room/GetOwnRoomObject.ts +++ b/src/api/nitro/room/GetOwnRoomObject.ts @@ -1,32 +1,32 @@ -import { IRoomObjectController, RoomObjectCategory } from '@nitrots/nitro-renderer'; -import { GetRoomSession, GetSessionDataManager } from '../session'; -import { GetRoomEngine } from './GetRoomEngine'; +import { IRoomObjectController, RoomObjectCategory } from "@nitrots/nitro-renderer" +import { GetRoomSession, GetSessionDataManager } from "../session" +import { GetRoomEngine } from "./GetRoomEngine" export function GetOwnRoomObject(): IRoomObjectController { - const userId = GetSessionDataManager().userId; - const roomId = GetRoomEngine().activeRoomId; - const category = RoomObjectCategory.UNIT; - const totalObjects = GetRoomEngine().getTotalObjectsForManager(roomId, category); + const userId = GetSessionDataManager().userId + const roomId = GetRoomEngine().activeRoomId + const category = RoomObjectCategory.UNIT + const totalObjects = GetRoomEngine().getTotalObjectsForManager(roomId, category) - let i = 0; + let i = 0 while(i < totalObjects) { - const roomObject = GetRoomEngine().getRoomObjectByIndex(roomId, i, category); + const roomObject = GetRoomEngine().getRoomObjectByIndex(roomId, i, category) if(roomObject) { - const userData = GetRoomSession().userDataManager.getUserDataByIndex(roomObject.id); + const userData = GetRoomSession().userDataManager.getUserDataByIndex(roomObject.id) if(userData) { - if(userData.webID === userId) return roomObject; + if(userData.webID === userId) return roomObject } } - i++; + i++ } - return null; + return null } diff --git a/src/api/nitro/room/GetRoomEngine.ts b/src/api/nitro/room/GetRoomEngine.ts index 4d18ea71d..01c7a464d 100644 --- a/src/api/nitro/room/GetRoomEngine.ts +++ b/src/api/nitro/room/GetRoomEngine.ts @@ -1,7 +1,7 @@ -import { IRoomEngine } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from '../GetNitroInstance'; +import { IRoomEngine } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "../GetNitroInstance" export function GetRoomEngine(): IRoomEngine { - return GetNitroInstance().roomEngine; + return GetNitroInstance().roomEngine } diff --git a/src/api/nitro/room/GetRoomObjectBounds.ts b/src/api/nitro/room/GetRoomObjectBounds.ts index 0a42ad650..97e0af0fc 100644 --- a/src/api/nitro/room/GetRoomObjectBounds.ts +++ b/src/api/nitro/room/GetRoomObjectBounds.ts @@ -1,13 +1,13 @@ -import { GetRoomEngine } from './GetRoomEngine'; +import { GetRoomEngine } from "./GetRoomEngine" export const GetRoomObjectBounds = (roomId: number, objectId: number, category: number, canvasId = 1) => { - const rectangle = GetRoomEngine().getRoomObjectBoundingRectangle(roomId, objectId, category, canvasId); + const rectangle = GetRoomEngine().getRoomObjectBoundingRectangle(roomId, objectId, category, canvasId) - if(!rectangle) return null; + if(!rectangle) return null - rectangle.x = Math.round(rectangle.x); - rectangle.y = Math.round(rectangle.y); + rectangle.x = Math.round(rectangle.x) + rectangle.y = Math.round(rectangle.y) - return rectangle; + return rectangle } diff --git a/src/api/nitro/room/GetRoomObjectScreenLocation.ts b/src/api/nitro/room/GetRoomObjectScreenLocation.ts index 1a8d973d2..89819d095 100644 --- a/src/api/nitro/room/GetRoomObjectScreenLocation.ts +++ b/src/api/nitro/room/GetRoomObjectScreenLocation.ts @@ -1,13 +1,13 @@ -import { GetRoomEngine } from './GetRoomEngine'; +import { GetRoomEngine } from "./GetRoomEngine" export const GetRoomObjectScreenLocation = (roomId: number, objectId: number, category: number, canvasId = 1) => { - const point = GetRoomEngine().getRoomObjectScreenLocation(roomId, objectId, category, canvasId); + const point = GetRoomEngine().getRoomObjectScreenLocation(roomId, objectId, category, canvasId) - if(!point) return null; + if(!point) return null - point.x = Math.round(point.x); - point.y = Math.round(point.y); + point.x = Math.round(point.x) + point.y = Math.round(point.y) - return point; + return point } diff --git a/src/api/nitro/room/InitializeRoomInstanceRenderingCanvas.ts b/src/api/nitro/room/InitializeRoomInstanceRenderingCanvas.ts index d85d739c2..9dd4eeea2 100644 --- a/src/api/nitro/room/InitializeRoomInstanceRenderingCanvas.ts +++ b/src/api/nitro/room/InitializeRoomInstanceRenderingCanvas.ts @@ -1,9 +1,9 @@ -import { GetRoomEngine } from './GetRoomEngine'; +import { GetRoomEngine } from "./GetRoomEngine" export const InitializeRoomInstanceRenderingCanvas = (width: number, height: number, canvasId: number = 1) => { - const roomEngine = GetRoomEngine(); - const roomId = roomEngine.activeRoomId; + const roomEngine = GetRoomEngine() + const roomId = roomEngine.activeRoomId - roomEngine.initializeRoomInstanceRenderingCanvas(roomId, canvasId, width, height); + roomEngine.initializeRoomInstanceRenderingCanvas(roomId, canvasId, width, height) } diff --git a/src/api/nitro/room/IsFurnitureSelectionDisabled.ts b/src/api/nitro/room/IsFurnitureSelectionDisabled.ts index 367f3895f..bf7d1c333 100644 --- a/src/api/nitro/room/IsFurnitureSelectionDisabled.ts +++ b/src/api/nitro/room/IsFurnitureSelectionDisabled.ts @@ -1,24 +1,24 @@ -import { RoomEngineObjectEvent, RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from '../..'; -import { GetRoomEngine } from './GetRoomEngine'; +import { RoomEngineObjectEvent, RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "../.." +import { GetRoomEngine } from "./GetRoomEngine" export function IsFurnitureSelectionDisabled(event: RoomEngineObjectEvent): boolean { - let result = false; + let result = false - const roomObject = GetRoomEngine().getRoomObject(event.roomId, event.objectId, event.category); + const roomObject = GetRoomEngine().getRoomObject(event.roomId, event.objectId, event.category) if(roomObject) { - const selectionDisabled = (roomObject.model.getValue(RoomObjectVariable.FURNITURE_SELECTION_DISABLED) === 1); + const selectionDisabled = (roomObject.model.getValue(RoomObjectVariable.FURNITURE_SELECTION_DISABLED) === 1) if(selectionDisabled) { - result = true; + result = true - if(GetSessionDataManager().isModerator) result = false; + if(GetSessionDataManager().isModerator) result = false } } - return result; + return result } diff --git a/src/api/nitro/room/ProcessRoomObjectOperation.ts b/src/api/nitro/room/ProcessRoomObjectOperation.ts index b9187faab..c44c9f1c9 100644 --- a/src/api/nitro/room/ProcessRoomObjectOperation.ts +++ b/src/api/nitro/room/ProcessRoomObjectOperation.ts @@ -1,6 +1,6 @@ -import { GetRoomEngine } from './GetRoomEngine'; +import { GetRoomEngine } from "./GetRoomEngine" export function ProcessRoomObjectOperation(objectId: number, category: number, operation: string): void { - GetRoomEngine().processRoomObjectOperation(objectId, category, operation); + GetRoomEngine().processRoomObjectOperation(objectId, category, operation) } diff --git a/src/api/nitro/room/SetActiveRoomId.ts b/src/api/nitro/room/SetActiveRoomId.ts index 2cccd8454..a82482dc9 100644 --- a/src/api/nitro/room/SetActiveRoomId.ts +++ b/src/api/nitro/room/SetActiveRoomId.ts @@ -1,6 +1,6 @@ -import { GetRoomEngine } from './GetRoomEngine'; +import { GetRoomEngine } from "./GetRoomEngine" export function SetActiveRoomId(roomId: number): void { - GetRoomEngine().setActiveRoomId(roomId); + GetRoomEngine().setActiveRoomId(roomId) } diff --git a/src/api/nitro/room/index.ts b/src/api/nitro/room/index.ts index 764b72e9d..d29c90ddd 100644 --- a/src/api/nitro/room/index.ts +++ b/src/api/nitro/room/index.ts @@ -1,10 +1,10 @@ -export * from './DispatchMouseEvent'; -export * from './DispatchTouchEvent'; -export * from './GetOwnRoomObject'; -export * from './GetRoomEngine'; -export * from './GetRoomObjectBounds'; -export * from './GetRoomObjectScreenLocation'; -export * from './InitializeRoomInstanceRenderingCanvas'; -export * from './IsFurnitureSelectionDisabled'; -export * from './ProcessRoomObjectOperation'; -export * from './SetActiveRoomId'; +export * from "./DispatchMouseEvent" +export * from "./DispatchTouchEvent" +export * from "./GetOwnRoomObject" +export * from "./GetRoomEngine" +export * from "./GetRoomObjectBounds" +export * from "./GetRoomObjectScreenLocation" +export * from "./InitializeRoomInstanceRenderingCanvas" +export * from "./IsFurnitureSelectionDisabled" +export * from "./ProcessRoomObjectOperation" +export * from "./SetActiveRoomId" diff --git a/src/api/nitro/session/CanManipulateFurniture.ts b/src/api/nitro/session/CanManipulateFurniture.ts index 8655292cd..1c5d13842 100644 --- a/src/api/nitro/session/CanManipulateFurniture.ts +++ b/src/api/nitro/session/CanManipulateFurniture.ts @@ -1,11 +1,11 @@ -import { IRoomSession, RoomControllerLevel } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from '../..'; -import { GetRoomEngine } from '../room/GetRoomEngine'; -import { IsOwnerOfFurniture } from './IsOwnerOfFurniture'; +import { IRoomSession, RoomControllerLevel } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "../.." +import { GetRoomEngine } from "../room/GetRoomEngine" +import { IsOwnerOfFurniture } from "./IsOwnerOfFurniture" export function CanManipulateFurniture(roomSession: IRoomSession, objectId: number, category: number): boolean { - if(!roomSession) return false; + if(!roomSession) return false - return (roomSession.isRoomOwner || (roomSession.controllerLevel >= RoomControllerLevel.GUEST) || GetSessionDataManager().isModerator || IsOwnerOfFurniture(GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category))); + return (roomSession.isRoomOwner || (roomSession.controllerLevel >= RoomControllerLevel.GUEST) || GetSessionDataManager().isModerator || IsOwnerOfFurniture(GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category))) } diff --git a/src/api/nitro/session/CreateRoomSession.ts b/src/api/nitro/session/CreateRoomSession.ts index 3be6a8abc..74b7e1184 100644 --- a/src/api/nitro/session/CreateRoomSession.ts +++ b/src/api/nitro/session/CreateRoomSession.ts @@ -1,6 +1,6 @@ -import { GetRoomSessionManager } from './GetRoomSessionManager'; +import { GetRoomSessionManager } from "./GetRoomSessionManager" export function CreateRoomSession(roomId: number, password: string = null): void { - GetRoomSessionManager().createSession(roomId, password); + GetRoomSessionManager().createSession(roomId, password) } diff --git a/src/api/nitro/session/GetCanStandUp.ts b/src/api/nitro/session/GetCanStandUp.ts index 4915d183e..93b30917b 100644 --- a/src/api/nitro/session/GetCanStandUp.ts +++ b/src/api/nitro/session/GetCanStandUp.ts @@ -1,13 +1,13 @@ -import { AvatarAction, RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetOwnRoomObject } from '../room'; +import { AvatarAction, RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetOwnRoomObject } from "../room" export function GetCanStandUp(): string { - const roomObject = GetOwnRoomObject(); + const roomObject = GetOwnRoomObject() - if(!roomObject) return AvatarAction.POSTURE_STAND; + if(!roomObject) return AvatarAction.POSTURE_STAND - const model = roomObject.model; + const model = roomObject.model - return model.getValue(RoomObjectVariable.FIGURE_CAN_STAND_UP); + return model.getValue(RoomObjectVariable.FIGURE_CAN_STAND_UP) } diff --git a/src/api/nitro/session/GetCanUseExpression.ts b/src/api/nitro/session/GetCanUseExpression.ts index c7c73676c..8b28e3ee9 100644 --- a/src/api/nitro/session/GetCanUseExpression.ts +++ b/src/api/nitro/session/GetCanUseExpression.ts @@ -1,14 +1,14 @@ -import { RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetOwnRoomObject } from '../room'; +import { RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetOwnRoomObject } from "../room" export function GetCanUseExpression(): boolean { - const roomObject = GetOwnRoomObject(); + const roomObject = GetOwnRoomObject() - if(!roomObject) return false; + if(!roomObject) return false - const model = roomObject.model; - const effectId = model.getValue(RoomObjectVariable.FIGURE_EFFECT); + const model = roomObject.model + const effectId = model.getValue(RoomObjectVariable.FIGURE_EFFECT) - return !((effectId === 29) || (effectId === 30) || (effectId === 185)); + return !((effectId === 29) || (effectId === 30) || (effectId === 185)) } diff --git a/src/api/nitro/session/GetClubMemberLevel.ts b/src/api/nitro/session/GetClubMemberLevel.ts index fea75b7f7..31cab2093 100644 --- a/src/api/nitro/session/GetClubMemberLevel.ts +++ b/src/api/nitro/session/GetClubMemberLevel.ts @@ -1,10 +1,10 @@ -import { HabboClubLevelEnum } from '@nitrots/nitro-renderer'; -import { GetConfiguration } from '..'; -import { GetSessionDataManager } from './GetSessionDataManager'; +import { HabboClubLevelEnum } from "@nitrots/nitro-renderer" +import { GetConfiguration } from ".." +import { GetSessionDataManager } from "./GetSessionDataManager" export function GetClubMemberLevel(): number { - if(GetConfiguration('hc.disabled', false)) return HabboClubLevelEnum.VIP; + if(GetConfiguration("hc.disabled", false)) return HabboClubLevelEnum.VIP - return GetSessionDataManager().clubLevel; + return GetSessionDataManager().clubLevel } diff --git a/src/api/nitro/session/GetFurnitureData.ts b/src/api/nitro/session/GetFurnitureData.ts index 71afef86e..5093ee40c 100644 --- a/src/api/nitro/session/GetFurnitureData.ts +++ b/src/api/nitro/session/GetFurnitureData.ts @@ -1,20 +1,20 @@ -import { IFurnitureData } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from '.'; -import { ProductTypeEnum } from '../../catalog'; +import { IFurnitureData } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "." +import { ProductTypeEnum } from "../../catalog" export function GetFurnitureData(furniClassId: number, productType: string): IFurnitureData { - let furniData: IFurnitureData = null; + let furniData: IFurnitureData = null switch(productType.toLowerCase()) { - case ProductTypeEnum.FLOOR: - furniData = GetSessionDataManager().getFloorItemData(furniClassId); - break; - case ProductTypeEnum.WALL: - furniData = GetSessionDataManager().getWallItemData(furniClassId); - break; + case ProductTypeEnum.FLOOR: + furniData = GetSessionDataManager().getFloorItemData(furniClassId) + break + case ProductTypeEnum.WALL: + furniData = GetSessionDataManager().getWallItemData(furniClassId) + break } - return furniData; + return furniData } diff --git a/src/api/nitro/session/GetFurnitureDataForProductOffer.ts b/src/api/nitro/session/GetFurnitureDataForProductOffer.ts index 0588835c4..b9cf58dc6 100644 --- a/src/api/nitro/session/GetFurnitureDataForProductOffer.ts +++ b/src/api/nitro/session/GetFurnitureDataForProductOffer.ts @@ -1,21 +1,21 @@ -import { CatalogPageMessageProductData, FurnitureType, IFurnitureData } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from './GetSessionDataManager'; +import { CatalogPageMessageProductData, FurnitureType, IFurnitureData } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "./GetSessionDataManager" export function GetFurnitureDataForProductOffer(offer: CatalogPageMessageProductData): IFurnitureData { - if(!offer) return null; + if(!offer) return null - let furniData: IFurnitureData = null; + let furniData: IFurnitureData = null switch((offer.productType.toUpperCase())) { - case FurnitureType.FLOOR: - furniData = GetSessionDataManager().getFloorItemData(offer.furniClassId); - break; - case FurnitureType.WALL: - furniData = GetSessionDataManager().getWallItemData(offer.furniClassId); - break; + case FurnitureType.FLOOR: + furniData = GetSessionDataManager().getFloorItemData(offer.furniClassId) + break + case FurnitureType.WALL: + furniData = GetSessionDataManager().getWallItemData(offer.furniClassId) + break } - return furniData; + return furniData } diff --git a/src/api/nitro/session/GetFurnitureDataForRoomObject.ts b/src/api/nitro/session/GetFurnitureDataForRoomObject.ts index 360f18d17..c9b9970a6 100644 --- a/src/api/nitro/session/GetFurnitureDataForRoomObject.ts +++ b/src/api/nitro/session/GetFurnitureDataForRoomObject.ts @@ -1,22 +1,22 @@ -import { IFurnitureData, RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetRoomEngine } from '../room'; -import { GetSessionDataManager } from './GetSessionDataManager'; +import { IFurnitureData, RoomObjectCategory, RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetRoomEngine } from "../room" +import { GetSessionDataManager } from "./GetSessionDataManager" export function GetFurnitureDataForRoomObject(roomId: number, objectId: number, category: number): IFurnitureData { - const roomObject = GetRoomEngine().getRoomObject(roomId, objectId, category); + const roomObject = GetRoomEngine().getRoomObject(roomId, objectId, category) - if(!roomObject) return; + if(!roomObject) return - const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID) switch(category) { - case RoomObjectCategory.FLOOR: - return GetSessionDataManager().getFloorItemData(typeId); - case RoomObjectCategory.WALL: - return GetSessionDataManager().getWallItemData(typeId); + case RoomObjectCategory.FLOOR: + return GetSessionDataManager().getFloorItemData(typeId) + case RoomObjectCategory.WALL: + return GetSessionDataManager().getWallItemData(typeId) } - return null; + return null } diff --git a/src/api/nitro/session/GetOwnPosture.ts b/src/api/nitro/session/GetOwnPosture.ts index fe0c5f33c..8b22ca7e8 100644 --- a/src/api/nitro/session/GetOwnPosture.ts +++ b/src/api/nitro/session/GetOwnPosture.ts @@ -1,13 +1,13 @@ -import { AvatarAction, RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetOwnRoomObject } from '../room'; +import { AvatarAction, RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetOwnRoomObject } from "../room" export function GetOwnPosture(): string { - const roomObject = GetOwnRoomObject(); + const roomObject = GetOwnRoomObject() - if(!roomObject) return AvatarAction.POSTURE_STAND; + if(!roomObject) return AvatarAction.POSTURE_STAND - const model = roomObject.model; + const model = roomObject.model - return model.getValue(RoomObjectVariable.FIGURE_POSTURE); + return model.getValue(RoomObjectVariable.FIGURE_POSTURE) } diff --git a/src/api/nitro/session/GetProductDataForLocalization.ts b/src/api/nitro/session/GetProductDataForLocalization.ts index 692e0ecc7..84304dafc 100644 --- a/src/api/nitro/session/GetProductDataForLocalization.ts +++ b/src/api/nitro/session/GetProductDataForLocalization.ts @@ -1,9 +1,9 @@ -import { IProductData } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from './GetSessionDataManager'; +import { IProductData } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "./GetSessionDataManager" export function GetProductDataForLocalization(localizationId: string): IProductData { - if(!localizationId) return null; + if(!localizationId) return null - return GetSessionDataManager().getProductData(localizationId); + return GetSessionDataManager().getProductData(localizationId) } diff --git a/src/api/nitro/session/GetRoomSession.ts b/src/api/nitro/session/GetRoomSession.ts index 37a8b9f4d..5f706491e 100644 --- a/src/api/nitro/session/GetRoomSession.ts +++ b/src/api/nitro/session/GetRoomSession.ts @@ -1,7 +1,7 @@ -import { IRoomSession } from '@nitrots/nitro-renderer'; -import { GetRoomSessionManager } from './GetRoomSessionManager'; +import { IRoomSession } from "@nitrots/nitro-renderer" +import { GetRoomSessionManager } from "./GetRoomSessionManager" export function GetRoomSession(): IRoomSession { - return GetRoomSessionManager().getSession(-1); + return GetRoomSessionManager().getSession(-1) } diff --git a/src/api/nitro/session/GetRoomSessionManager.ts b/src/api/nitro/session/GetRoomSessionManager.ts index 579342dcb..004e46b6f 100644 --- a/src/api/nitro/session/GetRoomSessionManager.ts +++ b/src/api/nitro/session/GetRoomSessionManager.ts @@ -1,7 +1,7 @@ -import { IRoomSessionManager } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from '../GetNitroInstance'; +import { IRoomSessionManager } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "../GetNitroInstance" export function GetRoomSessionManager(): IRoomSessionManager { - return GetNitroInstance().roomSessionManager; + return GetNitroInstance().roomSessionManager } diff --git a/src/api/nitro/session/GetSessionDataManager.ts b/src/api/nitro/session/GetSessionDataManager.ts index 1f3674e08..9658f2928 100644 --- a/src/api/nitro/session/GetSessionDataManager.ts +++ b/src/api/nitro/session/GetSessionDataManager.ts @@ -1,7 +1,7 @@ -import { ISessionDataManager } from '@nitrots/nitro-renderer'; -import { GetNitroInstance } from '../GetNitroInstance'; +import { ISessionDataManager } from "@nitrots/nitro-renderer" +import { GetNitroInstance } from "../GetNitroInstance" export function GetSessionDataManager(): ISessionDataManager { - return GetNitroInstance().sessionDataManager; + return GetNitroInstance().sessionDataManager } diff --git a/src/api/nitro/session/GoToDesktop.ts b/src/api/nitro/session/GoToDesktop.ts index 1bbe0168a..b264523c2 100644 --- a/src/api/nitro/session/GoToDesktop.ts +++ b/src/api/nitro/session/GoToDesktop.ts @@ -1,7 +1,7 @@ -import { DesktopViewComposer } from '@nitrots/nitro-renderer'; -import { SendMessageComposer } from '..'; +import { DesktopViewComposer } from "@nitrots/nitro-renderer" +import { SendMessageComposer } from ".." export function GoToDesktop(): void { - SendMessageComposer(new DesktopViewComposer()); + SendMessageComposer(new DesktopViewComposer()) } diff --git a/src/api/nitro/session/HasHabboClub.ts b/src/api/nitro/session/HasHabboClub.ts index 4077a0f3c..7dd0f1193 100644 --- a/src/api/nitro/session/HasHabboClub.ts +++ b/src/api/nitro/session/HasHabboClub.ts @@ -1,7 +1,7 @@ -import { HabboClubLevelEnum } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from './GetSessionDataManager'; +import { HabboClubLevelEnum } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "./GetSessionDataManager" export function HasHabboClub(): boolean { - return (GetSessionDataManager().clubLevel >= HabboClubLevelEnum.CLUB); + return (GetSessionDataManager().clubLevel >= HabboClubLevelEnum.CLUB) } diff --git a/src/api/nitro/session/HasHabboVip.ts b/src/api/nitro/session/HasHabboVip.ts index 87f115650..62dfb9b86 100644 --- a/src/api/nitro/session/HasHabboVip.ts +++ b/src/api/nitro/session/HasHabboVip.ts @@ -1,7 +1,7 @@ -import { HabboClubLevelEnum } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from './GetSessionDataManager'; +import { HabboClubLevelEnum } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "./GetSessionDataManager" export function HasHabboVip(): boolean { - return (GetSessionDataManager().clubLevel >= HabboClubLevelEnum.VIP); + return (GetSessionDataManager().clubLevel >= HabboClubLevelEnum.VIP) } diff --git a/src/api/nitro/session/IsOwnerOfFloorFurniture.ts b/src/api/nitro/session/IsOwnerOfFloorFurniture.ts index 65ef7fb39..2a67761f9 100644 --- a/src/api/nitro/session/IsOwnerOfFloorFurniture.ts +++ b/src/api/nitro/session/IsOwnerOfFloorFurniture.ts @@ -1,16 +1,16 @@ -import { RoomObjectCategory, RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetRoomSession } from '.'; -import { GetRoomEngine } from '..'; -import { GetSessionDataManager } from '../../../api'; +import { RoomObjectCategory, RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetRoomSession } from "." +import { GetRoomEngine } from ".." +import { GetSessionDataManager } from "../../../api" export function IsOwnerOfFloorFurniture(id: number): boolean { - const roomObject = GetRoomEngine().getRoomObject(GetRoomSession().roomId, id, RoomObjectCategory.FLOOR); + const roomObject = GetRoomEngine().getRoomObject(GetRoomSession().roomId, id, RoomObjectCategory.FLOOR) - if(!roomObject || !roomObject.model) return false; + if(!roomObject || !roomObject.model) return false - const userId = GetSessionDataManager().userId; - const objectOwnerId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID); + const userId = GetSessionDataManager().userId + const objectOwnerId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID) - return (userId === objectOwnerId); + return (userId === objectOwnerId) } diff --git a/src/api/nitro/session/IsOwnerOfFurniture.ts b/src/api/nitro/session/IsOwnerOfFurniture.ts index 56b7fc34a..c9079b91a 100644 --- a/src/api/nitro/session/IsOwnerOfFurniture.ts +++ b/src/api/nitro/session/IsOwnerOfFurniture.ts @@ -1,12 +1,12 @@ -import { IRoomObject, RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetSessionDataManager } from '../../../api'; +import { IRoomObject, RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetSessionDataManager } from "../../../api" export function IsOwnerOfFurniture(roomObject: IRoomObject): boolean { - if(!roomObject || !roomObject.model) return false; + if(!roomObject || !roomObject.model) return false - const userId = GetSessionDataManager().userId; - const objectOwnerId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID); + const userId = GetSessionDataManager().userId + const objectOwnerId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID) - return (userId === objectOwnerId); + return (userId === objectOwnerId) } diff --git a/src/api/nitro/session/IsRidingHorse.ts b/src/api/nitro/session/IsRidingHorse.ts index f946b69be..9646c239b 100644 --- a/src/api/nitro/session/IsRidingHorse.ts +++ b/src/api/nitro/session/IsRidingHorse.ts @@ -1,14 +1,14 @@ -import { RoomObjectVariable } from '@nitrots/nitro-renderer'; -import { GetOwnRoomObject } from '../room'; +import { RoomObjectVariable } from "@nitrots/nitro-renderer" +import { GetOwnRoomObject } from "../room" export function IsRidingHorse(): boolean { - const roomObject = GetOwnRoomObject(); + const roomObject = GetOwnRoomObject() - if(!roomObject) return false; + if(!roomObject) return false - const model = roomObject.model; - const effectId = model.getValue(RoomObjectVariable.FIGURE_EFFECT); + const model = roomObject.model + const effectId = model.getValue(RoomObjectVariable.FIGURE_EFFECT) - return (effectId === 77); + return (effectId === 77) } diff --git a/src/api/nitro/session/StartRoomSession.ts b/src/api/nitro/session/StartRoomSession.ts index 99d9d0bec..9cceefc73 100644 --- a/src/api/nitro/session/StartRoomSession.ts +++ b/src/api/nitro/session/StartRoomSession.ts @@ -1,7 +1,7 @@ -import { IRoomSession } from '@nitrots/nitro-renderer'; -import { GetRoomSessionManager } from './GetRoomSessionManager'; +import { IRoomSession } from "@nitrots/nitro-renderer" +import { GetRoomSessionManager } from "./GetRoomSessionManager" export function StartRoomSession(session: IRoomSession): void { - GetRoomSessionManager().startSession(session); + GetRoomSessionManager().startSession(session) } diff --git a/src/api/nitro/session/VisitDesktop.ts b/src/api/nitro/session/VisitDesktop.ts index e7416a354..5a6dbd933 100644 --- a/src/api/nitro/session/VisitDesktop.ts +++ b/src/api/nitro/session/VisitDesktop.ts @@ -1,9 +1,9 @@ -import { GetRoomSession, GetRoomSessionManager, GoToDesktop } from '.'; +import { GetRoomSession, GetRoomSessionManager, GoToDesktop } from "." export const VisitDesktop = () => { - if(!GetRoomSession()) return; + if(!GetRoomSession()) return - GoToDesktop(); - GetRoomSessionManager().removeSession(-1); + GoToDesktop() + GetRoomSessionManager().removeSession(-1) } diff --git a/src/api/nitro/session/index.ts b/src/api/nitro/session/index.ts index a860d7a05..1efb8e2da 100644 --- a/src/api/nitro/session/index.ts +++ b/src/api/nitro/session/index.ts @@ -1,21 +1,21 @@ -export * from './CanManipulateFurniture'; -export * from './CreateRoomSession'; -export * from './GetCanStandUp'; -export * from './GetCanUseExpression'; -export * from './GetClubMemberLevel'; -export * from './GetFurnitureData'; -export * from './GetFurnitureDataForProductOffer'; -export * from './GetFurnitureDataForRoomObject'; -export * from './GetOwnPosture'; -export * from './GetProductDataForLocalization'; -export * from './GetRoomSession'; -export * from './GetRoomSessionManager'; -export * from './GetSessionDataManager'; -export * from './GoToDesktop'; -export * from './HasHabboClub'; -export * from './HasHabboVip'; -export * from './IsOwnerOfFloorFurniture'; -export * from './IsOwnerOfFurniture'; -export * from './IsRidingHorse'; -export * from './StartRoomSession'; -export * from './VisitDesktop'; +export * from "./CanManipulateFurniture" +export * from "./CreateRoomSession" +export * from "./GetCanStandUp" +export * from "./GetCanUseExpression" +export * from "./GetClubMemberLevel" +export * from "./GetFurnitureData" +export * from "./GetFurnitureDataForProductOffer" +export * from "./GetFurnitureDataForRoomObject" +export * from "./GetOwnPosture" +export * from "./GetProductDataForLocalization" +export * from "./GetRoomSession" +export * from "./GetRoomSessionManager" +export * from "./GetSessionDataManager" +export * from "./GoToDesktop" +export * from "./HasHabboClub" +export * from "./HasHabboVip" +export * from "./IsOwnerOfFloorFurniture" +export * from "./IsOwnerOfFurniture" +export * from "./IsRidingHorse" +export * from "./StartRoomSession" +export * from "./VisitDesktop" diff --git a/src/api/notification/NotificationAlertItem.ts b/src/api/notification/NotificationAlertItem.ts index 2d7702c7b..a4553cbc9 100644 --- a/src/api/notification/NotificationAlertItem.ts +++ b/src/api/notification/NotificationAlertItem.ts @@ -1,67 +1,67 @@ -import { NotificationAlertType } from './NotificationAlertType'; +import { NotificationAlertType } from "./NotificationAlertType" export class NotificationAlertItem { - private static ITEM_ID: number = -1; + private static ITEM_ID: number = -1 - private _id: number; - private _messages: string[]; - private _alertType: string; - private _clickUrl: string; - private _clickUrlText: string; - private _title: string; - private _imageUrl: string; + private _id: number + private _messages: string[] + private _alertType: string + private _clickUrl: string + private _clickUrlText: string + private _title: string + private _imageUrl: string constructor(messages: string[], alertType: string = NotificationAlertType.DEFAULT, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null) { - NotificationAlertItem.ITEM_ID += 1; + NotificationAlertItem.ITEM_ID += 1 - this._id = NotificationAlertItem.ITEM_ID; - this._messages = messages; - this._alertType = alertType; - this._clickUrl = clickUrl; - this._clickUrlText = clickUrlText; - this._title = title; - this._imageUrl = imageUrl; + this._id = NotificationAlertItem.ITEM_ID + this._messages = messages + this._alertType = alertType + this._clickUrl = clickUrl + this._clickUrlText = clickUrlText + this._title = title + this._imageUrl = imageUrl } public get id(): number { - return this._id; + return this._id } public get messages(): string[] { - return this._messages; + return this._messages } public set alertType(alertType: string) { - this._alertType = alertType; + this._alertType = alertType } public get alertType(): string { - return this._alertType; + return this._alertType } public get clickUrl(): string { - return this._clickUrl; + return this._clickUrl } public get clickUrlText(): string { - return this._clickUrlText; + return this._clickUrlText } public get title(): string { - return this._title; + return this._title } public get imageUrl(): string { - return this._imageUrl; + return this._imageUrl } } diff --git a/src/api/notification/NotificationAlertType.ts b/src/api/notification/NotificationAlertType.ts index ad804e806..7a482cab8 100644 --- a/src/api/notification/NotificationAlertType.ts +++ b/src/api/notification/NotificationAlertType.ts @@ -1,10 +1,10 @@ export class NotificationAlertType { - public static DEFAULT: string = 'default'; - public static MOTD: string = 'motd'; - public static MODERATION: string = 'moderation'; - public static EVENT: string = 'event'; - public static NITRO: string = 'nitro'; - public static SEARCH: string = 'search'; - public static ALERT: string = 'alert'; + public static DEFAULT: string = "default" + public static MOTD: string = "motd" + public static MODERATION: string = "moderation" + public static EVENT: string = "event" + public static NITRO: string = "nitro" + public static SEARCH: string = "search" + public static ALERT: string = "alert" } diff --git a/src/api/notification/NotificationBubbleItem.ts b/src/api/notification/NotificationBubbleItem.ts index fe90dab70..372770d5c 100644 --- a/src/api/notification/NotificationBubbleItem.ts +++ b/src/api/notification/NotificationBubbleItem.ts @@ -1,48 +1,48 @@ -import { NotificationBubbleType } from './NotificationBubbleType'; +import { NotificationBubbleType } from "./NotificationBubbleType" export class NotificationBubbleItem { - private static ITEM_ID: number = -1; + private static ITEM_ID: number = -1 - private _id: number; - private _message: string; - private _notificationType: string; - private _iconUrl: string; - private _linkUrl: string; + private _id: number + private _message: string + private _notificationType: string + private _iconUrl: string + private _linkUrl: string constructor(message: string, notificationType: string = NotificationBubbleType.INFO, iconUrl: string = null, linkUrl: string = null) { - NotificationBubbleItem.ITEM_ID += 1; + NotificationBubbleItem.ITEM_ID += 1 - this._id = NotificationBubbleItem.ITEM_ID; - this._message = message; - this._notificationType = notificationType; - this._iconUrl = iconUrl; - this._linkUrl = linkUrl; + this._id = NotificationBubbleItem.ITEM_ID + this._message = message + this._notificationType = notificationType + this._iconUrl = iconUrl + this._linkUrl = linkUrl } public get id(): number { - return this._id; + return this._id } public get message(): string { - return this._message; + return this._message } public get notificationType(): string { - return this._notificationType; + return this._notificationType } public get iconUrl(): string { - return this._iconUrl; + return this._iconUrl } public get linkUrl(): string { - return this._linkUrl; + return this._linkUrl } } diff --git a/src/api/notification/NotificationBubbleType.ts b/src/api/notification/NotificationBubbleType.ts index cce38f5ba..356e0a748 100644 --- a/src/api/notification/NotificationBubbleType.ts +++ b/src/api/notification/NotificationBubbleType.ts @@ -1,19 +1,19 @@ export class NotificationBubbleType { - public static FRIENDOFFLINE: string = 'friendoffline'; - public static FRIENDONLINE: string = 'friendonline'; - public static THIRDPARTYFRIENDOFFLINE: string = 'thirdpartyfriendoffline'; - public static THIRDPARTYFRIENDONLINE: string = 'thirdpartyfriendonline'; - public static ACHIEVEMENT: string = 'achievement'; - public static BADGE_RECEIVED: string = 'badge_received'; - public static INFO: string = 'info'; - public static RECYCLEROK: string = 'recyclerok'; - public static RESPECT: string = 'respect'; - public static CLUB: string = 'club'; - public static SOUNDMACHINE: string = 'soundmachine'; - public static PETLEVEL: string = 'petlevel'; - public static CLUBGIFT: string = 'clubgift'; - public static BUYFURNI: string = 'buyfurni'; - public static VIP: string = 'vip'; - public static ROOMMESSAGESPOSTED: string = 'roommessagesposted'; + public static FRIENDOFFLINE: string = "friendoffline" + public static FRIENDONLINE: string = "friendonline" + public static THIRDPARTYFRIENDOFFLINE: string = "thirdpartyfriendoffline" + public static THIRDPARTYFRIENDONLINE: string = "thirdpartyfriendonline" + public static ACHIEVEMENT: string = "achievement" + public static BADGE_RECEIVED: string = "badge_received" + public static INFO: string = "info" + public static RECYCLEROK: string = "recyclerok" + public static RESPECT: string = "respect" + public static CLUB: string = "club" + public static SOUNDMACHINE: string = "soundmachine" + public static PETLEVEL: string = "petlevel" + public static CLUBGIFT: string = "clubgift" + public static BUYFURNI: string = "buyfurni" + public static VIP: string = "vip" + public static ROOMMESSAGESPOSTED: string = "roommessagesposted" } diff --git a/src/api/notification/NotificationConfirmItem.ts b/src/api/notification/NotificationConfirmItem.ts index 045566264..13fae9085 100644 --- a/src/api/notification/NotificationConfirmItem.ts +++ b/src/api/notification/NotificationConfirmItem.ts @@ -1,67 +1,67 @@ export class NotificationConfirmItem { - private static ITEM_ID: number = -1; + private static ITEM_ID: number = -1 - private _id: number; - private _confirmType: string; - private _message: string; - private _onConfirm: Function; - private _onCancel: Function; - private _confirmText: string; - private _cancelText: string; - private _title: string; + private _id: number + private _confirmType: string + private _message: string + private _onConfirm: Function + private _onCancel: Function + private _confirmText: string + private _cancelText: string + private _title: string constructor(confirmType: string, message: string, onConfirm: Function, onCancel: Function, confirmText: string, cancelText: string, title: string) { - NotificationConfirmItem.ITEM_ID += 1; + NotificationConfirmItem.ITEM_ID += 1 - this._id = NotificationConfirmItem.ITEM_ID; - this._confirmType = confirmType; - this._message = message; - this._onConfirm = onConfirm; - this._onCancel = onCancel; - this._confirmText = confirmText; - this._cancelText = cancelText; - this._title = title; + this._id = NotificationConfirmItem.ITEM_ID + this._confirmType = confirmType + this._message = message + this._onConfirm = onConfirm + this._onCancel = onCancel + this._confirmText = confirmText + this._cancelText = cancelText + this._title = title } public get id(): number { - return this._id; + return this._id } public get confirmType(): string { - return this._confirmType; + return this._confirmType } public get message(): string { - return this._message; + return this._message } public get onConfirm(): Function { - return this._onConfirm; + return this._onConfirm } public get onCancel(): Function { - return this._onCancel; + return this._onCancel } public get confirmText(): string { - return this._confirmText; + return this._confirmText } public get cancelText(): string { - return this._cancelText; + return this._cancelText } public get title(): string { - return this._title; + return this._title } } diff --git a/src/api/notification/NotificationConfirmType.ts b/src/api/notification/NotificationConfirmType.ts index 533ca053f..52bd515ae 100644 --- a/src/api/notification/NotificationConfirmType.ts +++ b/src/api/notification/NotificationConfirmType.ts @@ -1,4 +1,4 @@ export class NotificationConfirmType { - public static DEFAULT: string = 'default'; + public static DEFAULT: string = "default" } diff --git a/src/api/notification/index.ts b/src/api/notification/index.ts index 23476d358..f41d1b5f2 100644 --- a/src/api/notification/index.ts +++ b/src/api/notification/index.ts @@ -1,6 +1,6 @@ -export * from './NotificationAlertItem'; -export * from './NotificationAlertType'; -export * from './NotificationBubbleItem'; -export * from './NotificationBubbleType'; -export * from './NotificationConfirmItem'; -export * from './NotificationConfirmType'; +export * from "./NotificationAlertItem" +export * from "./NotificationAlertType" +export * from "./NotificationBubbleItem" +export * from "./NotificationBubbleType" +export * from "./NotificationConfirmItem" +export * from "./NotificationConfirmType" diff --git a/src/api/purse/Purse.ts b/src/api/purse/Purse.ts index 6970e59c5..71c027591 100644 --- a/src/api/purse/Purse.ts +++ b/src/api/purse/Purse.ts @@ -1,165 +1,165 @@ -import { GetTickerTime, HabboClubLevelEnum } from '@nitrots/nitro-renderer'; -import { IPurse } from './IPurse'; +import { GetTickerTime, HabboClubLevelEnum } from "@nitrots/nitro-renderer" +import { IPurse } from "./IPurse" export class Purse implements IPurse { - private _credits: number = 0; - private _activityPoints: Map = new Map(); - private _clubDays: number = 0; - private _clubPeriods: number = 0; - private _isVIP: boolean = false; - private _pastClubDays: number = 0; - private _pastVipDays: number = 0; - private _isExpiring: boolean = false; - private _minutesUntilExpiration: number = 0; - private _minutesSinceLastModified: number = 0; - private _lastUpdated: number = 0; + private _credits: number = 0 + private _activityPoints: Map = new Map() + private _clubDays: number = 0 + private _clubPeriods: number = 0 + private _isVIP: boolean = false + private _pastClubDays: number = 0 + private _pastVipDays: number = 0 + private _isExpiring: boolean = false + private _minutesUntilExpiration: number = 0 + private _minutesSinceLastModified: number = 0 + private _lastUpdated: number = 0 public static from(purse: Purse): Purse { - const newPurse = new Purse(); + const newPurse = new Purse() - newPurse._credits = purse._credits; - newPurse._activityPoints = purse._activityPoints; - newPurse._clubDays = purse._clubDays; - newPurse._clubPeriods = purse._clubPeriods; - newPurse._isVIP = purse._isVIP; - newPurse._pastClubDays = purse._pastClubDays; - newPurse._pastVipDays = purse._pastVipDays; - newPurse._isExpiring = purse._isExpiring; - newPurse._minutesUntilExpiration = purse._minutesUntilExpiration; - newPurse._minutesSinceLastModified = purse._minutesSinceLastModified; - newPurse._lastUpdated = purse._lastUpdated; + newPurse._credits = purse._credits + newPurse._activityPoints = purse._activityPoints + newPurse._clubDays = purse._clubDays + newPurse._clubPeriods = purse._clubPeriods + newPurse._isVIP = purse._isVIP + newPurse._pastClubDays = purse._pastClubDays + newPurse._pastVipDays = purse._pastVipDays + newPurse._isExpiring = purse._isExpiring + newPurse._minutesUntilExpiration = purse._minutesUntilExpiration + newPurse._minutesSinceLastModified = purse._minutesSinceLastModified + newPurse._lastUpdated = purse._lastUpdated - return newPurse; + return newPurse } public get credits(): number { - return this._credits; + return this._credits } public set credits(credits: number) { - this._lastUpdated = GetTickerTime(); - this._credits = credits; + this._lastUpdated = GetTickerTime() + this._credits = credits } public get activityPoints(): Map { - return this._activityPoints; + return this._activityPoints } public set activityPoints(k: Map) { - this._lastUpdated = GetTickerTime(); - this._activityPoints = k; + this._lastUpdated = GetTickerTime() + this._activityPoints = k } public get clubDays(): number { - return this._clubDays; + return this._clubDays } public set clubDays(k: number) { - this._lastUpdated = GetTickerTime(); - this._clubDays = k; + this._lastUpdated = GetTickerTime() + this._clubDays = k } public get clubPeriods(): number { - return this._clubPeriods; + return this._clubPeriods } public set clubPeriods(k: number) { - this._lastUpdated = GetTickerTime(); - this._clubPeriods = k; + this._lastUpdated = GetTickerTime() + this._clubPeriods = k } public get hasClubLeft(): boolean { - return (this._clubDays > 0) || (this._clubPeriods > 0); + return (this._clubDays > 0) || (this._clubPeriods > 0) } public get isVip(): boolean { - return this._isVIP; + return this._isVIP } public set isVip(k: boolean) { - this._isVIP = k; + this._isVIP = k } public get pastClubDays(): number { - return this._pastClubDays; + return this._pastClubDays } public set pastClubDays(k: number) { - this._lastUpdated = GetTickerTime(); - this._pastClubDays = k; + this._lastUpdated = GetTickerTime() + this._pastClubDays = k } public get pastVipDays(): number { - return this._pastVipDays; + return this._pastVipDays } public set pastVipDays(k: number) { - this._lastUpdated = GetTickerTime(); - this._pastVipDays = k; + this._lastUpdated = GetTickerTime() + this._pastVipDays = k } public get isExpiring(): boolean { - return this._isExpiring; + return this._isExpiring } public set isExpiring(k: boolean) { - this._isExpiring = k; + this._isExpiring = k } public get minutesUntilExpiration(): number { - var k: number = ((GetTickerTime() - this._lastUpdated) / (1000 * 60)); - var _local_2: number = (this._minutesUntilExpiration - k); - return (_local_2 > 0) ? _local_2 : 0; + var k: number = ((GetTickerTime() - this._lastUpdated) / (1000 * 60)) + var _local_2: number = (this._minutesUntilExpiration - k) + return (_local_2 > 0) ? _local_2 : 0 } public set minutesUntilExpiration(k: number) { - this._lastUpdated = GetTickerTime(); - this._minutesUntilExpiration = k; + this._lastUpdated = GetTickerTime() + this._minutesUntilExpiration = k } public get minutesSinceLastModified(): number { - return this._minutesSinceLastModified; + return this._minutesSinceLastModified } public set minutesSinceLastModified(k: number) { - this._lastUpdated = GetTickerTime(); - this._minutesSinceLastModified = k; + this._lastUpdated = GetTickerTime() + this._minutesSinceLastModified = k } public get lastUpdated(): number { - return this._lastUpdated; + return this._lastUpdated } public get clubLevel(): number { - if(((this.clubDays === 0) && (this.clubPeriods === 0))) return HabboClubLevelEnum.NO_CLUB; + if(((this.clubDays === 0) && (this.clubPeriods === 0))) return HabboClubLevelEnum.NO_CLUB - if(this.isVip) return HabboClubLevelEnum.VIP; + if(this.isVip) return HabboClubLevelEnum.VIP - return HabboClubLevelEnum.CLUB; + return HabboClubLevelEnum.CLUB } } diff --git a/src/api/purse/index.ts b/src/api/purse/index.ts index ed3448048..67b16d0ca 100644 --- a/src/api/purse/index.ts +++ b/src/api/purse/index.ts @@ -1,2 +1,2 @@ -export * from './IPurse'; -export * from './Purse'; +export * from "./IPurse" +export * from "./Purse" diff --git a/src/api/room/events/RoomWidgetPollUpdateEvent.ts b/src/api/room/events/RoomWidgetPollUpdateEvent.ts index edfb8fd0d..96e6862ea 100644 --- a/src/api/room/events/RoomWidgetPollUpdateEvent.ts +++ b/src/api/room/events/RoomWidgetPollUpdateEvent.ts @@ -1,110 +1,110 @@ -import { IPollQuestion } from '@nitrots/nitro-renderer'; -import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; +import { IPollQuestion } from "@nitrots/nitro-renderer" +import { RoomWidgetUpdateEvent } from "./RoomWidgetUpdateEvent" export class RoomWidgetPollUpdateEvent extends RoomWidgetUpdateEvent { - public static readonly OFFER = 'RWPUW_OFFER'; - public static readonly ERROR = 'RWPUW_ERROR'; - public static readonly CONTENT = 'RWPUW_CONTENT'; - - private _id = -1; - private _summary: string; - private _headline: string; - private _numQuestions = 0; - private _startMessage = ''; - private _endMessage = ''; - private _questionArray: IPollQuestion[] = null; - private _pollType = ''; - private _npsPoll = false; + public static readonly OFFER = "RWPUW_OFFER" + public static readonly ERROR = "RWPUW_ERROR" + public static readonly CONTENT = "RWPUW_CONTENT" + + private _id = -1 + private _summary: string + private _headline: string + private _numQuestions = 0 + private _startMessage = "" + private _endMessage = "" + private _questionArray: IPollQuestion[] = null + private _pollType = "" + private _npsPoll = false constructor(type: string, id: number) { - super(type); - this._id = id; + super(type) + this._id = id } public get id(): number { - return this._id; + return this._id } public get summary(): string { - return this._summary; + return this._summary } public set summary(k: string) { - this._summary = k; + this._summary = k } public get headline(): string { - return this._headline; + return this._headline } public set headline(k: string) { - this._headline = k; + this._headline = k } public get numQuestions(): number { - return this._numQuestions; + return this._numQuestions } public set numQuestions(k: number) { - this._numQuestions = k; + this._numQuestions = k } public get startMessage(): string { - return this._startMessage; + return this._startMessage } public set startMessage(k: string) { - this._startMessage = k; + this._startMessage = k } public get endMessage(): string { - return this._endMessage; + return this._endMessage } public set endMessage(k: string) { - this._endMessage = k; + this._endMessage = k } public get questionArray(): IPollQuestion[] { - return this._questionArray; + return this._questionArray } public set questionArray(k: IPollQuestion[]) { - this._questionArray = k; + this._questionArray = k } public get pollType(): string { - return this._pollType; + return this._pollType } public set pollType(k: string) { - this._pollType = k; + this._pollType = k } public get npsPoll(): boolean { - return this._npsPoll; + return this._npsPoll } public set npsPoll(k: boolean) { - this._npsPoll = k; + this._npsPoll = k } } diff --git a/src/api/room/events/RoomWidgetUpdateBackgroundColorPreviewEvent.ts b/src/api/room/events/RoomWidgetUpdateBackgroundColorPreviewEvent.ts index 30135a3b4..928b92477 100644 --- a/src/api/room/events/RoomWidgetUpdateBackgroundColorPreviewEvent.ts +++ b/src/api/room/events/RoomWidgetUpdateBackgroundColorPreviewEvent.ts @@ -1,35 +1,35 @@ -import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; +import { RoomWidgetUpdateEvent } from "./RoomWidgetUpdateEvent" export class RoomWidgetUpdateBackgroundColorPreviewEvent extends RoomWidgetUpdateEvent { - public static PREVIEW = 'RWUBCPE_PREVIEW'; - public static CLEAR_PREVIEW = 'RWUBCPE_CLEAR_PREVIEW'; + public static PREVIEW = "RWUBCPE_PREVIEW" + public static CLEAR_PREVIEW = "RWUBCPE_CLEAR_PREVIEW" - private _hue: number; - private _saturation: number; - private _lightness: number; + private _hue: number + private _saturation: number + private _lightness: number constructor(type: string, hue: number = 0, saturation: number = 0, lightness: number = 0) { - super(type); + super(type) - this._hue = hue; - this._saturation = saturation; - this._lightness = lightness; + this._hue = hue + this._saturation = saturation + this._lightness = lightness } public get hue(): number { - return this._hue; + return this._hue } public get saturation(): number { - return this._saturation; + return this._saturation } public get lightness(): number { - return this._lightness; + return this._lightness } } diff --git a/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts b/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts index 9352372fa..3f055eb27 100644 --- a/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts +++ b/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts @@ -1,29 +1,29 @@ -import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; +import { RoomWidgetUpdateEvent } from "./RoomWidgetUpdateEvent" export class RoomWidgetUpdateChatInputContentEvent extends RoomWidgetUpdateEvent { - public static CHAT_INPUT_CONTENT: string = 'RWUCICE_CHAT_INPUT_CONTENT'; - public static WHISPER: string = 'whisper'; - public static SHOUT: string = 'shout'; + public static CHAT_INPUT_CONTENT: string = "RWUCICE_CHAT_INPUT_CONTENT" + public static WHISPER: string = "whisper" + public static SHOUT: string = "shout" - private _chatMode: string = ''; - private _userName: string = ''; + private _chatMode: string = "" + private _userName: string = "" constructor(chatMode: string, userName: string) { - super(RoomWidgetUpdateChatInputContentEvent.CHAT_INPUT_CONTENT); + super(RoomWidgetUpdateChatInputContentEvent.CHAT_INPUT_CONTENT) - this._chatMode = chatMode; - this._userName = userName; + this._chatMode = chatMode + this._userName = userName } public get chatMode(): string { - return this._chatMode; + return this._chatMode } public get userName(): string { - return this._userName; + return this._userName } } diff --git a/src/api/room/events/RoomWidgetUpdateEvent.ts b/src/api/room/events/RoomWidgetUpdateEvent.ts index 0ac8ff816..5c64a2026 100644 --- a/src/api/room/events/RoomWidgetUpdateEvent.ts +++ b/src/api/room/events/RoomWidgetUpdateEvent.ts @@ -1,4 +1,4 @@ -import { NitroEvent } from '@nitrots/nitro-renderer'; +import { NitroEvent } from "@nitrots/nitro-renderer" export class RoomWidgetUpdateEvent extends NitroEvent {} diff --git a/src/api/room/events/RoomWidgetUpdateRentableBotChatEvent.ts b/src/api/room/events/RoomWidgetUpdateRentableBotChatEvent.ts index 6191e1b99..261f5bce2 100644 --- a/src/api/room/events/RoomWidgetUpdateRentableBotChatEvent.ts +++ b/src/api/room/events/RoomWidgetUpdateRentableBotChatEvent.ts @@ -1,62 +1,62 @@ -import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; +import { RoomWidgetUpdateEvent } from "./RoomWidgetUpdateEvent" export class RoomWidgetUpdateRentableBotChatEvent extends RoomWidgetUpdateEvent { - public static UPDATE_CHAT: string = 'RWURBCE_UPDATE_CHAT'; + public static UPDATE_CHAT: string = "RWURBCE_UPDATE_CHAT" - private _objectId: number; - private _category: number; - private _botId: number; - private _chat: string; - private _automaticChat: boolean; - private _chatDelay: number; - private _mixSentences: boolean; + private _objectId: number + private _category: number + private _botId: number + private _chat: string + private _automaticChat: boolean + private _chatDelay: number + private _mixSentences: boolean constructor(objectId: number, category: number, botId: number, chat: string, automaticChat: boolean, chatDelay: number, mixSentences: boolean) { - super(RoomWidgetUpdateRentableBotChatEvent.UPDATE_CHAT); + super(RoomWidgetUpdateRentableBotChatEvent.UPDATE_CHAT) - this._objectId = objectId; - this._category = category; - this._botId = botId; - this._chat = chat; - this._automaticChat = automaticChat; - this._chatDelay = chatDelay; - this._mixSentences = mixSentences; + this._objectId = objectId + this._category = category + this._botId = botId + this._chat = chat + this._automaticChat = automaticChat + this._chatDelay = chatDelay + this._mixSentences = mixSentences } public get objectId(): number { - return this._objectId; + return this._objectId } public get category(): number { - return this._category; + return this._category } public get botId(): number { - return this._botId; + return this._botId } public get chat(): string { - return this._chat; + return this._chat } public get automaticChat(): boolean { - return this._automaticChat; + return this._automaticChat } public get chatDelay(): number { - return this._chatDelay; + return this._chatDelay } public get mixSentences(): boolean { - return this._mixSentences; + return this._mixSentences } } diff --git a/src/api/room/events/RoomWidgetUpdateRoomObjectEvent.ts b/src/api/room/events/RoomWidgetUpdateRoomObjectEvent.ts index 0660276c0..a212ab224 100644 --- a/src/api/room/events/RoomWidgetUpdateRoomObjectEvent.ts +++ b/src/api/room/events/RoomWidgetUpdateRoomObjectEvent.ts @@ -1,43 +1,43 @@ -import { RoomWidgetUpdateEvent } from './RoomWidgetUpdateEvent'; +import { RoomWidgetUpdateEvent } from "./RoomWidgetUpdateEvent" export class RoomWidgetUpdateRoomObjectEvent extends RoomWidgetUpdateEvent { - public static OBJECT_SELECTED: string = 'RWUROE_OBJECT_SELECTED'; - public static OBJECT_DESELECTED: string = 'RWUROE_OBJECT_DESELECTED'; - public static USER_REMOVED: string = 'RWUROE_USER_REMOVED'; - public static FURNI_REMOVED: string = 'RWUROE_FURNI_REMOVED'; - public static FURNI_ADDED: string = 'RWUROE_FURNI_ADDED'; - public static USER_ADDED: string = 'RWUROE_USER_ADDED'; - public static OBJECT_ROLL_OVER: string = 'RWUROE_OBJECT_ROLL_OVER'; - public static OBJECT_ROLL_OUT: string = 'RWUROE_OBJECT_ROLL_OUT'; - public static OBJECT_REQUEST_MANIPULATION: string = 'RWUROE_OBJECT_REQUEST_MANIPULATION'; - public static OBJECT_DOUBLE_CLICKED: string = 'RWUROE_OBJECT_DOUBLE_CLICKED'; + public static OBJECT_SELECTED: string = "RWUROE_OBJECT_SELECTED" + public static OBJECT_DESELECTED: string = "RWUROE_OBJECT_DESELECTED" + public static USER_REMOVED: string = "RWUROE_USER_REMOVED" + public static FURNI_REMOVED: string = "RWUROE_FURNI_REMOVED" + public static FURNI_ADDED: string = "RWUROE_FURNI_ADDED" + public static USER_ADDED: string = "RWUROE_USER_ADDED" + public static OBJECT_ROLL_OVER: string = "RWUROE_OBJECT_ROLL_OVER" + public static OBJECT_ROLL_OUT: string = "RWUROE_OBJECT_ROLL_OUT" + public static OBJECT_REQUEST_MANIPULATION: string = "RWUROE_OBJECT_REQUEST_MANIPULATION" + public static OBJECT_DOUBLE_CLICKED: string = "RWUROE_OBJECT_DOUBLE_CLICKED" - private _id: number; - private _category: number; - private _roomId: number; + private _id: number + private _category: number + private _roomId: number constructor(type: string, id: number, category: number, roomId: number) { - super(type); + super(type) - this._id = id; - this._category = category; - this._roomId = roomId; + this._id = id + this._category = category + this._roomId = roomId } public get id(): number { - return this._id; + return this._id } public get category(): number { - return this._category; + return this._category } public get roomId(): number { - return this._roomId; + return this._roomId } } diff --git a/src/api/room/events/index.ts b/src/api/room/events/index.ts index e5ed0d8c6..77963fdd5 100644 --- a/src/api/room/events/index.ts +++ b/src/api/room/events/index.ts @@ -1,6 +1,6 @@ -export * from './RoomWidgetPollUpdateEvent'; -export * from './RoomWidgetUpdateBackgroundColorPreviewEvent'; -export * from './RoomWidgetUpdateChatInputContentEvent'; -export * from './RoomWidgetUpdateEvent'; -export * from './RoomWidgetUpdateRentableBotChatEvent'; -export * from './RoomWidgetUpdateRoomObjectEvent'; +export * from "./RoomWidgetPollUpdateEvent" +export * from "./RoomWidgetUpdateBackgroundColorPreviewEvent" +export * from "./RoomWidgetUpdateChatInputContentEvent" +export * from "./RoomWidgetUpdateEvent" +export * from "./RoomWidgetUpdateRentableBotChatEvent" +export * from "./RoomWidgetUpdateRoomObjectEvent" diff --git a/src/api/room/index.ts b/src/api/room/index.ts index 56aea79e4..6fe7fb8f8 100644 --- a/src/api/room/index.ts +++ b/src/api/room/index.ts @@ -1,2 +1,2 @@ -export * from './events'; -export * from './widgets'; +export * from "./events" +export * from "./widgets" diff --git a/src/api/room/widgets/AvatarInfoFurni.ts b/src/api/room/widgets/AvatarInfoFurni.ts index 3380282af..a333e1da1 100644 --- a/src/api/room/widgets/AvatarInfoFurni.ts +++ b/src/api/room/widgets/AvatarInfoFurni.ts @@ -1,37 +1,37 @@ -import { IObjectData } from '@nitrots/nitro-renderer'; -import { IAvatarInfo } from './IAvatarInfo'; +import { IObjectData } from "@nitrots/nitro-renderer" +import { IAvatarInfo } from "./IAvatarInfo" export class AvatarInfoFurni implements IAvatarInfo { - public static FURNI: string = 'IFI_FURNI'; + public static FURNI: string = "IFI_FURNI" - public id: number = 0; - public category: number = 0; - public name: string = ''; - public description: string = ''; - public image: HTMLImageElement = null; - public isWallItem: boolean = false; - public isStickie: boolean = false; - public isRoomOwner: boolean = false; - public roomControllerLevel: number = 0; - public isAnyRoomController: boolean = false; - public expiration: number = -1; - public purchaseCatalogPageId: number = -1; - public purchaseOfferId: number = -1; - public extraParam: string = ''; - public isOwner: boolean = false; - public stuffData: IObjectData = null; - public groupId: number = 0; - public ownerId: number = 0; - public ownerName: string = ''; - public usagePolicy: number = 0; - public rentCatalogPageId: number = -1; - public rentOfferId: number = -1; - public purchaseCouldBeUsedForBuyout: boolean = false; - public rentCouldBeUsedForBuyout: boolean = false; - public availableForBuildersClub: boolean = false; - public tileSizeX: number = 1; - public tileSizeY: number = 1; + public id: number = 0 + public category: number = 0 + public name: string = "" + public description: string = "" + public image: HTMLImageElement = null + public isWallItem: boolean = false + public isStickie: boolean = false + public isRoomOwner: boolean = false + public roomControllerLevel: number = 0 + public isAnyRoomController: boolean = false + public expiration: number = -1 + public purchaseCatalogPageId: number = -1 + public purchaseOfferId: number = -1 + public extraParam: string = "" + public isOwner: boolean = false + public stuffData: IObjectData = null + public groupId: number = 0 + public ownerId: number = 0 + public ownerName: string = "" + public usagePolicy: number = 0 + public rentCatalogPageId: number = -1 + public rentOfferId: number = -1 + public purchaseCouldBeUsedForBuyout: boolean = false + public rentCouldBeUsedForBuyout: boolean = false + public availableForBuildersClub: boolean = false + public tileSizeX: number = 1 + public tileSizeY: number = 1 constructor(public readonly type: string) {} diff --git a/src/api/room/widgets/AvatarInfoName.ts b/src/api/room/widgets/AvatarInfoName.ts index 66a6a7e3d..b34ec734f 100644 --- a/src/api/room/widgets/AvatarInfoName.ts +++ b/src/api/room/widgets/AvatarInfoName.ts @@ -6,6 +6,7 @@ export class AvatarInfoName public readonly id: number, public readonly name: string, public readonly userType: number, - public readonly isFriend: boolean = false) + public readonly isFriend: boolean = false, + public readonly relationshipStatus: number = 0) {} } diff --git a/src/api/room/widgets/AvatarInfoPet.ts b/src/api/room/widgets/AvatarInfoPet.ts index 0c0435a93..cecc61ca7 100644 --- a/src/api/room/widgets/AvatarInfoPet.ts +++ b/src/api/room/widgets/AvatarInfoPet.ts @@ -1,45 +1,45 @@ -import { IAvatarInfo } from './IAvatarInfo'; +import { IAvatarInfo } from "./IAvatarInfo" export class AvatarInfoPet implements IAvatarInfo { - public static PET_INFO: string = 'IPI_PET_INFO'; + public static PET_INFO: string = "IPI_PET_INFO" - public level: number = 0; - public maximumLevel: number = 0; - public experience: number = 0; - public levelExperienceGoal: number = 0; - public energy: number = 0; - public maximumEnergy: number = 0; - public happyness: number = 0; - public maximumHappyness: number = 0; - public respectsPetLeft: number = 0; - public respect: number = 0; - public age: number = 0; - public name: string = ''; - public id: number = -1; - public image: HTMLImageElement = null; - public petType: number = 0; - public petBreed: number = 0; - public petFigure: string = ''; - public posture: string = 'std'; - public isOwner: boolean = false; - public ownerId: number = -1; - public ownerName: string = ''; - public canRemovePet: boolean = false; - public roomIndex: number = 0; - public unknownRarityLevel: number = 0; - public saddle: boolean = false; - public rider: boolean = false; - public breedable: boolean = false; - public skillTresholds: number[] = []; - public publiclyRideable: number = 0; - public fullyGrown: boolean = false; - public dead: boolean = false; - public rarityLevel: number = 0; - public maximumTimeToLive: number = 0; - public remainingTimeToLive: number = 0; - public remainingGrowTime: number = 0; - public publiclyBreedable: boolean = false; + public level: number = 0 + public maximumLevel: number = 0 + public experience: number = 0 + public levelExperienceGoal: number = 0 + public energy: number = 0 + public maximumEnergy: number = 0 + public happyness: number = 0 + public maximumHappyness: number = 0 + public respectsPetLeft: number = 0 + public respect: number = 0 + public age: number = 0 + public name: string = "" + public id: number = -1 + public image: HTMLImageElement = null + public petType: number = 0 + public petBreed: number = 0 + public petFigure: string = "" + public posture: string = "std" + public isOwner: boolean = false + public ownerId: number = -1 + public ownerName: string = "" + public canRemovePet: boolean = false + public roomIndex: number = 0 + public unknownRarityLevel: number = 0 + public saddle: boolean = false + public rider: boolean = false + public breedable: boolean = false + public skillTresholds: number[] = [] + public publiclyRideable: number = 0 + public fullyGrown: boolean = false + public dead: boolean = false + public rarityLevel: number = 0 + public maximumTimeToLive: number = 0 + public remainingTimeToLive: number = 0 + public remainingGrowTime: number = 0 + public publiclyBreedable: boolean = false constructor(public readonly type: string) {} diff --git a/src/api/room/widgets/AvatarInfoRentableBot.ts b/src/api/room/widgets/AvatarInfoRentableBot.ts index 77fb10ca5..68e156f1e 100644 --- a/src/api/room/widgets/AvatarInfoRentableBot.ts +++ b/src/api/room/widgets/AvatarInfoRentableBot.ts @@ -1,22 +1,22 @@ -import { IAvatarInfo } from './IAvatarInfo'; +import { IAvatarInfo } from "./IAvatarInfo" export class AvatarInfoRentableBot implements IAvatarInfo { - public static RENTABLE_BOT: string = 'IRBI_RENTABLE_BOT'; + public static RENTABLE_BOT: string = "IRBI_RENTABLE_BOT" - public name: string = ''; - public motto: string = ''; - public webID: number = 0; - public figure: string = ''; - public badges: string[] = []; - public carryItem: number = 0; - public roomIndex: number = 0; - public amIOwner: boolean = false; - public amIAnyRoomController: boolean = false; - public roomControllerLevel: number = 0; - public ownerId: number = -1; - public ownerName: string = ''; - public botSkills: number[] = []; + public name: string = "" + public motto: string = "" + public webID: number = 0 + public figure: string = "" + public badges: string[] = [] + public carryItem: number = 0 + public roomIndex: number = 0 + public amIOwner: boolean = false + public amIAnyRoomController: boolean = false + public roomControllerLevel: number = 0 + public ownerId: number = -1 + public ownerName: string = "" + public botSkills: number[] = [] constructor(public readonly type: string) {} diff --git a/src/api/room/widgets/AvatarInfoUser.ts b/src/api/room/widgets/AvatarInfoUser.ts index 270bfbd47..000a63587 100644 --- a/src/api/room/widgets/AvatarInfoUser.ts +++ b/src/api/room/widgets/AvatarInfoUser.ts @@ -1,49 +1,49 @@ -import { IAvatarInfo } from './IAvatarInfo'; +import { IAvatarInfo } from "./IAvatarInfo" export class AvatarInfoUser implements IAvatarInfo { - public static OWN_USER: string = 'IUI_OWN_USER'; - public static PEER: string = 'IUI_PEER'; - public static BOT: string = 'IUI_BOT'; - public static TRADE_REASON_OK: number = 0; - public static TRADE_REASON_SHUTDOWN: number = 2; - public static TRADE_REASON_NO_TRADING: number = 3; - public static DEFAULT_BOT_BADGE_ID: string = 'BOT'; + public static OWN_USER: string = "IUI_OWN_USER" + public static PEER: string = "IUI_PEER" + public static BOT: string = "IUI_BOT" + public static TRADE_REASON_OK: number = 0 + public static TRADE_REASON_SHUTDOWN: number = 2 + public static TRADE_REASON_NO_TRADING: number = 3 + public static DEFAULT_BOT_BADGE_ID: string = "BOT" - public name: string = ''; - public motto: string = ''; - public achievementScore: number = 0; - public webID: number = 0; - public xp: number = 0; - public userType: number = -1; - public figure: string = ''; - public badges: string[] = []; - public groupId: number = 0; - public groupName: string = ''; - public groupBadgeId: string = ''; - public carryItem: number = 0; - public roomIndex: number = 0; - public isSpectatorMode: boolean = false; - public allowNameChange: boolean = false; - public amIOwner: boolean = false; - public amIAnyRoomController: boolean = false; - public roomControllerLevel: number = 0; - public canBeKicked: boolean = false; - public canBeBanned: boolean = false; - public canBeMuted: boolean = false; - public respectLeft: number = 0; - public isIgnored: boolean = false; - public isGuildRoom: boolean = false; - public canTrade: boolean = false; - public canTradeReason: number = 0; - public targetRoomControllerLevel: number = 0; - public isAmbassador: boolean = false; + public name: string = "" + public motto: string = "" + public achievementScore: number = 0 + public webID: number = 0 + public xp: number = 0 + public userType: number = -1 + public figure: string = "" + public badges: string[] = [] + public groupId: number = 0 + public groupName: string = "" + public groupBadgeId: string = "" + public carryItem: number = 0 + public roomIndex: number = 0 + public isSpectatorMode: boolean = false + public allowNameChange: boolean = false + public amIOwner: boolean = false + public amIAnyRoomController: boolean = false + public roomControllerLevel: number = 0 + public canBeKicked: boolean = false + public canBeBanned: boolean = false + public canBeMuted: boolean = false + public respectLeft: number = 0 + public isIgnored: boolean = false + public isGuildRoom: boolean = false + public canTrade: boolean = false + public canTradeReason: number = 0 + public targetRoomControllerLevel: number = 0 + public isAmbassador: boolean = false constructor(public readonly type: string) {} public get isOwnUser(): boolean { - return (this.type === AvatarInfoUser.OWN_USER); + return (this.type === AvatarInfoUser.OWN_USER) } } diff --git a/src/api/room/widgets/AvatarInfoUtilities.ts b/src/api/room/widgets/AvatarInfoUtilities.ts index 7c4894483..2cb949410 100644 --- a/src/api/room/widgets/AvatarInfoUtilities.ts +++ b/src/api/room/widgets/AvatarInfoUtilities.ts @@ -1,405 +1,405 @@ -import { GetTickerTime, IFurnitureData, IRoomModerationSettings, IRoomPetData, IRoomUserData, ObjectDataFactory, PetFigureData, PetType, RoomControllerLevel, RoomModerationSettings, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomTradingLevelEnum, RoomWidgetEnumItemExtradataParameter, Vector3d } from '@nitrots/nitro-renderer'; -import { GetRoomEngine, GetRoomSession, GetSessionDataManager, IsOwnerOfFurniture } from '../../nitro'; -import { LocalizeText } from '../../utils'; -import { AvatarInfoFurni } from './AvatarInfoFurni'; -import { AvatarInfoName } from './AvatarInfoName'; -import { AvatarInfoPet } from './AvatarInfoPet'; -import { AvatarInfoRentableBot } from './AvatarInfoRentableBot'; -import { AvatarInfoUser } from './AvatarInfoUser'; +import { GetTickerTime, IFurnitureData, IRoomModerationSettings, IRoomPetData, IRoomUserData, ObjectDataFactory, PetFigureData, PetType, RoomControllerLevel, RoomModerationSettings, RoomObjectCategory, RoomObjectType, RoomObjectVariable, RoomTradingLevelEnum, RoomWidgetEnumItemExtradataParameter, Vector3d } from "@nitrots/nitro-renderer" +import { GetRoomEngine, GetRoomSession, GetSessionDataManager, IsOwnerOfFurniture } from "../../nitro" +import { LocalizeText } from "../../utils" +import { AvatarInfoFurni } from "./AvatarInfoFurni" +import { AvatarInfoName } from "./AvatarInfoName" +import { AvatarInfoPet } from "./AvatarInfoPet" +import { AvatarInfoRentableBot } from "./AvatarInfoRentableBot" +import { AvatarInfoUser } from "./AvatarInfoUser" export class AvatarInfoUtilities { public static getObjectName(objectId: number, category: number): AvatarInfoName { - const roomSession = GetRoomSession(); + const roomSession = GetRoomSession() - let id = -1; - let name: string = null; - let userType = 0; + let id = -1 + let name: string = null + let userType = 0 switch(category) { - case RoomObjectCategory.FLOOR: - case RoomObjectCategory.WALL: { - const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category); + case RoomObjectCategory.FLOOR: + case RoomObjectCategory.WALL: { + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category) - if(!roomObject) break; + if(!roomObject) break - if(roomObject.type.indexOf('poster') === 0) - { - name = LocalizeText('${poster_' + parseInt(roomObject.type.replace('poster', '')) + '_name}'); - } - else - { - let furniData: IFurnitureData = null; + if(roomObject.type.indexOf("poster") === 0) + { + name = LocalizeText("${poster_" + parseInt(roomObject.type.replace("poster", "")) + "_name}") + } + else + { + let furniData: IFurnitureData = null - const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID) - if(category === RoomObjectCategory.FLOOR) - { - furniData = GetSessionDataManager().getFloorItemData(typeId); - } + if(category === RoomObjectCategory.FLOOR) + { + furniData = GetSessionDataManager().getFloorItemData(typeId) + } - else if(category === RoomObjectCategory.WALL) - { - furniData = GetSessionDataManager().getWallItemData(typeId); - } + else if(category === RoomObjectCategory.WALL) + { + furniData = GetSessionDataManager().getWallItemData(typeId) + } - if(!furniData) break; + if(!furniData) break - id = furniData.id; - name = furniData.name; - } - break; + id = furniData.id + name = furniData.name } - case RoomObjectCategory.UNIT: { - const userData = roomSession.userDataManager.getUserDataByIndex(objectId); + break + } + case RoomObjectCategory.UNIT: { + const userData = roomSession.userDataManager.getUserDataByIndex(objectId) - if(!userData) break; + if(!userData) break - id = userData.webID; - name = userData.name; - userType = userData.type; - break; - } + id = userData.webID + name = userData.name + userType = userData.type + break + } } - if(!name || !name.length) return null; + if(!name || !name.length) return null - return new AvatarInfoName(objectId, category, id, name, userType); + return new AvatarInfoName(objectId, category, id, name, userType) } public static getFurniInfo(objectId: number, category: number): AvatarInfoFurni { - const roomSession = GetRoomSession(); - const furniInfo = new AvatarInfoFurni(AvatarInfoFurni.FURNI); + const roomSession = GetRoomSession() + const furniInfo = new AvatarInfoFurni(AvatarInfoFurni.FURNI) - furniInfo.id = objectId; - furniInfo.category = category; + furniInfo.id = objectId + furniInfo.category = category - const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category); + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, objectId, category) - if(!roomObject) return; + if(!roomObject) return - const model = roomObject.model; + const model = roomObject.model if(model.getValue(RoomWidgetEnumItemExtradataParameter.INFOSTAND_EXTRA_PARAM)) { - furniInfo.extraParam = model.getValue(RoomWidgetEnumItemExtradataParameter.INFOSTAND_EXTRA_PARAM); + furniInfo.extraParam = model.getValue(RoomWidgetEnumItemExtradataParameter.INFOSTAND_EXTRA_PARAM) } - const dataFormat = model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT); - const objectData = ObjectDataFactory.getData(dataFormat); + const dataFormat = model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT) + const objectData = ObjectDataFactory.getData(dataFormat) - objectData.initializeFromRoomObjectModel(model); + objectData.initializeFromRoomObjectModel(model) - furniInfo.stuffData = objectData; + furniInfo.stuffData = objectData - const objectType = roomObject.type; + const objectType = roomObject.type - if(objectType.indexOf('poster') === 0) + if(objectType.indexOf("poster") === 0) { - const posterId = parseInt(objectType.replace('poster', '')); + const posterId = parseInt(objectType.replace("poster", "")) - furniInfo.name = LocalizeText(('${poster_' + posterId) + '_name}'); - furniInfo.description = LocalizeText(('${poster_' + posterId) + '_desc}'); + furniInfo.name = LocalizeText(("${poster_" + posterId) + "_name}") + furniInfo.description = LocalizeText(("${poster_" + posterId) + "_desc}") } else { - const typeId = model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + const typeId = model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID) - let furnitureData: IFurnitureData = null; + let furnitureData: IFurnitureData = null if(category === RoomObjectCategory.FLOOR) { - furnitureData = GetSessionDataManager().getFloorItemData(typeId); + furnitureData = GetSessionDataManager().getFloorItemData(typeId) } else if(category === RoomObjectCategory.WALL) { - furnitureData = GetSessionDataManager().getWallItemData(typeId); + furnitureData = GetSessionDataManager().getWallItemData(typeId) } if(furnitureData) { - furniInfo.name = furnitureData.name; - furniInfo.description = furnitureData.description; - furniInfo.purchaseOfferId = furnitureData.purchaseOfferId; - furniInfo.purchaseCouldBeUsedForBuyout = furnitureData.purchaseCouldBeUsedForBuyout; - furniInfo.rentOfferId = furnitureData.rentOfferId; - furniInfo.rentCouldBeUsedForBuyout = furnitureData.rentCouldBeUsedForBuyout; - furniInfo.availableForBuildersClub = furnitureData.availableForBuildersClub; - furniInfo.tileSizeX = furnitureData.tileSizeX; - furniInfo.tileSizeY = furnitureData.tileSizeY; + furniInfo.name = furnitureData.name + furniInfo.description = furnitureData.description + furniInfo.purchaseOfferId = furnitureData.purchaseOfferId + furniInfo.purchaseCouldBeUsedForBuyout = furnitureData.purchaseCouldBeUsedForBuyout + furniInfo.rentOfferId = furnitureData.rentOfferId + furniInfo.rentCouldBeUsedForBuyout = furnitureData.rentCouldBeUsedForBuyout + furniInfo.availableForBuildersClub = furnitureData.availableForBuildersClub + furniInfo.tileSizeX = furnitureData.tileSizeX + furniInfo.tileSizeY = furnitureData.tileSizeY } } - if(objectType.indexOf('post_it') > -1) furniInfo.isStickie = true; + if(objectType.indexOf("post_it") > -1) furniInfo.isStickie = true - const expiryTime = model.getValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME); - const expiryTimestamp = model.getValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP); + const expiryTime = model.getValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME) + const expiryTimestamp = model.getValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP) - furniInfo.expiration = ((expiryTime < 0) ? expiryTime : Math.max(0, (expiryTime - ((GetTickerTime() - expiryTimestamp) / 1000)))); + furniInfo.expiration = ((expiryTime < 0) ? expiryTime : Math.max(0, (expiryTime - ((GetTickerTime() - expiryTimestamp) / 1000)))) - let roomObjectImage = GetRoomEngine().getRoomObjectImage(roomSession.roomId, objectId, category, new Vector3d(180), 64, null); + let roomObjectImage = GetRoomEngine().getRoomObjectImage(roomSession.roomId, objectId, category, new Vector3d(180), 64, null) if(!roomObjectImage.data || (roomObjectImage.data.width > 140) || (roomObjectImage.data.height > 200)) { - roomObjectImage = GetRoomEngine().getRoomObjectImage(roomSession.roomId, objectId, category, new Vector3d(180), 1, null); + roomObjectImage = GetRoomEngine().getRoomObjectImage(roomSession.roomId, objectId, category, new Vector3d(180), 1, null) } - furniInfo.image = roomObjectImage.getImage(); - furniInfo.isWallItem = (category === RoomObjectCategory.WALL); - furniInfo.isRoomOwner = roomSession.isRoomOwner; - furniInfo.roomControllerLevel = roomSession.controllerLevel; - furniInfo.isAnyRoomController = GetSessionDataManager().isModerator; - furniInfo.ownerId = model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID); - furniInfo.ownerName = model.getValue(RoomObjectVariable.FURNITURE_OWNER_NAME); - furniInfo.usagePolicy = model.getValue(RoomObjectVariable.FURNITURE_USAGE_POLICY); + furniInfo.image = roomObjectImage.getImage() + furniInfo.isWallItem = (category === RoomObjectCategory.WALL) + furniInfo.isRoomOwner = roomSession.isRoomOwner + furniInfo.roomControllerLevel = roomSession.controllerLevel + furniInfo.isAnyRoomController = GetSessionDataManager().isModerator + furniInfo.ownerId = model.getValue(RoomObjectVariable.FURNITURE_OWNER_ID) + furniInfo.ownerName = model.getValue(RoomObjectVariable.FURNITURE_OWNER_NAME) + furniInfo.usagePolicy = model.getValue(RoomObjectVariable.FURNITURE_USAGE_POLICY) - const guildId = model.getValue(RoomObjectVariable.FURNITURE_GUILD_CUSTOMIZED_GUILD_ID); + const guildId = model.getValue(RoomObjectVariable.FURNITURE_GUILD_CUSTOMIZED_GUILD_ID) if(guildId !== 0) { - furniInfo.groupId = guildId; + furniInfo.groupId = guildId //this.container.connection.send(new GroupInformationComposer(guildId, false)); } - if(IsOwnerOfFurniture(roomObject)) furniInfo.isOwner = true; + if(IsOwnerOfFurniture(roomObject)) furniInfo.isOwner = true - return furniInfo; + return furniInfo } public static getUserInfo(category: number, userData: IRoomUserData): AvatarInfoUser { - const roomSession = GetRoomSession(); + const roomSession = GetRoomSession() - let userInfoType = AvatarInfoUser.OWN_USER; + let userInfoType = AvatarInfoUser.OWN_USER - if(userData.webID !== GetSessionDataManager().userId) userInfoType = AvatarInfoUser.PEER; + if(userData.webID !== GetSessionDataManager().userId) userInfoType = AvatarInfoUser.PEER - const userInfo = new AvatarInfoUser(userInfoType); + const userInfo = new AvatarInfoUser(userInfoType) - userInfo.isSpectatorMode = roomSession.isSpectator; - userInfo.name = userData.name; - userInfo.motto = userData.custom; - userInfo.achievementScore = userData.activityPoints; - userInfo.webID = userData.webID; - userInfo.roomIndex = userData.roomIndex; - userInfo.userType = RoomObjectType.USER; + userInfo.isSpectatorMode = roomSession.isSpectator + userInfo.name = userData.name + userInfo.motto = userData.custom + userInfo.achievementScore = userData.activityPoints + userInfo.webID = userData.webID + userInfo.roomIndex = userData.roomIndex + userInfo.userType = RoomObjectType.USER - const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category); + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category) - if(roomObject) userInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0); + if(roomObject) userInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0) - if(userInfoType === AvatarInfoUser.OWN_USER) userInfo.allowNameChange = GetSessionDataManager().canChangeName; + if(userInfoType === AvatarInfoUser.OWN_USER) userInfo.allowNameChange = GetSessionDataManager().canChangeName - userInfo.amIOwner = roomSession.isRoomOwner; - userInfo.isGuildRoom = roomSession.isGuildRoom; - userInfo.roomControllerLevel = roomSession.controllerLevel; - userInfo.amIAnyRoomController = GetSessionDataManager().isModerator; - userInfo.isAmbassador = GetSessionDataManager().isAmbassador; + userInfo.amIOwner = roomSession.isRoomOwner + userInfo.isGuildRoom = roomSession.isGuildRoom + userInfo.roomControllerLevel = roomSession.controllerLevel + userInfo.amIAnyRoomController = GetSessionDataManager().isModerator + userInfo.isAmbassador = GetSessionDataManager().isAmbassador if(userInfoType === AvatarInfoUser.PEER) { if(roomObject) { - const flatControl = roomObject.model.getValue(RoomObjectVariable.FIGURE_FLAT_CONTROL); + const flatControl = roomObject.model.getValue(RoomObjectVariable.FIGURE_FLAT_CONTROL) - if(flatControl !== null) userInfo.targetRoomControllerLevel = flatControl; + if(flatControl !== null) userInfo.targetRoomControllerLevel = flatControl - userInfo.canBeMuted = this.canBeMuted(userInfo); - userInfo.canBeKicked = this.canBeKicked(userInfo); - userInfo.canBeBanned = this.canBeBanned(userInfo); + userInfo.canBeMuted = this.canBeMuted(userInfo) + userInfo.canBeKicked = this.canBeKicked(userInfo) + userInfo.canBeBanned = this.canBeBanned(userInfo) } - userInfo.isIgnored = GetSessionDataManager().isUserIgnored(userData.name); - userInfo.respectLeft = GetSessionDataManager().respectsLeft; + userInfo.isIgnored = GetSessionDataManager().isUserIgnored(userData.name) + userInfo.respectLeft = GetSessionDataManager().respectsLeft - const isShuttingDown = GetSessionDataManager().isSystemShutdown; - const tradeMode = roomSession.tradeMode; + const isShuttingDown = GetSessionDataManager().isSystemShutdown + const tradeMode = roomSession.tradeMode if(isShuttingDown) { - userInfo.canTrade = false; + userInfo.canTrade = false } else { switch(tradeMode) { - case RoomTradingLevelEnum.ROOM_CONTROLLER_REQUIRED: { - const roomController = ((userInfo.roomControllerLevel !== RoomControllerLevel.NONE) && (userInfo.roomControllerLevel !== RoomControllerLevel.GUILD_MEMBER)); - const targetController = ((userInfo.targetRoomControllerLevel !== RoomControllerLevel.NONE) && (userInfo.targetRoomControllerLevel !== RoomControllerLevel.GUILD_MEMBER)); - - userInfo.canTrade = (roomController || targetController); - break; - } - case RoomTradingLevelEnum.NO_TRADING: - userInfo.canTrade = true; - break; - default: - userInfo.canTrade = false; - break; + case RoomTradingLevelEnum.ROOM_CONTROLLER_REQUIRED: { + const roomController = ((userInfo.roomControllerLevel !== RoomControllerLevel.NONE) && (userInfo.roomControllerLevel !== RoomControllerLevel.GUILD_MEMBER)) + const targetController = ((userInfo.targetRoomControllerLevel !== RoomControllerLevel.NONE) && (userInfo.targetRoomControllerLevel !== RoomControllerLevel.GUILD_MEMBER)) + + userInfo.canTrade = (roomController || targetController) + break + } + case RoomTradingLevelEnum.NO_TRADING: + userInfo.canTrade = true + break + default: + userInfo.canTrade = false + break } } - userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_OK; + userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_OK - if(isShuttingDown) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_SHUTDOWN; + if(isShuttingDown) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_SHUTDOWN - if(tradeMode !== RoomTradingLevelEnum.FREE_TRADING) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_NO_TRADING; + if(tradeMode !== RoomTradingLevelEnum.FREE_TRADING) userInfo.canTradeReason = AvatarInfoUser.TRADE_REASON_NO_TRADING // const _local_12 = GetSessionDataManager().userId; // _local_13 = GetSessionDataManager().getUserTags(_local_12); // this._Str_16287(_local_12, _local_13); } - userInfo.groupId = userData.groupId; - userInfo.groupBadgeId = GetSessionDataManager().getGroupBadge(userInfo.groupId); - userInfo.groupName = userData.groupName; - userInfo.badges = roomSession.userDataManager.getUserBadges(userData.webID); - userInfo.figure = userData.figure; + userInfo.groupId = userData.groupId + userInfo.groupBadgeId = GetSessionDataManager().getGroupBadge(userInfo.groupId) + userInfo.groupName = userData.groupName + userInfo.badges = roomSession.userDataManager.getUserBadges(userData.webID) + userInfo.figure = userData.figure //var _local_8:Array = GetSessionDataManager().getUserTags(userData.webID); //this._Str_16287(userData.webId, _local_8); //this._container.habboGroupsManager.updateVisibleExtendedProfile(userData.webID); //this._container.connection.send(new GetRelationshipStatusInfoMessageComposer(userData.webId)); - return userInfo; + return userInfo } public static getBotInfo(category: number, userData: IRoomUserData): AvatarInfoUser { - const roomSession = GetRoomSession(); - const userInfo = new AvatarInfoUser(AvatarInfoUser.BOT); + const roomSession = GetRoomSession() + const userInfo = new AvatarInfoUser(AvatarInfoUser.BOT) - userInfo.name = userData.name; - userInfo.motto = userData.custom; - userInfo.webID = userData.webID; - userInfo.roomIndex = userData.roomIndex; - userInfo.userType = userData.type; + userInfo.name = userData.name + userInfo.motto = userData.custom + userInfo.webID = userData.webID + userInfo.roomIndex = userData.roomIndex + userInfo.userType = userData.type - const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category); + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category) - if(roomObject) userInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0); + if(roomObject) userInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0) - userInfo.amIOwner = roomSession.isRoomOwner; - userInfo.isGuildRoom = roomSession.isGuildRoom; - userInfo.roomControllerLevel = roomSession.controllerLevel; - userInfo.amIAnyRoomController = GetSessionDataManager().isModerator; - userInfo.isAmbassador = GetSessionDataManager().isAmbassador; - userInfo.badges = [ AvatarInfoUser.DEFAULT_BOT_BADGE_ID ]; - userInfo.figure = userData.figure; + userInfo.amIOwner = roomSession.isRoomOwner + userInfo.isGuildRoom = roomSession.isGuildRoom + userInfo.roomControllerLevel = roomSession.controllerLevel + userInfo.amIAnyRoomController = GetSessionDataManager().isModerator + userInfo.isAmbassador = GetSessionDataManager().isAmbassador + userInfo.badges = [ AvatarInfoUser.DEFAULT_BOT_BADGE_ID ] + userInfo.figure = userData.figure - return userInfo; + return userInfo } public static getRentableBotInfo(category: number, userData: IRoomUserData): AvatarInfoRentableBot { - const roomSession = GetRoomSession(); - const botInfo = new AvatarInfoRentableBot(AvatarInfoRentableBot.RENTABLE_BOT); + const roomSession = GetRoomSession() + const botInfo = new AvatarInfoRentableBot(AvatarInfoRentableBot.RENTABLE_BOT) - botInfo.name = userData.name; - botInfo.motto = userData.custom; - botInfo.webID = userData.webID; - botInfo.roomIndex = userData.roomIndex; - botInfo.ownerId = userData.ownerId; - botInfo.ownerName = userData.ownerName; - botInfo.botSkills = userData.botSkills; + botInfo.name = userData.name + botInfo.motto = userData.custom + botInfo.webID = userData.webID + botInfo.roomIndex = userData.roomIndex + botInfo.ownerId = userData.ownerId + botInfo.ownerName = userData.ownerName + botInfo.botSkills = userData.botSkills - const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category); + const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, userData.roomIndex, category) - if(roomObject) botInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0); + if(roomObject) botInfo.carryItem = (roomObject.model.getValue(RoomObjectVariable.FIGURE_CARRY_OBJECT) || 0) - botInfo.amIOwner = roomSession.isRoomOwner; - botInfo.roomControllerLevel = roomSession.controllerLevel; - botInfo.amIAnyRoomController = GetSessionDataManager().isModerator; - botInfo.badges = [ AvatarInfoUser.DEFAULT_BOT_BADGE_ID ]; - botInfo.figure = userData.figure; + botInfo.amIOwner = roomSession.isRoomOwner + botInfo.roomControllerLevel = roomSession.controllerLevel + botInfo.amIAnyRoomController = GetSessionDataManager().isModerator + botInfo.badges = [ AvatarInfoUser.DEFAULT_BOT_BADGE_ID ] + botInfo.figure = userData.figure - return botInfo; + return botInfo } public static getPetInfo(petData: IRoomPetData): AvatarInfoPet { - const roomSession = GetRoomSession(); - const userData = roomSession.userDataManager.getPetData(petData.id); + const roomSession = GetRoomSession() + const userData = roomSession.userDataManager.getPetData(petData.id) - if(!userData) return; + if(!userData) return - const figure = new PetFigureData(userData.figure); + const figure = new PetFigureData(userData.figure) - let posture: string = null; + let posture: string = null if(figure.typeId === PetType.MONSTERPLANT) { - if(petData.level >= petData.adultLevel) posture = 'std'; - else posture = ('grw' + petData.level); + if(petData.level >= petData.adultLevel) posture = "std" + else posture = ("grw" + petData.level) } - const isOwner = (petData.ownerId === GetSessionDataManager().userId); - const petInfo = new AvatarInfoPet(AvatarInfoPet.PET_INFO); - - petInfo.name = userData.name; - petInfo.id = petData.id; - petInfo.ownerId = petData.ownerId; - petInfo.ownerName = petData.ownerName; - petInfo.rarityLevel = petData.rarityLevel; - petInfo.petType = figure.typeId; - petInfo.petBreed = figure.paletteId; - petInfo.petFigure = userData.figure; - petInfo.posture = posture; - petInfo.isOwner = isOwner; - petInfo.roomIndex = userData.roomIndex; - petInfo.level = petData.level; - petInfo.maximumLevel = petData.maximumLevel; - petInfo.experience = petData.experience; - petInfo.levelExperienceGoal = petData.levelExperienceGoal; - petInfo.energy = petData.energy; - petInfo.maximumEnergy = petData.maximumEnergy; - petInfo.happyness = petData.happyness; - petInfo.maximumHappyness = petData.maximumHappyness; - petInfo.respect = petData.respect; - petInfo.respectsPetLeft = GetSessionDataManager().respectsPetLeft; - petInfo.age = petData.age; - petInfo.saddle = petData.saddle; - petInfo.rider = petData.rider; - petInfo.breedable = petData.breedable; - petInfo.fullyGrown = petData.fullyGrown; - petInfo.dead = petData.dead; - petInfo.rarityLevel = petData.rarityLevel; - petInfo.skillTresholds = petData.skillTresholds; - petInfo.canRemovePet = false; - petInfo.publiclyRideable = petData.publiclyRideable; - petInfo.maximumTimeToLive = petData.maximumTimeToLive; - petInfo.remainingTimeToLive = petData.remainingTimeToLive; - petInfo.remainingGrowTime = petData.remainingGrowTime; - petInfo.publiclyBreedable = petData.publiclyBreedable; - - if(isOwner || roomSession.isRoomOwner || GetSessionDataManager().isModerator || (roomSession.controllerLevel >= RoomControllerLevel.GUEST)) petInfo.canRemovePet = true; - - return petInfo; + const isOwner = (petData.ownerId === GetSessionDataManager().userId) + const petInfo = new AvatarInfoPet(AvatarInfoPet.PET_INFO) + + petInfo.name = userData.name + petInfo.id = petData.id + petInfo.ownerId = petData.ownerId + petInfo.ownerName = petData.ownerName + petInfo.rarityLevel = petData.rarityLevel + petInfo.petType = figure.typeId + petInfo.petBreed = figure.paletteId + petInfo.petFigure = userData.figure + petInfo.posture = posture + petInfo.isOwner = isOwner + petInfo.roomIndex = userData.roomIndex + petInfo.level = petData.level + petInfo.maximumLevel = petData.maximumLevel + petInfo.experience = petData.experience + petInfo.levelExperienceGoal = petData.levelExperienceGoal + petInfo.energy = petData.energy + petInfo.maximumEnergy = petData.maximumEnergy + petInfo.happyness = petData.happyness + petInfo.maximumHappyness = petData.maximumHappyness + petInfo.respect = petData.respect + petInfo.respectsPetLeft = GetSessionDataManager().respectsPetLeft + petInfo.age = petData.age + petInfo.saddle = petData.saddle + petInfo.rider = petData.rider + petInfo.breedable = petData.breedable + petInfo.fullyGrown = petData.fullyGrown + petInfo.dead = petData.dead + petInfo.rarityLevel = petData.rarityLevel + petInfo.skillTresholds = petData.skillTresholds + petInfo.canRemovePet = false + petInfo.publiclyRideable = petData.publiclyRideable + petInfo.maximumTimeToLive = petData.maximumTimeToLive + petInfo.remainingTimeToLive = petData.remainingTimeToLive + petInfo.remainingGrowTime = petData.remainingGrowTime + petInfo.publiclyBreedable = petData.publiclyBreedable + + if(isOwner || roomSession.isRoomOwner || GetSessionDataManager().isModerator || (roomSession.controllerLevel >= RoomControllerLevel.GUEST)) petInfo.canRemovePet = true + + return petInfo } private static checkGuildSetting(userInfo: AvatarInfoUser): boolean { - if(userInfo.isGuildRoom) return (userInfo.roomControllerLevel >= RoomControllerLevel.GUILD_ADMIN); + if(userInfo.isGuildRoom) return (userInfo.roomControllerLevel >= RoomControllerLevel.GUILD_ADMIN) - return (userInfo.roomControllerLevel >= RoomControllerLevel.GUEST); + return (userInfo.roomControllerLevel >= RoomControllerLevel.GUEST) } private static isValidSetting(userInfo: AvatarInfoUser, checkSetting: (userInfo: AvatarInfoUser, moderation: IRoomModerationSettings) => boolean): boolean { - const roomSession = GetRoomSession(); + const roomSession = GetRoomSession() - if(!roomSession.isPrivateRoom) return false; + if(!roomSession.isPrivateRoom) return false - const moderation = roomSession.moderationSettings; + const moderation = roomSession.moderationSettings - let flag = false; + let flag = false - if(moderation) flag = checkSetting(userInfo, moderation); + if(moderation) flag = checkSetting(userInfo, moderation) - return (flag && (userInfo.targetRoomControllerLevel < RoomControllerLevel.ROOM_OWNER)); + return (flag && (userInfo.targetRoomControllerLevel < RoomControllerLevel.ROOM_OWNER)) } private static canBeMuted(userInfo: AvatarInfoUser): boolean @@ -408,14 +408,14 @@ export class AvatarInfoUtilities { switch(moderation.allowMute) { - case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: - return this.checkGuildSetting(userInfo); - default: - return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER); + case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: + return this.checkGuildSetting(userInfo) + default: + return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER) } } - return this.isValidSetting(userInfo, checkSetting); + return this.isValidSetting(userInfo, checkSetting) } private static canBeKicked(userInfo: AvatarInfoUser): boolean @@ -424,16 +424,16 @@ export class AvatarInfoUtilities { switch(moderation.allowKick) { - case RoomModerationSettings.MODERATION_LEVEL_ALL: - return true; - case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: - return this.checkGuildSetting(userInfo); - default: - return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER); + case RoomModerationSettings.MODERATION_LEVEL_ALL: + return true + case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: + return this.checkGuildSetting(userInfo) + default: + return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER) } } - return this.isValidSetting(userInfo, checkSetting); + return this.isValidSetting(userInfo, checkSetting) } private static canBeBanned(userInfo: AvatarInfoUser): boolean @@ -442,13 +442,13 @@ export class AvatarInfoUtilities { switch(moderation.allowBan) { - case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: - return this.checkGuildSetting(userInfo); - default: - return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER); + case RoomModerationSettings.MODERATION_LEVEL_USER_WITH_RIGHTS: + return this.checkGuildSetting(userInfo) + default: + return (userInfo.roomControllerLevel >= RoomControllerLevel.ROOM_OWNER) } } - return this.isValidSetting(userInfo, checkSetting); + return this.isValidSetting(userInfo, checkSetting) } } diff --git a/src/api/room/widgets/BotSkillsEnum.ts b/src/api/room/widgets/BotSkillsEnum.ts index b879cdc99..96ca3e8b9 100644 --- a/src/api/room/widgets/BotSkillsEnum.ts +++ b/src/api/room/widgets/BotSkillsEnum.ts @@ -1,18 +1,18 @@ export class BotSkillsEnum { - public static GENERIC_SKILL: number = 0; - public static DRESS_UP: number = 1; - public static SETUP_CHAT: number = 2; - public static RANDOM_WALK: number = 3; - public static DANCE: number = 4; - public static CHANGE_BOT_NAME: number = 5; - public static SERVE_BEVERAGE: number = 6; - public static INCLIENT_LINK: number = 7; - public static NUX_PROCEED: number = 8; - public static CHANGE_BOT_MOTTO: number = 9; - public static NUX_TAKE_TOUR: number = 10; - public static NO_PICK_UP: number = 12; - public static NAVIGATOR_SEARCH: number = 14; - public static DONATE_TO_USER: number = 24; - public static DONATE_TO_ALL: number = 25; + public static GENERIC_SKILL: number = 0 + public static DRESS_UP: number = 1 + public static SETUP_CHAT: number = 2 + public static RANDOM_WALK: number = 3 + public static DANCE: number = 4 + public static CHANGE_BOT_NAME: number = 5 + public static SERVE_BEVERAGE: number = 6 + public static INCLIENT_LINK: number = 7 + public static NUX_PROCEED: number = 8 + public static CHANGE_BOT_MOTTO: number = 9 + public static NUX_TAKE_TOUR: number = 10 + public static NO_PICK_UP: number = 12 + public static NAVIGATOR_SEARCH: number = 14 + public static DONATE_TO_USER: number = 24 + public static DONATE_TO_ALL: number = 25 } diff --git a/src/api/room/widgets/ChatBubbleMessage.ts b/src/api/room/widgets/ChatBubbleMessage.ts index c9cede331..b213ee437 100644 --- a/src/api/room/widgets/ChatBubbleMessage.ts +++ b/src/api/room/widgets/ChatBubbleMessage.ts @@ -1,25 +1,25 @@ -import { INitroPoint } from '@nitrots/nitro-renderer'; +import { INitroPoint } from "@nitrots/nitro-renderer" export class ChatBubbleMessage { - public static BUBBLE_COUNTER: number = 0; + public static BUBBLE_COUNTER: number = 0 - public id: number = -1; - public width: number = 0; - public height: number = 0; - public elementRef: HTMLDivElement = null; - public skipMovement: boolean = false; + public id: number = -1 + public width: number = 0 + public height: number = 0 + public elementRef: HTMLDivElement = null + public skipMovement: boolean = false - private _top: number = 0; - private _left: number = 0; + private _top: number = 0 + private _left: number = 0 constructor( public senderId: number = -1, public senderCategory: number = -1, public roomId: number = -1, - public text: string = '', - public formattedText: string = '', - public username: string = '', + public text: string = "", + public formattedText: string = "", + public username: string = "", public location: INitroPoint = null, public type: number = 0, public styleId: number = 0, @@ -27,30 +27,30 @@ export class ChatBubbleMessage public color: string = null ) { - this.id = ++ChatBubbleMessage.BUBBLE_COUNTER; + this.id = ++ChatBubbleMessage.BUBBLE_COUNTER } public get top(): number { - return this._top; + return this._top } public set top(value: number) { - this._top = value; + this._top = value - if(this.elementRef) this.elementRef.style.top = (this._top + 'px'); + if(this.elementRef) this.elementRef.style.top = (this._top + "px") } public get left(): number { - return this._left; + return this._left } public set left(value: number) { - this._left = value; + this._left = value - if(this.elementRef) this.elementRef.style.left = (this._left + 'px'); + if(this.elementRef) this.elementRef.style.left = (this._left + "px") } } diff --git a/src/api/room/widgets/ChatMessageTypeEnum.ts b/src/api/room/widgets/ChatMessageTypeEnum.ts index 1a5296b1d..78c7a06bf 100644 --- a/src/api/room/widgets/ChatMessageTypeEnum.ts +++ b/src/api/room/widgets/ChatMessageTypeEnum.ts @@ -1,6 +1,6 @@ export class ChatMessageTypeEnum { - public static CHAT_DEFAULT: number = 0; - public static CHAT_WHISPER: number = 1; - public static CHAT_SHOUT: number = 2; + public static CHAT_DEFAULT: number = 0 + public static CHAT_WHISPER: number = 1 + public static CHAT_SHOUT: number = 2 } diff --git a/src/api/room/widgets/DoChatsOverlap.ts b/src/api/room/widgets/DoChatsOverlap.ts index 092ce5db6..adc70fc80 100644 --- a/src/api/room/widgets/DoChatsOverlap.ts +++ b/src/api/room/widgets/DoChatsOverlap.ts @@ -1,7 +1,7 @@ -import { ChatBubbleMessage } from './ChatBubbleMessage'; +import { ChatBubbleMessage } from "./ChatBubbleMessage" export const DoChatsOverlap = (a: ChatBubbleMessage, b: ChatBubbleMessage, additionalBTop: number, padding: number = 0) => { - return !((((a.left + padding) + a.width) < (b.left + padding)) || ((a.left + padding) > ((b.left + padding) + b.width)) || ((a.top + a.height) < (b.top + additionalBTop)) || (a.top > ((b.top + additionalBTop) + b.height))); + return !((((a.left + padding) + a.width) < (b.left + padding)) || ((a.left + padding) > ((b.left + padding) + b.width)) || ((a.top + a.height) < (b.top + additionalBTop)) || (a.top > ((b.top + additionalBTop) + b.height))) } \ No newline at end of file diff --git a/src/api/room/widgets/FurnitureDimmerUtilities.ts b/src/api/room/widgets/FurnitureDimmerUtilities.ts index 9d252d104..bbddde91d 100644 --- a/src/api/room/widgets/FurnitureDimmerUtilities.ts +++ b/src/api/room/widgets/FurnitureDimmerUtilities.ts @@ -1,29 +1,29 @@ -import { GetRoomEngine, GetRoomSession } from '../../nitro'; +import { GetRoomEngine, GetRoomSession } from "../../nitro" export class FurnitureDimmerUtilities { - public static AVAILABLE_COLORS: number[] = [ 7665141, 21495, 15161822, 15353138, 15923281, 8581961, 0 ]; - public static HTML_COLORS: string[] = [ '#74F5F5', '#0053F7', '#E759DE', '#EA4532', '#F2F851', '#82F349', '#000000' ]; - public static MIN_BRIGHTNESS: number = 76; - public static MAX_BRIGHTNESS: number = 255; + public static AVAILABLE_COLORS: number[] = [ 7665141, 21495, 15161822, 15353138, 15923281, 8581961, 0 ] + public static HTML_COLORS: string[] = [ "#74F5F5", "#0053F7", "#E759DE", "#EA4532", "#F2F851", "#82F349", "#000000" ] + public static MIN_BRIGHTNESS: number = 76 + public static MAX_BRIGHTNESS: number = 255 public static savePreset(presetNumber: number, effectTypeId: number, color: number, brightness: number, apply: boolean): void { - GetRoomSession().updateMoodlightData(presetNumber, effectTypeId, color, brightness, apply); + GetRoomSession().updateMoodlightData(presetNumber, effectTypeId, color, brightness, apply) } public static changeState(): void { - GetRoomSession().toggleMoodlightState(); + GetRoomSession().toggleMoodlightState() } public static previewDimmer(color: number, brightness: number, bgOnly: boolean): void { - GetRoomEngine().updateObjectRoomColor(GetRoomSession().roomId, color, brightness, bgOnly); + GetRoomEngine().updateObjectRoomColor(GetRoomSession().roomId, color, brightness, bgOnly) } public static scaleBrightness(value: number): number { - return ~~((((value - this.MIN_BRIGHTNESS) * (100 - 0)) / (this.MAX_BRIGHTNESS - this.MIN_BRIGHTNESS)) + 0); + return ~~((((value - this.MIN_BRIGHTNESS) * (100 - 0)) / (this.MAX_BRIGHTNESS - this.MIN_BRIGHTNESS)) + 0) } } diff --git a/src/api/room/widgets/GetDiskColor.ts b/src/api/room/widgets/GetDiskColor.ts index 989f2949d..81863e51a 100644 --- a/src/api/room/widgets/GetDiskColor.ts +++ b/src/api/room/widgets/GetDiskColor.ts @@ -1,37 +1,37 @@ -const DISK_COLOR_RED_MIN: number = 130; -const DISK_COLOR_RED_RANGE: number = 100; -const DISK_COLOR_GREEN_MIN: number = 130; -const DISK_COLOR_GREEN_RANGE: number = 100; -const DISK_COLOR_BLUE_MIN: number = 130; -const DISK_COLOR_BLUE_RANGE: number = 100; +const DISK_COLOR_RED_MIN: number = 130 +const DISK_COLOR_RED_RANGE: number = 100 +const DISK_COLOR_GREEN_MIN: number = 130 +const DISK_COLOR_GREEN_RANGE: number = 100 +const DISK_COLOR_BLUE_MIN: number = 130 +const DISK_COLOR_BLUE_RANGE: number = 100 export const GetDiskColor = (name: string) => { - let r: number = 0; - let g: number = 0; - let b: number = 0; - let index: number = 0; + let r: number = 0 + let g: number = 0 + let b: number = 0 + let index: number = 0 while (index < name.length) { switch ((index % 3)) { - case 0: - r = (r + ( name.charCodeAt(index) * 37) ); - break; - case 1: - g = (g + ( name.charCodeAt(index) * 37) ); - break; - case 2: - b = (b + ( name.charCodeAt(index) * 37) ); - break; + case 0: + r = (r + (name.charCodeAt(index) * 37)) + break + case 1: + g = (g + (name.charCodeAt(index) * 37)) + break + case 2: + b = (b + (name.charCodeAt(index) * 37)) + break } - index++; + index++ } - r = ((r % DISK_COLOR_RED_RANGE) + DISK_COLOR_RED_MIN); - g = ((g % DISK_COLOR_GREEN_RANGE) + DISK_COLOR_GREEN_MIN); - b = ((b % DISK_COLOR_BLUE_RANGE) + DISK_COLOR_BLUE_MIN); + r = ((r % DISK_COLOR_RED_RANGE) + DISK_COLOR_RED_MIN) + g = ((g % DISK_COLOR_GREEN_RANGE) + DISK_COLOR_GREEN_MIN) + b = ((b % DISK_COLOR_BLUE_RANGE) + DISK_COLOR_BLUE_MIN) - return `rgb(${ r },${ g },${ b })`; + return `rgb(${ r },${ g },${ b })` } diff --git a/src/api/room/widgets/MannequinUtilities.ts b/src/api/room/widgets/MannequinUtilities.ts index 5e82b9afc..c2c6e7aad 100644 --- a/src/api/room/widgets/MannequinUtilities.ts +++ b/src/api/room/widgets/MannequinUtilities.ts @@ -1,9 +1,9 @@ -import { AvatarFigurePartType, IAvatarFigureContainer } from '@nitrots/nitro-renderer'; -import { GetAvatarRenderManager } from '../../nitro'; +import { AvatarFigurePartType, IAvatarFigureContainer } from "@nitrots/nitro-renderer" +import { GetAvatarRenderManager } from "../../nitro" export class MannequinUtilities { - public static MANNEQUIN_FIGURE = [ 'hd', 99999, [ 99998 ] ]; + public static MANNEQUIN_FIGURE = [ "hd", 99999, [ 99998 ] ] public static MANNEQUIN_CLOTHING_PART_TYPES = [ AvatarFigurePartType.CHEST_ACCESSORY, AvatarFigurePartType.COAT_CHEST, @@ -11,29 +11,29 @@ export class MannequinUtilities AvatarFigurePartType.LEGS, AvatarFigurePartType.SHOES, AvatarFigurePartType.WAIST_ACCESSORY - ]; + ] public static getMergedMannequinFigureContainer(figure: string, targetFigure: string): IAvatarFigureContainer { - const figureContainer = GetAvatarRenderManager().createFigureContainer(figure); - const targetFigureContainer = GetAvatarRenderManager().createFigureContainer(targetFigure); + const figureContainer = GetAvatarRenderManager().createFigureContainer(figure) + const targetFigureContainer = GetAvatarRenderManager().createFigureContainer(targetFigure) - for(const part of this.MANNEQUIN_CLOTHING_PART_TYPES) figureContainer.removePart(part); + for(const part of this.MANNEQUIN_CLOTHING_PART_TYPES) figureContainer.removePart(part) - for(const part of targetFigureContainer.getPartTypeIds()) figureContainer.updatePart(part, targetFigureContainer.getPartSetId(part), targetFigureContainer.getPartColorIds(part)); + for(const part of targetFigureContainer.getPartTypeIds()) figureContainer.updatePart(part, targetFigureContainer.getPartSetId(part), targetFigureContainer.getPartColorIds(part)) - return figureContainer; + return figureContainer } public static transformAsMannequinFigure(figureContainer: IAvatarFigureContainer): void { for(const part of figureContainer.getPartTypeIds()) { - if(this.MANNEQUIN_CLOTHING_PART_TYPES.indexOf(part) >= 0) continue; + if(this.MANNEQUIN_CLOTHING_PART_TYPES.indexOf(part) >= 0) continue - figureContainer.removePart(part); + figureContainer.removePart(part) } - figureContainer.updatePart((this.MANNEQUIN_FIGURE[0] as string), (this.MANNEQUIN_FIGURE[1] as number), (this.MANNEQUIN_FIGURE[2] as number[])); + figureContainer.updatePart((this.MANNEQUIN_FIGURE[0] as string), (this.MANNEQUIN_FIGURE[1] as number), (this.MANNEQUIN_FIGURE[2] as number[])) }; } diff --git a/src/api/room/widgets/PetSupplementEnum.ts b/src/api/room/widgets/PetSupplementEnum.ts index eb2368751..694407350 100644 --- a/src/api/room/widgets/PetSupplementEnum.ts +++ b/src/api/room/widgets/PetSupplementEnum.ts @@ -1,5 +1,5 @@ export class PetSupplementEnum { - public static WATER: number = 0; - public static LIGHT: number = 1; + public static WATER: number = 0 + public static LIGHT: number = 1 } diff --git a/src/api/room/widgets/PostureTypeEnum.ts b/src/api/room/widgets/PostureTypeEnum.ts index 21352d787..adae936d7 100644 --- a/src/api/room/widgets/PostureTypeEnum.ts +++ b/src/api/room/widgets/PostureTypeEnum.ts @@ -1,5 +1,5 @@ export class PostureTypeEnum { - public static POSTURE_STAND: number = 0; - public static POSTURE_SIT: number = 1; + public static POSTURE_STAND: number = 0 + public static POSTURE_SIT: number = 1 } diff --git a/src/api/room/widgets/RoomDimmerPreset.ts b/src/api/room/widgets/RoomDimmerPreset.ts index 86600d583..7758d246e 100644 --- a/src/api/room/widgets/RoomDimmerPreset.ts +++ b/src/api/room/widgets/RoomDimmerPreset.ts @@ -1,35 +1,35 @@ export class RoomDimmerPreset { - private _id: number; - private _type: number; - private _color: number; - private _brightness: number; + private _id: number + private _type: number + private _color: number + private _brightness: number constructor(id: number, type: number, color: number, brightness: number) { - this._id = id; - this._type = type; - this._color = color; - this._brightness = brightness; + this._id = id + this._type = type + this._color = color + this._brightness = brightness } public get id(): number { - return this._id; + return this._id } public get type(): number { - return this._type; + return this._type } public get color(): number { - return this._color; + return this._color } public get brightness(): number { - return this._brightness; + return this._brightness } } diff --git a/src/api/room/widgets/RoomObjectItem.ts b/src/api/room/widgets/RoomObjectItem.ts index f4fb2d6fe..07678669a 100644 --- a/src/api/room/widgets/RoomObjectItem.ts +++ b/src/api/room/widgets/RoomObjectItem.ts @@ -1,28 +1,28 @@ export class RoomObjectItem { - private _id: number; - private _category: number; - private _name: string; + private _id: number + private _category: number + private _name: string constructor(id: number, category: number, name: string) { - this._id = id; - this._category = category; - this._name = name; + this._id = id + this._category = category + this._name = name } public get id(): number { - return this._id; + return this._id } public get category(): number { - return this._category; + return this._category } public get name(): string { - return this._name; + return this._name } } diff --git a/src/api/room/widgets/VoteValue.ts b/src/api/room/widgets/VoteValue.ts index ecf4336ea..828b4ffc8 100644 --- a/src/api/room/widgets/VoteValue.ts +++ b/src/api/room/widgets/VoteValue.ts @@ -1,5 +1,5 @@ -export const VALUE_KEY_DISLIKE = '0'; -export const VALUE_KEY_LIKE = '1'; +export const VALUE_KEY_DISLIKE = "0" +export const VALUE_KEY_LIKE = "1" export interface VoteValue { diff --git a/src/api/room/widgets/YoutubeVideoPlaybackStateEnum.ts b/src/api/room/widgets/YoutubeVideoPlaybackStateEnum.ts index 3a885d151..26a7aa739 100644 --- a/src/api/room/widgets/YoutubeVideoPlaybackStateEnum.ts +++ b/src/api/room/widgets/YoutubeVideoPlaybackStateEnum.ts @@ -1,9 +1,9 @@ export class YoutubeVideoPlaybackStateEnum { - public static readonly UNSTARTED = -1; - public static readonly ENDED = 0; - public static readonly PLAYING = 1; - public static readonly PAUSED = 2; - public static readonly BUFFERING = 3; - public static readonly CUED = 5; + public static readonly UNSTARTED = -1 + public static readonly ENDED = 0 + public static readonly PLAYING = 1 + public static readonly PAUSED = 2 + public static readonly BUFFERING = 3 + public static readonly CUED = 5 } diff --git a/src/api/room/widgets/index.ts b/src/api/room/widgets/index.ts index c43d6aaaa..c721ab722 100644 --- a/src/api/room/widgets/index.ts +++ b/src/api/room/widgets/index.ts @@ -1,25 +1,25 @@ -export * from './AvatarInfoFurni'; -export * from './AvatarInfoName'; -export * from './AvatarInfoPet'; -export * from './AvatarInfoRentableBot'; -export * from './AvatarInfoUser'; -export * from './AvatarInfoUtilities'; -export * from './BotSkillsEnum'; -export * from './ChatBubbleMessage'; -export * from './ChatMessageTypeEnum'; -export * from './DimmerFurnitureWidgetPresetItem'; -export * from './DoChatsOverlap'; -export * from './FurnitureDimmerUtilities'; -export * from './GetDiskColor'; -export * from './IAvatarInfo'; -export * from './ICraftingIngredient'; -export * from './ICraftingRecipe'; -export * from './IPhotoData'; -export * from './MannequinUtilities'; -export * from './PetSupplementEnum'; -export * from './PostureTypeEnum'; -export * from './RoomDimmerPreset'; -export * from './RoomObjectItem'; -export * from './UseProductItem'; -export * from './VoteValue'; -export * from './YoutubeVideoPlaybackStateEnum'; +export * from "./AvatarInfoFurni" +export * from "./AvatarInfoName" +export * from "./AvatarInfoPet" +export * from "./AvatarInfoRentableBot" +export * from "./AvatarInfoUser" +export * from "./AvatarInfoUtilities" +export * from "./BotSkillsEnum" +export * from "./ChatBubbleMessage" +export * from "./ChatMessageTypeEnum" +export * from "./DimmerFurnitureWidgetPresetItem" +export * from "./DoChatsOverlap" +export * from "./FurnitureDimmerUtilities" +export * from "./GetDiskColor" +export * from "./IAvatarInfo" +export * from "./ICraftingIngredient" +export * from "./ICraftingRecipe" +export * from "./IPhotoData" +export * from "./MannequinUtilities" +export * from "./PetSupplementEnum" +export * from "./PostureTypeEnum" +export * from "./RoomDimmerPreset" +export * from "./RoomObjectItem" +export * from "./UseProductItem" +export * from "./VoteValue" +export * from "./YoutubeVideoPlaybackStateEnum" diff --git a/src/api/user/GetUserProfile.ts b/src/api/user/GetUserProfile.ts index 0f2be7734..0f3c74e5c 100644 --- a/src/api/user/GetUserProfile.ts +++ b/src/api/user/GetUserProfile.ts @@ -1,7 +1,7 @@ -import { UserProfileComposer } from '@nitrots/nitro-renderer'; -import { SendMessageComposer } from '..'; +import { UserProfileComposer } from "@nitrots/nitro-renderer" +import { SendMessageComposer } from ".." export function GetUserProfile(userId: number): void { - SendMessageComposer(new UserProfileComposer(userId)); + SendMessageComposer(new UserProfileComposer(userId)) } diff --git a/src/api/user/index.ts b/src/api/user/index.ts index 1c609ea78..f8904c5ee 100644 --- a/src/api/user/index.ts +++ b/src/api/user/index.ts @@ -1 +1 @@ -export * from './GetUserProfile'; +export * from "./GetUserProfile" diff --git a/src/api/utils/CloneObject.ts b/src/api/utils/CloneObject.ts index 6cd8d3eb3..79c53e9d8 100644 --- a/src/api/utils/CloneObject.ts +++ b/src/api/utils/CloneObject.ts @@ -1,14 +1,15 @@ export const CloneObject = (object: T): T => { - if((object == null) || ('object' != typeof object)) return object; + // eslint-disable-next-line + if((object == null) || ("object" !== typeof object)) return object // @ts-ignore - const copy = new object.constructor(); + const copy = new object.constructor() for(const attr in object) { - if(object.hasOwnProperty(attr)) copy[attr] = object[attr]; + if(object.hasOwnProperty(attr)) copy[attr] = object[attr] } - return copy; + return copy } diff --git a/src/api/utils/ColorUtils.ts b/src/api/utils/ColorUtils.ts index c32f8fbae..5de30480f 100644 --- a/src/api/utils/ColorUtils.ts +++ b/src/api/utils/ColorUtils.ts @@ -2,25 +2,25 @@ export class ColorUtils { public static makeColorHex(color: string): string { - return ('#' + color); + return ("#" + color) } public static makeColorNumberHex(color: number): string { - let val = color.toString(16); - return ( '#' + val.padStart(6, '0')); + let val = color.toString(16) + return ("#" + val.padStart(6, "0")) } public static convertFromHex(color: string): number { - return parseInt(color.replace('#', ''), 16); + return parseInt(color.replace("#", ""), 16) } public static uintHexColor(color: number): string { - const realColor = color >>>0; + const realColor = color >>> 0 - return ColorUtils.makeColorHex(realColor.toString(16).substring(2)); + return ColorUtils.makeColorHex(realColor.toString(16).substring(2)) } /** @@ -31,11 +31,11 @@ export class ColorUtils public static int_to_8BitVals(value: number): [number, number, number, number] { const val1 = ((value >> 24) & 0xFF) - const val2 = ((value >> 16) & 0xFF); - const val3 = ((value >> 8) & 0xFF); - const val4 = (value & 0xFF); + const val2 = ((value >> 16) & 0xFF) + const val3 = ((value >> 8) & 0xFF) + const val4 = (value & 0xFF) - return [ val1, val2, val3, val4 ]; + return [ val1, val2, val3, val4 ] } /** @@ -49,17 +49,17 @@ export class ColorUtils */ public static eight_bitVals_to_int(val1: number, val2: number, val3: number, val4: number): number { - return (((val1) << 24) + ((val2) << 16) + ((val3) << 8) + (val4| 0)); + return (((val1) << 24) + ((val2) << 16) + ((val3) << 8) + (val4 | 0)) } public static int2rgb(color: number): string { - color >>>= 0; - const b = color & 0xFF; - const g = (color & 0xFF00) >>> 8; - const r = (color & 0xFF0000) >>> 16; - const a = ((color & 0xFF000000) >>> 24) / 255; + color >>>= 0 + const b = color & 0xFF + const g = (color & 0xFF00) >>> 8 + const r = (color & 0xFF0000) >>> 16 + const a = ((color & 0xFF000000) >>> 24) / 255 - return 'rgba(' + [ r, g, b, 1 ].join(',') + ')'; + return "rgba(" + [ r, g, b, 1 ].join(",") + ")" } } diff --git a/src/api/utils/ConvertSeconds.ts b/src/api/utils/ConvertSeconds.ts index f559dea91..d85c69e79 100644 --- a/src/api/utils/ConvertSeconds.ts +++ b/src/api/utils/ConvertSeconds.ts @@ -1,9 +1,9 @@ export const ConvertSeconds = (seconds: number) => { - let numDays = Math.floor(seconds / 86400); - let numHours = Math.floor((seconds % 86400) / 3600); - let numMinutes = Math.floor(((seconds % 86400) % 3600) / 60); - let numSeconds = ((seconds % 86400) % 3600) % 60; + let numDays = Math.floor(seconds / 86400) + let numHours = Math.floor((seconds % 86400) / 3600) + let numMinutes = Math.floor(((seconds % 86400) % 3600) / 60) + let numSeconds = ((seconds % 86400) % 3600) % 60 - return numDays.toString().padStart(2, '0') + ':' + numHours.toString().padStart(2, '0') + ':' + numMinutes.toString().padStart(2, '0') + ':' + numSeconds.toString().padStart(2, '0'); + return numDays.toString().padStart(2, "0") + ":" + numHours.toString().padStart(2, "0") + ":" + numMinutes.toString().padStart(2, "0") + ":" + numSeconds.toString().padStart(2, "0") } diff --git a/src/api/utils/GetLocalStorage.ts b/src/api/utils/GetLocalStorage.ts index 769df6d7a..81dac9b33 100644 --- a/src/api/utils/GetLocalStorage.ts +++ b/src/api/utils/GetLocalStorage.ts @@ -6,6 +6,6 @@ export const GetLocalStorage = (key: string) => } catch(e) { - return null; + return null } } diff --git a/src/api/utils/LocalStorageKeys.ts b/src/api/utils/LocalStorageKeys.ts index 6c922790f..d3c435469 100644 --- a/src/api/utils/LocalStorageKeys.ts +++ b/src/api/utils/LocalStorageKeys.ts @@ -1,5 +1,5 @@ export class LocalStorageKeys { - public static CATALOG_PLACE_MULTIPLE_OBJECTS: string = 'catalogPlaceMultipleObjects'; - public static CATALOG_SKIP_PURCHASE_CONFIRMATION: string = 'catalogSkipPurchaseConfirmation'; + public static CATALOG_PLACE_MULTIPLE_OBJECTS: string = "catalogPlaceMultipleObjects" + public static CATALOG_SKIP_PURCHASE_CONFIRMATION: string = "catalogSkipPurchaseConfirmation" } diff --git a/src/api/utils/LocalizeBadgeDescription.ts b/src/api/utils/LocalizeBadgeDescription.ts index 04fd7df95..80ff778b4 100644 --- a/src/api/utils/LocalizeBadgeDescription.ts +++ b/src/api/utils/LocalizeBadgeDescription.ts @@ -1,10 +1,10 @@ -import { GetNitroInstance } from '..'; +import { GetNitroInstance } from ".." export const LocalizeBadgeDescription = (key: string) => { - let badgeDesc = GetNitroInstance().localization.getBadgeDesc(key); + let badgeDesc = GetNitroInstance().localization.getBadgeDesc(key) - if(!badgeDesc || !badgeDesc.length) badgeDesc = `badge_desc_${ key }`; + if(!badgeDesc || !badgeDesc.length) badgeDesc = `badge_desc_${ key }` - return badgeDesc; + return badgeDesc } diff --git a/src/api/utils/LocalizeBageName.ts b/src/api/utils/LocalizeBageName.ts index d722ab071..3886b23b1 100644 --- a/src/api/utils/LocalizeBageName.ts +++ b/src/api/utils/LocalizeBageName.ts @@ -1,10 +1,10 @@ -import { GetNitroInstance } from '..'; +import { GetNitroInstance } from ".." export const LocalizeBadgeName = (key: string) => { - let badgeName = GetNitroInstance().localization.getBadgeName(key); + let badgeName = GetNitroInstance().localization.getBadgeName(key) - if(!badgeName || !badgeName.length) badgeName = `badge_name_${ key }`; + if(!badgeName || !badgeName.length) badgeName = `badge_name_${ key }` - return badgeName; + return badgeName } diff --git a/src/api/utils/LocalizeFormattedNumber.ts b/src/api/utils/LocalizeFormattedNumber.ts index fab30d466..d793742ee 100644 --- a/src/api/utils/LocalizeFormattedNumber.ts +++ b/src/api/utils/LocalizeFormattedNumber.ts @@ -1,6 +1,6 @@ export function LocalizeFormattedNumber(number: number): string { - if(!number || isNaN(number)) return '0'; + if(!number || isNaN(number)) return "0" - return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' '); + return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ") }; diff --git a/src/api/utils/LocalizeShortNumber.ts b/src/api/utils/LocalizeShortNumber.ts index 30975ecac..e5130648d 100644 --- a/src/api/utils/LocalizeShortNumber.ts +++ b/src/api/utils/LocalizeShortNumber.ts @@ -1,36 +1,36 @@ export function LocalizeShortNumber(number: number): string { - if(!number || isNaN(number)) return '0'; + if(!number || isNaN(number)) return "0" - let abs = Math.abs(number); + let abs = Math.abs(number) - const rounder = Math.pow(10, 1); - const isNegative = (number < 0); + const rounder = Math.pow(10, 1) + const isNegative = (number < 0) - let key = ''; + let key = "" const powers = [ - { key: 'Q', value: Math.pow(10, 15) }, - { key: 'T', value: Math.pow(10, 12) }, - { key: 'B', value: Math.pow(10, 9) }, - { key: 'M', value: Math.pow(10, 6) }, - { key: 'K', value: 1000 } - ]; + { key: "Q", value: Math.pow(10, 15) }, + { key: "T", value: Math.pow(10, 12) }, + { key: "B", value: Math.pow(10, 9) }, + { key: "M", value: Math.pow(10, 6) }, + { key: "K", value: 1000 } + ] for(const power of powers) { - let reduced = abs / power.value; + let reduced = abs / power.value - reduced = Math.round(reduced * rounder) / rounder; + reduced = Math.round(reduced * rounder) / rounder if(reduced >= 1) { - abs = reduced; - key = power.key; + abs = reduced + key = power.key - break; + break } } - return ((isNegative ? '-' : '') + abs + key); + return ((isNegative ? "-" : "") + abs + key) } diff --git a/src/api/utils/LocalizeText.ts b/src/api/utils/LocalizeText.ts index cf34a1ff4..5f59359ed 100644 --- a/src/api/utils/LocalizeText.ts +++ b/src/api/utils/LocalizeText.ts @@ -1,6 +1,6 @@ -import { GetNitroInstance } from '..'; +import { GetNitroInstance } from ".." export function LocalizeText(key: string, parameters: string[] = null, replacements: string[] = null): string { - return GetNitroInstance().getLocalizationWithParameters(key, parameters, replacements); + return GetNitroInstance().getLocalizationWithParameters(key, parameters, replacements) } diff --git a/src/api/utils/PlaySound.ts b/src/api/utils/PlaySound.ts index 0f9a39d89..8b9490b36 100644 --- a/src/api/utils/PlaySound.ts +++ b/src/api/utils/PlaySound.ts @@ -1,24 +1,24 @@ -import { MouseEventType, NitroSoundEvent } from '@nitrots/nitro-renderer'; -import { DispatchMainEvent } from '../events'; +import { MouseEventType, NitroSoundEvent } from "@nitrots/nitro-renderer" +import { DispatchMainEvent } from "../events" -let canPlaySound = false; +let canPlaySound = false export const PlaySound = (sampleCode: string) => { - if(!canPlaySound) return; + if(!canPlaySound) return - DispatchMainEvent(new NitroSoundEvent(NitroSoundEvent.PLAY_SOUND, sampleCode)); + DispatchMainEvent(new NitroSoundEvent(NitroSoundEvent.PLAY_SOUND, sampleCode)) } -const eventTypes = [ MouseEventType.MOUSE_CLICK ]; +const eventTypes = [ MouseEventType.MOUSE_CLICK ] const startListening = () => { - const stopListening = () => eventTypes.forEach(type => window.removeEventListener(type, onEvent)); + const stopListening = () => eventTypes.forEach(type => window.removeEventListener(type, onEvent)) - const onEvent = (event: Event) => ((canPlaySound = true) && stopListening()); + const onEvent = (event: Event) => ((canPlaySound = true) && stopListening()) - eventTypes.forEach(type => window.addEventListener(type, onEvent)); + eventTypes.forEach(type => window.addEventListener(type, onEvent)) } -startListening(); +startListening() diff --git a/src/api/utils/ProductImageUtility.ts b/src/api/utils/ProductImageUtility.ts index 59c8c4f4b..fa42e4ec2 100644 --- a/src/api/utils/ProductImageUtility.ts +++ b/src/api/utils/ProductImageUtility.ts @@ -1,59 +1,59 @@ -import { CatalogPageMessageProductData } from '@nitrots/nitro-renderer'; -import { FurniCategory } from '../inventory'; -import { GetRoomEngine } from '../nitro'; +import { CatalogPageMessageProductData } from "@nitrots/nitro-renderer" +import { FurniCategory } from "../inventory" +import { GetRoomEngine } from "../nitro" export class ProductImageUtility { public static getProductImageUrl(productType: string, furniClassId: number, extraParam: string): string { - let imageUrl: string = null; + let imageUrl: string = null switch(productType) { - case CatalogPageMessageProductData.S: - imageUrl = GetRoomEngine().getFurnitureFloorIconUrl(furniClassId); - break; - case CatalogPageMessageProductData.I: - const productCategory = this.getProductCategory(CatalogPageMessageProductData.I, furniClassId); - - if(productCategory === 1) - { - imageUrl = GetRoomEngine().getFurnitureWallIconUrl(furniClassId, extraParam); - } - else + case CatalogPageMessageProductData.S: + imageUrl = GetRoomEngine().getFurnitureFloorIconUrl(furniClassId) + break + case CatalogPageMessageProductData.I: + const productCategory = this.getProductCategory(CatalogPageMessageProductData.I, furniClassId) + + if(productCategory === 1) + { + imageUrl = GetRoomEngine().getFurnitureWallIconUrl(furniClassId, extraParam) + } + else + { + switch(productCategory) { - switch(productCategory) - { - case FurniCategory.WALL_PAPER: - break; - case FurniCategory.LANDSCAPE: - break; - case FurniCategory.FLOOR: - break; - } + case FurniCategory.WALL_PAPER: + break + case FurniCategory.LANDSCAPE: + break + case FurniCategory.FLOOR: + break } - break; - case CatalogPageMessageProductData.E: + } + break + case CatalogPageMessageProductData.E: // fx_icon_furniClassId_png - break; + break } - return imageUrl; + return imageUrl } public static getProductCategory(productType: string, furniClassId: number): number { - if(productType === CatalogPageMessageProductData.S) return 1; + if(productType === CatalogPageMessageProductData.S) return 1 if(productType === CatalogPageMessageProductData.I) { - if(furniClassId === 3001) return FurniCategory.WALL_PAPER; + if(furniClassId === 3001) return FurniCategory.WALL_PAPER - if(furniClassId === 3002) return FurniCategory.FLOOR; + if(furniClassId === 3002) return FurniCategory.FLOOR - if(furniClassId === 4057) return FurniCategory.LANDSCAPE; + if(furniClassId === 4057) return FurniCategory.LANDSCAPE } - return 1; + return 1 } } diff --git a/src/api/utils/Randomizer.ts b/src/api/utils/Randomizer.ts index 1f67a129c..6910d1fb0 100644 --- a/src/api/utils/Randomizer.ts +++ b/src/api/utils/Randomizer.ts @@ -2,27 +2,27 @@ export class Randomizer { public static getRandomNumber(count: number): number { - return Math.floor(Math.random() * count); + return Math.floor(Math.random() * count) } public static getRandomElement(elements: T[]): T { - return elements[this.getRandomNumber(elements.length)]; + return elements[this.getRandomNumber(elements.length)] } public static getRandomElements(elements: T[], count: number): T[] { - const result: T[] = new Array(count); - let len = elements.length; - const taken = new Array(len); + const result: T[] = new Array(count) + let len = elements.length + const taken = new Array(len) while(count--) { - var x = this.getRandomNumber(len); - result[count] = elements[x in taken ? taken[x] : x]; - taken[x] = --len in taken ? taken[len] : len; + var x = this.getRandomNumber(len) + result[count] = elements[x in taken ? taken[x] : x] + taken[x] = --len in taken ? taken[len] : len } - return result; + return result } } diff --git a/src/api/utils/RoomChatFormatter.ts b/src/api/utils/RoomChatFormatter.ts index a24cdf570..965bf1ce6 100644 --- a/src/api/utils/RoomChatFormatter.ts +++ b/src/api/utils/RoomChatFormatter.ts @@ -1,75 +1,75 @@ -const allowedColours: Map = new Map(); +const allowedColours: Map = new Map() -allowedColours.set('r', 'red'); -allowedColours.set('b', 'blue'); -allowedColours.set('g', 'green'); -allowedColours.set('y', 'yellow'); -allowedColours.set('w', 'white'); -allowedColours.set('o', 'orange'); -allowedColours.set('c', 'cyan'); -allowedColours.set('br', 'brown'); -allowedColours.set('pr', 'purple'); -allowedColours.set('pk', 'pink'); +allowedColours.set("r", "red") +allowedColours.set("b", "blue") +allowedColours.set("g", "green") +allowedColours.set("y", "yellow") +allowedColours.set("w", "white") +allowedColours.set("o", "orange") +allowedColours.set("c", "cyan") +allowedColours.set("br", "brown") +allowedColours.set("pr", "purple") +allowedColours.set("pk", "pink") -allowedColours.set('red', 'red'); -allowedColours.set('blue', 'blue'); -allowedColours.set('green', 'green'); -allowedColours.set('yellow', 'yellow'); -allowedColours.set('white', 'white'); -allowedColours.set('orange', 'orange'); -allowedColours.set('cyan', 'cyan'); -allowedColours.set('brown', 'brown'); -allowedColours.set('purple', 'purple'); -allowedColours.set('pink', 'pink'); +allowedColours.set("red", "red") +allowedColours.set("blue", "blue") +allowedColours.set("green", "green") +allowedColours.set("yellow", "yellow") +allowedColours.set("white", "white") +allowedColours.set("orange", "orange") +allowedColours.set("cyan", "cyan") +allowedColours.set("brown", "brown") +allowedColours.set("purple", "purple") +allowedColours.set("pink", "pink") const encodeHTML = (str: string) => { return str.replace(/([\u00A0-\u9999<>&])(.|$)/g, (full, char, next) => { - if(char !== '&' || next !== '#') + if(char !== "&" || next !== "#") { - if(/[\u00A0-\u9999<>&]/.test(next)) next = '&#' + next.charCodeAt(0) + ';'; + if(/[\u00A0-\u9999<>&]/.test(next)) next = "&#" + next.charCodeAt(0) + ";" - return '&#' + char.charCodeAt(0) + ';' + next; + return "&#" + char.charCodeAt(0) + ";" + next } - return full; - }); + return full + }) } export const RoomChatFormatter = (content: string) => { - let result = ''; + let result = "" - content = encodeHTML(content); + content = encodeHTML(content) //content = (joypixels.shortnameToUnicode(content) as string) - if(content.startsWith('@') && content.indexOf('@', 1) > -1) + if(content.startsWith("@") && content.indexOf("@", 1) > -1) { - let match = null; + let match = null while((match = /@[a-zA-Z]+@/g.exec(content)) !== null) { - const colorTag = match[0].toString(); - const colorName = colorTag.substr(1, colorTag.length - 2); - const text = content.replace(colorTag, ''); + const colorTag = match[0].toString() + const colorName = colorTag.substr(1, colorTag.length - 2) + const text = content.replace(colorTag, "") if(!allowedColours.has(colorName)) { - result = text; + result = text } else { - const color = allowedColours.get(colorName); - result = '' + text + ''; + const color = allowedColours.get(colorName) + result = "" + text + "" } - break; + break } } else { - result = content; + result = content } - return result; + return result } diff --git a/src/api/utils/SetLocalStorage.ts b/src/api/utils/SetLocalStorage.ts index 02aa8f3da..afcae69ee 100644 --- a/src/api/utils/SetLocalStorage.ts +++ b/src/api/utils/SetLocalStorage.ts @@ -1 +1 @@ -export const SetLocalStorage = (key: string, value: T) => window.localStorage.setItem(key, JSON.stringify(value)); +export const SetLocalStorage = (key: string, value: T) => window.localStorage.setItem(key, JSON.stringify(value)) diff --git a/src/api/utils/SoundNames.ts b/src/api/utils/SoundNames.ts index 4459651b3..3e6575619 100644 --- a/src/api/utils/SoundNames.ts +++ b/src/api/utils/SoundNames.ts @@ -1,9 +1,9 @@ export class SoundNames { - public static CAMERA_SHUTTER = 'camera_shutter'; - public static CREDITS = 'credits'; - public static DUCKETS = 'duckets'; - public static MESSENGER_NEW_THREAD = 'messenger_new_thread'; - public static MESSENGER_MESSAGE_RECEIVED = 'messenger_message_received'; - public static MODTOOLS_NEW_TICKET = 'modtools_new_ticket'; + public static CAMERA_SHUTTER = "camera_shutter" + public static CREDITS = "credits" + public static DUCKETS = "duckets" + public static MESSENGER_NEW_THREAD = "messenger_new_thread" + public static MESSENGER_MESSAGE_RECEIVED = "messenger_message_received" + public static MODTOOLS_NEW_TICKET = "modtools_new_ticket" } diff --git a/src/api/utils/index.ts b/src/api/utils/index.ts index 0c51fc495..ba2dfeb61 100644 --- a/src/api/utils/index.ts +++ b/src/api/utils/index.ts @@ -1,17 +1,17 @@ -export * from './CloneObject'; -export * from './ColorUtils'; -export * from './ConvertSeconds'; -export * from './GetLocalStorage'; -export * from './LocalizeBadgeDescription'; -export * from './LocalizeBageName'; -export * from './LocalizeFormattedNumber'; -export * from './LocalizeShortNumber'; -export * from './LocalizeText'; -export * from './LocalStorageKeys'; -export * from './PlaySound'; -export * from './ProductImageUtility'; -export * from './Randomizer'; -export * from './RoomChatFormatter'; -export * from './SetLocalStorage'; -export * from './SoundNames'; -export * from './WindowSaveOptions'; +export * from "./CloneObject" +export * from "./ColorUtils" +export * from "./ConvertSeconds" +export * from "./GetLocalStorage" +export * from "./LocalizeBadgeDescription" +export * from "./LocalizeBageName" +export * from "./LocalizeFormattedNumber" +export * from "./LocalizeShortNumber" +export * from "./LocalizeText" +export * from "./LocalStorageKeys" +export * from "./PlaySound" +export * from "./ProductImageUtility" +export * from "./Randomizer" +export * from "./RoomChatFormatter" +export * from "./SetLocalStorage" +export * from "./SoundNames" +export * from "./WindowSaveOptions" diff --git a/src/api/wired/GetWiredTimeLocale.ts b/src/api/wired/GetWiredTimeLocale.ts index 49025fe4f..d1311aab8 100644 --- a/src/api/wired/GetWiredTimeLocale.ts +++ b/src/api/wired/GetWiredTimeLocale.ts @@ -1,8 +1,8 @@ export const GetWiredTimeLocale = (value: number) => { - const time = Math.floor((value / 2)); + const time = Math.floor((value / 2)) - if(!(value % 2)) return time.toString(); + if(!(value % 2)) return time.toString() - return (time + 0.5).toString(); + return (time + 0.5).toString() } diff --git a/src/api/wired/WiredActionLayoutCode.ts b/src/api/wired/WiredActionLayoutCode.ts index 5282dc590..f47a792ed 100644 --- a/src/api/wired/WiredActionLayoutCode.ts +++ b/src/api/wired/WiredActionLayoutCode.ts @@ -1,29 +1,29 @@ export class WiredActionLayoutCode { - public static TOGGLE_FURNI_STATE: number = 0; - public static RESET: number = 1; - public static SET_FURNI_STATE: number = 3; - public static MOVE_FURNI: number = 4; - public static GIVE_SCORE: number = 6; - public static CHAT: number = 7; - public static TELEPORT: number = 8; - public static JOIN_TEAM: number = 9; - public static LEAVE_TEAM: number = 10; - public static CHASE: number = 11; - public static FLEE: number = 12; - public static MOVE_AND_ROTATE_FURNI: number = 13; - public static GIVE_SCORE_TO_PREDEFINED_TEAM: number = 14; - public static TOGGLE_TO_RANDOM_STATE: number = 15; - public static MOVE_FURNI_TO: number = 16; - public static GIVE_REWARD: number = 17; - public static CALL_ANOTHER_STACK: number = 18; - public static KICK_FROM_ROOM: number = 19; - public static MUTE_USER: number = 20; - public static BOT_TELEPORT: number = 21; - public static BOT_MOVE: number = 22; - public static BOT_TALK: number = 23; - public static BOT_GIVE_HAND_ITEM: number = 24; - public static BOT_FOLLOW_AVATAR: number = 25; - public static BOT_CHANGE_FIGURE: number = 26; - public static BOT_TALK_DIRECT_TO_AVTR: number = 27; + public static TOGGLE_FURNI_STATE: number = 0 + public static RESET: number = 1 + public static SET_FURNI_STATE: number = 3 + public static MOVE_FURNI: number = 4 + public static GIVE_SCORE: number = 6 + public static CHAT: number = 7 + public static TELEPORT: number = 8 + public static JOIN_TEAM: number = 9 + public static LEAVE_TEAM: number = 10 + public static CHASE: number = 11 + public static FLEE: number = 12 + public static MOVE_AND_ROTATE_FURNI: number = 13 + public static GIVE_SCORE_TO_PREDEFINED_TEAM: number = 14 + public static TOGGLE_TO_RANDOM_STATE: number = 15 + public static MOVE_FURNI_TO: number = 16 + public static GIVE_REWARD: number = 17 + public static CALL_ANOTHER_STACK: number = 18 + public static KICK_FROM_ROOM: number = 19 + public static MUTE_USER: number = 20 + public static BOT_TELEPORT: number = 21 + public static BOT_MOVE: number = 22 + public static BOT_TALK: number = 23 + public static BOT_GIVE_HAND_ITEM: number = 24 + public static BOT_FOLLOW_AVATAR: number = 25 + public static BOT_CHANGE_FIGURE: number = 26 + public static BOT_TALK_DIRECT_TO_AVTR: number = 27 } diff --git a/src/api/wired/WiredConditionLayoutCode.ts b/src/api/wired/WiredConditionLayoutCode.ts index 58cae5db5..790268474 100644 --- a/src/api/wired/WiredConditionLayoutCode.ts +++ b/src/api/wired/WiredConditionLayoutCode.ts @@ -1,29 +1,29 @@ export class WiredConditionlayout { - public static STATES_MATCH: number = 0; - public static FURNIS_HAVE_AVATARS: number = 1; - public static ACTOR_IS_ON_FURNI: number = 2; - public static TIME_ELAPSED_MORE: number = 3; - public static TIME_ELAPSED_LESS: number = 4; - public static USER_COUNT_IN: number = 5; - public static ACTOR_IS_IN_TEAM: number = 6; - public static HAS_STACKED_FURNIS: number = 7; - public static STUFF_TYPE_MATCHES: number = 8; - public static STUFFS_IN_FORMATION: number = 9; - public static ACTOR_IS_GROUP_MEMBER: number = 10; - public static ACTOR_IS_WEARING_BADGE: number = 11; - public static ACTOR_IS_WEARING_EFFECT: number = 12; - public static NOT_STATES_MATCH: number = 13; - public static FURNI_NOT_HAVE_HABBO: number = 14; - public static NOT_ACTOR_ON_FURNI: number = 15; - public static NOT_USER_COUNT_IN: number = 16; - public static NOT_ACTOR_IN_TEAM: number = 17; - public static NOT_HAS_STACKED_FURNIS: number = 18; - public static NOT_FURNI_IS_OF_TYPE: number = 19; - public static NOT_STUFFS_IN_FORMATION: number = 20; - public static NOT_ACTOR_IN_GROUP: number = 21; - public static NOT_ACTOR_WEARS_BADGE: number = 22; - public static NOT_ACTOR_WEARING_EFFECT: number = 23; - public static DATE_RANGE_ACTIVE: number = 24; - public static ACTOR_HAS_HANDITEM: number = 25; + public static STATES_MATCH: number = 0 + public static FURNIS_HAVE_AVATARS: number = 1 + public static ACTOR_IS_ON_FURNI: number = 2 + public static TIME_ELAPSED_MORE: number = 3 + public static TIME_ELAPSED_LESS: number = 4 + public static USER_COUNT_IN: number = 5 + public static ACTOR_IS_IN_TEAM: number = 6 + public static HAS_STACKED_FURNIS: number = 7 + public static STUFF_TYPE_MATCHES: number = 8 + public static STUFFS_IN_FORMATION: number = 9 + public static ACTOR_IS_GROUP_MEMBER: number = 10 + public static ACTOR_IS_WEARING_BADGE: number = 11 + public static ACTOR_IS_WEARING_EFFECT: number = 12 + public static NOT_STATES_MATCH: number = 13 + public static FURNI_NOT_HAVE_HABBO: number = 14 + public static NOT_ACTOR_ON_FURNI: number = 15 + public static NOT_USER_COUNT_IN: number = 16 + public static NOT_ACTOR_IN_TEAM: number = 17 + public static NOT_HAS_STACKED_FURNIS: number = 18 + public static NOT_FURNI_IS_OF_TYPE: number = 19 + public static NOT_STUFFS_IN_FORMATION: number = 20 + public static NOT_ACTOR_IN_GROUP: number = 21 + public static NOT_ACTOR_WEARS_BADGE: number = 22 + public static NOT_ACTOR_WEARING_EFFECT: number = 23 + public static DATE_RANGE_ACTIVE: number = 24 + public static ACTOR_HAS_HANDITEM: number = 25 } diff --git a/src/api/wired/WiredDateToString.ts b/src/api/wired/WiredDateToString.ts index 825adc8ec..07ef2fca6 100644 --- a/src/api/wired/WiredDateToString.ts +++ b/src/api/wired/WiredDateToString.ts @@ -1 +1 @@ -export const WiredDateToString = (date: Date) => `${ date.getFullYear() }/${ ('0' + (date.getMonth() + 1)).slice(-2) }/${ ('0' + date.getDate()).slice(-2) } ${ ('0' + date.getHours()).slice(-2) }:${ ('0' + date.getMinutes()).slice(-2) }`; +export const WiredDateToString = (date: Date) => `${ date.getFullYear() }/${ ("0" + (date.getMonth() + 1)).slice(-2) }/${ ("0" + date.getDate()).slice(-2) } ${ ("0" + date.getHours()).slice(-2) }:${ ("0" + date.getMinutes()).slice(-2) }` diff --git a/src/api/wired/WiredFurniType.ts b/src/api/wired/WiredFurniType.ts index 447e97012..a21a70131 100644 --- a/src/api/wired/WiredFurniType.ts +++ b/src/api/wired/WiredFurniType.ts @@ -1,7 +1,7 @@ export class WiredFurniType { - public static STUFF_SELECTION_OPTION_NONE: number = 0; - public static STUFF_SELECTION_OPTION_BY_ID: number = 1; - public static STUFF_SELECTION_OPTION_BY_ID_OR_BY_TYPE: number = 2; - public static STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT: number = 3; + public static STUFF_SELECTION_OPTION_NONE: number = 0 + public static STUFF_SELECTION_OPTION_BY_ID: number = 1 + public static STUFF_SELECTION_OPTION_BY_ID_OR_BY_TYPE: number = 2 + public static STUFF_SELECTION_OPTION_BY_ID_BY_TYPE_OR_FROM_CONTEXT: number = 3 } diff --git a/src/api/wired/WiredSelectionFilter.ts b/src/api/wired/WiredSelectionFilter.ts index d661bcf7c..30a8e3066 100644 --- a/src/api/wired/WiredSelectionFilter.ts +++ b/src/api/wired/WiredSelectionFilter.ts @@ -1,4 +1,4 @@ -import { ColorConverter, NitroFilter } from '@nitrots/nitro-renderer'; +import { ColorConverter, NitroFilter } from "@nitrots/nitro-renderer" const vertex = ` attribute vec2 aVertexPosition; @@ -9,7 +9,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`; +}` const fragment = ` varying vec2 vTextureCoord; @@ -26,70 +26,70 @@ void main(void) { } else if(currentColor.a > 0.0) { gl_FragColor = vec4(colorOverlay.r, colorOverlay.g, colorOverlay.b, currentColor.a); } -}`; +}` export class WiredSelectionFilter extends NitroFilter { - private _lineColor: number; - private _color: number; + private _lineColor: number + private _color: number constructor(lineColor: number | number[], color: number | number[]) { - super(vertex, fragment); + super(vertex, fragment) - this.uniforms.lineColor = new Float32Array(3); - this.uniforms.color = new Float32Array(3); - this.lineColor = lineColor; - this.color = color; + this.uniforms.lineColor = new Float32Array(3) + this.uniforms.color = new Float32Array(3) + this.lineColor = lineColor + this.color = color } public get lineColor(): number | number[] { - return this._lineColor; + return this._lineColor } public set lineColor(value: number | number[]) { - const arr = this.uniforms.lineColor; + const arr = this.uniforms.lineColor - if(typeof value === 'number') + if(typeof value === "number") { - ColorConverter.hex2rgb(value, arr); + ColorConverter.hex2rgb(value, arr) - this._lineColor = value; + this._lineColor = value } else { - arr[0] = value[0]; - arr[1] = value[1]; - arr[2] = value[2]; + arr[0] = value[0] + arr[1] = value[1] + arr[2] = value[2] - this._lineColor = ColorConverter.rgb2hex(arr); + this._lineColor = ColorConverter.rgb2hex(arr) } } public get color(): number | number[] { - return this._color; + return this._color } public set color(value: number | number[]) { - const arr = this.uniforms.color; + const arr = this.uniforms.color - if(typeof value === 'number') + if(typeof value === "number") { - ColorConverter.hex2rgb(value, arr); + ColorConverter.hex2rgb(value, arr) - this._color = value; + this._color = value } else { - arr[0] = value[0]; - arr[1] = value[1]; - arr[2] = value[2]; + arr[0] = value[0] + arr[1] = value[1] + arr[2] = value[2] - this._color = ColorConverter.rgb2hex(arr); + this._color = ColorConverter.rgb2hex(arr) } } } diff --git a/src/api/wired/WiredSelectionVisualizer.ts b/src/api/wired/WiredSelectionVisualizer.ts index 7f5c33284..34b9990e3 100644 --- a/src/api/wired/WiredSelectionVisualizer.ts +++ b/src/api/wired/WiredSelectionVisualizer.ts @@ -1,26 +1,26 @@ -import { IRoomObject, IRoomObjectSpriteVisualization, NitroFilter, RoomObjectCategory } from '@nitrots/nitro-renderer'; -import { WiredSelectionFilter } from '.'; -import { GetRoomEngine } from '..'; +import { IRoomObject, IRoomObjectSpriteVisualization, NitroFilter, RoomObjectCategory } from "@nitrots/nitro-renderer" +import { WiredSelectionFilter } from "." +import { GetRoomEngine } from ".." export class WiredSelectionVisualizer { - private static _selectionShader: NitroFilter = new WiredSelectionFilter([ 1, 1, 1 ], [ 0.6, 0.6, 0.6 ]); + private static _selectionShader: NitroFilter = new WiredSelectionFilter([ 1, 1, 1 ], [ 0.6, 0.6, 0.6 ]) public static show(furniId: number): void { - WiredSelectionVisualizer.applySelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + WiredSelectionVisualizer.applySelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)) } public static hide(furniId: number): void { - WiredSelectionVisualizer.clearSelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + WiredSelectionVisualizer.clearSelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)) } public static clearSelectionShaderFromFurni(furniIds: number[]): void { for(const furniId of furniIds) { - WiredSelectionVisualizer.clearSelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + WiredSelectionVisualizer.clearSelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)) } } @@ -28,41 +28,41 @@ export class WiredSelectionVisualizer { for(const furniId of furniIds) { - WiredSelectionVisualizer.applySelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)); + WiredSelectionVisualizer.applySelectionShader(WiredSelectionVisualizer.getRoomObject(furniId)) } } private static getRoomObject(objectId: number): IRoomObject { - const roomEngine = GetRoomEngine(); + const roomEngine = GetRoomEngine() - return roomEngine.getRoomObject(roomEngine.activeRoomId, objectId, RoomObjectCategory.FLOOR); + return roomEngine.getRoomObject(roomEngine.activeRoomId, objectId, RoomObjectCategory.FLOOR) } private static applySelectionShader(roomObject: IRoomObject): void { - if(!roomObject) return; + if(!roomObject) return - const visualization = (roomObject.visualization as IRoomObjectSpriteVisualization); + const visualization = (roomObject.visualization as IRoomObjectSpriteVisualization) - if(!visualization) return; + if(!visualization) return for(const sprite of visualization.sprites) { - if(sprite.blendMode === 1) continue; // BLEND_MODE: ADD + if(sprite.blendMode === 1) continue // BLEND_MODE: ADD - sprite.filters = [ WiredSelectionVisualizer._selectionShader ]; + sprite.filters = [ WiredSelectionVisualizer._selectionShader ] } } private static clearSelectionShader(roomObject: IRoomObject): void { - if(!roomObject) return; + if(!roomObject) return - const visualization = (roomObject.visualization as IRoomObjectSpriteVisualization); + const visualization = (roomObject.visualization as IRoomObjectSpriteVisualization) - if(!visualization) return; + if(!visualization) return - for(const sprite of visualization.sprites) sprite.filters = []; + for(const sprite of visualization.sprites) sprite.filters = [] } } diff --git a/src/api/wired/WiredStringDelimeter.ts b/src/api/wired/WiredStringDelimeter.ts index bc4cf2e41..2a7abe46e 100644 --- a/src/api/wired/WiredStringDelimeter.ts +++ b/src/api/wired/WiredStringDelimeter.ts @@ -1 +1 @@ -export const WIRED_STRING_DELIMETER: string = '\t'; +export const WIRED_STRING_DELIMETER: string = "\t" diff --git a/src/api/wired/WiredTriggerLayoutCode.ts b/src/api/wired/WiredTriggerLayoutCode.ts index fd758dff5..82557cd67 100644 --- a/src/api/wired/WiredTriggerLayoutCode.ts +++ b/src/api/wired/WiredTriggerLayoutCode.ts @@ -1,17 +1,17 @@ export class WiredTriggerLayout { - public static AVATAR_SAYS_SOMETHING: number = 0; - public static AVATAR_WALKS_ON_FURNI: number = 1; - public static AVATAR_WALKS_OFF_FURNI: number = 2; - public static EXECUTE_ONCE: number = 3; - public static TOGGLE_FURNI: number = 4; - public static EXECUTE_PERIODICALLY: number = 6; - public static AVATAR_ENTERS_ROOM: number = 7; - public static GAME_STARTS: number = 8; - public static GAME_ENDS: number = 9; - public static SCORE_ACHIEVED: number = 10; - public static COLLISION: number = 11; - public static EXECUTE_PERIODICALLY_LONG: number = 12; - public static BOT_REACHED_STUFF: number = 13; - public static BOT_REACHED_AVATAR: number = 14; + public static AVATAR_SAYS_SOMETHING: number = 0 + public static AVATAR_WALKS_ON_FURNI: number = 1 + public static AVATAR_WALKS_OFF_FURNI: number = 2 + public static EXECUTE_ONCE: number = 3 + public static TOGGLE_FURNI: number = 4 + public static EXECUTE_PERIODICALLY: number = 6 + public static AVATAR_ENTERS_ROOM: number = 7 + public static GAME_STARTS: number = 8 + public static GAME_ENDS: number = 9 + public static SCORE_ACHIEVED: number = 10 + public static COLLISION: number = 11 + public static EXECUTE_PERIODICALLY_LONG: number = 12 + public static BOT_REACHED_STUFF: number = 13 + public static BOT_REACHED_AVATAR: number = 14 } diff --git a/src/api/wired/index.ts b/src/api/wired/index.ts index e8558813b..5ac2a3214 100644 --- a/src/api/wired/index.ts +++ b/src/api/wired/index.ts @@ -1,9 +1,9 @@ -export * from './GetWiredTimeLocale'; -export * from './WiredActionLayoutCode'; -export * from './WiredConditionLayoutCode'; -export * from './WiredDateToString'; -export * from './WiredFurniType'; -export * from './WiredSelectionFilter'; -export * from './WiredSelectionVisualizer'; -export * from './WiredStringDelimeter'; -export * from './WiredTriggerLayoutCode'; +export * from "./GetWiredTimeLocale" +export * from "./WiredActionLayoutCode" +export * from "./WiredConditionLayoutCode" +export * from "./WiredDateToString" +export * from "./WiredFurniType" +export * from "./WiredSelectionFilter" +export * from "./WiredSelectionVisualizer" +export * from "./WiredStringDelimeter" +export * from "./WiredTriggerLayoutCode" diff --git a/src/assets/images/achievements/back-arrow.png b/src/assets/images/achievements/back-arrow.png deleted file mode 100644 index e795c0ee1..000000000 Binary files a/src/assets/images/achievements/back-arrow.png and /dev/null differ diff --git a/src/assets/images/avatareditor/arrow-left-icon.png b/src/assets/images/avatareditor/arrow-left-icon.png deleted file mode 100644 index f94a7dfdd..000000000 Binary files a/src/assets/images/avatareditor/arrow-left-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/arrow-right-icon.png b/src/assets/images/avatareditor/arrow-right-icon.png deleted file mode 100644 index 1d2217fb2..000000000 Binary files a/src/assets/images/avatareditor/arrow-right-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/avatar-editor-spritesheet.png b/src/assets/images/avatareditor/avatar-editor-spritesheet.png deleted file mode 100644 index 0c91ca0ff..000000000 Binary files a/src/assets/images/avatareditor/avatar-editor-spritesheet.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ca-icon.png b/src/assets/images/avatareditor/ca-icon.png deleted file mode 100644 index c9803b950..000000000 Binary files a/src/assets/images/avatareditor/ca-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ca-selected-icon.png b/src/assets/images/avatareditor/ca-selected-icon.png deleted file mode 100644 index b118c3ed6..000000000 Binary files a/src/assets/images/avatareditor/ca-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/cc-icon.png b/src/assets/images/avatareditor/cc-icon.png deleted file mode 100644 index 4a8844e49..000000000 Binary files a/src/assets/images/avatareditor/cc-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/cc-selected-icon.png b/src/assets/images/avatareditor/cc-selected-icon.png deleted file mode 100644 index 3493751af..000000000 Binary files a/src/assets/images/avatareditor/cc-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ch-icon.png b/src/assets/images/avatareditor/ch-icon.png deleted file mode 100644 index ef7da1131..000000000 Binary files a/src/assets/images/avatareditor/ch-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ch-selected-icon.png b/src/assets/images/avatareditor/ch-selected-icon.png deleted file mode 100644 index c5e9f3402..000000000 Binary files a/src/assets/images/avatareditor/ch-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/clear-icon.png b/src/assets/images/avatareditor/clear-icon.png deleted file mode 100644 index e0d50abca..000000000 Binary files a/src/assets/images/avatareditor/clear-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/cp-icon.png b/src/assets/images/avatareditor/cp-icon.png deleted file mode 100644 index 5e460f153..000000000 Binary files a/src/assets/images/avatareditor/cp-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/cp-selected-icon.png b/src/assets/images/avatareditor/cp-selected-icon.png deleted file mode 100644 index a067085d2..000000000 Binary files a/src/assets/images/avatareditor/cp-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ea-icon.png b/src/assets/images/avatareditor/ea-icon.png deleted file mode 100644 index c227ae107..000000000 Binary files a/src/assets/images/avatareditor/ea-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ea-selected-icon.png b/src/assets/images/avatareditor/ea-selected-icon.png deleted file mode 100644 index e7678c4a6..000000000 Binary files a/src/assets/images/avatareditor/ea-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/fa-icon.png b/src/assets/images/avatareditor/fa-icon.png deleted file mode 100644 index 9b72ff5e3..000000000 Binary files a/src/assets/images/avatareditor/fa-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/fa-selected-icon.png b/src/assets/images/avatareditor/fa-selected-icon.png deleted file mode 100644 index a1d26b61c..000000000 Binary files a/src/assets/images/avatareditor/fa-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/female-icon.png b/src/assets/images/avatareditor/female-icon.png deleted file mode 100644 index 8e6e8202c..000000000 Binary files a/src/assets/images/avatareditor/female-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/female-selected-icon.png b/src/assets/images/avatareditor/female-selected-icon.png deleted file mode 100644 index 50ffde099..000000000 Binary files a/src/assets/images/avatareditor/female-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ha-icon.png b/src/assets/images/avatareditor/ha-icon.png deleted file mode 100644 index f0a819181..000000000 Binary files a/src/assets/images/avatareditor/ha-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/ha-selected-icon.png b/src/assets/images/avatareditor/ha-selected-icon.png deleted file mode 100644 index 4c81ece52..000000000 Binary files a/src/assets/images/avatareditor/ha-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/he-icon.png b/src/assets/images/avatareditor/he-icon.png deleted file mode 100644 index 7cf6dc4c7..000000000 Binary files a/src/assets/images/avatareditor/he-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/he-selected-icon.png b/src/assets/images/avatareditor/he-selected-icon.png deleted file mode 100644 index 32633559b..000000000 Binary files a/src/assets/images/avatareditor/he-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/hr-icon.png b/src/assets/images/avatareditor/hr-icon.png deleted file mode 100644 index de299902a..000000000 Binary files a/src/assets/images/avatareditor/hr-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/hr-selected-icon.png b/src/assets/images/avatareditor/hr-selected-icon.png deleted file mode 100644 index c694b82a5..000000000 Binary files a/src/assets/images/avatareditor/hr-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/lg-icon.png b/src/assets/images/avatareditor/lg-icon.png deleted file mode 100644 index 0bdd750e4..000000000 Binary files a/src/assets/images/avatareditor/lg-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/lg-selected-icon.png b/src/assets/images/avatareditor/lg-selected-icon.png deleted file mode 100644 index 7a2853b02..000000000 Binary files a/src/assets/images/avatareditor/lg-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/loading-icon.png b/src/assets/images/avatareditor/loading-icon.png deleted file mode 100644 index 50d132b3e..000000000 Binary files a/src/assets/images/avatareditor/loading-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/male-icon.png b/src/assets/images/avatareditor/male-icon.png deleted file mode 100644 index 95a1b3526..000000000 Binary files a/src/assets/images/avatareditor/male-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/male-selected-icon.png b/src/assets/images/avatareditor/male-selected-icon.png deleted file mode 100644 index 85debbb3e..000000000 Binary files a/src/assets/images/avatareditor/male-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/sellable-icon.png b/src/assets/images/avatareditor/sellable-icon.png deleted file mode 100644 index 4485b518d..000000000 Binary files a/src/assets/images/avatareditor/sellable-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/sh-icon.png b/src/assets/images/avatareditor/sh-icon.png deleted file mode 100644 index 915c7c1e8..000000000 Binary files a/src/assets/images/avatareditor/sh-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/sh-selected-icon.png b/src/assets/images/avatareditor/sh-selected-icon.png deleted file mode 100644 index 12c6deb1f..000000000 Binary files a/src/assets/images/avatareditor/sh-selected-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/spotlight-icon.png b/src/assets/images/avatareditor/spotlight-icon.png deleted file mode 100644 index 8755373c5..000000000 Binary files a/src/assets/images/avatareditor/spotlight-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/wa-icon.png b/src/assets/images/avatareditor/wa-icon.png deleted file mode 100644 index 8a73b7aef..000000000 Binary files a/src/assets/images/avatareditor/wa-icon.png and /dev/null differ diff --git a/src/assets/images/avatareditor/wa-selected-icon.png b/src/assets/images/avatareditor/wa-selected-icon.png deleted file mode 100644 index 5348be318..000000000 Binary files a/src/assets/images/avatareditor/wa-selected-icon.png and /dev/null differ diff --git a/src/assets/images/campaign/available.png b/src/assets/images/campaign/available.png deleted file mode 100644 index 1cc8fa621..000000000 Binary files a/src/assets/images/campaign/available.png and /dev/null differ diff --git a/src/assets/images/campaign/campaign_day_generic_bg.png b/src/assets/images/campaign/campaign_day_generic_bg.png deleted file mode 100644 index 25b3c622d..000000000 Binary files a/src/assets/images/campaign/campaign_day_generic_bg.png and /dev/null differ diff --git a/src/assets/images/campaign/campaign_opened.png b/src/assets/images/campaign/campaign_opened.png deleted file mode 100644 index 9ec1bb30b..000000000 Binary files a/src/assets/images/campaign/campaign_opened.png and /dev/null differ diff --git a/src/assets/images/campaign/campaign_spritesheet.png b/src/assets/images/campaign/campaign_spritesheet.png deleted file mode 100644 index eeac9d499..000000000 Binary files a/src/assets/images/campaign/campaign_spritesheet.png and /dev/null differ diff --git a/src/assets/images/campaign/locked.png b/src/assets/images/campaign/locked.png deleted file mode 100644 index 3805e5023..000000000 Binary files a/src/assets/images/campaign/locked.png and /dev/null differ diff --git a/src/assets/images/campaign/locked_bg.png b/src/assets/images/campaign/locked_bg.png deleted file mode 100644 index 93927dd5a..000000000 Binary files a/src/assets/images/campaign/locked_bg.png and /dev/null differ diff --git a/src/assets/images/campaign/next.png b/src/assets/images/campaign/next.png deleted file mode 100644 index 88a2883a7..000000000 Binary files a/src/assets/images/campaign/next.png and /dev/null differ diff --git a/src/assets/images/campaign/prev.png b/src/assets/images/campaign/prev.png deleted file mode 100644 index 914a65921..000000000 Binary files a/src/assets/images/campaign/prev.png and /dev/null differ diff --git a/src/assets/images/campaign/unavailable.png b/src/assets/images/campaign/unavailable.png deleted file mode 100644 index dc134c3f1..000000000 Binary files a/src/assets/images/campaign/unavailable.png and /dev/null differ diff --git a/src/assets/images/campaign/unlocked_bg.png b/src/assets/images/campaign/unlocked_bg.png deleted file mode 100644 index 31c35ba17..000000000 Binary files a/src/assets/images/campaign/unlocked_bg.png and /dev/null differ diff --git a/src/assets/images/catalog/diamond_info_illustration.gif b/src/assets/images/catalog/diamond_info_illustration.gif deleted file mode 100644 index d082ef4d7..000000000 Binary files a/src/assets/images/catalog/diamond_info_illustration.gif and /dev/null differ diff --git a/src/assets/images/catalog/hc_banner_big.png b/src/assets/images/catalog/hc_banner_big.png deleted file mode 100644 index 4b2c4ec39..000000000 Binary files a/src/assets/images/catalog/hc_banner_big.png and /dev/null differ diff --git a/src/assets/images/catalog/hc_big.png b/src/assets/images/catalog/hc_big.png deleted file mode 100644 index 5f8c0a236..000000000 Binary files a/src/assets/images/catalog/hc_big.png and /dev/null differ diff --git a/src/assets/images/catalog/hc_small.png b/src/assets/images/catalog/hc_small.png deleted file mode 100644 index 99833309b..000000000 Binary files a/src/assets/images/catalog/hc_small.png and /dev/null differ diff --git a/src/assets/images/catalog/paint-icon.png b/src/assets/images/catalog/paint-icon.png deleted file mode 100644 index f2bf7ea3f..000000000 Binary files a/src/assets/images/catalog/paint-icon.png and /dev/null differ diff --git a/src/assets/images/catalog/target-price.png b/src/assets/images/catalog/target-price.png deleted file mode 100644 index 8639afd55..000000000 Binary files a/src/assets/images/catalog/target-price.png and /dev/null differ diff --git a/src/assets/images/catalog/vip.png b/src/assets/images/catalog/vip.png deleted file mode 100644 index 9a3aad6d2..000000000 Binary files a/src/assets/images/catalog/vip.png and /dev/null differ diff --git a/src/assets/images/chat/styles-icon.png b/src/assets/images/chat/styles-icon.png deleted file mode 100644 index 74cd9ecda..000000000 Binary files a/src/assets/images/chat/styles-icon.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-0.png b/src/assets/images/floorplaneditor/door-direction-0.png deleted file mode 100644 index 8c272a0a9..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-0.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-1.png b/src/assets/images/floorplaneditor/door-direction-1.png deleted file mode 100644 index 52e488f68..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-1.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-2.png b/src/assets/images/floorplaneditor/door-direction-2.png deleted file mode 100644 index da1a1cb52..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-2.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-3.png b/src/assets/images/floorplaneditor/door-direction-3.png deleted file mode 100644 index 15712a91a..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-3.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-4.png b/src/assets/images/floorplaneditor/door-direction-4.png deleted file mode 100644 index eb1b4b5e0..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-4.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-5.png b/src/assets/images/floorplaneditor/door-direction-5.png deleted file mode 100644 index 46e6f4d9b..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-5.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-6.png b/src/assets/images/floorplaneditor/door-direction-6.png deleted file mode 100644 index fda613acc..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-6.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/door-direction-7.png b/src/assets/images/floorplaneditor/door-direction-7.png deleted file mode 100644 index 96fa8e483..000000000 Binary files a/src/assets/images/floorplaneditor/door-direction-7.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/icon-door.png b/src/assets/images/floorplaneditor/icon-door.png deleted file mode 100644 index 1b56bb2b5..000000000 Binary files a/src/assets/images/floorplaneditor/icon-door.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/icon-tile-down.png b/src/assets/images/floorplaneditor/icon-tile-down.png deleted file mode 100644 index 352c48dff..000000000 Binary files a/src/assets/images/floorplaneditor/icon-tile-down.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/icon-tile-set.png b/src/assets/images/floorplaneditor/icon-tile-set.png deleted file mode 100644 index eac61532c..000000000 Binary files a/src/assets/images/floorplaneditor/icon-tile-set.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/icon-tile-unset.png b/src/assets/images/floorplaneditor/icon-tile-unset.png deleted file mode 100644 index 3f5e21817..000000000 Binary files a/src/assets/images/floorplaneditor/icon-tile-unset.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/icon-tile-up.png b/src/assets/images/floorplaneditor/icon-tile-up.png deleted file mode 100644 index 27153e0ce..000000000 Binary files a/src/assets/images/floorplaneditor/icon-tile-up.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/preview_tile.png b/src/assets/images/floorplaneditor/preview_tile.png deleted file mode 100644 index 607f45013..000000000 Binary files a/src/assets/images/floorplaneditor/preview_tile.png and /dev/null differ diff --git a/src/assets/images/floorplaneditor/selected_height_icon.png b/src/assets/images/floorplaneditor/selected_height_icon.png deleted file mode 100644 index f763fde5a..000000000 Binary files a/src/assets/images/floorplaneditor/selected_height_icon.png and /dev/null differ diff --git a/src/assets/images/friends/friends-spritesheet.png b/src/assets/images/friends/friends-spritesheet.png deleted file mode 100644 index aa72325db..000000000 Binary files a/src/assets/images/friends/friends-spritesheet.png and /dev/null differ diff --git a/src/assets/images/friends/icon-accept.png b/src/assets/images/friends/icon-accept.png deleted file mode 100644 index da56941a0..000000000 Binary files a/src/assets/images/friends/icon-accept.png and /dev/null differ diff --git a/src/assets/images/friends/icon-add.png b/src/assets/images/friends/icon-add.png deleted file mode 100644 index d570c8f58..000000000 Binary files a/src/assets/images/friends/icon-add.png and /dev/null differ diff --git a/src/assets/images/friends/icon-bobba.png b/src/assets/images/friends/icon-bobba.png deleted file mode 100644 index eaea89573..000000000 Binary files a/src/assets/images/friends/icon-bobba.png and /dev/null differ diff --git a/src/assets/images/friends/icon-chat.png b/src/assets/images/friends/icon-chat.png deleted file mode 100644 index 631b7bc26..000000000 Binary files a/src/assets/images/friends/icon-chat.png and /dev/null differ diff --git a/src/assets/images/friends/icon-deny.png b/src/assets/images/friends/icon-deny.png deleted file mode 100644 index c74e5c067..000000000 Binary files a/src/assets/images/friends/icon-deny.png and /dev/null differ diff --git a/src/assets/images/friends/icon-follow.png b/src/assets/images/friends/icon-follow.png deleted file mode 100644 index 9e045168a..000000000 Binary files a/src/assets/images/friends/icon-follow.png and /dev/null differ diff --git a/src/assets/images/friends/icon-friendbar-chat.png b/src/assets/images/friends/icon-friendbar-chat.png deleted file mode 100644 index e0c164593..000000000 Binary files a/src/assets/images/friends/icon-friendbar-chat.png and /dev/null differ diff --git a/src/assets/images/friends/icon-friendbar-visit.png b/src/assets/images/friends/icon-friendbar-visit.png deleted file mode 100644 index fac57d9a6..000000000 Binary files a/src/assets/images/friends/icon-friendbar-visit.png and /dev/null differ diff --git a/src/assets/images/friends/icon-heart.png b/src/assets/images/friends/icon-heart.png deleted file mode 100644 index 5dd1015e9..000000000 Binary files a/src/assets/images/friends/icon-heart.png and /dev/null differ diff --git a/src/assets/images/friends/icon-new-message.png b/src/assets/images/friends/icon-new-message.png deleted file mode 100644 index 46d23f5a2..000000000 Binary files a/src/assets/images/friends/icon-new-message.png and /dev/null differ diff --git a/src/assets/images/friends/icon-none.png b/src/assets/images/friends/icon-none.png deleted file mode 100644 index ececd9ee4..000000000 Binary files a/src/assets/images/friends/icon-none.png and /dev/null differ diff --git a/src/assets/images/friends/icon-profile-sm-hover.png b/src/assets/images/friends/icon-profile-sm-hover.png deleted file mode 100644 index f8f42f2bf..000000000 Binary files a/src/assets/images/friends/icon-profile-sm-hover.png and /dev/null differ diff --git a/src/assets/images/friends/icon-profile-sm.png b/src/assets/images/friends/icon-profile-sm.png deleted file mode 100644 index 60107e1e1..000000000 Binary files a/src/assets/images/friends/icon-profile-sm.png and /dev/null differ diff --git a/src/assets/images/friends/icon-profile.png b/src/assets/images/friends/icon-profile.png deleted file mode 100644 index 2c8ec5c71..000000000 Binary files a/src/assets/images/friends/icon-profile.png and /dev/null differ diff --git a/src/assets/images/friends/icon-smile.png b/src/assets/images/friends/icon-smile.png deleted file mode 100644 index 62fcae6eb..000000000 Binary files a/src/assets/images/friends/icon-smile.png and /dev/null differ diff --git a/src/assets/images/friends/icon-warning.png b/src/assets/images/friends/icon-warning.png deleted file mode 100644 index 3a3ffcf9e..000000000 Binary files a/src/assets/images/friends/icon-warning.png and /dev/null differ diff --git a/src/assets/images/friends/messenger_notification_icon.png b/src/assets/images/friends/messenger_notification_icon.png deleted file mode 100644 index 73f7e5eab..000000000 Binary files a/src/assets/images/friends/messenger_notification_icon.png and /dev/null differ diff --git a/src/assets/images/gift/incognito.png b/src/assets/images/gift/incognito.png deleted file mode 100644 index 304c30c25..000000000 Binary files a/src/assets/images/gift/incognito.png and /dev/null differ diff --git a/src/assets/images/groups/creator_images.png b/src/assets/images/groups/creator_images.png deleted file mode 100644 index b39b0d7b8..000000000 Binary files a/src/assets/images/groups/creator_images.png and /dev/null differ diff --git a/src/assets/images/groups/creator_tabs.png b/src/assets/images/groups/creator_tabs.png deleted file mode 100644 index e95b9f0cb..000000000 Binary files a/src/assets/images/groups/creator_tabs.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_decorate_icon.png b/src/assets/images/groups/icons/group_decorate_icon.png deleted file mode 100644 index 3a395fbb7..000000000 Binary files a/src/assets/images/groups/icons/group_decorate_icon.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_favorite.png b/src/assets/images/groups/icons/group_favorite.png deleted file mode 100644 index 4cd734d12..000000000 Binary files a/src/assets/images/groups/icons/group_favorite.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_icon_admin.png b/src/assets/images/groups/icons/group_icon_admin.png deleted file mode 100644 index bad07e4ae..000000000 Binary files a/src/assets/images/groups/icons/group_icon_admin.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_icon_big_admin.png b/src/assets/images/groups/icons/group_icon_big_admin.png deleted file mode 100644 index 2d3e28765..000000000 Binary files a/src/assets/images/groups/icons/group_icon_big_admin.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_icon_big_member.png b/src/assets/images/groups/icons/group_icon_big_member.png deleted file mode 100644 index 3435937e2..000000000 Binary files a/src/assets/images/groups/icons/group_icon_big_member.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_icon_big_owner.png b/src/assets/images/groups/icons/group_icon_big_owner.png deleted file mode 100644 index 52b8361e5..000000000 Binary files a/src/assets/images/groups/icons/group_icon_big_owner.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_icon_not_admin.png b/src/assets/images/groups/icons/group_icon_not_admin.png deleted file mode 100644 index 7c8b9ee49..000000000 Binary files a/src/assets/images/groups/icons/group_icon_not_admin.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_icon_small_owner.png b/src/assets/images/groups/icons/group_icon_small_owner.png deleted file mode 100644 index 7230ecc59..000000000 Binary files a/src/assets/images/groups/icons/group_icon_small_owner.png and /dev/null differ diff --git a/src/assets/images/groups/icons/group_notfavorite.png b/src/assets/images/groups/icons/group_notfavorite.png deleted file mode 100644 index 835d8eb7e..000000000 Binary files a/src/assets/images/groups/icons/group_notfavorite.png and /dev/null differ diff --git a/src/assets/images/groups/icons/grouptype_icon_0.png b/src/assets/images/groups/icons/grouptype_icon_0.png deleted file mode 100644 index 9dc4191d5..000000000 Binary files a/src/assets/images/groups/icons/grouptype_icon_0.png and /dev/null differ diff --git a/src/assets/images/groups/icons/grouptype_icon_1.png b/src/assets/images/groups/icons/grouptype_icon_1.png deleted file mode 100644 index ed37213e3..000000000 Binary files a/src/assets/images/groups/icons/grouptype_icon_1.png and /dev/null differ diff --git a/src/assets/images/groups/icons/grouptype_icon_2.png b/src/assets/images/groups/icons/grouptype_icon_2.png deleted file mode 100644 index 6a5c0571f..000000000 Binary files a/src/assets/images/groups/icons/grouptype_icon_2.png and /dev/null differ diff --git a/src/assets/images/groups/no-group-1.png b/src/assets/images/groups/no-group-1.png deleted file mode 100644 index caf0182de..000000000 Binary files a/src/assets/images/groups/no-group-1.png and /dev/null differ diff --git a/src/assets/images/groups/no-group-2.png b/src/assets/images/groups/no-group-2.png deleted file mode 100644 index 797c94680..000000000 Binary files a/src/assets/images/groups/no-group-2.png and /dev/null differ diff --git a/src/assets/images/groups/no-group-3.png b/src/assets/images/groups/no-group-3.png deleted file mode 100644 index e5d6a7b77..000000000 Binary files a/src/assets/images/groups/no-group-3.png and /dev/null differ diff --git a/src/assets/images/groups/no-group-spritesheet.png b/src/assets/images/groups/no-group-spritesheet.png deleted file mode 100644 index 3eed4b97d..000000000 Binary files a/src/assets/images/groups/no-group-spritesheet.png and /dev/null differ diff --git a/src/assets/images/guide-tool/guide_tool_duty_switch.png b/src/assets/images/guide-tool/guide_tool_duty_switch.png deleted file mode 100644 index f7de6be96..000000000 Binary files a/src/assets/images/guide-tool/guide_tool_duty_switch.png and /dev/null differ diff --git a/src/assets/images/guide-tool/guide_tool_info_icon.png b/src/assets/images/guide-tool/guide_tool_info_icon.png deleted file mode 100644 index 32c4a3531..000000000 Binary files a/src/assets/images/guide-tool/guide_tool_info_icon.png and /dev/null differ diff --git a/src/assets/images/hc-center/benefits.png b/src/assets/images/hc-center/benefits.png deleted file mode 100644 index 508ecc823..000000000 Binary files a/src/assets/images/hc-center/benefits.png and /dev/null differ diff --git a/src/assets/images/hc-center/clock.png b/src/assets/images/hc-center/clock.png deleted file mode 100644 index 4c37e957d..000000000 Binary files a/src/assets/images/hc-center/clock.png and /dev/null differ diff --git a/src/assets/images/hc-center/hc_logo.gif b/src/assets/images/hc-center/hc_logo.gif deleted file mode 100644 index 8834034f3..000000000 Binary files a/src/assets/images/hc-center/hc_logo.gif and /dev/null differ diff --git a/src/assets/images/hc-center/payday.png b/src/assets/images/hc-center/payday.png deleted file mode 100644 index c9bd80ba0..000000000 Binary files a/src/assets/images/hc-center/payday.png and /dev/null differ diff --git a/src/assets/images/help/help_index.png b/src/assets/images/help/help_index.png deleted file mode 100644 index 2844f41e1..000000000 Binary files a/src/assets/images/help/help_index.png and /dev/null differ diff --git a/src/assets/images/icons/arrows.png b/src/assets/images/icons/arrows.png deleted file mode 100644 index 47a833ce7..000000000 Binary files a/src/assets/images/icons/arrows.png and /dev/null differ diff --git a/src/assets/images/icons/camera-colormatrix.png b/src/assets/images/icons/camera-colormatrix.png deleted file mode 100644 index 894396e7c..000000000 Binary files a/src/assets/images/icons/camera-colormatrix.png and /dev/null differ diff --git a/src/assets/images/icons/camera-composite.png b/src/assets/images/icons/camera-composite.png deleted file mode 100644 index 681fb18cb..000000000 Binary files a/src/assets/images/icons/camera-composite.png and /dev/null differ diff --git a/src/assets/images/icons/camera-small.png b/src/assets/images/icons/camera-small.png deleted file mode 100644 index 1c0563eeb..000000000 Binary files a/src/assets/images/icons/camera-small.png and /dev/null differ diff --git a/src/assets/images/icons/chat-history.png b/src/assets/images/icons/chat-history.png deleted file mode 100644 index da51f37e2..000000000 Binary files a/src/assets/images/icons/chat-history.png and /dev/null differ diff --git a/src/assets/images/icons/close.png b/src/assets/images/icons/close.png deleted file mode 100644 index a723b3eac..000000000 Binary files a/src/assets/images/icons/close.png and /dev/null differ diff --git a/src/assets/images/icons/cog.png b/src/assets/images/icons/cog.png deleted file mode 100644 index b7101d718..000000000 Binary files a/src/assets/images/icons/cog.png and /dev/null differ diff --git a/src/assets/images/icons/help.png b/src/assets/images/icons/help.png deleted file mode 100644 index 50d8aa8a0..000000000 Binary files a/src/assets/images/icons/help.png and /dev/null differ diff --git a/src/assets/images/icons/house-small.png b/src/assets/images/icons/house-small.png deleted file mode 100644 index e106a4560..000000000 Binary files a/src/assets/images/icons/house-small.png and /dev/null differ diff --git a/src/assets/images/icons/icon_cog.png b/src/assets/images/icons/icon_cog.png deleted file mode 100644 index 7175afb78..000000000 Binary files a/src/assets/images/icons/icon_cog.png and /dev/null differ diff --git a/src/assets/images/icons/like-room.png b/src/assets/images/icons/like-room.png deleted file mode 100644 index 1c13cd851..000000000 Binary files a/src/assets/images/icons/like-room.png and /dev/null differ diff --git a/src/assets/images/icons/loading-icon.png b/src/assets/images/icons/loading-icon.png deleted file mode 100644 index e3d64d0bd..000000000 Binary files a/src/assets/images/icons/loading-icon.png and /dev/null differ diff --git a/src/assets/images/icons/room-link.png b/src/assets/images/icons/room-link.png deleted file mode 100644 index efbebf4a8..000000000 Binary files a/src/assets/images/icons/room-link.png and /dev/null differ diff --git a/src/assets/images/icons/sign-exclamation.png b/src/assets/images/icons/sign-exclamation.png deleted file mode 100644 index 7db61fb02..000000000 Binary files a/src/assets/images/icons/sign-exclamation.png and /dev/null differ diff --git a/src/assets/images/icons/sign-heart.png b/src/assets/images/icons/sign-heart.png deleted file mode 100644 index 8ac56853d..000000000 Binary files a/src/assets/images/icons/sign-heart.png and /dev/null differ diff --git a/src/assets/images/icons/sign-red.png b/src/assets/images/icons/sign-red.png deleted file mode 100644 index ac0915e10..000000000 Binary files a/src/assets/images/icons/sign-red.png and /dev/null differ diff --git a/src/assets/images/icons/sign-skull.png b/src/assets/images/icons/sign-skull.png deleted file mode 100644 index 6221d9a5b..000000000 Binary files a/src/assets/images/icons/sign-skull.png and /dev/null differ diff --git a/src/assets/images/icons/sign-smile.png b/src/assets/images/icons/sign-smile.png deleted file mode 100644 index 1a1721cd0..000000000 Binary files a/src/assets/images/icons/sign-smile.png and /dev/null differ diff --git a/src/assets/images/icons/sign-soccer.png b/src/assets/images/icons/sign-soccer.png deleted file mode 100644 index 334f1fab4..000000000 Binary files a/src/assets/images/icons/sign-soccer.png and /dev/null differ diff --git a/src/assets/images/icons/sign-yellow.png b/src/assets/images/icons/sign-yellow.png deleted file mode 100644 index 272358f20..000000000 Binary files a/src/assets/images/icons/sign-yellow.png and /dev/null differ diff --git a/src/assets/images/icons/small-room.png b/src/assets/images/icons/small-room.png deleted file mode 100644 index c8bbbccc0..000000000 Binary files a/src/assets/images/icons/small-room.png and /dev/null differ diff --git a/src/assets/images/icons/tickets.png b/src/assets/images/icons/tickets.png deleted file mode 100644 index 81f48834b..000000000 Binary files a/src/assets/images/icons/tickets.png and /dev/null differ diff --git a/src/assets/images/icons/user.png b/src/assets/images/icons/user.png deleted file mode 100644 index c4155a2c2..000000000 Binary files a/src/assets/images/icons/user.png and /dev/null differ diff --git a/src/assets/images/icons/zoom-less.png b/src/assets/images/icons/zoom-less.png deleted file mode 100644 index 36423da8e..000000000 Binary files a/src/assets/images/icons/zoom-less.png and /dev/null differ diff --git a/src/assets/images/icons/zoom-more.png b/src/assets/images/icons/zoom-more.png deleted file mode 100644 index c14a9e8d4..000000000 Binary files a/src/assets/images/icons/zoom-more.png and /dev/null differ diff --git a/src/assets/images/infostand/bot_background.png b/src/assets/images/infostand/bot_background.png deleted file mode 100644 index cd460bbbf..000000000 Binary files a/src/assets/images/infostand/bot_background.png and /dev/null differ diff --git a/src/assets/images/infostand/countown-timer.png b/src/assets/images/infostand/countown-timer.png deleted file mode 100644 index ebfe62911..000000000 Binary files a/src/assets/images/infostand/countown-timer.png and /dev/null differ diff --git a/src/assets/images/infostand/disk-creator.png b/src/assets/images/infostand/disk-creator.png deleted file mode 100644 index c4e95c9dd..000000000 Binary files a/src/assets/images/infostand/disk-creator.png and /dev/null differ diff --git a/src/assets/images/infostand/disk-icon.png b/src/assets/images/infostand/disk-icon.png deleted file mode 100644 index 9ee4ed83d..000000000 Binary files a/src/assets/images/infostand/disk-icon.png and /dev/null differ diff --git a/src/assets/images/infostand/pencil-icon.png b/src/assets/images/infostand/pencil-icon.png deleted file mode 100644 index 27de0d6dd..000000000 Binary files a/src/assets/images/infostand/pencil-icon.png and /dev/null differ diff --git a/src/assets/images/infostand/rarity-level.png b/src/assets/images/infostand/rarity-level.png deleted file mode 100644 index eb1278ef8..000000000 Binary files a/src/assets/images/infostand/rarity-level.png and /dev/null differ diff --git a/src/assets/images/inventory/rarity-level.png b/src/assets/images/inventory/rarity-level.png deleted file mode 100644 index 218eccbd6..000000000 Binary files a/src/assets/images/inventory/rarity-level.png and /dev/null differ diff --git a/src/assets/images/inventory/trading/locked-icon.png b/src/assets/images/inventory/trading/locked-icon.png deleted file mode 100644 index 4f54e2d3c..000000000 Binary files a/src/assets/images/inventory/trading/locked-icon.png and /dev/null differ diff --git a/src/assets/images/inventory/trading/unlocked-icon.png b/src/assets/images/inventory/trading/unlocked-icon.png deleted file mode 100644 index d6362c452..000000000 Binary files a/src/assets/images/inventory/trading/unlocked-icon.png and /dev/null differ diff --git a/src/assets/images/loading/connecting-duck-spritesheet.png b/src/assets/images/loading/connecting-duck-spritesheet.png deleted file mode 100644 index 36c5daeca..000000000 Binary files a/src/assets/images/loading/connecting-duck-spritesheet.png and /dev/null differ diff --git a/src/assets/images/loading/connecting_duck_01.png b/src/assets/images/loading/connecting_duck_01.png deleted file mode 100644 index e3772c8b4..000000000 Binary files a/src/assets/images/loading/connecting_duck_01.png and /dev/null differ diff --git a/src/assets/images/loading/connecting_duck_02.png b/src/assets/images/loading/connecting_duck_02.png deleted file mode 100644 index 86499a377..000000000 Binary files a/src/assets/images/loading/connecting_duck_02.png and /dev/null differ diff --git a/src/assets/images/loading/connecting_duck_03.png b/src/assets/images/loading/connecting_duck_03.png deleted file mode 100644 index 15a2bb9f4..000000000 Binary files a/src/assets/images/loading/connecting_duck_03.png and /dev/null differ diff --git a/src/assets/images/loading/connecting_duck_04.png b/src/assets/images/loading/connecting_duck_04.png deleted file mode 100644 index 90860f2c7..000000000 Binary files a/src/assets/images/loading/connecting_duck_04.png and /dev/null differ diff --git a/src/assets/images/loading/connecting_duck_05.png b/src/assets/images/loading/connecting_duck_05.png deleted file mode 100644 index a72154ab1..000000000 Binary files a/src/assets/images/loading/connecting_duck_05.png and /dev/null differ diff --git a/src/assets/images/loading/connecting_duck_06.png b/src/assets/images/loading/connecting_duck_06.png deleted file mode 100644 index 0e51a51d7..000000000 Binary files a/src/assets/images/loading/connecting_duck_06.png and /dev/null differ diff --git a/src/assets/images/loading/connecting_duck_07.png b/src/assets/images/loading/connecting_duck_07.png deleted file mode 100644 index 76c9e347e..000000000 Binary files a/src/assets/images/loading/connecting_duck_07.png and /dev/null differ diff --git a/src/assets/images/loading/progress_habbos.gif b/src/assets/images/loading/progress_habbos.gif deleted file mode 100644 index 2224994d3..000000000 Binary files a/src/assets/images/loading/progress_habbos.gif and /dev/null differ diff --git a/src/assets/images/modtool/chatlog.gif b/src/assets/images/modtool/chatlog.gif deleted file mode 100644 index a64ca0b4c..000000000 Binary files a/src/assets/images/modtool/chatlog.gif and /dev/null differ diff --git a/src/assets/images/modtool/key.gif b/src/assets/images/modtool/key.gif deleted file mode 100644 index 578ee6507..000000000 Binary files a/src/assets/images/modtool/key.gif and /dev/null differ diff --git a/src/assets/images/modtool/m_icon.png b/src/assets/images/modtool/m_icon.png deleted file mode 100644 index 1116b4ded..000000000 Binary files a/src/assets/images/modtool/m_icon.png and /dev/null differ diff --git a/src/assets/images/modtool/reports.png b/src/assets/images/modtool/reports.png deleted file mode 100644 index 4731fed34..000000000 Binary files a/src/assets/images/modtool/reports.png and /dev/null differ diff --git a/src/assets/images/modtool/room.gif b/src/assets/images/modtool/room.gif deleted file mode 100644 index 94e77dd9e..000000000 Binary files a/src/assets/images/modtool/room.gif and /dev/null differ diff --git a/src/assets/images/modtool/room.png b/src/assets/images/modtool/room.png deleted file mode 100644 index 2ce5efa4e..000000000 Binary files a/src/assets/images/modtool/room.png and /dev/null differ diff --git a/src/assets/images/modtool/user.gif b/src/assets/images/modtool/user.gif deleted file mode 100644 index ab9a590dd..000000000 Binary files a/src/assets/images/modtool/user.gif and /dev/null differ diff --git a/src/assets/images/modtool/wrench.gif b/src/assets/images/modtool/wrench.gif deleted file mode 100644 index 530c78a8c..000000000 Binary files a/src/assets/images/modtool/wrench.gif and /dev/null differ diff --git a/src/assets/images/mysterybox/chain_mysterybox_box_overlay.png b/src/assets/images/mysterybox/chain_mysterybox_box_overlay.png deleted file mode 100644 index 5914aa5a2..000000000 Binary files a/src/assets/images/mysterybox/chain_mysterybox_box_overlay.png and /dev/null differ diff --git a/src/assets/images/mysterybox/key_overlay.png b/src/assets/images/mysterybox/key_overlay.png deleted file mode 100644 index 8f8c2a5be..000000000 Binary files a/src/assets/images/mysterybox/key_overlay.png and /dev/null differ diff --git a/src/assets/images/mysterybox/mystery_box.png b/src/assets/images/mysterybox/mystery_box.png deleted file mode 100644 index e85f966ce..000000000 Binary files a/src/assets/images/mysterybox/mystery_box.png and /dev/null differ diff --git a/src/assets/images/mysterybox/mystery_box_key.png b/src/assets/images/mysterybox/mystery_box_key.png deleted file mode 100644 index 79b43deee..000000000 Binary files a/src/assets/images/mysterybox/mystery_box_key.png and /dev/null differ diff --git a/src/assets/images/mysterytrophy/frank_mystery_trophy.png b/src/assets/images/mysterytrophy/frank_mystery_trophy.png deleted file mode 100644 index 67bfeba77..000000000 Binary files a/src/assets/images/mysterytrophy/frank_mystery_trophy.png and /dev/null differ diff --git a/src/assets/images/navigator/icons/info.png b/src/assets/images/navigator/icons/info.png deleted file mode 100644 index b32d14d9e..000000000 Binary files a/src/assets/images/navigator/icons/info.png and /dev/null differ diff --git a/src/assets/images/navigator/icons/room_group.png b/src/assets/images/navigator/icons/room_group.png deleted file mode 100644 index b059ba444..000000000 Binary files a/src/assets/images/navigator/icons/room_group.png and /dev/null differ diff --git a/src/assets/images/navigator/icons/room_invisible.png b/src/assets/images/navigator/icons/room_invisible.png deleted file mode 100644 index 976fe8b41..000000000 Binary files a/src/assets/images/navigator/icons/room_invisible.png and /dev/null differ diff --git a/src/assets/images/navigator/icons/room_locked.png b/src/assets/images/navigator/icons/room_locked.png deleted file mode 100644 index f46843c89..000000000 Binary files a/src/assets/images/navigator/icons/room_locked.png and /dev/null differ diff --git a/src/assets/images/navigator/icons/room_password.png b/src/assets/images/navigator/icons/room_password.png deleted file mode 100644 index 9fa392f8e..000000000 Binary files a/src/assets/images/navigator/icons/room_password.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_0.png b/src/assets/images/navigator/models/model_0.png deleted file mode 100644 index 8b7b1d3e3..000000000 Binary files a/src/assets/images/navigator/models/model_0.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_1.png b/src/assets/images/navigator/models/model_1.png deleted file mode 100644 index 36f325ad3..000000000 Binary files a/src/assets/images/navigator/models/model_1.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_2.png b/src/assets/images/navigator/models/model_2.png deleted file mode 100644 index 921d6f1da..000000000 Binary files a/src/assets/images/navigator/models/model_2.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_3.png b/src/assets/images/navigator/models/model_3.png deleted file mode 100644 index 0444324a7..000000000 Binary files a/src/assets/images/navigator/models/model_3.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_4.png b/src/assets/images/navigator/models/model_4.png deleted file mode 100644 index e3714753a..000000000 Binary files a/src/assets/images/navigator/models/model_4.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_5.png b/src/assets/images/navigator/models/model_5.png deleted file mode 100644 index 4036e1d31..000000000 Binary files a/src/assets/images/navigator/models/model_5.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_6.png b/src/assets/images/navigator/models/model_6.png deleted file mode 100644 index dd14b3b24..000000000 Binary files a/src/assets/images/navigator/models/model_6.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_7.png b/src/assets/images/navigator/models/model_7.png deleted file mode 100644 index 031751ed4..000000000 Binary files a/src/assets/images/navigator/models/model_7.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_8.png b/src/assets/images/navigator/models/model_8.png deleted file mode 100644 index 7e38e1ffd..000000000 Binary files a/src/assets/images/navigator/models/model_8.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_9.png b/src/assets/images/navigator/models/model_9.png deleted file mode 100644 index 0f36c7ca9..000000000 Binary files a/src/assets/images/navigator/models/model_9.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_a.png b/src/assets/images/navigator/models/model_a.png deleted file mode 100644 index cc4a072b9..000000000 Binary files a/src/assets/images/navigator/models/model_a.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_b.png b/src/assets/images/navigator/models/model_b.png deleted file mode 100644 index 49b780ae2..000000000 Binary files a/src/assets/images/navigator/models/model_b.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_c.png b/src/assets/images/navigator/models/model_c.png deleted file mode 100644 index 2ce5efa4e..000000000 Binary files a/src/assets/images/navigator/models/model_c.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_d.png b/src/assets/images/navigator/models/model_d.png deleted file mode 100644 index de061c820..000000000 Binary files a/src/assets/images/navigator/models/model_d.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_e.png b/src/assets/images/navigator/models/model_e.png deleted file mode 100644 index 039b92760..000000000 Binary files a/src/assets/images/navigator/models/model_e.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_f.png b/src/assets/images/navigator/models/model_f.png deleted file mode 100644 index 4b4fadb80..000000000 Binary files a/src/assets/images/navigator/models/model_f.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_g.png b/src/assets/images/navigator/models/model_g.png deleted file mode 100644 index 26d03724c..000000000 Binary files a/src/assets/images/navigator/models/model_g.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_h.png b/src/assets/images/navigator/models/model_h.png deleted file mode 100644 index d8c4be7fb..000000000 Binary files a/src/assets/images/navigator/models/model_h.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_i.png b/src/assets/images/navigator/models/model_i.png deleted file mode 100644 index f5e3d55cc..000000000 Binary files a/src/assets/images/navigator/models/model_i.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_j.png b/src/assets/images/navigator/models/model_j.png deleted file mode 100644 index 8be8f6732..000000000 Binary files a/src/assets/images/navigator/models/model_j.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_k.png b/src/assets/images/navigator/models/model_k.png deleted file mode 100644 index 96fcc8b15..000000000 Binary files a/src/assets/images/navigator/models/model_k.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_l.png b/src/assets/images/navigator/models/model_l.png deleted file mode 100644 index f479323b7..000000000 Binary files a/src/assets/images/navigator/models/model_l.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_m.png b/src/assets/images/navigator/models/model_m.png deleted file mode 100644 index d1d8dd76e..000000000 Binary files a/src/assets/images/navigator/models/model_m.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_n.png b/src/assets/images/navigator/models/model_n.png deleted file mode 100644 index 6e023a1bb..000000000 Binary files a/src/assets/images/navigator/models/model_n.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_o.png b/src/assets/images/navigator/models/model_o.png deleted file mode 100644 index 458706466..000000000 Binary files a/src/assets/images/navigator/models/model_o.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_p.png b/src/assets/images/navigator/models/model_p.png deleted file mode 100644 index 356601e09..000000000 Binary files a/src/assets/images/navigator/models/model_p.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_q.png b/src/assets/images/navigator/models/model_q.png deleted file mode 100644 index 9208a1493..000000000 Binary files a/src/assets/images/navigator/models/model_q.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_r.png b/src/assets/images/navigator/models/model_r.png deleted file mode 100644 index a93d80d3e..000000000 Binary files a/src/assets/images/navigator/models/model_r.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_snowwar1.png b/src/assets/images/navigator/models/model_snowwar1.png deleted file mode 100644 index 41bab59ce..000000000 Binary files a/src/assets/images/navigator/models/model_snowwar1.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_snowwar2.png b/src/assets/images/navigator/models/model_snowwar2.png deleted file mode 100644 index 41bab59ce..000000000 Binary files a/src/assets/images/navigator/models/model_snowwar2.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_t.png b/src/assets/images/navigator/models/model_t.png deleted file mode 100644 index 920255d74..000000000 Binary files a/src/assets/images/navigator/models/model_t.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_u.png b/src/assets/images/navigator/models/model_u.png deleted file mode 100644 index 96da1012a..000000000 Binary files a/src/assets/images/navigator/models/model_u.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_v.png b/src/assets/images/navigator/models/model_v.png deleted file mode 100644 index 6d85c22c7..000000000 Binary files a/src/assets/images/navigator/models/model_v.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_w.png b/src/assets/images/navigator/models/model_w.png deleted file mode 100644 index 7bc8024fd..000000000 Binary files a/src/assets/images/navigator/models/model_w.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_x.png b/src/assets/images/navigator/models/model_x.png deleted file mode 100644 index ce0403737..000000000 Binary files a/src/assets/images/navigator/models/model_x.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_y.png b/src/assets/images/navigator/models/model_y.png deleted file mode 100644 index 430344cb2..000000000 Binary files a/src/assets/images/navigator/models/model_y.png and /dev/null differ diff --git a/src/assets/images/navigator/models/model_z.png b/src/assets/images/navigator/models/model_z.png deleted file mode 100644 index 0809c916b..000000000 Binary files a/src/assets/images/navigator/models/model_z.png and /dev/null differ diff --git a/src/assets/images/navigator/thumbnail_placeholder.png b/src/assets/images/navigator/thumbnail_placeholder.png deleted file mode 100644 index be26f8476..000000000 Binary files a/src/assets/images/navigator/thumbnail_placeholder.png and /dev/null differ diff --git a/src/assets/images/nitro/nitro-dark.svg b/src/assets/images/nitro/nitro-dark.svg deleted file mode 100644 index 20cc53358..000000000 --- a/src/assets/images/nitro/nitro-dark.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/assets/images/nitro/nitro-light.svg b/src/assets/images/nitro/nitro-light.svg deleted file mode 100644 index 5706684a3..000000000 --- a/src/assets/images/nitro/nitro-light.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/assets/images/nitro/nitro-n-dark.svg b/src/assets/images/nitro/nitro-n-dark.svg deleted file mode 100644 index f8d0ebd65..000000000 --- a/src/assets/images/nitro/nitro-n-dark.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/assets/images/nitro/nitro-n-light.svg b/src/assets/images/nitro/nitro-n-light.svg deleted file mode 100644 index 4dd94fca3..000000000 --- a/src/assets/images/nitro/nitro-n-light.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/assets/images/notifications/frank.gif b/src/assets/images/notifications/frank.gif deleted file mode 100644 index 211634f74..000000000 Binary files a/src/assets/images/notifications/frank.gif and /dev/null differ diff --git a/src/assets/images/prize/prize_background.png b/src/assets/images/prize/prize_background.png deleted file mode 100644 index ec9c03065..000000000 Binary files a/src/assets/images/prize/prize_background.png and /dev/null differ diff --git a/src/assets/images/profile/icons/offline.png b/src/assets/images/profile/icons/offline.png deleted file mode 100644 index 677aadcf2..000000000 Binary files a/src/assets/images/profile/icons/offline.png and /dev/null differ diff --git a/src/assets/images/profile/icons/online.gif b/src/assets/images/profile/icons/online.gif deleted file mode 100644 index 3a79838bd..000000000 Binary files a/src/assets/images/profile/icons/online.gif and /dev/null differ diff --git a/src/assets/images/profile/icons/tick.png b/src/assets/images/profile/icons/tick.png deleted file mode 100644 index ec8c52fdf..000000000 Binary files a/src/assets/images/profile/icons/tick.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_bottom_left.png b/src/assets/images/room-spectator/room_spectator_bottom_left.png deleted file mode 100644 index 01688cb29..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_bottom_left.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_bottom_right.png b/src/assets/images/room-spectator/room_spectator_bottom_right.png deleted file mode 100644 index 59c8ef2c2..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_bottom_right.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_middle_bottom.png b/src/assets/images/room-spectator/room_spectator_middle_bottom.png deleted file mode 100644 index ba6fdeccc..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_middle_bottom.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_middle_left.png b/src/assets/images/room-spectator/room_spectator_middle_left.png deleted file mode 100644 index 6d9aaa795..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_middle_left.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_middle_right.png b/src/assets/images/room-spectator/room_spectator_middle_right.png deleted file mode 100644 index 9d963b3d1..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_middle_right.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_middle_top.png b/src/assets/images/room-spectator/room_spectator_middle_top.png deleted file mode 100644 index f6559cee0..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_middle_top.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_top_left.png b/src/assets/images/room-spectator/room_spectator_top_left.png deleted file mode 100644 index 5e62a3c95..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_top_left.png and /dev/null differ diff --git a/src/assets/images/room-spectator/room_spectator_top_right.png b/src/assets/images/room-spectator/room_spectator_top_right.png deleted file mode 100644 index 825f3fb10..000000000 Binary files a/src/assets/images/room-spectator/room_spectator_top_right.png and /dev/null differ diff --git a/src/assets/images/room-widgets/camera-widget/btn.png b/src/assets/images/room-widgets/camera-widget/btn.png deleted file mode 100644 index 76b086b18..000000000 Binary files a/src/assets/images/room-widgets/camera-widget/btn.png and /dev/null differ diff --git a/src/assets/images/room-widgets/camera-widget/btn_down.png b/src/assets/images/room-widgets/camera-widget/btn_down.png deleted file mode 100644 index 76f25da1d..000000000 Binary files a/src/assets/images/room-widgets/camera-widget/btn_down.png and /dev/null differ diff --git a/src/assets/images/room-widgets/camera-widget/btn_hi.png b/src/assets/images/room-widgets/camera-widget/btn_hi.png deleted file mode 100644 index 5f04fc007..000000000 Binary files a/src/assets/images/room-widgets/camera-widget/btn_hi.png and /dev/null differ diff --git a/src/assets/images/room-widgets/camera-widget/cam_bg.png b/src/assets/images/room-widgets/camera-widget/cam_bg.png deleted file mode 100644 index d6cf994d0..000000000 Binary files a/src/assets/images/room-widgets/camera-widget/cam_bg.png and /dev/null differ diff --git a/src/assets/images/room-widgets/camera-widget/camera-spritesheet.png b/src/assets/images/room-widgets/camera-widget/camera-spritesheet.png deleted file mode 100644 index 4ea82e31a..000000000 Binary files a/src/assets/images/room-widgets/camera-widget/camera-spritesheet.png and /dev/null differ diff --git a/src/assets/images/room-widgets/camera-widget/viewfinder.png b/src/assets/images/room-widgets/camera-widget/viewfinder.png deleted file mode 100644 index ab6a9b24f..000000000 Binary files a/src/assets/images/room-widgets/camera-widget/viewfinder.png and /dev/null differ diff --git a/src/assets/images/room-widgets/dimmer-widget/dimmer_banner.png b/src/assets/images/room-widgets/dimmer-widget/dimmer_banner.png deleted file mode 100644 index fdc6e9fab..000000000 Binary files a/src/assets/images/room-widgets/dimmer-widget/dimmer_banner.png and /dev/null differ diff --git a/src/assets/images/room-widgets/engraving-lock-widget/engraving-lock-spritesheet.png b/src/assets/images/room-widgets/engraving-lock-widget/engraving-lock-spritesheet.png deleted file mode 100644 index 472dc85b2..000000000 Binary files a/src/assets/images/room-widgets/engraving-lock-widget/engraving-lock-spritesheet.png and /dev/null differ diff --git a/src/assets/images/room-widgets/playlist-editor/disk_2.png b/src/assets/images/room-widgets/playlist-editor/disk_2.png deleted file mode 100644 index 303302097..000000000 Binary files a/src/assets/images/room-widgets/playlist-editor/disk_2.png and /dev/null differ diff --git a/src/assets/images/room-widgets/playlist-editor/disk_image.png b/src/assets/images/room-widgets/playlist-editor/disk_image.png deleted file mode 100644 index 7a8ab453d..000000000 Binary files a/src/assets/images/room-widgets/playlist-editor/disk_image.png and /dev/null differ diff --git a/src/assets/images/room-widgets/playlist-editor/move.png b/src/assets/images/room-widgets/playlist-editor/move.png deleted file mode 100644 index 9d1635d83..000000000 Binary files a/src/assets/images/room-widgets/playlist-editor/move.png and /dev/null differ diff --git a/src/assets/images/room-widgets/playlist-editor/pause-btn.png b/src/assets/images/room-widgets/playlist-editor/pause-btn.png deleted file mode 100644 index 900f99b4d..000000000 Binary files a/src/assets/images/room-widgets/playlist-editor/pause-btn.png and /dev/null differ diff --git a/src/assets/images/room-widgets/playlist-editor/pause.png b/src/assets/images/room-widgets/playlist-editor/pause.png deleted file mode 100644 index ec5fef47d..000000000 Binary files a/src/assets/images/room-widgets/playlist-editor/pause.png and /dev/null differ diff --git a/src/assets/images/room-widgets/playlist-editor/playing.png b/src/assets/images/room-widgets/playlist-editor/playing.png deleted file mode 100644 index 0e3449d16..000000000 Binary files a/src/assets/images/room-widgets/playlist-editor/playing.png and /dev/null differ diff --git a/src/assets/images/room-widgets/playlist-editor/preview.png b/src/assets/images/room-widgets/playlist-editor/preview.png deleted file mode 100644 index 160f0befb..000000000 Binary files a/src/assets/images/room-widgets/playlist-editor/preview.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-blue.png b/src/assets/images/room-widgets/stickie-widget/stickie-blue.png deleted file mode 100644 index 9a14182e5..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-blue.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-christmas.png b/src/assets/images/room-widgets/stickie-widget/stickie-christmas.png deleted file mode 100644 index 82b4732fa..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-christmas.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-close.png b/src/assets/images/room-widgets/stickie-widget/stickie-close.png deleted file mode 100644 index 9621c56f2..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-close.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-dreams.png b/src/assets/images/room-widgets/stickie-widget/stickie-dreams.png deleted file mode 100644 index 1723bdcb0..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-dreams.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-green.png b/src/assets/images/room-widgets/stickie-widget/stickie-green.png deleted file mode 100644 index 5e73c7473..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-green.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-heart.png b/src/assets/images/room-widgets/stickie-widget/stickie-heart.png deleted file mode 100644 index 455238513..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-heart.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-juninas.png b/src/assets/images/room-widgets/stickie-widget/stickie-juninas.png deleted file mode 100644 index faaea9d1e..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-juninas.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-pink.png b/src/assets/images/room-widgets/stickie-widget/stickie-pink.png deleted file mode 100644 index 756589983..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-pink.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-shakesp.png b/src/assets/images/room-widgets/stickie-widget/stickie-shakesp.png deleted file mode 100644 index d5011c74b..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-shakesp.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-spritesheet.png b/src/assets/images/room-widgets/stickie-widget/stickie-spritesheet.png deleted file mode 100644 index 02495714f..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-spritesheet.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-trash.png b/src/assets/images/room-widgets/stickie-widget/stickie-trash.png deleted file mode 100644 index 96dff8f02..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-trash.png and /dev/null differ diff --git a/src/assets/images/room-widgets/stickie-widget/stickie-yellow.png b/src/assets/images/room-widgets/stickie-widget/stickie-yellow.png deleted file mode 100644 index 759d3f990..000000000 Binary files a/src/assets/images/room-widgets/stickie-widget/stickie-yellow.png and /dev/null differ diff --git a/src/assets/images/room-widgets/wordquiz-widget/thumbs-down-small.png b/src/assets/images/room-widgets/wordquiz-widget/thumbs-down-small.png deleted file mode 100644 index 78e51cfe5..000000000 Binary files a/src/assets/images/room-widgets/wordquiz-widget/thumbs-down-small.png and /dev/null differ diff --git a/src/assets/images/room-widgets/wordquiz-widget/thumbs-down.png b/src/assets/images/room-widgets/wordquiz-widget/thumbs-down.png deleted file mode 100644 index fd320c51d..000000000 Binary files a/src/assets/images/room-widgets/wordquiz-widget/thumbs-down.png and /dev/null differ diff --git a/src/assets/images/room-widgets/wordquiz-widget/thumbs-up-small.png b/src/assets/images/room-widgets/wordquiz-widget/thumbs-up-small.png deleted file mode 100644 index b93111f0c..000000000 Binary files a/src/assets/images/room-widgets/wordquiz-widget/thumbs-up-small.png and /dev/null differ diff --git a/src/assets/images/room-widgets/wordquiz-widget/thumbs-up.png b/src/assets/images/room-widgets/wordquiz-widget/thumbs-up.png deleted file mode 100644 index dd650987d..000000000 Binary files a/src/assets/images/room-widgets/wordquiz-widget/thumbs-up.png and /dev/null differ diff --git a/src/assets/images/room-widgets/youtube-widget/next.png b/src/assets/images/room-widgets/youtube-widget/next.png deleted file mode 100644 index a02e164ba..000000000 Binary files a/src/assets/images/room-widgets/youtube-widget/next.png and /dev/null differ diff --git a/src/assets/images/room-widgets/youtube-widget/prev.png b/src/assets/images/room-widgets/youtube-widget/prev.png deleted file mode 100644 index d48b658eb..000000000 Binary files a/src/assets/images/room-widgets/youtube-widget/prev.png and /dev/null differ diff --git a/src/assets/images/stackhelper/slider-background.png b/src/assets/images/stackhelper/slider-background.png deleted file mode 100644 index 20ab191e4..000000000 Binary files a/src/assets/images/stackhelper/slider-background.png and /dev/null differ diff --git a/src/assets/images/stackhelper/slider-pointer.png b/src/assets/images/stackhelper/slider-pointer.png deleted file mode 100644 index 8787456f5..000000000 Binary files a/src/assets/images/stackhelper/slider-pointer.png and /dev/null differ diff --git a/src/assets/images/toolbar/arrow.png b/src/assets/images/toolbar/arrow.png deleted file mode 100644 index bf04ea0ec..000000000 Binary files a/src/assets/images/toolbar/arrow.png and /dev/null differ diff --git a/src/assets/images/toolbar/friend-search.png b/src/assets/images/toolbar/friend-search.png deleted file mode 100644 index 7156c4fd2..000000000 Binary files a/src/assets/images/toolbar/friend-search.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/buildersclub.png b/src/assets/images/toolbar/icons/buildersclub.png deleted file mode 100644 index bbf6d6812..000000000 Binary files a/src/assets/images/toolbar/icons/buildersclub.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/camera.png b/src/assets/images/toolbar/icons/camera.png deleted file mode 100644 index da5d835f2..000000000 Binary files a/src/assets/images/toolbar/icons/camera.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/catalog.png b/src/assets/images/toolbar/icons/catalog.png deleted file mode 100644 index f68092171..000000000 Binary files a/src/assets/images/toolbar/icons/catalog.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/friend_all.png b/src/assets/images/toolbar/icons/friend_all.png deleted file mode 100644 index b2ca0d7d5..000000000 Binary files a/src/assets/images/toolbar/icons/friend_all.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/friend_head.png b/src/assets/images/toolbar/icons/friend_head.png deleted file mode 100644 index 6380c90c1..000000000 Binary files a/src/assets/images/toolbar/icons/friend_head.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/friend_search.png b/src/assets/images/toolbar/icons/friend_search.png deleted file mode 100644 index ebe1c65ed..000000000 Binary files a/src/assets/images/toolbar/icons/friend_search.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/game.png b/src/assets/images/toolbar/icons/game.png deleted file mode 100644 index 59ef8aafb..000000000 Binary files a/src/assets/images/toolbar/icons/game.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/habbo.png b/src/assets/images/toolbar/icons/habbo.png deleted file mode 100644 index 78cd0a486..000000000 Binary files a/src/assets/images/toolbar/icons/habbo.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/house.png b/src/assets/images/toolbar/icons/house.png deleted file mode 100644 index f2c8746ab..000000000 Binary files a/src/assets/images/toolbar/icons/house.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/inventory.png b/src/assets/images/toolbar/icons/inventory.png deleted file mode 100644 index d848586ae..000000000 Binary files a/src/assets/images/toolbar/icons/inventory.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/joinroom.png b/src/assets/images/toolbar/icons/joinroom.png deleted file mode 100644 index 894ee78ff..000000000 Binary files a/src/assets/images/toolbar/icons/joinroom.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/achievements.png b/src/assets/images/toolbar/icons/me-menu/achievements.png deleted file mode 100644 index 575464d61..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/achievements.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/clothing.png b/src/assets/images/toolbar/icons/me-menu/clothing.png deleted file mode 100644 index bfacabd84..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/clothing.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/cog.png b/src/assets/images/toolbar/icons/me-menu/cog.png deleted file mode 100644 index 6180409a1..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/cog.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/forums.png b/src/assets/images/toolbar/icons/me-menu/forums.png deleted file mode 100644 index e22426e6d..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/forums.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/helper-tool.png b/src/assets/images/toolbar/icons/me-menu/helper-tool.png deleted file mode 100644 index e324611fc..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/helper-tool.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/my-rooms.png b/src/assets/images/toolbar/icons/me-menu/my-rooms.png deleted file mode 100644 index 8d4dcad00..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/my-rooms.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/profile.png b/src/assets/images/toolbar/icons/me-menu/profile.png deleted file mode 100644 index 04964bfe6..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/profile.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/rooms.png b/src/assets/images/toolbar/icons/me-menu/rooms.png deleted file mode 100644 index 00261ceed..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/rooms.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/me-menu/talents.png b/src/assets/images/toolbar/icons/me-menu/talents.png deleted file mode 100644 index 2f91dfe03..000000000 Binary files a/src/assets/images/toolbar/icons/me-menu/talents.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/message.png b/src/assets/images/toolbar/icons/message.png deleted file mode 100644 index c12d5bb4a..000000000 Binary files a/src/assets/images/toolbar/icons/message.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/message_unsee.gif b/src/assets/images/toolbar/icons/message_unsee.gif deleted file mode 100644 index eddfe1cc2..000000000 Binary files a/src/assets/images/toolbar/icons/message_unsee.gif and /dev/null differ diff --git a/src/assets/images/toolbar/icons/modtools.png b/src/assets/images/toolbar/icons/modtools.png deleted file mode 100644 index 24c362f0e..000000000 Binary files a/src/assets/images/toolbar/icons/modtools.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/rooms.png b/src/assets/images/toolbar/icons/rooms.png deleted file mode 100644 index 00261ceed..000000000 Binary files a/src/assets/images/toolbar/icons/rooms.png and /dev/null differ diff --git a/src/assets/images/toolbar/icons/sendmessage.png b/src/assets/images/toolbar/icons/sendmessage.png deleted file mode 100644 index 9f64b17c3..000000000 Binary files a/src/assets/images/toolbar/icons/sendmessage.png and /dev/null differ diff --git a/src/assets/images/unique/catalog-info-amount-bg.png b/src/assets/images/unique/catalog-info-amount-bg.png deleted file mode 100644 index 4a56c9b26..000000000 Binary files a/src/assets/images/unique/catalog-info-amount-bg.png and /dev/null differ diff --git a/src/assets/images/unique/catalog-info-sold-out.png b/src/assets/images/unique/catalog-info-sold-out.png deleted file mode 100644 index 79626e146..000000000 Binary files a/src/assets/images/unique/catalog-info-sold-out.png and /dev/null differ diff --git a/src/assets/images/unique/grid-bg-glass.png b/src/assets/images/unique/grid-bg-glass.png deleted file mode 100644 index 5b64c480b..000000000 Binary files a/src/assets/images/unique/grid-bg-glass.png and /dev/null differ diff --git a/src/assets/images/unique/grid-bg-sold-out.png b/src/assets/images/unique/grid-bg-sold-out.png deleted file mode 100644 index 94f66620a..000000000 Binary files a/src/assets/images/unique/grid-bg-sold-out.png and /dev/null differ diff --git a/src/assets/images/unique/grid-bg.png b/src/assets/images/unique/grid-bg.png deleted file mode 100644 index d7737ba83..000000000 Binary files a/src/assets/images/unique/grid-bg.png and /dev/null differ diff --git a/src/assets/images/unique/grid-count-bg.png b/src/assets/images/unique/grid-count-bg.png deleted file mode 100644 index 68e13bddb..000000000 Binary files a/src/assets/images/unique/grid-count-bg.png and /dev/null differ diff --git a/src/assets/images/unique/inventory-info-amount-bg.png b/src/assets/images/unique/inventory-info-amount-bg.png deleted file mode 100644 index af4e31e2e..000000000 Binary files a/src/assets/images/unique/inventory-info-amount-bg.png and /dev/null differ diff --git a/src/assets/images/wired/card-action-corners.png b/src/assets/images/wired/card-action-corners.png deleted file mode 100644 index faec2349d..000000000 Binary files a/src/assets/images/wired/card-action-corners.png and /dev/null differ diff --git a/src/assets/images/wired/icon_action.png b/src/assets/images/wired/icon_action.png deleted file mode 100644 index 78e90e630..000000000 Binary files a/src/assets/images/wired/icon_action.png and /dev/null differ diff --git a/src/assets/images/wired/icon_condition.png b/src/assets/images/wired/icon_condition.png deleted file mode 100644 index 26925a63f..000000000 Binary files a/src/assets/images/wired/icon_condition.png and /dev/null differ diff --git a/src/assets/images/wired/icon_trigger.png b/src/assets/images/wired/icon_trigger.png deleted file mode 100644 index f48d13c87..000000000 Binary files a/src/assets/images/wired/icon_trigger.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_around.png b/src/assets/images/wired/icon_wired_around.png deleted file mode 100644 index 0b4b5a125..000000000 Binary files a/src/assets/images/wired/icon_wired_around.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_left_right.png b/src/assets/images/wired/icon_wired_left_right.png deleted file mode 100644 index 862d6d813..000000000 Binary files a/src/assets/images/wired/icon_wired_left_right.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_north_east.png b/src/assets/images/wired/icon_wired_north_east.png deleted file mode 100644 index 3710854fd..000000000 Binary files a/src/assets/images/wired/icon_wired_north_east.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_north_west.png b/src/assets/images/wired/icon_wired_north_west.png deleted file mode 100644 index 09eeefc18..000000000 Binary files a/src/assets/images/wired/icon_wired_north_west.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_rotate_clockwise.png b/src/assets/images/wired/icon_wired_rotate_clockwise.png deleted file mode 100644 index 2827e3d23..000000000 Binary files a/src/assets/images/wired/icon_wired_rotate_clockwise.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_rotate_counter_clockwise.png b/src/assets/images/wired/icon_wired_rotate_counter_clockwise.png deleted file mode 100644 index 7e281bacb..000000000 Binary files a/src/assets/images/wired/icon_wired_rotate_counter_clockwise.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_south_east.png b/src/assets/images/wired/icon_wired_south_east.png deleted file mode 100644 index 4217c4b83..000000000 Binary files a/src/assets/images/wired/icon_wired_south_east.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_south_west.png b/src/assets/images/wired/icon_wired_south_west.png deleted file mode 100644 index 07ab1f95e..000000000 Binary files a/src/assets/images/wired/icon_wired_south_west.png and /dev/null differ diff --git a/src/assets/images/wired/icon_wired_up_down.png b/src/assets/images/wired/icon_wired_up_down.png deleted file mode 100644 index c2d243bae..000000000 Binary files a/src/assets/images/wired/icon_wired_up_down.png and /dev/null differ diff --git a/src/assets/styles/bootstrap/_accordion.scss b/src/assets/styles/bootstrap/_accordion.scss deleted file mode 100644 index fc62ceb88..000000000 --- a/src/assets/styles/bootstrap/_accordion.scss +++ /dev/null @@ -1,118 +0,0 @@ -// -// Base styles -// - -.accordion-button { - position: relative; - display: flex; - align-items: center; - width: 100%; - padding: $accordion-button-padding-y $accordion-button-padding-x; - @include font-size($font-size-base); - color: $accordion-button-color; - text-align: left; // Reset button style - background-color: $accordion-button-bg; - border: 0; - @include border-radius(0); - overflow-anchor: none; - @include transition($accordion-transition); - - &:not(.collapsed) { - color: $accordion-button-active-color; - background-color: $accordion-button-active-bg; - box-shadow: inset 0 ($accordion-border-width * -1) 0 $accordion-border-color; - - &::after { - background-image: escape-svg($accordion-button-active-icon); - transform: $accordion-icon-transform; - } - } - - // Accordion icon - &::after { - flex-shrink: 0; - width: $accordion-icon-width; - height: $accordion-icon-width; - margin-left: auto; - content: ""; - background-image: escape-svg($accordion-button-icon); - background-repeat: no-repeat; - background-size: $accordion-icon-width; - @include transition($accordion-icon-transition); - } - - &:hover { - z-index: 2; - } - - &:focus { - z-index: 3; - border-color: $accordion-button-focus-border-color; - outline: 0; - box-shadow: $accordion-button-focus-box-shadow; - } -} - -.accordion-header { - margin-bottom: 0; -} - -.accordion-item { - background-color: $accordion-bg; - border: $accordion-border-width solid $accordion-border-color; - - &:first-of-type { - @include border-top-radius($accordion-border-radius); - - .accordion-button { - @include border-top-radius($accordion-inner-border-radius); - } - } - - &:not(:first-of-type) { - border-top: 0; - } - - // Only set a border-radius on the last item if the accordion is collapsed - &:last-of-type { - @include border-bottom-radius($accordion-border-radius); - - .accordion-button { - &.collapsed { - @include border-bottom-radius($accordion-inner-border-radius); - } - } - - .accordion-collapse { - @include border-bottom-radius($accordion-border-radius); - } - } -} - -.accordion-body { - padding: $accordion-body-padding-y $accordion-body-padding-x; -} - - -// Flush accordion items -// -// Remove borders and border-radius to keep accordion items edge-to-edge. - -.accordion-flush { - .accordion-collapse { - border-width: 0; - } - - .accordion-item { - border-right: 0; - border-left: 0; - @include border-radius(0); - - &:first-child { border-top: 0; } - &:last-child { border-bottom: 0; } - - .accordion-button { - @include border-radius(0); - } - } -} diff --git a/src/assets/styles/bootstrap/_alert.scss b/src/assets/styles/bootstrap/_alert.scss deleted file mode 100644 index 34f1e84ed..000000000 --- a/src/assets/styles/bootstrap/_alert.scss +++ /dev/null @@ -1,57 +0,0 @@ -// -// Base styles -// - -.alert { - position: relative; - padding: $alert-padding-y $alert-padding-x; - margin-bottom: $alert-margin-bottom; - border: $alert-border-width solid transparent; - @include border-radius($alert-border-radius); -} - -// Headings for larger alerts -.alert-heading { - // Specified to prevent conflicts of changing $headings-color - color: inherit; -} - -// Provide class for links that match alerts -.alert-link { - font-weight: $alert-link-font-weight; -} - - -// Dismissible alerts -// -// Expand the right padding and account for the close button's positioning. - -.alert-dismissible { - padding-right: $alert-dismissible-padding-r; - - // Adjust close link position - .btn-close { - position: absolute; - top: 0; - right: 0; - z-index: $stretched-link-z-index + 1; - padding: $alert-padding-y * 1.25 $alert-padding-x; - } -} - - -// scss-docs-start alert-modifiers -// Generate contextual modifier classes for colorizing the alert. - -@each $state, $value in $theme-colors { - $alert-background: shift-color($value, $alert-bg-scale); - $alert-border: shift-color($value, $alert-border-scale); - $alert-color: shift-color($value, $alert-color-scale); - @if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) { - $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale)); - } - .alert-#{$state} { - @include alert-variant($alert-background, $alert-border, $alert-color); - } -} -// scss-docs-end alert-modifiers diff --git a/src/assets/styles/bootstrap/_badge.scss b/src/assets/styles/bootstrap/_badge.scss deleted file mode 100644 index 08df1b84a..000000000 --- a/src/assets/styles/bootstrap/_badge.scss +++ /dev/null @@ -1,29 +0,0 @@ -// Base class -// -// Requires one of the contextual, color modifier classes for `color` and -// `background-color`. - -.badge { - display: inline-block; - padding: $badge-padding-y $badge-padding-x; - @include font-size($badge-font-size); - font-weight: $badge-font-weight; - line-height: 1; - color: $badge-color; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - @include border-radius($badge-border-radius); - @include gradient-bg(); - - // Empty badges collapse automatically - &:empty { - display: none; - } -} - -// Quick fix for badges in buttons -.btn .badge { - position: relative; - top: -1px; -} diff --git a/src/assets/styles/bootstrap/_breadcrumb.scss b/src/assets/styles/bootstrap/_breadcrumb.scss deleted file mode 100644 index f7fafe743..000000000 --- a/src/assets/styles/bootstrap/_breadcrumb.scss +++ /dev/null @@ -1,28 +0,0 @@ -.breadcrumb { - display: flex; - flex-wrap: wrap; - padding: $breadcrumb-padding-y $breadcrumb-padding-x; - margin-bottom: $breadcrumb-margin-bottom; - @include font-size($breadcrumb-font-size); - list-style: none; - background-color: $breadcrumb-bg; - @include border-radius($breadcrumb-border-radius); -} - -.breadcrumb-item { - // The separator between breadcrumbs (by default, a forward-slash: "/") - + .breadcrumb-item { - padding-left: $breadcrumb-item-padding-x; - - &::before { - float: left; // Suppress inline spacings and underlining of the separator - padding-right: $breadcrumb-item-padding-x; - color: $breadcrumb-divider-color; - content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"}; - } - } - - &.active { - color: $breadcrumb-active-color; - } -} diff --git a/src/assets/styles/bootstrap/_button-group.scss b/src/assets/styles/bootstrap/_button-group.scss deleted file mode 100644 index 13aa0569a..000000000 --- a/src/assets/styles/bootstrap/_button-group.scss +++ /dev/null @@ -1,139 +0,0 @@ -// Make the div behave like a button -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-flex; - vertical-align: middle; // match .btn alignment given font-size hack above - - > .btn { - position: relative; - flex: 1 1 auto; - } - - // Bring the hover, focused, and "active" buttons to the front to overlay - // the borders properly - > .btn-check:checked + .btn, - > .btn-check:focus + .btn, - > .btn:hover, - > .btn:focus, - > .btn:active, - > .btn.active { - z-index: 1; - } -} - -// Optional: Group multiple button groups together for a toolbar -.btn-toolbar { - display: flex; - flex-wrap: wrap; - justify-content: flex-start; - - .input-group { - width: auto; - } -} - -.btn-group { - // Prevent double borders when buttons are next to each other - > .btn:not(:first-child), - > .btn-group:not(:first-child) { - margin-left: -$btn-border-width; - } - - // Reset rounded corners - > .btn:not(:last-child):not(.dropdown-toggle), - > .btn-group:not(:last-child) > .btn { - @include border-end-radius(0); - } - - // The left radius should be 0 if the button is: - // - the "third or more" child - // - the second child and the previous element isn't `.btn-check` (making it the first child visually) - // - part of a btn-group which isn't the first child - > .btn:nth-child(n + 3), - > :not(.btn-check) + .btn, - > .btn-group:not(:first-child) > .btn { - @include border-start-radius(0); - } -} - -// Sizing -// -// Remix the default button sizing classes into new ones for easier manipulation. - -.btn-group-sm > .btn { @extend .btn-sm; } -.btn-group-lg > .btn { @extend .btn-lg; } - - -// -// Split button dropdowns -// - -.dropdown-toggle-split { - padding-right: $btn-padding-x * .75; - padding-left: $btn-padding-x * .75; - - &::after, - .dropup &::after, - .dropend &::after { - margin-left: 0; - } - - .dropstart &::before { - margin-right: 0; - } -} - -.btn-sm + .dropdown-toggle-split { - padding-right: $btn-padding-x-sm * .75; - padding-left: $btn-padding-x-sm * .75; -} - -.btn-lg + .dropdown-toggle-split { - padding-right: $btn-padding-x-lg * .75; - padding-left: $btn-padding-x-lg * .75; -} - - -// The clickable button for toggling the menu -// Set the same inset shadow as the :active state -.btn-group.show .dropdown-toggle { - @include box-shadow($btn-active-box-shadow); - - // Show no shadow for `.btn-link` since it has no other button styles. - &.btn-link { - @include box-shadow(none); - } -} - - -// -// Vertical button groups -// - -.btn-group-vertical { - flex-direction: column; - align-items: flex-start; - justify-content: center; - - > .btn, - > .btn-group { - width: 100%; - } - - > .btn:not(:first-child), - > .btn-group:not(:first-child) { - margin-top: -$btn-border-width; - } - - // Reset rounded corners - > .btn:not(:last-child):not(.dropdown-toggle), - > .btn-group:not(:last-child) > .btn { - @include border-bottom-radius(0); - } - - > .btn ~ .btn, - > .btn-group:not(:first-child) > .btn { - @include border-top-radius(0); - } -} diff --git a/src/assets/styles/bootstrap/_buttons.scss b/src/assets/styles/bootstrap/_buttons.scss deleted file mode 100644 index 3c2cba9c3..000000000 --- a/src/assets/styles/bootstrap/_buttons.scss +++ /dev/null @@ -1,116 +0,0 @@ -// -// Base styles -// - -.btn { - display: inline-block; - font-family: $btn-font-family; - font-weight: $btn-font-weight; - line-height: $btn-line-height; - color: $body-color; - text-align: center; - text-decoration: if($link-decoration == none, null, none); - white-space: $btn-white-space; - vertical-align: middle; - cursor: if($enable-button-pointers, pointer, null); - user-select: none; - background-color: transparent; - border: $btn-border-width solid transparent; - @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius); - @include transition($btn-transition); - - &:hover { - color: $body-color; - text-decoration: if($link-hover-decoration == underline, none, null); - } - - .btn-check:focus + &, - &:focus { - outline: 0; - box-shadow: $btn-focus-box-shadow; - } - - .btn-check:checked + &, - .btn-check:active + &, - &:active, - &.active { - @include box-shadow($btn-active-box-shadow); - - &:focus { - @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow); - } - } - - &:disabled, - &.disabled, - fieldset:disabled & { - pointer-events: none; - opacity: $btn-disabled-opacity; - @include box-shadow(none); - } -} - - -// -// Alternate buttons -// - -// scss-docs-start btn-variant-loops -@each $color, $value in $theme-colors { - .btn-#{$color} { - @include button-variant($value, $value); - } -} - -@each $color, $value in $theme-colors { - .btn-outline-#{$color} { - @include button-outline-variant($value); - } -} -// scss-docs-end btn-variant-loops - - -// -// Link buttons -// - -// Make a button look and behave like a link -.btn-link { - font-weight: $font-weight-normal; - color: $btn-link-color; - text-decoration: $link-decoration; - box-shadow: none !important; - - &:active { - color: $btn-link-color !important; - } - - &:hover { - color: $btn-link-hover-color; - text-decoration: $link-hover-decoration; - } - - &:focus { - text-decoration: $link-hover-decoration; - } - - &:disabled, - &.disabled { - color: $btn-link-disabled-color; - } - - // No need for an active state here -} - - -// -// Button Sizes -// - -.btn-lg { - @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg); -} - -.btn-sm { - @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm); -} diff --git a/src/assets/styles/bootstrap/_card.scss b/src/assets/styles/bootstrap/_card.scss deleted file mode 100644 index 22890f5c9..000000000 --- a/src/assets/styles/bootstrap/_card.scss +++ /dev/null @@ -1,216 +0,0 @@ -// -// Base styles -// - -.card { - position: relative; - display: flex; - flex-direction: column; - min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106 - height: $card-height; - word-wrap: break-word; - background-color: $card-bg; - background-clip: border-box; - border: $card-border-width solid $card-border-color; - @include border-radius($card-border-radius); - @include box-shadow($card-box-shadow); - - > hr { - margin-right: 0; - margin-left: 0; - } - - > .list-group { - border-top: inherit; - border-bottom: inherit; - - &:first-child { - border-top-width: 0; - @include border-top-radius($card-inner-border-radius); - } - - &:last-child { - border-bottom-width: 0; - @include border-bottom-radius($card-inner-border-radius); - } - } - - // Due to specificity of the above selector (`.card > .list-group`), we must - // use a child selector here to prevent double borders. - > .card-header + .list-group, - > .list-group + .card-footer { - border-top: 0; - } -} - -.card-body { - // Enable `flex-grow: 1` for decks and groups so that card blocks take up - // as much space as possible, ensuring footers are aligned to the bottom. - flex: 1 1 auto; - padding: $card-spacer-y $card-spacer-x; - color: $card-color; -} - -.card-title { - margin-bottom: $card-title-spacer-y; -} - -.card-subtitle { - margin-top: -$card-title-spacer-y * .5; - margin-bottom: 0; -} - -.card-text:last-child { - margin-bottom: 0; -} - -.card-link { - &:hover { - text-decoration: if($link-hover-decoration == underline, none, null); - } - - + .card-link { - margin-left: $card-spacer-x; - } -} - -// -// Optional textual caps -// - -.card-header { - padding: $card-cap-padding-y $card-cap-padding-x; - margin-bottom: 0; // Removes the default margin-bottom of - color: $card-cap-color; - background-color: $card-cap-bg; - border-bottom: $card-border-width solid $card-border-color; - - &:first-child { - @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0); - } -} - -.card-footer { - padding: $card-cap-padding-y $card-cap-padding-x; - color: $card-cap-color; - background-color: $card-cap-bg; - border-top: $card-border-width solid $card-border-color; - - &:last-child { - @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius); - } -} - - -// -// Header navs -// - -.card-header-tabs { - margin-right: -$card-cap-padding-x * .5; - margin-bottom: -$card-cap-padding-y; - margin-left: -$card-cap-padding-x * .5; - border-bottom: 0; - - @if $nav-tabs-link-active-bg != $card-bg { - .nav-link.active { - background-color: $card-bg; - border-bottom-color: $card-bg; - } - } -} - -.card-header-pills { - margin-right: -$card-cap-padding-x * .5; - margin-left: -$card-cap-padding-x * .5; -} - -// Card image -.card-img-overlay { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - padding: $card-img-overlay-padding; - @include border-radius($card-inner-border-radius); -} - -.card-img, -.card-img-top, -.card-img-bottom { - width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch -} - -.card-img, -.card-img-top { - @include border-top-radius($card-inner-border-radius); -} - -.card-img, -.card-img-bottom { - @include border-bottom-radius($card-inner-border-radius); -} - - -// -// Card groups -// - -.card-group { - // The child selector allows nested `.card` within `.card-group` - // to display properly. - > .card { - margin-bottom: $card-group-margin; - } - - @include media-breakpoint-up(sm) { - display: flex; - flex-flow: row wrap; - // The child selector allows nested `.card` within `.card-group` - // to display properly. - > .card { - // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4 - flex: 1 0 0%; - margin-bottom: 0; - - + .card { - margin-left: 0; - border-left: 0; - } - - // Handle rounded corners - @if $enable-rounded { - &:not(:last-child) { - @include border-end-radius(0); - - .card-img-top, - .card-header { - // stylelint-disable-next-line property-disallowed-list - border-top-right-radius: 0; - } - .card-img-bottom, - .card-footer { - // stylelint-disable-next-line property-disallowed-list - border-bottom-right-radius: 0; - } - } - - &:not(:first-child) { - @include border-start-radius(0); - - .card-img-top, - .card-header { - // stylelint-disable-next-line property-disallowed-list - border-top-left-radius: 0; - } - .card-img-bottom, - .card-footer { - // stylelint-disable-next-line property-disallowed-list - border-bottom-left-radius: 0; - } - } - } - } - } -} diff --git a/src/assets/styles/bootstrap/_carousel.scss b/src/assets/styles/bootstrap/_carousel.scss deleted file mode 100644 index 3d8fb15a0..000000000 --- a/src/assets/styles/bootstrap/_carousel.scss +++ /dev/null @@ -1,229 +0,0 @@ -// Notes on the classes: -// -// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically) -// even when their scroll action started on a carousel, but for compatibility (with Firefox) -// we're preventing all actions instead -// 2. The .carousel-item-start and .carousel-item-end is used to indicate where -// the active slide is heading. -// 3. .active.carousel-item is the current slide. -// 4. .active.carousel-item-start and .active.carousel-item-end is the current -// slide in its in-transition state. Only one of these occurs at a time. -// 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end -// is the upcoming slide in transition. - -.carousel { - position: relative; -} - -.carousel.pointer-event { - touch-action: pan-y; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; - @include clearfix(); -} - -.carousel-item { - position: relative; - display: none; - float: left; - width: 100%; - margin-right: -100%; - backface-visibility: hidden; - @include transition($carousel-transition); -} - -.carousel-item.active, -.carousel-item-next, -.carousel-item-prev { - display: block; -} - -/* rtl:begin:ignore */ -.carousel-item-next:not(.carousel-item-start), -.active.carousel-item-end { - transform: translateX(100%); -} - -.carousel-item-prev:not(.carousel-item-end), -.active.carousel-item-start { - transform: translateX(-100%); -} - -/* rtl:end:ignore */ - - -// -// Alternate transitions -// - -.carousel-fade { - .carousel-item { - opacity: 0; - transition-property: opacity; - transform: none; - } - - .carousel-item.active, - .carousel-item-next.carousel-item-start, - .carousel-item-prev.carousel-item-end { - z-index: 1; - opacity: 1; - } - - .active.carousel-item-start, - .active.carousel-item-end { - z-index: 0; - opacity: 0; - @include transition(opacity 0s $carousel-transition-duration); - } -} - - -// -// Left/right controls for nav -// - -.carousel-control-prev, -.carousel-control-next { - position: absolute; - top: 0; - bottom: 0; - z-index: 1; - // Use flex for alignment (1-3) - display: flex; // 1. allow flex styles - align-items: center; // 2. vertically center contents - justify-content: center; // 3. horizontally center contents - width: $carousel-control-width; - padding: 0; - color: $carousel-control-color; - text-align: center; - background: none; - border: 0; - opacity: $carousel-control-opacity; - @include transition($carousel-control-transition); - - // Hover/focus state - &:hover, - &:focus { - color: $carousel-control-color; - text-decoration: none; - outline: 0; - opacity: $carousel-control-hover-opacity; - } -} -.carousel-control-prev { - left: 0; - background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null); -} -.carousel-control-next { - right: 0; - background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null); -} - -// Icons for within -.carousel-control-prev-icon, -.carousel-control-next-icon { - display: inline-block; - width: $carousel-control-icon-width; - height: $carousel-control-icon-width; - background-repeat: no-repeat; - background-position: 50%; - background-size: 100% 100%; -} - -/* rtl:options: { - "autoRename": true, - "stringMap":[ { - "name" : "prev-next", - "search" : "prev", - "replace" : "next" - } ] -} */ -.carousel-control-prev-icon { - background-image: escape-svg($carousel-control-prev-icon-bg); -} -.carousel-control-next-icon { - background-image: escape-svg($carousel-control-next-icon-bg); -} - -// Optional indicator pips/controls -// -// Add a container (such as a list) with the following class and add an item (ideally a focusable control, -// like a button) with data-bs-target for each slide your carousel holds. - -.carousel-indicators { - position: absolute; - right: 0; - bottom: 0; - left: 0; - z-index: 2; - display: flex; - justify-content: center; - padding: 0; - // Use the .carousel-control's width as margin so we don't overlay those - margin-right: $carousel-control-width; - margin-bottom: 1rem; - margin-left: $carousel-control-width; - list-style: none; - - [data-bs-target] { - box-sizing: content-box; - flex: 0 1 auto; - width: $carousel-indicator-width; - height: $carousel-indicator-height; - padding: 0; - margin-right: $carousel-indicator-spacer; - margin-left: $carousel-indicator-spacer; - text-indent: -999px; - cursor: pointer; - background-color: $carousel-indicator-active-bg; - background-clip: padding-box; - border: 0; - // Use transparent borders to increase the hit area by 10px on top and bottom. - border-top: $carousel-indicator-hit-area-height solid transparent; - border-bottom: $carousel-indicator-hit-area-height solid transparent; - opacity: $carousel-indicator-opacity; - @include transition($carousel-indicator-transition); - } - - .active { - opacity: $carousel-indicator-active-opacity; - } -} - - -// Optional captions -// -// - -.carousel-caption { - position: absolute; - right: (100% - $carousel-caption-width) * .5; - bottom: $carousel-caption-spacer; - left: (100% - $carousel-caption-width) * .5; - padding-top: $carousel-caption-padding-y; - padding-bottom: $carousel-caption-padding-y; - color: $carousel-caption-color; - text-align: center; -} - -// Dark mode carousel - -.carousel-dark { - .carousel-control-prev-icon, - .carousel-control-next-icon { - filter: $carousel-dark-control-icon-filter; - } - - .carousel-indicators [data-bs-target] { - background-color: $carousel-dark-indicator-active-bg; - } - - .carousel-caption { - color: $carousel-dark-caption-color; - } -} diff --git a/src/assets/styles/bootstrap/_close.scss b/src/assets/styles/bootstrap/_close.scss deleted file mode 100644 index 32a0f68cc..000000000 --- a/src/assets/styles/bootstrap/_close.scss +++ /dev/null @@ -1,40 +0,0 @@ -// transparent background and border properties included for button version. -// iOS requires the button element instead of an anchor tag. -// If you want the anchor version, it requires `href="#"`. -// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile - -.btn-close { - box-sizing: content-box; - width: $btn-close-width; - height: $btn-close-height; - padding: $btn-close-padding-y $btn-close-padding-x; - color: $btn-close-color; - background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements - border: 0; // for button elements - @include border-radius(); - opacity: $btn-close-opacity; - - // Override 's hover style - &:hover { - color: $btn-close-color; - text-decoration: none; - opacity: $btn-close-hover-opacity; - } - - &:focus { - outline: 0; - box-shadow: $btn-close-focus-shadow; - opacity: $btn-close-focus-opacity; - } - - &:disabled, - &.disabled { - pointer-events: none; - user-select: none; - opacity: $btn-close-disabled-opacity; - } -} - -.btn-close-white { - filter: $btn-close-white-filter; -} diff --git a/src/assets/styles/bootstrap/_containers.scss b/src/assets/styles/bootstrap/_containers.scss deleted file mode 100644 index f88f1e5f5..000000000 --- a/src/assets/styles/bootstrap/_containers.scss +++ /dev/null @@ -1,41 +0,0 @@ -// Container widths -// -// Set the container width, and override it for fixed navbars in media queries. - -@if $enable-grid-classes { - // Single container class with breakpoint max-widths - .container, - // 100% wide container at all breakpoints - .container-fluid { - @include make-container(); - } - - // Responsive containers that are 100% wide until a breakpoint - @each $breakpoint, $container-max-width in $container-max-widths { - .container-#{$breakpoint} { - @extend .container-fluid; - } - - @include media-breakpoint-up($breakpoint, $grid-breakpoints) { - %responsive-container-#{$breakpoint} { - max-width: $container-max-width; - } - - // Extend each breakpoint which is smaller or equal to the current breakpoint - $extend-breakpoint: true; - - @each $name, $width in $grid-breakpoints { - @if ($extend-breakpoint) { - .container#{breakpoint-infix($name, $grid-breakpoints)} { - @extend %responsive-container-#{$breakpoint}; - } - - // Once the current breakpoint is reached, stop extending - @if ($breakpoint == $name) { - $extend-breakpoint: false; - } - } - } - } - } -} diff --git a/src/assets/styles/bootstrap/_dropdown.scss b/src/assets/styles/bootstrap/_dropdown.scss deleted file mode 100644 index adc114327..000000000 --- a/src/assets/styles/bootstrap/_dropdown.scss +++ /dev/null @@ -1,240 +0,0 @@ -// The dropdown wrapper (`
`) -.dropup, -.dropend, -.dropdown, -.dropstart { - position: relative; -} - -.dropdown-toggle { - white-space: nowrap; - - // Generate the caret automatically - @include caret(); -} - -// The dropdown menu -.dropdown-menu { - position: absolute; - z-index: $zindex-dropdown; - display: none; // none by default, but block on "open" of the menu - min-width: $dropdown-min-width; - padding: $dropdown-padding-y $dropdown-padding-x; - margin: 0; // Override default margin of ul - @include font-size($dropdown-font-size); - color: $dropdown-color; - text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) - list-style: none; - background-color: $dropdown-bg; - background-clip: padding-box; - border: $dropdown-border-width solid $dropdown-border-color; - @include border-radius($dropdown-border-radius); - @include box-shadow($dropdown-box-shadow); - - &[data-bs-popper] { - top: 100%; - left: 0; - margin-top: $dropdown-spacer; - } -} - -// scss-docs-start responsive-breakpoints -// We deliberately hardcode the `bs-` prefix because we check -// this custom property in JS to determine Popper's positioning - -@each $breakpoint in map-keys($grid-breakpoints) { - @include media-breakpoint-up($breakpoint) { - $infix: breakpoint-infix($breakpoint, $grid-breakpoints); - - .dropdown-menu#{$infix}-start { - --bs-position: start; - - &[data-bs-popper] { - right: auto; - left: 0; - } - } - - .dropdown-menu#{$infix}-end { - --bs-position: end; - - &[data-bs-popper] { - right: 0; - left: auto; - } - } - } -} -// scss-docs-end responsive-breakpoints - -// Allow for dropdowns to go bottom up (aka, dropup-menu) -// Just add .dropup after the standard .dropdown class and you're set. -.dropup { - .dropdown-menu[data-bs-popper] { - top: auto; - bottom: 100%; - margin-top: 0; - margin-bottom: $dropdown-spacer; - } - - .dropdown-toggle { - @include caret(up); - } -} - -.dropend { - .dropdown-menu[data-bs-popper] { - top: 0; - right: auto; - left: 100%; - margin-top: 0; - margin-left: $dropdown-spacer; - } - - .dropdown-toggle { - @include caret(end); - &::after { - vertical-align: 0; - } - } -} - -.dropstart { - .dropdown-menu[data-bs-popper] { - top: 0; - right: 100%; - left: auto; - margin-top: 0; - margin-right: $dropdown-spacer; - } - - .dropdown-toggle { - @include caret(start); - &::before { - vertical-align: 0; - } - } -} - - -// Dividers (basically an `
`) within the dropdown -.dropdown-divider { - height: 0; - margin: $dropdown-divider-margin-y 0; - overflow: hidden; - border-top: 1px solid $dropdown-divider-bg; -} - -// Links, buttons, and more within the dropdown menu -// -// `
+ ) } diff --git a/src/common/ButtonGroup.tsx b/src/common/ButtonGroup.tsx deleted file mode 100644 index 033bb1fc2..000000000 --- a/src/common/ButtonGroup.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from './Base'; - -export interface ButtonGroupProps extends BaseProps -{ -} - -export const ButtonGroup: FC = props => -{ - const { classNames = [], ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'btn-group' ]; - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ classNames ]); - - return ; -} diff --git a/src/common/Column.tsx b/src/common/Column.tsx index 3055a98d8..fea6142b1 100644 --- a/src/common/Column.tsx +++ b/src/common/Column.tsx @@ -1,7 +1,7 @@ -import { FC, useMemo } from 'react'; -import { Flex, FlexProps } from './Flex'; -import { useGridContext } from './GridContext'; -import { ColumnSizesType } from './types'; +import { FC, useMemo } from "react" +import { Flex, FlexProps } from "./Flex" +import { useGridContext } from "./GridContext" +import { ColumnSizesType } from "./types" export interface ColumnProps extends FlexProps { @@ -12,35 +12,35 @@ export interface ColumnProps extends FlexProps export const Column: FC = props => { - const { size = 0, offset = 0, column = true, gap = 2, classNames = [], ...rest } = props; - const { isCssGrid = false } = useGridContext(); + const { size = 0, offset = 0, column = true, gap = 0, classNames = [], ...rest } = props + const { isCssGrid = false } = useGridContext() const getClassNames = useMemo(() => { - const newClassNames: string[] = []; + const newClassNames: string[] = [] if(size) { - let colClassName = `col-${ size }`; + let colClassName = `col-${ size }` - if(isCssGrid) colClassName = `g-${ colClassName }`; + if(isCssGrid) colClassName = `g-${ colClassName }` - newClassNames.push(colClassName); + newClassNames.push(colClassName) } if(offset) { - let colClassName = `offset-${ offset }`; + let colClassName = `offset-${ offset }` - if(isCssGrid) colClassName = `g-start-${ offset }`; + if(isCssGrid) colClassName = `g-start-${ offset }` - newClassNames.push(colClassName); + newClassNames.push(colClassName) } - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ size, offset, isCssGrid, classNames ]); + return newClassNames + }, [ size, offset, isCssGrid, classNames ]) - return ; + return } diff --git a/src/common/Flex.tsx b/src/common/Flex.tsx index ce69731c0..e925d7ebe 100644 --- a/src/common/Flex.tsx +++ b/src/common/Flex.tsx @@ -1,6 +1,6 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from './Base'; -import { AlignItemType, AlignSelfType, JustifyContentType, SpacingType } from './types'; +import { FC, useMemo } from "react" +import { Base, BaseProps } from "./Base" +import { AlignItemType, AlignSelfType, JustifyContentType, SpacingType } from "./types" export interface FlexProps extends BaseProps { @@ -15,36 +15,36 @@ export interface FlexProps extends BaseProps export const Flex: FC = props => { - const { display = 'flex', column = undefined, reverse = false, gap = null, center = false, alignSelf = null, alignItems = null, justifyContent = null, classNames = [], ...rest } = props; + const { display = "flex", column = undefined, reverse = false, gap = null, center = false, alignSelf = null, alignItems = null, justifyContent = null, classNames = [], ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = []; + const newClassNames: string[] = [] if(column) { - if(reverse) newClassNames.push('flex-column-reverse'); - else newClassNames.push('flex-column'); + if(reverse) newClassNames.push("flex-col-reverse") + else newClassNames.push("flex-col") } else { - if(reverse) newClassNames.push('flex-row-reverse'); + if(reverse) newClassNames.push("flex-row-reverse") } - if(gap) newClassNames.push('gap-' + gap); + if(gap) newClassNames.push("gap-" + gap) - if(alignSelf) newClassNames.push('align-self-' + alignSelf); + if(alignSelf) newClassNames.push("self-" + alignSelf) - if(alignItems) newClassNames.push('align-items-' + alignItems); + if(alignItems) newClassNames.push("items-" + alignItems) - if(justifyContent) newClassNames.push('justify-content-' + justifyContent); + if(justifyContent) newClassNames.push("justify-" + justifyContent) - if(!alignItems && !justifyContent && center) newClassNames.push('align-items-center', 'justify-content-center'); + if(!alignItems && !justifyContent && center) newClassNames.push("items-center", "justify-center") - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ column, reverse, gap, center, alignSelf, alignItems, justifyContent, classNames ]); + return newClassNames + }, [ column, reverse, gap, center, alignSelf, alignItems, justifyContent, classNames ]) - return ; + return } diff --git a/src/common/FormGroup.tsx b/src/common/FormGroup.tsx deleted file mode 100644 index 8eb183a2e..000000000 --- a/src/common/FormGroup.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { FC, useMemo } from 'react'; -import { Flex, FlexProps } from './Flex'; - -export interface FormGroupProps extends FlexProps -{ -} - -export const FormGroup: FC = props => -{ - const { classNames = [], ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'form-group' ]; - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ classNames ]); - - return ; -} diff --git a/src/common/Grid.tsx b/src/common/Grid.tsx index 860a89ca3..b89699a8e 100644 --- a/src/common/Grid.tsx +++ b/src/common/Grid.tsx @@ -1,7 +1,7 @@ -import { CSSProperties, FC, useMemo } from 'react'; -import { Base, BaseProps } from './Base'; -import { GridContextProvider } from './GridContext'; -import { AlignItemType, AlignSelfType, JustifyContentType, SpacingType } from './types'; +import { CSSProperties, FC, useMemo } from "react" +import { Base, BaseProps } from "./Base" +import { GridContextProvider } from "./GridContext" +import { AlignItemType, AlignSelfType, JustifyContentType, SpacingType } from "./types" export interface GridProps extends BaseProps { @@ -17,47 +17,47 @@ export interface GridProps extends BaseProps export const Grid: FC = props => { - const { inline = false, gap = 2, maxContent = false, columnCount = 0, center = false, alignSelf = null, alignItems = null, justifyContent = null, fullHeight = true, classNames = [], style = {}, ...rest } = props; + const { inline = false, gap = 2, maxContent = false, columnCount = 0, center = false, alignSelf = null, alignItems = null, justifyContent = null, fullHeight = true, classNames = [], style = {}, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = []; + const newClassNames: string[] = [] - if(inline) newClassNames.push('inline-grid'); - else newClassNames.push('grid'); + if(inline) newClassNames.push("inline-grid") + else newClassNames.push("grid") - if(gap) newClassNames.push('gap-' + gap); - else if(gap === 0) newClassNames.push('gap-0'); + if(gap) newClassNames.push("gap-" + gap) + else if(gap === 0) newClassNames.push("gap-0") - if(maxContent) newClassNames.push('flex-basis-max-content'); + if(maxContent) newClassNames.push("flex-basis-max-content") - if(alignSelf) newClassNames.push('align-self-' + alignSelf); + if(alignSelf) newClassNames.push("self-" + alignSelf) - if(alignItems) newClassNames.push('align-items-' + alignItems); + if(alignItems) newClassNames.push("items-" + alignItems) - if(justifyContent) newClassNames.push('justify-content-' + justifyContent); + if(justifyContent) newClassNames.push("justify-" + justifyContent) - if(!alignItems && !justifyContent && center) newClassNames.push('align-items-center', 'justify-content-center'); + if(!alignItems && !justifyContent && center) newClassNames.push("items-center", "justify-center") - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ inline, gap, maxContent, alignSelf, alignItems, justifyContent, center, classNames ]); + return newClassNames + }, [ inline, gap, maxContent, alignSelf, alignItems, justifyContent, center, classNames ]) const getStyle = useMemo(() => { - let newStyle: CSSProperties = {}; + let newStyle: CSSProperties = {} - if(columnCount) newStyle['--bs-columns'] = columnCount.toString(); + if(columnCount) newStyle["--bs-columns"] = columnCount.toString() - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + if(Object.keys(style).length) newStyle = { ...newStyle, ...style } - return newStyle; - }, [ columnCount, style ]); + return newStyle + }, [ columnCount, style ]) return ( - ); + ) } diff --git a/src/common/GridContext.tsx b/src/common/GridContext.tsx index 821e01b72..3d91279c4 100644 --- a/src/common/GridContext.tsx +++ b/src/common/GridContext.tsx @@ -1,4 +1,4 @@ -import { createContext, FC, ProviderProps, useContext } from 'react'; +import { createContext, FC, ProviderProps, useContext } from "react" export interface IGridContext { @@ -7,11 +7,11 @@ export interface IGridContext const GridContext = createContext({ isCssGrid: false -}); +}) export const GridContextProvider: FC> = props => { return { props.children } } -export const useGridContext = () => useContext(GridContext); +export const useGridContext = () => useContext(GridContext) diff --git a/src/common/HorizontalRule.tsx b/src/common/HorizontalRule.tsx deleted file mode 100644 index 25aeaf996..000000000 --- a/src/common/HorizontalRule.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { CSSProperties, FC, useMemo } from 'react'; -import { Base, BaseProps } from './Base'; -import { ColorVariantType } from './types'; - -export interface HorizontalRuleProps extends BaseProps -{ - variant?: ColorVariantType; - height?: number; -} - -export const HorizontalRule: FC = props => -{ - const { variant = 'black', height = 1, classNames = [], style = {}, ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = []; - - if(variant) newClassNames.push('bg-' + variant); - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ variant, classNames ]); - - const getStyle = useMemo(() => - { - let newStyle: CSSProperties = { display: 'list-item' }; - - if(height > 0) newStyle.height = height; - - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; - - return newStyle; - }, [ height, style ]); - - return ; -} diff --git a/src/common/InfiniteScroll.tsx b/src/common/InfiniteScroll.tsx index f679da0ba..1f2e2e5f2 100644 --- a/src/common/InfiniteScroll.tsx +++ b/src/common/InfiniteScroll.tsx @@ -1,9 +1,9 @@ -import { useVirtual } from '@tanstack/react-virtual'; -import { FC, Fragment, ReactElement, useEffect, useRef, useState } from 'react'; -import { Base } from './Base'; +import { useVirtual } from "@tanstack/react-virtual" +import { FC, Fragment, ReactElement, useEffect, useRef, useState } from "react" interface InfiniteScrollProps { + className: string; rows: T[]; overscan?: number; scrollToBottom?: boolean; @@ -12,39 +12,36 @@ interface InfiniteScrollProps export const InfiniteScroll: FC = props => { - const { rows = [], overscan = 5, scrollToBottom = false, rowRender = null } = props; - const [ scrollIndex, setScrollIndex ] = useState(rows.length - 1); - const elementRef = useRef(null); + const { className = null, rows = [], overscan = 5, scrollToBottom = false, rowRender = null } = props + const [ scrollIndex, setScrollIndex ] = useState(rows.length - 1) + const elementRef = useRef(null) const { virtualItems = [], totalSize = 0, scrollToIndex = null } = useVirtual({ parentRef: elementRef, size: rows.length, overscan - }); + }) const paddingTop = (virtualItems.length > 0) ? (virtualItems?.[0]?.start || 0) : 0 - const paddingBottom = (virtualItems.length > 0) ? (totalSize - (virtualItems?.[virtualItems.length - 1]?.end || 0)) : 0; + const paddingBottom = (virtualItems.length > 0) ? (totalSize - (virtualItems?.[virtualItems.length - 1]?.end || 0)) : 0 useEffect(() => { - if(!scrollToBottom) return; + if(!scrollToBottom) return - scrollToIndex(scrollIndex); - }, [ scrollToBottom, scrollIndex, scrollToIndex ]); + scrollToIndex(scrollIndex) + }, [ scrollToBottom, scrollIndex, scrollToIndex ]) return ( - +
{ (paddingTop > 0) && -
} - { virtualItems.map(item => - { - const row = rows[item.index]; +
} + { virtualItems.map(item => { + const row = rows[item.index] if (!row) return ( - - ); + + ) return (
= props => { rowRender(row) }
) - }) } - { (paddingBottom > 0) && -
} - - ); + })} + { (paddingBottom > 0) &&
} +
+ ) } diff --git a/src/common/Text.tsx b/src/common/Text.tsx index 62cd91ce2..f8b848a26 100644 --- a/src/common/Text.tsx +++ b/src/common/Text.tsx @@ -1,6 +1,6 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from './Base'; -import { ColorVariantType, FontSizeType, FontWeightType, TextAlignType } from './types'; +import { FC, useMemo } from "react" +import { Base, BaseProps } from "./Base" +import { ColorVariantType, FontSizeType, FontWeightType, TextAlignType } from "./types" export interface TextProps extends BaseProps { @@ -22,42 +22,42 @@ export interface TextProps extends BaseProps export const Text: FC = props => { - const { variant = 'black', fontWeight = null, fontSize = 0, align = null, bold = false, underline = false, italics = false, truncate = false, center = false, textEnd = false, small = false, wrap = false, noWrap = false, textBreak = false, ...rest } = props; + const { variant = "black", fontWeight = null, fontSize = 0, align = null, bold = false, underline = false, italics = false, truncate = false, center = false, textEnd = false, small = false, wrap = false, noWrap = false, textBreak = false, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'd-inline' ]; + const newClassNames: string[] = [ "d-inline" ] - if(variant) newClassNames.push('text-' + variant); + if(variant) newClassNames.push("text-" + variant) - if(bold) newClassNames.push('fw-bold'); + if(bold) newClassNames.push("fw-bold") - if(fontWeight) newClassNames.push('fw-' + fontWeight); + if(fontWeight) newClassNames.push("fw-" + fontWeight) - if(fontSize) newClassNames.push('fs-' + fontSize); + if(fontSize) newClassNames.push("fs-" + fontSize) - if(align) newClassNames.push('text-' + align); + if(align) newClassNames.push("text-" + align) - if(underline) newClassNames.push('text-decoration-underline'); + if(underline) newClassNames.push("text-decoration-underline") - if(italics) newClassNames.push('fst-italic'); + if(italics) newClassNames.push("fst-italic") - if(truncate) newClassNames.push('text-truncate'); + if(truncate) newClassNames.push("text-truncate") - if(center) newClassNames.push('text-center'); + if(center) newClassNames.push("text-center") - if(textEnd) newClassNames.push('text-end'); + if(textEnd) newClassNames.push("text-end") - if(small) newClassNames.push('small'); + if(small) newClassNames.push("small") - if(wrap) newClassNames.push('text-wrap'); + if(wrap) newClassNames.push("text-wrap") - if(noWrap) newClassNames.push('text-nowrap'); + if(noWrap) newClassNames.push("text-nowrap") - if(textBreak) newClassNames.push('text-break'); + if(textBreak) newClassNames.push("text-break") - return newClassNames; - }, [ variant, fontWeight, fontSize, align, bold, underline, italics, truncate, center, textEnd, small, wrap, noWrap, textBreak ]); + return newClassNames + }, [ variant, fontWeight, fontSize, align, bold, underline, italics, truncate, center, textEnd, small, wrap, noWrap, textBreak ]) - return ; + return } diff --git a/src/common/card/NitroBigCardContentView.tsx b/src/common/card/NitroBigCardContentView.tsx new file mode 100644 index 000000000..5c6316c78 --- /dev/null +++ b/src/common/card/NitroBigCardContentView.tsx @@ -0,0 +1,27 @@ +import { FC, useMemo } from "react" +import { ColumnProps } from ".." + +export const NitroBigCardContentView: FC = props => +{ + const { classNames = [], className = "", ...rest } = props + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ "illumina-card illumina-card-body flex flex-col p-2.5 overflow-hidden" ] + + if(classNames.length) newClassNames.push(...classNames) + + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) + + return
+} diff --git a/src/common/card/NitroBigCardHeaderView.tsx b/src/common/card/NitroBigCardHeaderView.tsx new file mode 100644 index 000000000..66a4a9993 --- /dev/null +++ b/src/common/card/NitroBigCardHeaderView.tsx @@ -0,0 +1,20 @@ +import { FC } from "react" +import { ColumnProps } from ".." + +interface NitroBigCardHeaderViewProps extends ColumnProps +{ + headerText?: string; +} + +export const NitroBigCardHeaderView: FC = props => +{ + const { headerText = null, children, ...rest } = props + + return ( +
+ {headerText && + { headerText } } + { children } +
+ ) +} diff --git a/src/common/card/NitroBigCardView.tsx b/src/common/card/NitroBigCardView.tsx new file mode 100644 index 000000000..f4bf3fbca --- /dev/null +++ b/src/common/card/NitroBigCardView.tsx @@ -0,0 +1,44 @@ +import { FC, useMemo, useRef } from "react" +import { ColumnProps } from ".." +import { GetConfiguration } from "../../api" +import { DraggableWindowProps } from "../draggable-window" + +export interface NitroBigCardViewProps extends DraggableWindowProps, ColumnProps +{ + onCloseClick?: () => void; +} + +export const NitroBigCardView: FC = props => +{ + const { uniqueKey = null, onCloseClick = null, classNames = [], className = "", ...rest } = props + const elementRef = useRef() + + const isOverlayRadial: boolean = GetConfiguration("illumina.overlay.radial") + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ "relative z-[9999]" ] + + if(classNames.length) newClassNames.push(...classNames) + + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) + + return ( +
+
+
+
+
+
+ ) +} diff --git a/src/common/card/NitroCardContentView.tsx b/src/common/card/NitroCardContentView.tsx index 903b4c5c0..8eac90874 100644 --- a/src/common/card/NitroCardContentView.tsx +++ b/src/common/card/NitroCardContentView.tsx @@ -1,18 +1,27 @@ -import { FC, useMemo } from 'react'; -import { Column, ColumnProps } from '..'; +import { FC, useMemo } from "react" +import { ColumnProps } from ".." export const NitroCardContentView: FC = props => { - const { overflow = 'auto', classNames = [], ...rest } = props; + const { classNames = [], className = "", ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'container-fluid', 'content-area' ]; + const newClassNames: string[] = [ "illumina-card-body flex flex-col px-2.5 pb-2.5 overflow-hidden" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) - return ; + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) + + return
} diff --git a/src/common/card/NitroCardContext.tsx b/src/common/card/NitroCardContext.tsx index 517b435bc..76d652acf 100644 --- a/src/common/card/NitroCardContext.tsx +++ b/src/common/card/NitroCardContext.tsx @@ -1,4 +1,4 @@ -import { createContext, FC, ProviderProps, useContext } from 'react'; +import { createContext, FC, ProviderProps, useContext } from "react" interface INitroCardContext { @@ -7,11 +7,11 @@ interface INitroCardContext const NitroCardContext = createContext({ theme: null -}); +}) export const NitroCardContextProvider: FC> = props => { return { props.children } } -export const useNitroCardContext = () => useContext(NitroCardContext); +export const useNitroCardContext = () => useContext(NitroCardContext) diff --git a/src/common/card/NitroCardHeaderView.tsx b/src/common/card/NitroCardHeaderView.tsx index 98837c763..532b96d1c 100644 --- a/src/common/card/NitroCardHeaderView.tsx +++ b/src/common/card/NitroCardHeaderView.tsx @@ -1,48 +1,32 @@ -import { FC, MouseEvent, useMemo } from 'react'; -import { FaFlag, FaTimes } from 'react-icons/fa'; -import { Base, Column, ColumnProps, Flex } from '..'; +import { FC, MouseEvent } from "react" +import { ColumnProps } from ".." +import { LayoutSubView } from "../layout/LayoutSubView" +import { LayoutTimesView } from "../layout/LayoutTimesView" interface NitroCardHeaderViewProps extends ColumnProps { headerText: string; - isGalleryPhoto?: boolean; + isClose?: boolean; noCloseButton?: boolean; - onReportPhoto?: (event: MouseEvent) => void; onCloseClick: (event: MouseEvent) => void; } export const NitroCardHeaderView: FC = props => { - const { headerText = null, isGalleryPhoto = false, noCloseButton = false, onReportPhoto = null, onCloseClick = null, justifyContent = 'center', alignItems = 'center', classNames = [], children = null, ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'drag-handler', 'container-fluid', 'nitro-card-header' ]; - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ classNames ]); - - const onMouseDown = (event: MouseEvent) => - { - event.stopPropagation(); - event.nativeEvent.stopImmediatePropagation(); - } + const { headerText = null, isClose = true, noCloseButton = null, onCloseClick = null, ...rest } = props return ( - - - { headerText } - { isGalleryPhoto && - - - - } - - - - - - ); +
+
+ { headerText } + {!noCloseButton + ? <> + { isClose + ? + : } + + : null} +
+
+ ) } diff --git a/src/common/card/NitroCardSubHeaderView.tsx b/src/common/card/NitroCardSubHeaderView.tsx deleted file mode 100644 index a37d0bd45..000000000 --- a/src/common/card/NitroCardSubHeaderView.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { FC, useMemo } from 'react'; -import { Flex, FlexProps } from '..'; - -interface NitroCardSubHeaderProps extends FlexProps { - variant?: string; -} -export const NitroCardSubHeaderView: FC = props => -{ - const { justifyContent = 'center', classNames = [], variant = 'muted', ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'container-fluid', 'p-1' ]; - - if(classNames.length) newClassNames.push(...classNames); - - newClassNames.push('bg-' + variant); - - return newClassNames; - }, [ classNames, variant ]); - - return ; -} diff --git a/src/common/card/NitroCardView.scss b/src/common/card/NitroCardView.scss deleted file mode 100644 index a552182e3..000000000 --- a/src/common/card/NitroCardView.scss +++ /dev/null @@ -1,248 +0,0 @@ -$nitro-card-header-height: 33px; -$nitro-card-tabs-height: 33px; - -.nitro-card { - resize: both; - - @include media-breakpoint-down(lg) { - max-width: 100vw !important; - max-height: 100vh !important; - } - - &.theme-primary { - border: $border-width solid $border-color; - - .nitro-card-header { - min-height: 33px; - max-height: 33px; - background: $primary; - - .nitro-card-header-text { - color: $white; - text-shadow: 0px 4px 4px rgba($black, 0.25); - @include font-size($h4-font-size); - } - - .nitro-card-header-close { - cursor: pointer; - padding: 2px 2px; - line-height: 1; - border-radius: $border-radius; - box-shadow: 0 0 0 1.6px $white; - border: 2px solid #921911; - background: repeating-linear-gradient( - rgba(245, 80, 65, 1), - rgba(245, 80, 65, 1) 50%, - rgba(194, 48, 39, 1) 50%, - rgba(194, 48, 39, 1) 100% - ); - - &:hover { - filter: brightness(1.2); - } - - &:active { - filter: brightness(0.8); - } - } - - .nitro-card-header-report-camera { - cursor: pointer; - padding: 1px 3px; - line-height: 1; - border-radius: $border-radius; - box-shadow: 0 0 0 1.6px $white; - border: 2px solid #921911; - background: repeating-linear-gradient( - rgba(245, 80, 65, 1), - rgba(245, 80, 65, 1) 50%, - rgba(194, 48, 39, 1) 50%, - rgba(194, 48, 39, 1) 100% - ); - - &:hover { - filter: brightness(1.2); - } - - &:active { - filter: brightness(0.8); - } - } - } - - .nitro-card-tabs { - background-color: $secondary; - - .nav-item { - padding: $nav-link-padding-y $nav-link-padding-x; - background-color: $muted; - color: $black; - z-index: 1; - margin-bottom: -1px; - - &.active { - background-color: $light; - border-color: $border-color $border-color $light !important; - border-bottom: 1px solid black; - - &:before { - background: $white; - } - } - - &:before { - content: ''; - position: absolute; - width: 93%; - height: 3px; - border-radius: 0.25rem; - top: 1.5px; - left: 0; - right: 0; - margin: auto; - background: #c2c9d1; - z-index: 1; - } - } - } - - .content-area { - background-color: $light; - } - } - - &.theme-primary-slim { - border: $border-width solid $border-color; - - .nitro-card-header { - position: relative; - min-height: 28px; - max-height: 28px; - background: repeating-linear-gradient($tertiary, $tertiary 50%, $quaternary 50%, $quaternary 100%); - border-bottom: 2px solid darken($quaternary, 5); - box-shadow: 0 2px white; - width: 100%; - margin: 0; - padding-top:2px; - - &:before { - position: absolute; - content: ' '; - top: 0; - left: 0; - width: 100%; - height: 2px; - background-color: rgba($white, 0.3); - } - - .nitro-card-header-text { - color: $white; - text-shadow: 0px 4px 4px rgba($black, 0.25); - @include font-size($h5-font-size); - min-height: 21px; - } - - .nitro-card-header-close { - cursor: pointer; - padding: 0px 2px; - line-height: 1; - @include font-size($h7-font-size); - border-radius: $border-radius; - box-shadow: 0 0 0 1.6px $white; - border: 2px solid #921911; - background: repeating-linear-gradient( - rgba(245, 80, 65, 1), - rgba(245, 80, 65, 1) 50%, - rgba(194, 48, 39, 1) 50%, - rgba(194, 48, 39, 1) 100% - ); - - &:hover { - filter: brightness(1.2); - } - - &:active { - filter: brightness(0.8); - } - } - - .nitro-card-header-report-camera { - cursor: pointer; - padding: 0px 2px; - margin-right: 4px; - line-height: 1; - @include font-size($h7-font-size); - border-radius: $border-radius; - box-shadow: 0 0 0 1.6px $white; - border: 2px solid #921911; - background: repeating-linear-gradient( - rgba(245, 80, 65, 1), - rgba(245, 80, 65, 1) 50%, - rgba(194, 48, 39, 1) 50%, - rgba(194, 48, 39, 1) 100% - ); - - &:hover { - filter: brightness(1.2); - } - - &:active { - filter: brightness(0.8); - } - } - } - - .nitro-card-tabs { - background-color: $secondary; - } - - .content-area { - background-color: $light; - } - } -} - -.content-area { - height: 100%; - padding-top: $container-padding-x; - padding-bottom: $container-padding-x; - overflow: auto; - - &.theme-dark { - background-color: #1C323F !important; - } -} - -@include media-breakpoint-down(lg) { - .content-area { - height: 100% !important; - min-height: auto !important; - max-height: 100% !important; - } -} - -.nitro-card-header { - position: relative; - height: 100%; -} - -.nitro-card-tabs { - height: 100%; - min-height: $nitro-card-tabs-height; - max-height: $nitro-card-tabs-height; - border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color; -} - -.nitro-card-accordion-set { - - &.active { - height: 100%; - overflow: hidden; - background: rgba($white, 0.5); - border-bottom: 1px solid rgba($black, 0.2); - } - - .nitro-card-accordion-set-header { - border-bottom: 1px solid rgba($black, 0.2); - } -} diff --git a/src/common/card/NitroCardView.tsx b/src/common/card/NitroCardView.tsx index 46c4126b8..e933c3121 100644 --- a/src/common/card/NitroCardView.tsx +++ b/src/common/card/NitroCardView.tsx @@ -1,64 +1,38 @@ -import { FC, useMemo, useRef } from 'react'; -import { Column, ColumnProps } from '..'; -import { DraggableWindow, DraggableWindowPosition, DraggableWindowProps } from '../draggable-window'; -import { NitroCardContextProvider } from './NitroCardContext'; +import { FC, useMemo, useRef } from "react" +import { ColumnProps } from ".." +import { DraggableWindow, DraggableWindowPosition, DraggableWindowProps } from "../draggable-window" export interface NitroCardViewProps extends DraggableWindowProps, ColumnProps { - theme?: string; + customZIndex?: number; } export const NitroCardView: FC = props => { - const { theme = 'primary', uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, overflow = 'hidden', position = 'relative', gap = 0, classNames = [], ...rest } = props; - const elementRef = useRef(); + const { uniqueKey = null, handleSelector = ".drag-handler", windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, customZIndex = 0, classNames = [], className = "", ...rest } = props + const elementRef = useRef() const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'nitro-card', 'rounded', 'shadow', ]; + const newClassNames: string[] = [ "illumina-card flex flex-col drop-shadow-[4px_4px_4px_#00000017]" ] - newClassNames.push(`theme-${ theme || 'primary' }`); + if(classNames.length) newClassNames.push(...classNames) - if(classNames.length) newClassNames.push(...classNames); + return newClassNames + }, [ classNames ]) - return newClassNames; - }, [ theme, classNames ]); - - /* useEffect(() => + const getClassName = useMemo(() => { - if(!uniqueKey || !elementRef || !elementRef.current) return; - - const localStorage = GetLocalStorage(`nitro.windows.${ uniqueKey }`); - const element = elementRef.current; - - if(localStorage && localStorage.size) - { - //element.style.width = `${ localStorage.size.width }px`; - //element.style.height = `${ localStorage.size.height }px`; - } - - const observer = new ResizeObserver(event => - { - const newStorage = { ...GetLocalStorage>(`nitro.windows.${ uniqueKey }`) } as WindowSaveOptions; - - newStorage.size = { width: element.offsetWidth, height: element.offsetHeight }; - - SetLocalStorage(`nitro.windows.${ uniqueKey }`, newStorage); - }); + let newClassName = getClassNames.join(" ") - observer.observe(element); + if(className.length) newClassName += (" " + className) - return () => - { - observer.disconnect(); - } - }, [ uniqueKey ]); */ + return newClassName.trim() + }, [ getClassNames, className ]) return ( - - - - - - ); + +
+ + ) } diff --git a/src/common/card/accordion/NitroCardAccordionContext.tsx b/src/common/card/accordion/NitroCardAccordionContext.tsx deleted file mode 100644 index 61377d541..000000000 --- a/src/common/card/accordion/NitroCardAccordionContext.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { createContext, Dispatch, FC, ProviderProps, SetStateAction, useContext } from 'react'; - -export interface INitroCardAccordionContext -{ - closers: Function[]; - setClosers: Dispatch>; - closeAll: () => void; -} - -const NitroCardAccordionContext = createContext({ - closers: null, - setClosers: null, - closeAll: null -}); - -export const NitroCardAccordionContextProvider: FC> = props => -{ - return ; -} - -export const useNitroCardAccordionContext = () => useContext(NitroCardAccordionContext); diff --git a/src/common/card/accordion/NitroCardAccordionItemView.tsx b/src/common/card/accordion/NitroCardAccordionItemView.tsx deleted file mode 100644 index dbd89cc28..000000000 --- a/src/common/card/accordion/NitroCardAccordionItemView.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { FC } from 'react'; -import { Flex, FlexProps } from '../..'; - -export interface NitroCardAccordionItemViewProps extends FlexProps -{ - -} - -export const NitroCardAccordionItemView: FC = props => -{ - const { alignItems = 'center', gap = 1, children = null, ...rest } = props; - - return ( - - { children } - - ); -} diff --git a/src/common/card/accordion/NitroCardAccordionSetView.tsx b/src/common/card/accordion/NitroCardAccordionSetView.tsx deleted file mode 100644 index d9e0656e9..000000000 --- a/src/common/card/accordion/NitroCardAccordionSetView.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { FaCaretDown, FaCaretUp } from 'react-icons/fa'; -import { Column, ColumnProps, Flex, Text } from '../..'; -import { useNitroCardAccordionContext } from './NitroCardAccordionContext'; - -export interface NitroCardAccordionSetViewProps extends ColumnProps -{ - headerText: string; - isExpanded?: boolean; -} - -export const NitroCardAccordionSetView: FC = props => -{ - const { headerText = '', isExpanded = false, gap = 0, classNames = [], children = null, ...rest } = props; - const [ isOpen, setIsOpen ] = useState(false); - const { setClosers = null, closeAll = null } = useNitroCardAccordionContext(); - - const onClick = () => - { - closeAll(); - - setIsOpen(prevValue => !prevValue); - } - - const onClose = useCallback(() => setIsOpen(false), []); - - const getClassNames = useMemo(() => - { - const newClassNames = [ 'nitro-card-accordion-set' ]; - - if(isOpen) newClassNames.push('active'); - - if(classNames && classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ isOpen, classNames ]); - - useEffect(() => - { - setIsOpen(isExpanded); - }, [ isExpanded ]); - - useEffect(() => - { - const closeFunction = onClose; - - setClosers(prevValue => - { - const newClosers = [ ...prevValue ]; - - newClosers.push(closeFunction); - - return newClosers; - }); - - return () => - { - setClosers(prevValue => - { - const newClosers = [ ...prevValue ]; - - const index = newClosers.indexOf(closeFunction); - - if(index >= 0) newClosers.splice(index, 1); - - return newClosers; - }); - } - }, [ onClose, setClosers ]); - - return ( - - - { headerText } - { isOpen && } - { !isOpen && } - - { isOpen && - - { children } - } - - ); -} diff --git a/src/common/card/accordion/NitroCardAccordionView.tsx b/src/common/card/accordion/NitroCardAccordionView.tsx deleted file mode 100644 index 648a2e7d2..000000000 --- a/src/common/card/accordion/NitroCardAccordionView.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { FC, useCallback, useState } from 'react'; -import { Column, ColumnProps } from '../..'; -import { NitroCardAccordionContextProvider } from './NitroCardAccordionContext'; - -interface NitroCardAccordionViewProps extends ColumnProps -{ - -} - -export const NitroCardAccordionView: FC = props => -{ - const { ...rest } = props; - const [ closers, setClosers ] = useState([]); - - const closeAll = useCallback(() => - { - for(const closer of closers) closer(); - }, [ closers ]); - - return ( - - - - ); -} diff --git a/src/common/card/accordion/index.ts b/src/common/card/accordion/index.ts deleted file mode 100644 index d585b3362..000000000 --- a/src/common/card/accordion/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './NitroCardAccordionContext'; -export * from './NitroCardAccordionItemView'; -export * from './NitroCardAccordionSetView'; -export * from './NitroCardAccordionView'; diff --git a/src/common/card/index.ts b/src/common/card/index.ts index 3619d4377..3d9283b1e 100644 --- a/src/common/card/index.ts +++ b/src/common/card/index.ts @@ -1,7 +1,9 @@ -export * from './accordion'; -export * from './NitroCardContentView'; -export * from './NitroCardContext'; -export * from './NitroCardHeaderView'; -export * from './NitroCardSubHeaderView'; -export * from './NitroCardView'; -export * from './tabs'; +export * from "./NitroBigCardContentView" +export * from "./NitroBigCardHeaderView" +export * from "./NitroBigCardView" +export * from "./NitroCardContentView" +export * from "./NitroCardContext" +export * from "./NitroCardHeaderView" +export * from "./NitroCardView" +export * from "./tabs" + diff --git a/src/common/card/tabs/NitroCardTabsItemView.tsx b/src/common/card/tabs/NitroCardTabsItemView.tsx index 1c74f8b18..0a8af505c 100644 --- a/src/common/card/tabs/NitroCardTabsItemView.tsx +++ b/src/common/card/tabs/NitroCardTabsItemView.tsx @@ -1,6 +1,6 @@ -import { FC, useMemo } from 'react'; -import { Flex, FlexProps } from '../../Flex'; -import { LayoutItemCountView } from '../../layout'; +import { FC, useMemo } from "react" +import { FlexProps } from "../../Flex" +import { LayoutItemCountView } from "../../layout" interface NitroCardTabsItemViewProps extends FlexProps { @@ -10,26 +10,34 @@ interface NitroCardTabsItemViewProps extends FlexProps export const NitroCardTabsItemView: FC = props => { - const { isActive = false, count = 0, overflow = 'hidden', position = 'relative', pointer = true, classNames = [], children = null, ...rest } = props; + const { isActive = false, count = 0, classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'nav-item', 'rounded-top', 'border' ]; + const newClassNames: string[] = [ "illumina-tab-item illumina-btn-primary flex justify-center items-center relative cursor-pointer h-[27px] px-3 text-[13px] !font-normal" ] - if(isActive) newClassNames.push('active'); + if(isActive) newClassNames.push("active") - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ isActive, classNames ]); + return newClassNames + }, [ isActive, classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) return ( - - +
+
{ children } - - { (count > 0) && - } - - ); +
+ { (count > 0) && } +
+ ) } diff --git a/src/common/card/tabs/NitroCardTabsView.tsx b/src/common/card/tabs/NitroCardTabsView.tsx index 1a64a1261..9b35f26fc 100644 --- a/src/common/card/tabs/NitroCardTabsView.tsx +++ b/src/common/card/tabs/NitroCardTabsView.tsx @@ -1,22 +1,31 @@ -import { FC, useMemo } from 'react'; -import { Flex, FlexProps } from '../..'; +import { FC, useMemo } from "react" +import { FlexProps } from "../.." export const NitroCardTabsView: FC = props => { - const { justifyContent = 'center', gap = 1, classNames = [], children = null, ...rest } = props; + const { classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'container-fluid', 'nitro-card-tabs', 'pt-1' ]; + const newClassNames: string[] = [ "flex justify-center items-end px-2.5 gap-1" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) return ( - +
{ children } - - ); +
+ ) } diff --git a/src/common/card/tabs/index.ts b/src/common/card/tabs/index.ts index 517db1146..cd7d28cdb 100644 --- a/src/common/card/tabs/index.ts +++ b/src/common/card/tabs/index.ts @@ -1,2 +1,2 @@ -export * from './NitroCardTabsItemView'; -export * from './NitroCardTabsView'; +export * from "./NitroCardTabsItemView" +export * from "./NitroCardTabsView" diff --git a/src/common/classNames.ts b/src/common/classNames.ts index 2127d85ef..8640b411a 100644 --- a/src/common/classNames.ts +++ b/src/common/classNames.ts @@ -1 +1 @@ -export const classNames = (...classes: string[]) => classes.filter(Boolean).join(' '); +export const classNames = (...classes: string[]) => classes.filter(Boolean).join(" ") diff --git a/src/common/draggable-window/DraggableWindow.tsx b/src/common/draggable-window/DraggableWindow.tsx index 286d51d18..814102545 100644 --- a/src/common/draggable-window/DraggableWindow.tsx +++ b/src/common/draggable-window/DraggableWindow.tsx @@ -1,13 +1,12 @@ -import { MouseEventType, TouchEventType } from '@nitrots/nitro-renderer'; -import { CSSProperties, FC, Key, MouseEvent as ReactMouseEvent, ReactNode, TouchEvent as ReactTouchEvent, useCallback, useEffect, useRef, useState } from 'react'; -import { createPortal } from 'react-dom'; -import { Base } from '..'; -import { GetLocalStorage, SetLocalStorage, WindowSaveOptions } from '../../api'; -import { DraggableWindowPosition } from './DraggableWindowPosition'; +import { MouseEventType, TouchEventType } from "@nitrots/nitro-renderer" +import { CSSProperties, FC, Key, MouseEvent as ReactMouseEvent, ReactNode, TouchEvent as ReactTouchEvent, useCallback, useEffect, useRef, useState } from "react" +import { createPortal } from "react-dom" +import { GetLocalStorage, SetLocalStorage, WindowSaveOptions } from "../../api" +import { DraggableWindowPosition } from "./DraggableWindowPosition" -const CURRENT_WINDOWS: HTMLElement[] = []; -const BOUNDS_THRESHOLD_TOP: number = 0; -const BOUNDS_THRESHOLD_LEFT: number = 0; +const CURRENT_WINDOWS: HTMLElement[] = [] +const BOUNDS_THRESHOLD_TOP: number = 0 +const BOUNDS_THRESHOLD_LEFT: number = 0 export interface DraggableWindowProps { @@ -15,6 +14,7 @@ export interface DraggableWindowProps handleSelector?: string; windowPosition?: string; disableDrag?: boolean; + customZIndex?: number; dragStyle?: CSSProperties; offsetLeft?: number; offsetTop?: number; @@ -23,248 +23,256 @@ export interface DraggableWindowProps export const DraggableWindow: FC = props => { - const { uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, dragStyle = {}, children = null, offsetLeft = 0, offsetTop = 0 } = props; - const [ delta, setDelta ] = useState<{ x: number, y: number }>(null); - const [ offset, setOffset ] = useState<{ x: number, y: number }>(null); - const [ start, setStart ] = useState<{ x: number, y: number }>({ x: 0, y: 0 }); - const [ isDragging, setIsDragging ] = useState(false); - const [ dragHandler, setDragHandler ] = useState(null); - const elementRef = useRef(); + const { uniqueKey = null, handleSelector = ".drag-handler", windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, customZIndex = 0, dragStyle = {}, children = null, offsetLeft = 0, offsetTop = 0 } = props + const [ delta, setDelta ] = useState<{ x: number, y: number }>(null) + const [ offset, setOffset ] = useState<{ x: number, y: number }>(null) + const [ start, setStart ] = useState<{ x: number, y: number }>({ x: 0, y: 0 }) + const [ isDragging, setIsDragging ] = useState(false) + const [ dragHandler, setDragHandler ] = useState(null) + const elementRef = useRef() const bringToTop = useCallback(() => { - let zIndex = 400; + let zIndex = 400 for(const existingWindow of CURRENT_WINDOWS) { - zIndex += 1; - - existingWindow.style.zIndex = zIndex.toString(); + zIndex += 1 + existingWindow.style.zIndex = zIndex.toString() } - }, []); + }, []) const moveCurrentWindow = useCallback(() => { - const index = CURRENT_WINDOWS.indexOf(elementRef.current); + const index = CURRENT_WINDOWS.indexOf(elementRef.current) if(index === -1) { - CURRENT_WINDOWS.push(elementRef.current); + CURRENT_WINDOWS.push(elementRef.current) } - else if(index === (CURRENT_WINDOWS.length - 1)) return; + else if(index === (CURRENT_WINDOWS.length - 1)) return else if(index >= 0) { - CURRENT_WINDOWS.splice(index, 1); + CURRENT_WINDOWS.splice(index, 1) - CURRENT_WINDOWS.push(elementRef.current); + CURRENT_WINDOWS.push(elementRef.current) } - bringToTop(); - }, [ bringToTop ]); + if(customZIndex > 0) { + elementRef.current.style.zIndex = customZIndex.toString() + return + } else { + bringToTop() + } + }, [ bringToTop, customZIndex ]) const onMouseDown = useCallback((event: ReactMouseEvent) => { - moveCurrentWindow(); - }, [ moveCurrentWindow ]); + moveCurrentWindow() + }, [ moveCurrentWindow ]) const onTouchStart = useCallback((event: ReactTouchEvent) => { - moveCurrentWindow(); - }, [ moveCurrentWindow ]); + moveCurrentWindow() + }, [ moveCurrentWindow ]) const startDragging = useCallback((startX: number, startY: number) => { - setStart({ x: startX, y: startY }); - setIsDragging(true); - }, []); + setStart({ x: startX, y: startY }) + setIsDragging(true) + }, []) const onDragMouseDown = useCallback((event: MouseEvent) => { - startDragging(event.clientX, event.clientY); - }, [ startDragging ]); + startDragging(event.clientX, event.clientY) + }, [ startDragging ]) const onTouchDown = useCallback((event: TouchEvent) => { - const touch = event.touches[0]; + const touch = event.touches[0] - startDragging(touch.clientX, touch.clientY); - }, [ startDragging ]); + startDragging(touch.clientX, touch.clientY) + }, [ startDragging ]) const onDragMouseMove = useCallback((event: MouseEvent) => { - setDelta({ x: (event.clientX - start.x), y: (event.clientY - start.y) }); - }, [ start ]); + setDelta({ x: (event.clientX - start.x), y: (event.clientY - start.y) }) + }, [ start ]) const onDragTouchMove = useCallback((event: TouchEvent) => { - const touch = event.touches[0]; + const touch = event.touches[0] - setDelta({ x: (touch.clientX - start.x), y: (touch.clientY - start.y) }); - }, [ start ]); + setDelta({ x: (touch.clientX - start.x), y: (touch.clientY - start.y) }) + }, [ start ]) const completeDrag = useCallback(() => { - if(!elementRef.current || !dragHandler) return; + if(!elementRef.current || !dragHandler) return - let offsetX = (offset.x + delta.x); - let offsetY = (offset.y + delta.y); + let offsetX = (offset.x + delta.x) + let offsetY = (offset.y + delta.y) - const left = elementRef.current.offsetLeft + offsetX; - const top = elementRef.current.offsetTop + offsetY; + const left = elementRef.current.offsetLeft + offsetX + const top = elementRef.current.offsetTop + offsetY if(top < BOUNDS_THRESHOLD_TOP) { - offsetY = -elementRef.current.offsetTop; + offsetY = -elementRef.current.offsetTop } else if((top + dragHandler.offsetHeight) >= (document.body.offsetHeight - BOUNDS_THRESHOLD_TOP)) { - offsetY = (document.body.offsetHeight - elementRef.current.offsetHeight) - elementRef.current.offsetTop; + offsetY = (document.body.offsetHeight - elementRef.current.offsetHeight) - elementRef.current.offsetTop } if((left + elementRef.current.offsetWidth) < BOUNDS_THRESHOLD_LEFT) { - offsetX = -elementRef.current.offsetLeft; + offsetX = -elementRef.current.offsetLeft } else if(left >= (document.body.offsetWidth - BOUNDS_THRESHOLD_LEFT)) { - offsetX = (document.body.offsetWidth - elementRef.current.offsetWidth) - elementRef.current.offsetLeft; + offsetX = (document.body.offsetWidth - elementRef.current.offsetWidth) - elementRef.current.offsetLeft } - setDelta({ x: 0, y: 0 }); - setOffset({ x: offsetX, y: offsetY }); - setIsDragging(false); + setDelta({ x: 0, y: 0 }) + setOffset({ x: offsetX, y: offsetY }) + setIsDragging(false) if(uniqueKey !== null) { - const newStorage = { ...GetLocalStorage(`nitro.windows.${ uniqueKey }`) } as WindowSaveOptions; + const newStorage = { ...GetLocalStorage(`nitro.windows.${ uniqueKey }`) } as WindowSaveOptions - newStorage.offset = { x: offsetX, y: offsetY }; + newStorage.offset = { x: offsetX, y: offsetY } - SetLocalStorage(`nitro.windows.${ uniqueKey }`, newStorage); + SetLocalStorage(`nitro.windows.${ uniqueKey }`, newStorage) } - }, [ dragHandler, delta, offset, uniqueKey ]); + }, [ dragHandler, delta, offset, uniqueKey ]) const onDragMouseUp = useCallback((event: MouseEvent) => { - completeDrag(); - }, [ completeDrag ]); + completeDrag() + }, [ completeDrag ]) const onDragTouchUp = useCallback((event: TouchEvent) => { - completeDrag(); - }, [ completeDrag ]); + completeDrag() + }, [ completeDrag ]) useEffect(() => { - const element = (elementRef.current as HTMLElement); - - if(!element) return; + const element = (elementRef.current as HTMLElement) - CURRENT_WINDOWS.push(element); + if(!element) return - bringToTop(); + CURRENT_WINDOWS.push(element) if(!disableDrag) { - const handle = (element.querySelector(handleSelector) as HTMLElement); + const handle = (element.querySelector(handleSelector) as HTMLElement) - if(handle) setDragHandler(handle); + if(handle) setDragHandler(handle) } - let offsetX = 0; - let offsetY = 0; + let offsetX = 0 + let offsetY = 0 switch(windowPosition) { - case DraggableWindowPosition.TOP_CENTER: - element.style.top = 50 + offsetTop + 'px'; - element.style.left = `calc(50vw - ${ (element.offsetWidth / 2 + offsetLeft) }px)`; - break; - case DraggableWindowPosition.CENTER: - element.style.top = `calc(50vh - ${ (element.offsetHeight / 2) + offsetTop }px)`; - element.style.left = `calc(50vw - ${ (element.offsetWidth / 2) + offsetLeft }px)`; - break; - case DraggableWindowPosition.TOP_LEFT: - element.style.top = 50 + offsetTop + 'px'; - element.style.left = 50 + offsetLeft + 'px'; - break; + case DraggableWindowPosition.TOP_CENTER: + element.style.top = 50 + offsetTop + "px" + element.style.left = `calc(50vw - ${ (element.offsetWidth / 2 + offsetLeft) }px)` + break + case DraggableWindowPosition.CENTER: + element.style.top = `calc(50vh - ${ (element.offsetHeight / 2) + offsetTop }px)` + element.style.left = `calc(50vw - ${ (element.offsetWidth / 2) + offsetLeft }px)` + break + case DraggableWindowPosition.TOP_LEFT: + element.style.top = 50 + offsetTop + "px" + element.style.left = 50 + offsetLeft + "px" + break + } + + if(customZIndex > 0) { + element.style.zIndex = customZIndex.toString() + } else { + bringToTop() } - setDelta({ x: 0, y: 0 }); - setOffset({ x: offsetX, y: offsetY }); + setDelta({ x: 0, y: 0 }) + setOffset({ x: offsetX, y: offsetY }) return () => { - const index = CURRENT_WINDOWS.indexOf(element); + const index = CURRENT_WINDOWS.indexOf(element) - if(index >= 0) CURRENT_WINDOWS.splice(index, 1); + if(index >= 0) CURRENT_WINDOWS.splice(index, 1) } - }, [ handleSelector, windowPosition, uniqueKey, disableDrag, offsetLeft, offsetTop, bringToTop ]); + }, [ handleSelector, windowPosition, uniqueKey, disableDrag, offsetLeft, offsetTop, bringToTop, customZIndex ]) useEffect(() => { - if(!offset && !delta) return; + if(!offset && !delta) return - const element = (elementRef.current as HTMLElement); + const element = (elementRef.current as HTMLElement) - if(!element) return; + if(!element) return - element.style.transform = `translate(${ offset.x + delta.x }px, ${ offset.y + delta.y }px)`; - element.style.visibility = 'visible'; - }, [ offset, delta ]); + element.style.transform = `translate(${ offset.x + delta.x }px, ${ offset.y + delta.y }px)` + element.style.visibility = "visible" + }, [ offset, delta ]) useEffect(() => { - if(!dragHandler) return; + if(!dragHandler) return - dragHandler.addEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown); - dragHandler.addEventListener(TouchEventType.TOUCH_START, onTouchDown); + dragHandler.addEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown) + dragHandler.addEventListener(TouchEventType.TOUCH_START, onTouchDown) return () => { - dragHandler.removeEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown); - dragHandler.removeEventListener(TouchEventType.TOUCH_START, onTouchDown); + dragHandler.removeEventListener(MouseEventType.MOUSE_DOWN, onDragMouseDown) + dragHandler.removeEventListener(TouchEventType.TOUCH_START, onTouchDown) } - }, [ dragHandler, onDragMouseDown, onTouchDown ]); + }, [ dragHandler, onDragMouseDown, onTouchDown ]) useEffect(() => { - if(!isDragging) return; + if(!isDragging) return - document.addEventListener(MouseEventType.MOUSE_UP, onDragMouseUp); - document.addEventListener(TouchEventType.TOUCH_END, onDragTouchUp); - document.addEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove); - document.addEventListener(TouchEventType.TOUCH_MOVE, onDragTouchMove); + document.addEventListener(MouseEventType.MOUSE_UP, onDragMouseUp) + document.addEventListener(TouchEventType.TOUCH_END, onDragTouchUp) + document.addEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove) + document.addEventListener(TouchEventType.TOUCH_MOVE, onDragTouchMove) return () => { - document.removeEventListener(MouseEventType.MOUSE_UP, onDragMouseUp); - document.removeEventListener(TouchEventType.TOUCH_END, onDragTouchUp); - document.removeEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove); - document.removeEventListener(TouchEventType.TOUCH_MOVE, onDragTouchMove); + document.removeEventListener(MouseEventType.MOUSE_UP, onDragMouseUp) + document.removeEventListener(TouchEventType.TOUCH_END, onDragTouchUp) + document.removeEventListener(MouseEventType.MOUSE_MOVE, onDragMouseMove) + document.removeEventListener(TouchEventType.TOUCH_MOVE, onDragTouchMove) } - }, [ isDragging, onDragMouseUp, onDragMouseMove, onDragTouchUp, onDragTouchMove ]); + }, [ isDragging, onDragMouseUp, onDragMouseMove, onDragTouchUp, onDragTouchMove ]) useEffect(() => { - if(!uniqueKey) return; + if(!uniqueKey) return - const localStorage = GetLocalStorage(`nitro.windows.${ uniqueKey }`); + const localStorage = GetLocalStorage(`nitro.windows.${ uniqueKey }`) - if(!localStorage || !localStorage.offset) return; + if(!localStorage || !localStorage.offset) return - setDelta({ x: 0, y: 0 }); - if(localStorage.offset) setOffset(localStorage.offset); - }, [ uniqueKey ]); + setDelta({ x: 0, y: 0 }) + if(localStorage.offset) setOffset(localStorage.offset) + }, [ uniqueKey ]) return ( createPortal( - +
{ children } - , document.getElementById('draggable-windows-container')) - ); +
, document.getElementById("draggable-windows-container")) + ) } diff --git a/src/common/draggable-window/DraggableWindowPosition.ts b/src/common/draggable-window/DraggableWindowPosition.ts index 476a37ec9..b7016f955 100644 --- a/src/common/draggable-window/DraggableWindowPosition.ts +++ b/src/common/draggable-window/DraggableWindowPosition.ts @@ -1,7 +1,7 @@ export class DraggableWindowPosition { - public static CENTER: string = 'DWP_CENTER'; - public static TOP_CENTER: string = 'DWP_TOP_CENTER'; - public static TOP_LEFT: string = 'DWP_TOP_LEFT'; - public static NOTHING: string = 'DWP_NOTHING'; + public static CENTER: string = "DWP_CENTER" + public static TOP_CENTER: string = "DWP_TOP_CENTER" + public static TOP_LEFT: string = "DWP_TOP_LEFT" + public static NOTHING: string = "DWP_NOTHING" } diff --git a/src/common/draggable-window/index.ts b/src/common/draggable-window/index.ts index 7672f5270..21172d828 100644 --- a/src/common/draggable-window/index.ts +++ b/src/common/draggable-window/index.ts @@ -1,2 +1,2 @@ -export * from './DraggableWindow'; -export * from './DraggableWindowPosition'; +export * from "./DraggableWindow" +export * from "./DraggableWindowPosition" diff --git a/src/common/index.scss b/src/common/index.scss deleted file mode 100644 index bc4a01b0b..000000000 --- a/src/common/index.scss +++ /dev/null @@ -1,561 +0,0 @@ -.layout-grid-item { - height: var(--nitro-grid-column-min-height, unset); - background-position: center; - background-repeat: no-repeat; - background-color: $grid-bg-color; - - &.active { - border-color: $grid-active-border-color !important; - - &:not(.clear-bg) { - background-color: $grid-active-bg-color !important; - } - } - - &.disabled { - cursor: not-allowed; - - img { - opacity: 0.5; - filter: grayscale(1); - } - } - - &.unseen { - background-color: rgba($success, 0.4); - } - - .avatar-image { - background-position-y: -35px; - } - - &.has-highlight { - &:after { - content: ''; - z-index: 2; - position: absolute; - top: 0; - left: 0; - right: 0; - height: 50%; - background-color: $white; - opacity: 0.1; - } - } -} - -.nitro-room-thumbnail-camera { - width: 132px; - height: 192px; - background-image: url('@/assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png'); - - .camera-frame { - position: absolute; - width: 110px; - height: 110px; - margin-top: 30px; - margin-left: 3px; - } -} - -.nitro-layout-trophy { - position: relative; - width: 340px; - height: 173px; - color: black; - pointer-events: all; - - background-position: 0px 0px; - background-image: url('@/assets/images/room-widgets/trophy-widget/trophy-spritesheet.png'); - - &.trophy-2 { - background-position: 0px 173px; - } - - &.trophy-3 { - background-position: 0px 346px; - } - - .trophy-header { - height: 22px; - - .trophy-close { - width: 15px; - height: 15px; - right: 5.5px; - top: 5px; - } - } - - .trophy-content { - width: 297px; - height: 116px; - white-space: pre-wrap; - overflow: auto; - } - - .trophy-footer { - width: 297px; - } -} - -.nitro-gift-card { - width: 306px; - height: 159px; - background: url('@/assets/images/gift/gift_tag.png') center no-repeat; - - .gift-face { - width: 65px; - - .gift-incognito { - width: 37px; - height: 48px; - background: url('@/assets/images/gift/incognito.png') center no-repeat; - } - - .gift-avatar { - position: relative; - overflow: hidden; - width: 40px; - height: 50px; - - .avatar-image { - position: absolute; - left: -25px; - top: -20px; - } - } - } - - .gift-message { - width: 100%; - min-width: 100%; - max-width: 100%; - border: none; - resize: none; - outline: none; - line-height: 17px; - } -} - -.spinner-container { - display: flex; - align-items: center; - justify-content: center; - - .spinner { - margin: 2px; - width: 10px; - height: 10px; - border: $border-width solid $white; - background-color: rgba($white, 0.8); - border-radius: 100%; - display: inline-block; - -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; - animation: sk-bouncedelay 1.4s infinite ease-in-out both; - - &:nth-child(1) { - -webkit-animation-delay: -0.32s; - animation-delay: -0.32s; - } - - &:nth-child(2) { - -webkit-animation-delay: -0.16s; - animation-delay: -0.16s; - } - } -} - -@-webkit-keyframes sk-bouncedelay { - - 0%, - 80%, - 100% { - -webkit-transform: scale(0); - } - - 40% { - -webkit-transform: scale(1); - } -} - -@keyframes sk-bouncedelay { - - 0%, - 80%, - 100% { - -webkit-transform: scale(0); - transform: scale(0); - } - - 40% { - -webkit-transform: scale(1); - transform: scale(1); - } -} - -.room-thumbnail { - position: relative; - width: 110px; - height: 110px; - background: url('@/assets/images/navigator/thumbnail_placeholder.png') no-repeat center; - background-color: rgba($black, 0.125); -} - -#draggable-windows-container { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - pointer-events: none; - overflow: hidden; - - @include media-breakpoint-down(lg) { - display: flex; - justify-content: center; - align-items: center; - } - - .draggable-window { - display: inline-block; - visibility: hidden; - pointer-events: all; - } -} - -.nitro-currency-icon { - background-position: center; - background-repeat: no-repeat; - width: 15px; - height: 15px; -} - -.nitro-item-count { - top: 2px; - right: 2px; - font-size: 9.5px; - padding: 2px 3px; - z-index: 1; -} - -.badge-image { - position: relative; - width: 40px; - height: 40px; - background-repeat: no-repeat; - background-position: center; - - .badge-information { - display: none; - } - - &:hover { - .badge-information { - display: block; - } - } - - .badge-information { - position: absolute; - pointer-events: none; - user-select: none; - width: 210px; - border-radius: $border-radius; - background: $white; - left: -220px; - z-index: 100; - - &:before { - position: absolute; - content: ' '; - width: 0; - height: 0; - border-left: 10px solid $white; - border-bottom: 10px solid transparent; - border-top: 10px solid transparent; - top: 10px; - right: -10px; - } - } -} - -.furni-image { - position: relative; - width: 100%; - height: 100%; - background-repeat: no-repeat; - background-position: center; -} - -.nitro-rarity-level { - width: 36px; - height: 28px; - background: url('@/assets/images/infostand/rarity-level.png'); - - div { - line-height: 28px; - text-align: center; - color: $black; - font-weight: bold; - } -} - -.nitro-counter-time { - width: 36px; - height: 28px; - background: url('@/assets/images/infostand/countown-timer.png'); - - div { - line-height: 28px; - text-align: center; - color: $white; - font-weight: bold; - } -} - -.avatar-image { - position: relative; - width: 90px; - height: 130px; - background-repeat: no-repeat; - background-position: center -8px; - pointer-events: none; -} - -.pet-image { - position: relative; - width: 100%; - height: 100%; - background-repeat: no-repeat; - background-position: center; -} - -.room-preview-container { - position: relative; - width: 100%; - - .room-preview-image { - position: relative; - top: 0; - left: 0; - height: 100%; - width: 100%; - border-radius: $border-radius; - background-color: $light; - background-repeat: no-repeat; - background-position: center; - overflow: hidden; - - &.border-0 { - &::after { - content: none; - } - } - - &::after { - position: absolute; - content: ''; - top: 0; - bottom: 0; - left: 0; - right: 0; - border-radius: $border-radius; - border-bottom: 2px solid white; - border-right: 2px solid white; - box-shadow: -2px -2px rgba(0, 0, 0, 0.4), - inset 3px 3px rgba(0, 0, 0, 0.2); - } - } -} - -.unique-item { - .unique-bg-override { - background-position: center; - background-repeat: no-repeat; - z-index: 2; - } - - &:before { - position: absolute; - content: ''; - width: 100%; - height: 100%; - background: url('@/assets/images/unique/grid-bg.png') center no-repeat; - z-index: 1; - } - - &:after { - position: absolute; - content: ''; - width: 100%; - height: 100%; - background: url('@/assets/images/unique/grid-bg-glass.png') center no-repeat; - bottom: 0; - z-index: 4; - } - - &.sold-out:after { - background: url('@/assets/images/unique/grid-bg-sold-out.png') center no-repeat, - url('@/assets/images/unique/grid-bg-glass.png') center no-repeat; - } - - .unique-item-counter { - margin: 0 auto; - display: flex; - justify-content: center; - align-items: center; - bottom: 1px; - width: 100%; - height: 9px; - background: url('@/assets/images/unique/grid-count-bg.png') center no-repeat; - z-index: 3; - } -} - -.unique-sold-out-blocker { - width: 364px; - height: 30px; - background: url('@/assets/images/unique/catalog-info-sold-out.png'); - - div { - float: right; - width: 140px; - text-align: center; - font-weight: bold; - margin-top: 5px; - margin-right: 17px; - color: #000; - } -} - -.unique-compact-plate { - display: flex; - flex-direction: column; - justify-content: flex-end; - align-items: center; - right: 16px; - width: 34px; - height: 37px; - background: url('@/assets/images/unique/inventory-info-amount-bg.png'); - - div { - display: flex; - justify-content: center; - align-items: center; - height: 9.5px; - } -} - -.unique-complete-plate { - width: 170px; - height: 29px; - background: url('@/assets/images/unique/catalog-info-amount-bg.png') no-repeat center; - z-index: 1; - padding-top: 3px; - - .plate-container { - margin-left: 45px; - width: 100px; - font-size: 10px; - color: black; - - > :first-child { - margin-bottom: 2px; - } - } -} - -.limited-edition-number { - display: inline-block; - outline: 0; - height: 5px; - margin-right: 1px; - background-image: url('@/assets/images/unique/numbers.png'); - background-repeat: no-repeat; - - &:last-child { - margin-right: 0px; - } - - &.n-0 { - width: 4px; - background-position: -1px 0px; - } - - &.n-1 { - width: 2px; - background-position: -6px 0px; - } - - &.n-2 { - width: 4px; - background-position: -9px 0px; - } - - &.n-3 { - width: 4px; - background-position: -14px 0px; - } - - &.n-4 { - width: 4px; - background-position: -19px 0px; - } - - &.n-5 { - width: 4px; - background-position: -24px 0px; - } - - &.n-6 { - width: 4px; - background-position: -29px 0px; - } - - &.n-7 { - width: 4px; - background-position: -34px 0px; - } - - &.n-8 { - width: 4px; - background-position: -39px 0px; - } - - &.n-9 { - width: 4px; - background-position: -44px 0px; - } -} - -.nitro-progress-bar { - border: 1px solid $white; - padding: 2px; - height: 20px; - border-radius: $border-radius; - overflow: hidden; - background: $primary; - - &.large { - height: 30px; - } - - .nitro-progress-bar-inner { - height: 100%; - z-index: 1; - transition: all 1s; - border-radius: calc(#{$border-radius} / 2); - background: repeating-linear-gradient($tertiary, - $tertiary 50%, - $quaternary 50%, - $quaternary 100%); - } - - .nitro-progress-bar-text { - text-shadow: 0px 4px 4px rgba($black, 0.25); - z-index: 2; - } -} - -@import './card/NitroCardView'; diff --git a/src/common/index.ts b/src/common/index.ts index 3722c52f4..b18fee89b 100644 --- a/src/common/index.ts +++ b/src/common/index.ts @@ -1,22 +1,17 @@ -export * from './AutoGrid'; -export * from './Base'; -export * from './Button'; -export * from './ButtonGroup'; -export * from './card'; -export * from './card/accordion'; -export * from './card/tabs'; -export * from './classNames'; -export * from './Column'; -export * from './draggable-window'; -export * from './Flex'; -export * from './FormGroup'; -export * from './Grid'; -export * from './GridContext'; -export * from './HorizontalRule'; -export * from './InfiniteScroll'; -export * from './layout'; -export * from './layout/limited-edition'; -export * from './Text'; -export * from './transitions'; -export * from './types'; -export * from './utils'; +export * from "./Base" +export * from "./Button" +export * from "./Column" +export * from "./Flex" +export * from "./Grid" +export * from "./GridContext" +export * from "./InfiniteScroll" +export * from "./Text" +export * from "./card" +export * from "./card/tabs" +export * from "./classNames" +export * from "./draggable-window" +export * from "./layout" +export * from "./layout/limited-edition" +export * from "./transitions" +export * from "./types" +export * from "./utils" diff --git a/src/common/layout/LayoutAvatarImageView.tsx b/src/common/layout/LayoutAvatarImageView.tsx index d127bd993..cae2e95a6 100644 --- a/src/common/layout/LayoutAvatarImageView.tsx +++ b/src/common/layout/LayoutAvatarImageView.tsx @@ -1,7 +1,7 @@ -import { AvatarScaleType, AvatarSetType } from '@nitrots/nitro-renderer'; -import { CSSProperties, FC, useEffect, useMemo, useRef, useState } from 'react'; -import { GetAvatarRenderManager } from '../../api'; -import { Base, BaseProps } from '../Base'; +import { AvatarScaleType, AvatarSetType } from "@nitrots/nitro-renderer" +import { CSSProperties, FC, useEffect, useMemo, useRef, useState } from "react" +import { GetAvatarRenderManager } from "../../api" +import { BaseProps } from "../Base" export interface LayoutAvatarImageViewProps extends BaseProps { @@ -14,76 +14,85 @@ export interface LayoutAvatarImageViewProps extends BaseProps export const LayoutAvatarImageView: FC = props => { - const { figure = '', gender = 'M', headOnly = false, direction = 0, scale = 1, classNames = [], style = {}, ...rest } = props; - const [ avatarUrl, setAvatarUrl ] = useState(null); - const [ randomValue, setRandomValue ] = useState(-1); - const isDisposed = useRef(false); + const { figure = "", gender = "M", headOnly = false, direction = 0, scale = 1, classNames = [], className = "", style = {}, ...rest } = props + const [ avatarUrl, setAvatarUrl ] = useState(null) + const [ randomValue, setRandomValue ] = useState(-1) + const isDisposed = useRef(false) const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'avatar-image' ]; + const newClassNames: string[] = [ "avatar-image" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) const getStyle = useMemo(() => { - let newStyle: CSSProperties = {}; + let newStyle: CSSProperties = {} - if(avatarUrl && avatarUrl.length) newStyle.backgroundImage = `url('${ avatarUrl }')`; + if(avatarUrl && avatarUrl.length) newStyle.backgroundImage = `url('${ avatarUrl }')` if(scale !== 1) { - newStyle.transform = `scale(${ scale })`; + newStyle.transform = `scale(${ scale })` - if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + if(!(scale % 1)) newStyle.imageRendering = "pixelated" } - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + if(Object.keys(style).length) newStyle = { ...newStyle, ...style } - return newStyle; - }, [ avatarUrl, scale, style ]); + return newStyle + }, [ avatarUrl, scale, style ]) useEffect(() => { const avatarImage = GetAvatarRenderManager().createAvatarImage(figure, AvatarScaleType.LARGE, gender, { resetFigure: figure => { - if(isDisposed.current) return; + if(isDisposed.current) return - setRandomValue(Math.random()); + setRandomValue(Math.random()) }, dispose: () => {}, disposed: false - }, null); + }, null) - if(!avatarImage) return; + if(!avatarImage) return - let setType = AvatarSetType.FULL; + let setType = AvatarSetType.FULL - if(headOnly) setType = AvatarSetType.HEAD; + if(headOnly) setType = AvatarSetType.HEAD - avatarImage.setDirection(setType, direction); + avatarImage.setDirection(setType, direction) - const image = avatarImage.getCroppedImage(setType); + const image = avatarImage.getCroppedImage(setType) - if(image) setAvatarUrl(image.src); + if(image) setAvatarUrl(image.src) - avatarImage.dispose(); - }, [ figure, gender, direction, headOnly, randomValue ]); + avatarImage.dispose() + }, [ figure, gender, direction, headOnly, randomValue ]) useEffect(() => { - isDisposed.current = false; + isDisposed.current = false return () => { - isDisposed.current = true; + isDisposed.current = true } - }, []); + }, []) - return ; + return
} diff --git a/src/common/layout/LayoutBackgroundImage.tsx b/src/common/layout/LayoutBackgroundImage.tsx deleted file mode 100644 index 0900a2600..000000000 --- a/src/common/layout/LayoutBackgroundImage.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from '../Base'; - -export interface LayoutBackgroundImageProps extends BaseProps -{ - imageUrl?: string; -} - -export const LayoutBackgroundImage: FC = props => -{ - const { imageUrl = null, fit = true, style = null, ...rest } = props; - - const getStyle = useMemo(() => - { - const newStyle = { ...style }; - - if(imageUrl) newStyle.background = `url(${ imageUrl }) center no-repeat`; - - return newStyle; - }, [ style, imageUrl ]); - - return ; -} diff --git a/src/common/layout/LayoutBadgeImageView.tsx b/src/common/layout/LayoutBadgeImageView.tsx index a469429bb..3c1e7cd75 100644 --- a/src/common/layout/LayoutBadgeImageView.tsx +++ b/src/common/layout/LayoutBadgeImageView.tsx @@ -1,7 +1,7 @@ -import { BadgeImageReadyEvent, NitroSprite, TextureUtils } from '@nitrots/nitro-renderer'; -import { CSSProperties, FC, useEffect, useMemo, useState } from 'react'; -import { GetConfiguration, GetSessionDataManager, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../api'; -import { Base, BaseProps } from '../Base'; +import { BadgeImageReadyEvent, NitroSprite, TextureUtils } from "@nitrots/nitro-renderer" +import { CSSProperties, FC, useEffect, useMemo, useRef, useState } from "react" +import { GetConfiguration, GetSessionDataManager, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from "../../api" +import { BaseProps } from "../Base" export interface LayoutBadgeImageViewProps extends BaseProps { @@ -10,94 +10,108 @@ export interface LayoutBadgeImageViewProps extends BaseProps showInfo?: boolean; customTitle?: string; isGrayscale?: boolean; + isShadow?: boolean; scale?: number; } export const LayoutBadgeImageView: FC = props => { - const { badgeCode = null, isGroup = false, showInfo = false, customTitle = null, isGrayscale = false, scale = 1, classNames = [], style = {}, children = null, ...rest } = props; - const [ imageElement, setImageElement ] = useState(null); + const { badgeCode = null, isGroup = false, showInfo = false, customTitle = null, isGrayscale = false, isShadow = false, scale = 1, classNames = [], className = "", style = {}, children = null, ...rest } = props + const [ imageElement, setImageElement ] = useState(null) + const elementRef = useRef() + const [ isVisible, setIsVisible ] = useState(false) const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'badge-image' ]; + const newClassNames: string[] = [] - if(isGroup) newClassNames.push('group-badge'); + if(isGroup) newClassNames.push("group-badge") - if(isGrayscale) newClassNames.push('grayscale'); + if(isGrayscale) newClassNames.push("grayscale") - if(classNames.length) newClassNames.push(...classNames); + if(isShadow) newClassNames.push("drop-shadow-[0px_1px_0_#fff] dark:drop-shadow-[0px_1px_0_#33312B]") - return newClassNames; - }, [ classNames, isGroup, isGrayscale ]); + if(classNames.length) newClassNames.push(...classNames) + + return newClassNames + }, [ classNames, isGroup, isGrayscale ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) const getStyle = useMemo(() => { - let newStyle: CSSProperties = {}; + let newStyle: CSSProperties = {} if(imageElement) { - newStyle.backgroundImage = `url(${ (isGroup) ? imageElement.src : GetConfiguration('badge.asset.url').replace('%badgename%', badgeCode.toString())})`; - newStyle.width = imageElement.width; - newStyle.height = imageElement.height; + newStyle.backgroundImage = `url(${ (isGroup) ? imageElement.src : GetConfiguration("badge.asset.url").replace("%badgename%", badgeCode.toString())})` + newStyle.width = imageElement.width + newStyle.height = imageElement.height if(scale !== 1) { - newStyle.transform = `scale(${ scale })`; + newStyle.transform = `scale(${ scale })` - if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + if(!(scale % 1)) newStyle.imageRendering = "pixelated" - newStyle.width = (imageElement.width * scale); - newStyle.height = (imageElement.height * scale); + newStyle.width = (imageElement.width * scale) + newStyle.height = (imageElement.height * scale) } } - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + if(Object.keys(style).length) newStyle = { ...newStyle, ...style } - return newStyle; - }, [ imageElement, scale, style ]); + return newStyle + }, [ imageElement, scale, style ]) useEffect(() => { - if(!badgeCode || !badgeCode.length) return; + if(!badgeCode || !badgeCode.length) return - let didSetBadge = false; + let didSetBadge = false const onBadgeImageReadyEvent = (event: BadgeImageReadyEvent) => { - if(event.badgeId !== badgeCode) return; + if(event.badgeId !== badgeCode) return - const element = TextureUtils.generateImage(new NitroSprite(event.image)); + const element = TextureUtils.generateImage(new NitroSprite(event.image)) - element.onload = () => setImageElement(element); + element.onload = () => setImageElement(element) - didSetBadge = true; + didSetBadge = true - GetSessionDataManager().events.removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent); + GetSessionDataManager().events.removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent) } - GetSessionDataManager().events.addEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent); + GetSessionDataManager().events.addEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent) - const texture = isGroup ? GetSessionDataManager().getGroupBadgeImage(badgeCode) : GetSessionDataManager().getBadgeImage(badgeCode); + const texture = isGroup ? GetSessionDataManager().getGroupBadgeImage(badgeCode) : GetSessionDataManager().getBadgeImage(badgeCode) if(texture && !didSetBadge) { - const element = TextureUtils.generateImage(new NitroSprite(texture)); + const element = TextureUtils.generateImage(new NitroSprite(texture)) - element.onload = () => setImageElement(element); + element.onload = () => setImageElement(element) } - return () => GetSessionDataManager().events.removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent); - }, [ badgeCode, isGroup ]); + return () => GetSessionDataManager().events.removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent) + }, [ badgeCode, isGroup ]) return ( - - { (showInfo && GetConfiguration('badge.descriptions.enabled', true)) && - -
{ isGroup ? customTitle : LocalizeBadgeName(badgeCode) }
-
{ isGroup ? LocalizeText('group.badgepopup.body') : LocalizeBadgeDescription(badgeCode) }
- } +
setIsVisible(true) } onMouseLeave={ event => setIsVisible(false) } className={ getClassName } style={ getStyle } { ...rest }> + { showInfo && isVisible && +
+

{ isGroup ? customTitle : LocalizeBadgeName(badgeCode) }

+ { GetConfiguration("badge.descriptions.enabled", true) &&

{ isGroup ? LocalizeText("group.badgepopup.body") : LocalizeBadgeDescription(badgeCode) }

} +
} { children } - - ); +
+ ) } diff --git a/src/common/layout/LayoutCounterTimeView.tsx b/src/common/layout/LayoutCounterTimeView.tsx index 7460b054e..8d3b016e8 100644 --- a/src/common/layout/LayoutCounterTimeView.tsx +++ b/src/common/layout/LayoutCounterTimeView.tsx @@ -1,7 +1,6 @@ -import { FC, useMemo } from 'react'; -import { LocalizeText } from '../../api'; -import { Base, BaseProps } from '../Base'; -import { Flex } from '../Flex'; +import { FC, useMemo } from "react" +import { LocalizeText } from "../../api" +import { BaseProps } from "../Base" interface LayoutCounterTimeViewProps extends BaseProps { @@ -13,31 +12,49 @@ interface LayoutCounterTimeViewProps extends BaseProps export const LayoutCounterTimeView: FC = props => { - const { day = '00', hour = '00', minutes = '00', seconds = '00', classNames = [], children = null, ...rest } = props; + const { day = "00", hour = "00", minutes = "00", seconds = "00", classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'nitro-counter-time' ]; + const newClassNames: string[] = [ "flex" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) return ( - - -
{ day != '00' ? day : hour }{ day != '00' ? LocalizeText('countdown_clock_unit_days') : LocalizeText('countdown_clock_unit_hours') }
- - : - -
{ minutes }{ LocalizeText('countdown_clock_unit_minutes') }
- - : - -
{ seconds }{ LocalizeText('countdown_clock_unit_seconds') }
- +
+
+
+

{ day !== "00" ? day : hour }

+
+

{ day !== "00" ? LocalizeText("countdown_clock_unit_days") : LocalizeText("countdown_clock_unit_hours") }

+
+
:
+
+
+

{ minutes }

+
+

{ LocalizeText("countdown_clock_unit_minutes") }

+
+
:
+
+
+

{ seconds }

+
+

{ LocalizeText("countdown_clock_unit_seconds") }

+
{ children } - - ); +
+ ) } diff --git a/src/common/layout/LayoutCurrencyIcon.tsx b/src/common/layout/LayoutCurrencyIcon.tsx index e12695269..3448125f1 100644 --- a/src/common/layout/LayoutCurrencyIcon.tsx +++ b/src/common/layout/LayoutCurrencyIcon.tsx @@ -1,44 +1,44 @@ -import { CSSProperties, FC, useMemo } from 'react'; -import { GetConfiguration } from '../../api'; -import { Base, BaseProps } from '../Base'; +import { FC, useMemo } from "react" +import { BaseProps } from "../Base" export interface CurrencyIconProps extends BaseProps { - type: number | string; + type?: string; + currency: number; + classNames?: string[]; + className?: string; } export const LayoutCurrencyIcon: FC = props => { - const { type = '', classNames = [], style = {}, ...rest } = props; + const { type = "", currency = 0, classNames = [], className = "" } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'nitro-currency-icon' ]; + const newClassNames: string[] = [] - if(classNames.length) newClassNames.push(...classNames); + newClassNames.push(currency.toString()) + if(type) newClassNames.push(`illumina-currency-${type}`) + if(!type) newClassNames.push("illumina-currency") + + if(currency === -1) newClassNames.push("credits") + if(currency === 0) newClassNames.push("duckets") + if(currency === 5) newClassNames.push("diamonds") + if((currency !== -1) && (currency !== 0) && (currency !== 5)) newClassNames.push("currency-" + currency.toString()) - return newClassNames; - }, [ classNames ]); + if(classNames.length) newClassNames.push(...classNames) - const urlString = useMemo(() => - { - let url = GetConfiguration('currency.asset.icon.url', ''); - - url = url.replace('%type%', type.toString()); - - return `url(${ url })`; - }, [ type ]); + return newClassNames + }, [ type, currency, classNames ]) - const getStyle = useMemo(() => + const getClassName = useMemo(() => { - let newStyle: CSSProperties = {}; - - newStyle.backgroundImage = urlString; + let newClassName = getClassNames.join(" ") - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + if(className.length) newClassName += (" " + className) - return newStyle; - }, [ style, urlString ]); + return newClassName.trim() + }, [ getClassNames, className ]) - return + return } diff --git a/src/common/layout/LayoutFurniIconImageView.tsx b/src/common/layout/LayoutFurniIconImageView.tsx index b1191dbdc..3e4aabbae 100644 --- a/src/common/layout/LayoutFurniIconImageView.tsx +++ b/src/common/layout/LayoutFurniIconImageView.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; -import { LayoutImage, LayoutImageProps } from '.'; -import { GetImageIconUrlForProduct } from '../../api'; +import { FC } from "react" +import { LayoutImage, LayoutImageProps } from "." +import { GetImageIconUrlForProduct } from "../../api" interface LayoutFurniIconImageViewProps extends LayoutImageProps { @@ -11,7 +11,7 @@ interface LayoutFurniIconImageViewProps extends LayoutImageProps export const LayoutFurniIconImageView: FC = props => { - const { productType = 's', productClassId = -1, extraData = '', ...rest } = props; + const { productType = "s", productClassId = -1, extraData = "", ...rest } = props - return ; + return } diff --git a/src/common/layout/LayoutFurniImageView.tsx b/src/common/layout/LayoutFurniImageView.tsx index ef8696c5b..1686ed5ab 100644 --- a/src/common/layout/LayoutFurniImageView.tsx +++ b/src/common/layout/LayoutFurniImageView.tsx @@ -1,8 +1,7 @@ -import { IGetImageListener, ImageResult, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; -import { CSSProperties, FC, useEffect, useMemo, useState } from 'react'; -import { BaseProps } from '..'; -import { GetRoomEngine, ProductTypeEnum } from '../../api'; -import { Base } from '../Base'; +import { IGetImageListener, ImageResult, TextureUtils, Vector3d } from "@nitrots/nitro-renderer" +import { CSSProperties, FC, useEffect, useMemo, useState } from "react" +import { BaseProps } from ".." +import { GetRoomEngine, ProductTypeEnum } from "../../api" interface LayoutFurniImageViewProps extends BaseProps { @@ -15,68 +14,68 @@ interface LayoutFurniImageViewProps extends BaseProps export const LayoutFurniImageView: FC = props => { - const { productType = 's', productClassId = -1, direction = 2, extraData = '', scale = 1, style = {}, ...rest } = props; - const [ imageElement, setImageElement ] = useState(null); + const { productType = "s", productClassId = -1, direction = 2, extraData = "", scale = 1, style = {}, ...rest } = props + const [ imageElement, setImageElement ] = useState(null) const getStyle = useMemo(() => { - let newStyle: CSSProperties = {}; + let newStyle: CSSProperties = {} if(imageElement?.src?.length) { - newStyle.backgroundImage = `url('${ imageElement.src }')`; - newStyle.width = imageElement.width; - newStyle.height = imageElement.height; + newStyle.backgroundImage = `url('${ imageElement.src }')` + newStyle.width = imageElement.width + newStyle.height = imageElement.height } if(scale !== 1) { - newStyle.transform = `scale(${ scale })`; + newStyle.transform = `scale(${ scale })` - if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + if(!(scale % 1)) newStyle.imageRendering = "pixelated" } - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + if(Object.keys(style).length) newStyle = { ...newStyle, ...style } - return newStyle; - }, [ imageElement, scale, style ]); + return newStyle + }, [ imageElement, scale, style ]) useEffect(() => { - let imageResult: ImageResult = null; + let imageResult: ImageResult = null const listener: IGetImageListener = { imageReady: (id, texture, image) => { if(!image && texture) { - image = TextureUtils.generateImage(texture); + image = TextureUtils.generateImage(texture) } - image.onload = () => setImageElement(image); + image.onload = () => setImageElement(image) }, imageFailed: null - }; + } switch(productType.toLocaleLowerCase()) { - case ProductTypeEnum.FLOOR: - imageResult = GetRoomEngine().getFurnitureFloorImage(productClassId, new Vector3d(direction), 64, listener, 0, extraData); - break; - case ProductTypeEnum.WALL: - imageResult = GetRoomEngine().getFurnitureWallImage(productClassId, new Vector3d(direction), 64, listener, 0, extraData); - break; + case ProductTypeEnum.FLOOR: + imageResult = GetRoomEngine().getFurnitureFloorImage(productClassId, new Vector3d(direction), 64, listener, 0, extraData) + break + case ProductTypeEnum.WALL: + imageResult = GetRoomEngine().getFurnitureWallImage(productClassId, new Vector3d(direction), 64, listener, 0, extraData) + break } if(imageResult) { - const image = imageResult.getImage(); + const image = imageResult.getImage() - image.onload = () => setImageElement(image); + image.onload = () => setImageElement(image) } - }, [ productType, productClassId, direction, extraData ]); + }, [ productType, productClassId, direction, extraData ]) - if(!imageElement) return null; + if(!imageElement) return null - return ; + return
} diff --git a/src/common/layout/LayoutGiftTagView.tsx b/src/common/layout/LayoutGiftTagView.tsx index 8fcc405f8..0be6c0330 100644 --- a/src/common/layout/LayoutGiftTagView.tsx +++ b/src/common/layout/LayoutGiftTagView.tsx @@ -1,10 +1,8 @@ -import { FC } from 'react'; -import { Column, Flex, Text } from '..'; -import { LocalizeText } from '../../api'; -import { LayoutAvatarImageView } from './LayoutAvatarImageView'; +import { FC, useState } from "react" +import { LocalizeText } from "../../api" +import { LayoutAvatarImageView } from "./LayoutAvatarImageView" -interface LayoutGiftTagViewProps -{ +interface LayoutGiftTagViewProps { figure?: string; userName?: string; message?: string; @@ -12,28 +10,63 @@ interface LayoutGiftTagViewProps onChange?: (value: string) => void; } -export const LayoutGiftTagView: FC = props => -{ - const { figure = null, userName = null, message = null, editable = false, onChange = null } = props; - +export const LayoutGiftTagView: FC = (props) => { + const { figure = null, userName = null, message = null, editable = false, onChange = null } = props + const [ inputValue, setInputValue ] = useState(message || "") + + const handleChange = (e: React.ChangeEvent) => { + const lines = e.target.value.split("\n") + const truncatedLines = lines.map((line) => line.slice(0, 33)) + const truncatedValue = truncatedLines.join("\n") + setInputValue(truncatedValue) + if (onChange) onChange(truncatedValue) + } + + const handlePaste = (e: React.ClipboardEvent) => { + e.preventDefault() + const pastedText = e.clipboardData.getData("text/plain") + const lines = pastedText.split("\n") + const truncatedLines = lines.map((line) => line.slice(0, 33)) + const truncatedText = truncatedLines.join("\n") + document.execCommand("insertText", false, truncatedText) + } + + const handleKeyDown = (e: React.KeyboardEvent) => { + const lines = inputValue.split("\n") + const currentLineIndex = inputValue.substr(0, e.currentTarget.selectionStart).split("\n").length - 1 + if (currentLineIndex < 4 && lines[currentLineIndex].length >= 33 && e.key !== "Backspace" && e.key !== "Delete") { + e.preventDefault() + } + if (e.key === "Enter" && lines.length >= 5) { + e.preventDefault() + } + } + return ( - -
- { !userName &&
} - { figure &&
- -
} +
+
+ {!userName && } + {figure && } +
+
+ {!editable &&

{inputValue}

} + {editable && ( + } - { userName && - { LocalizeText('catalog.gift_wrapping_new.message_from', [ 'name' ], [ userName ]) } } - - - - ); -}; +
+ ) +} diff --git a/src/common/layout/LayoutGridItem.tsx b/src/common/layout/LayoutGridItem.tsx index e1a32e5a1..a434a5fb3 100644 --- a/src/common/layout/LayoutGridItem.tsx +++ b/src/common/layout/LayoutGridItem.tsx @@ -1,12 +1,12 @@ -import { FC, useMemo } from 'react'; -import { Base } from '../Base'; -import { Column, ColumnProps } from '../Column'; -import { LayoutItemCountView } from './LayoutItemCountView'; -import { LayoutLimitedEditionStyledNumberView } from './limited-edition'; +import { FC, useMemo } from "react" +import { ColumnProps } from "../Column" +import { LayoutLimitedEditionStyledNumberView } from "./limited-edition" export interface LayoutGridItemProps extends ColumnProps { itemImage?: string; + itemBundle?: boolean; + itemAbsolute?: boolean; itemColor?: string; itemActive?: boolean; itemCount?: number; @@ -20,56 +20,63 @@ export interface LayoutGridItemProps extends ColumnProps export const LayoutGridItem: FC = props => { - const { itemImage = undefined, itemColor = undefined, itemActive = false, itemCount = 1, itemCountMinimum = 1, itemUniqueSoldout = false, itemUniqueNumber = -2, itemUnseen = false, itemHighlight = false, disabled = false, center = true, column = true, style = {}, classNames = [], position = 'relative', overflow = 'hidden', children = null, ...rest } = props; + const { itemImage = undefined, itemBundle = false, itemAbsolute = false, itemColor = undefined, itemActive = false, itemCount = 1, itemCountMinimum = 1, itemUniqueSoldout = false, itemUniqueNumber = -2, itemUnseen = false, itemHighlight = false, disabled = false, center = true, style = {}, classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'layout-grid-item', 'border', 'border-2', 'border-muted', 'rounded' ]; + const newClassNames: string[] = [ "relative flex items-center justify-center h-[43px] cursor-pointer" ] - if(itemActive) newClassNames.push('active'); + if(!itemBundle) newClassNames.push("illumina-furni-item") - if(itemUniqueSoldout || (itemUniqueNumber > 0)) newClassNames.push('unique-item'); + if(itemActive) newClassNames.push("active") - if(itemUniqueSoldout) newClassNames.push('sold-out'); + if(itemUnseen) newClassNames.push("unseen") - if(itemUnseen) newClassNames.push('unseen'); + if(itemHighlight) newClassNames.push("has-highlight") - if(itemHighlight) newClassNames.push('has-highlight'); + if(disabled) newClassNames.push("disabled") - if(disabled) newClassNames.push('disabled') + if(itemImage === null) newClassNames.push("icon", "loading-icon") - if(itemImage === null) newClassNames.push('icon', 'loading-icon'); + if(classNames.length) newClassNames.push(...classNames) - if(classNames.length) newClassNames.push(...classNames); + return newClassNames + }, [ itemActive, itemUniqueSoldout, itemUniqueNumber, itemUnseen, itemHighlight, disabled, itemImage, classNames ]) - return newClassNames; - }, [ itemActive, itemUniqueSoldout, itemUniqueNumber, itemUnseen, itemHighlight, disabled, itemImage, classNames ]); + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" flex-col ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) const getStyle = useMemo(() => { - let newStyle = { ...style }; + let newStyle = { ...style } - if(itemImage && !(itemUniqueSoldout || (itemUniqueNumber > 0))) newStyle.backgroundImage = `url(${ itemImage })`; + if(itemImage && !(itemUniqueSoldout || (itemUniqueNumber > 0))) newStyle.backgroundImage = `url(${ itemImage })` - if(itemColor) newStyle.backgroundColor = itemColor; + if(itemColor) newStyle.backgroundColor = itemColor - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + if(Object.keys(style).length) newStyle = { ...newStyle, ...style } - return newStyle; - }, [ style, itemImage, itemColor, itemUniqueSoldout, itemUniqueNumber ]); + return newStyle + }, [ style, itemImage, itemColor, itemUniqueSoldout, itemUniqueNumber ]) return ( - +
{ (itemCount > itemCountMinimum) && - } - { (itemUniqueNumber > 0) && - <> - -
+
{itemCount}
} + { (itemUniqueNumber > 0) + ?
+
+
- } +
:
} { children } - - ); +
+ ) } diff --git a/src/common/layout/LayoutImage.tsx b/src/common/layout/LayoutImage.tsx index e6c6228e1..865553a38 100644 --- a/src/common/layout/LayoutImage.tsx +++ b/src/common/layout/LayoutImage.tsx @@ -1,4 +1,4 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; +import { DetailedHTMLProps, FC, HTMLAttributes } from "react" export interface LayoutImageProps extends DetailedHTMLProps, HTMLImageElement> { @@ -7,7 +7,7 @@ export interface LayoutImageProps extends DetailedHTMLProps = props => { - const { imageUrl = null, className = '', ...rest } = props; + const { imageUrl = null, className = "", ...rest } = props - return ; + return } diff --git a/src/common/layout/LayoutItemCountView.tsx b/src/common/layout/LayoutItemCountView.tsx index 66bc9a220..95354ef68 100644 --- a/src/common/layout/LayoutItemCountView.tsx +++ b/src/common/layout/LayoutItemCountView.tsx @@ -1,5 +1,5 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from '..'; +import { FC, useMemo } from "react" +import { BaseProps } from ".." interface LayoutItemCountViewProps extends BaseProps { @@ -8,21 +8,30 @@ interface LayoutItemCountViewProps extends BaseProps export const LayoutItemCountView: FC = props => { - const { count = 0, position = 'absolute', classNames = [], children = null, ...rest } = props; + const { count = 0, classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'badge', 'border', 'border-black', 'bg-danger', 'px-1', 'nitro-item-count' ]; + const newClassNames: string[] = [ "illumina-item-badge absolute -top-1.5 -right-1.5 px-1.5 text-[11px] font-semibold [text-shadow:_0_1px_0_#ec2822] not-italic text-white z-30" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) return ( - +
{ count } { children } - - ); +
+ ) } diff --git a/src/common/layout/LayoutLoadingSpinnerView.tsx b/src/common/layout/LayoutLoadingSpinnerView.tsx deleted file mode 100644 index 308e0caad..000000000 --- a/src/common/layout/LayoutLoadingSpinnerView.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { FC } from 'react'; -import { Base, BaseProps } from '../Base'; - -export const LayoutLoadingSpinnerView: FC> = props => -{ - const { ...rest } = props; - - return ( - - - - - - ); -} diff --git a/src/common/layout/LayoutMiniCameraView.tsx b/src/common/layout/LayoutMiniCameraView.tsx index 31b361c71..a3ff7b05f 100644 --- a/src/common/layout/LayoutMiniCameraView.tsx +++ b/src/common/layout/LayoutMiniCameraView.tsx @@ -1,7 +1,8 @@ -import { NitroRectangle, NitroRenderTexture } from '@nitrots/nitro-renderer'; -import { FC, useRef } from 'react'; -import { GetRoomEngine, LocalizeText, PlaySound, SoundNames } from '../../api'; -import { DraggableWindow } from '../draggable-window'; +import { NitroRectangle, NitroRenderTexture } from "@nitrots/nitro-renderer" +import { FC, useRef } from "react" +import { GetRoomEngine, LocalizeText, PlaySound, SoundNames } from "../../api" +import { Button } from "../Button" +import { DraggableWindow } from "../draggable-window" interface LayoutMiniCameraViewProps { @@ -12,33 +13,33 @@ interface LayoutMiniCameraViewProps export const LayoutMiniCameraView: FC = props => { - const { roomId = -1, textureReceiver = null, onClose = null } = props; - const elementRef = useRef(); + const { roomId = -1, textureReceiver = null, onClose = null } = props + const elementRef = useRef() const getCameraBounds = () => { - if(!elementRef || !elementRef.current) return null; + if(!elementRef || !elementRef.current) return null - const frameBounds = elementRef.current.getBoundingClientRect(); + const frameBounds = elementRef.current.getBoundingClientRect() - return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); + return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)) } const takePicture = () => { - PlaySound(SoundNames.CAMERA_SHUTTER); - textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds())); + PlaySound(SoundNames.CAMERA_SHUTTER) + textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds())) } return ( - -
-
-
- - + +
+ +
+
+
- ); -}; + ) +} diff --git a/src/common/layout/LayoutNotificationAlertView.tsx b/src/common/layout/LayoutNotificationAlertView.tsx index 8db771af8..5b6683ff0 100644 --- a/src/common/layout/LayoutNotificationAlertView.tsx +++ b/src/common/layout/LayoutNotificationAlertView.tsx @@ -1,6 +1,6 @@ -import { FC, useMemo } from 'react'; -import { NotificationAlertType } from '../../api'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardView, NitroCardViewProps } from '../card'; +import { FC, useMemo } from "react" +import { NotificationAlertType } from "../../api" +import { NitroCardContentView, NitroCardHeaderView, NitroCardView, NitroCardViewProps } from "../card" export interface LayoutNotificationAlertViewProps extends NitroCardViewProps { @@ -11,25 +11,23 @@ export interface LayoutNotificationAlertViewProps extends NitroCardViewProps export const LayoutNotificationAlertView: FC = props => { - const { title = '', onClose = null, classNames = [], children = null,type = NotificationAlertType.DEFAULT, ...rest } = props; + const { title = "", onClose = null, classNames = [], children = null, type = NotificationAlertType.DEFAULT, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'nitro-alert' ]; - - newClassNames.push('nitro-alert-' + type); + const newClassNames: string[] = [ "illumina-alert" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames, type ]); + return newClassNames + }, [ classNames, type ]) return ( - + - + { children } - ); + ) } diff --git a/src/common/layout/LayoutNotificationBubbleView.tsx b/src/common/layout/LayoutNotificationBubbleView.tsx index a48216644..a7578f667 100644 --- a/src/common/layout/LayoutNotificationBubbleView.tsx +++ b/src/common/layout/LayoutNotificationBubbleView.tsx @@ -1,52 +1,46 @@ -import { FC, useEffect, useMemo, useState } from 'react'; -import { Flex, FlexProps } from '..'; -import { TransitionAnimation, TransitionAnimationTypes } from '../transitions'; +import { FC, ReactNode, useEffect, useState } from "react" +import { TransitionAnimation, TransitionAnimationTypes } from "../transitions" -export interface LayoutNotificationBubbleViewProps extends FlexProps +export interface LayoutNotificationBubbleViewProps { fadesOut?: boolean; timeoutMs?: number; - onClose: () => void; + onClick?: any; + onClose?: () => void; + children?: ReactNode; } export const LayoutNotificationBubbleView: FC = props => { - const { fadesOut = true, timeoutMs = 8000, onClose = null, overflow = 'hidden', classNames = [], ...rest } = props; - const [ isVisible, setIsVisible ] = useState(false); - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'nitro-notification-bubble', 'rounded' ]; - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ classNames ]); + const { fadesOut = true, timeoutMs = 8000, onClose = null, children = null } = props + const [ isVisible, setIsVisible ] = useState(false) useEffect(() => { - setIsVisible(true); + setIsVisible(true) - return () => setIsVisible(false); - }, []); + return () => setIsVisible(false) + }, []) useEffect(() => { - if(!fadesOut) return; + if(!fadesOut) return const timeout = setTimeout(() => { - setIsVisible(false); + setIsVisible(false) - setTimeout(() => onClose(), 300); - }, timeoutMs); + setTimeout(() => onClose(), 300) + }, timeoutMs) - return () => clearTimeout(timeout); - }, [ fadesOut, timeoutMs, onClose ]); + return () => clearTimeout(timeout) + }, [ fadesOut, timeoutMs, onClose ]) return ( - +
+ { children } +
- ); + ) } diff --git a/src/common/layout/LayoutPetImageView.tsx b/src/common/layout/LayoutPetImageView.tsx index 27d43dedb..d82bd9578 100644 --- a/src/common/layout/LayoutPetImageView.tsx +++ b/src/common/layout/LayoutPetImageView.tsx @@ -1,7 +1,7 @@ -import { IPetCustomPart, PetFigureData, TextureUtils, Vector3d } from '@nitrots/nitro-renderer'; -import { CSSProperties, FC, useEffect, useMemo, useRef, useState } from 'react'; -import { GetRoomEngine } from '../../api'; -import { Base, BaseProps } from '../Base'; +import { IPetCustomPart, PetFigureData, TextureUtils, Vector3d } from "@nitrots/nitro-renderer" +import { CSSProperties, FC, useEffect, useMemo, useRef, useState } from "react" +import { GetRoomEngine } from "../../api" +import { BaseProps } from "../Base" interface LayoutPetImageViewProps extends BaseProps { @@ -18,104 +18,102 @@ interface LayoutPetImageViewProps extends BaseProps export const LayoutPetImageView: FC = props => { - const { figure = '', typeId = -1, paletteId = -1, petColor = 0xFFFFFF, customParts = [], posture = 'std', headOnly = false, direction = 0, scale = 1, style = {}, ...rest } = props; - const [ petUrl, setPetUrl ] = useState(null); - const [ width, setWidth ] = useState(0); - const [ height, setHeight ] = useState(0); - const isDisposed = useRef(false); + const { figure = "", typeId = -1, paletteId = -1, petColor = 0xFFFFFF, customParts = [], posture = "std", headOnly = false, direction = 0, scale = 1, style = {}, ...rest } = props + const [ petUrl, setPetUrl ] = useState(null) + const [ width, setWidth ] = useState(0) + const [ height, setHeight ] = useState(0) + const isDisposed = useRef(false) const getStyle = useMemo(() => { - let newStyle: CSSProperties = {}; + let newStyle: CSSProperties = {} - if(petUrl && petUrl.length) newStyle.backgroundImage = `url(${ petUrl })`; + if(petUrl && petUrl.length) newStyle.backgroundImage = `url(${ petUrl })` if(scale !== 1) { - newStyle.transform = `scale(${ scale })`; + newStyle.transform = `scale(${ scale })` - if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; + if(!(scale % 1)) newStyle.imageRendering = "pixelated" } - newStyle.width = width; - newStyle.height = height; + newStyle.width = width + newStyle.height = height - if(Object.keys(style).length) newStyle = { ...newStyle, ...style }; + if(Object.keys(style).length) newStyle = { ...newStyle, ...style } - return newStyle; - }, [ petUrl, scale, style, width, height ]); + return newStyle + }, [ petUrl, scale, style, width, height ]) useEffect(() => { - let url = null; + let url = null - let petTypeId = typeId; - let petPaletteId = paletteId; - let petColor1 = petColor; - let petCustomParts: IPetCustomPart[] = customParts; - let petHeadOnly = headOnly; + let petTypeId = typeId + let petPaletteId = paletteId + let petColor1 = petColor + let petCustomParts: IPetCustomPart[] = customParts + let petHeadOnly = headOnly if(figure && figure.length) { - const petFigureData = new PetFigureData(figure); + const petFigureData = new PetFigureData(figure) - petTypeId = petFigureData.typeId; - petPaletteId = petFigureData.paletteId; - petColor1 = petFigureData.color; - petCustomParts = petFigureData.customParts; + petTypeId = petFigureData.typeId + petPaletteId = petFigureData.paletteId + petColor1 = petFigureData.color + petCustomParts = petFigureData.customParts } - if(petTypeId === 16) petHeadOnly = false; + if(petTypeId === 16) petHeadOnly = false const imageResult = GetRoomEngine().getRoomObjectPetImage(petTypeId, petPaletteId, petColor1, new Vector3d((direction * 45)), 64, { imageReady: (id, texture, image) => { - if(isDisposed.current) return; + if(isDisposed.current) return if(image) { - setPetUrl(image.src); - setWidth(image.width); - setHeight(image.height); + setPetUrl(image.src) + setWidth(image.width) + setHeight(image.height) } else if(texture) { - setPetUrl(TextureUtils.generateImageUrl(texture)); - setWidth(texture.width); - setHeight(texture.height); + setPetUrl(TextureUtils.generateImageUrl(texture)) + setWidth(texture.width) + setHeight(texture.height) } }, imageFailed: (id) => { } - }, petHeadOnly, 0, petCustomParts, posture); + }, petHeadOnly, 0, petCustomParts, posture) if(imageResult) { - const image = imageResult.getImage(); + const image = imageResult.getImage() if(image) { - setPetUrl(image.src); - setWidth(image.width); - setHeight(image.height); + setPetUrl(image.src) + setWidth(image.width) + setHeight(image.height) } } - }, [ figure, typeId, paletteId, petColor, customParts, posture, headOnly, direction ]); + }, [ figure, typeId, paletteId, petColor, customParts, posture, headOnly, direction ]) useEffect(() => { - isDisposed.current = false; + isDisposed.current = false return () => { - isDisposed.current = true; + isDisposed.current = true } - }, []); + }, []) - const url = `url('${ petUrl }')`; - - return ; + return
} diff --git a/src/common/layout/LayoutPrizeProductImageView.tsx b/src/common/layout/LayoutPrizeProductImageView.tsx index 206c7a801..a1524408e 100644 --- a/src/common/layout/LayoutPrizeProductImageView.tsx +++ b/src/common/layout/LayoutPrizeProductImageView.tsx @@ -1,8 +1,8 @@ -import { FC } from 'react'; -import { ProductTypeEnum } from '../../api'; -import { LayoutBadgeImageView } from './LayoutBadgeImageView'; -import { LayoutCurrencyIcon } from './LayoutCurrencyIcon'; -import { LayoutFurniImageView } from './LayoutFurniImageView'; +import { FC } from "react" +import { ProductTypeEnum } from "../../api" +import { LayoutBadgeImageView } from "./LayoutBadgeImageView" +import { LayoutCurrencyIcon } from "./LayoutCurrencyIcon" +import { LayoutFurniImageView } from "./LayoutFurniImageView" interface LayoutPrizeProductImageViewProps { @@ -13,18 +13,18 @@ interface LayoutPrizeProductImageViewProps export const LayoutPrizeProductImageView: FC = props => { - const { productType = ProductTypeEnum.FLOOR, classId = -1, extraParam = undefined } = props; + const { productType = ProductTypeEnum.FLOOR, classId = -1, extraParam = undefined } = props switch(productType) { - case ProductTypeEnum.WALL: - case ProductTypeEnum.FLOOR: - return - case ProductTypeEnum.BADGE: - return - case ProductTypeEnum.HABBO_CLUB: - return + case ProductTypeEnum.WALL: + case ProductTypeEnum.FLOOR: + return + case ProductTypeEnum.BADGE: + return + case ProductTypeEnum.HABBO_CLUB: + return } - return null; + return null } diff --git a/src/common/layout/LayoutProgressBar.tsx b/src/common/layout/LayoutProgressBar.tsx deleted file mode 100644 index 8f821717c..000000000 --- a/src/common/layout/LayoutProgressBar.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { FC, useMemo } from 'react'; -import { Base, Column, ColumnProps, Flex } from '..'; - -interface LayoutProgressBarProps extends ColumnProps -{ - text?: string; - progress: number; - maxProgress?: number; -} - -export const LayoutProgressBar: FC = props => -{ - const { text = '', progress = 0, maxProgress = 100, position = 'relative', justifyContent = 'center', classNames = [], children = null, ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'nitro-progress-bar', 'text-white' ]; - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ classNames ]); - - return ( - - { text && (text.length > 0) && - { text } } - - { children } - - ); -} diff --git a/src/common/layout/LayoutPurchaseView.tsx b/src/common/layout/LayoutPurchaseView.tsx new file mode 100644 index 000000000..6b35a406a --- /dev/null +++ b/src/common/layout/LayoutPurchaseView.tsx @@ -0,0 +1,89 @@ +import { ColorConverter, GetTicker, IRoomRenderingCanvas, RoomPreviewer, TextureUtils } from "@nitrots/nitro-renderer" +import { FC, ReactNode, useEffect, useRef, useState } from "react" + +export interface LayoutPurchaseViewProps +{ + roomPreviewer: RoomPreviewer; + height?: number; + children?: ReactNode; +} + +export const LayoutPurchaseView: FC = props => +{ + const { roomPreviewer = null, height = 0, children = null } = props + const [ renderingCanvas, setRenderingCanvas ] = useState(null) + const elementRef = useRef() + + useEffect(() => + { + if(!roomPreviewer) return + + const update = (time: number) => + { + if(!roomPreviewer || !renderingCanvas || !elementRef.current) return + + roomPreviewer.updatePreviewRoomView() + + if(!renderingCanvas.canvasUpdated) return + + elementRef.current.style.backgroundImage = `url(${ TextureUtils.generateImageUrl(renderingCanvas.master) })` + } + + if(!renderingCanvas) + { + if(elementRef.current && roomPreviewer) + { + const computed = document.defaultView.getComputedStyle(elementRef.current, null) + + let backgroundColor = computed.backgroundColor + + backgroundColor = ColorConverter.rgbStringToHex(backgroundColor) + backgroundColor = backgroundColor.replace("#", "0x") + + roomPreviewer.backgroundColor = parseInt(backgroundColor, 16) + + const width = elementRef.current.parentElement.clientWidth + + roomPreviewer.getRoomCanvas(width, height) + + const canvas = roomPreviewer.getRenderingCanvas() + + setRenderingCanvas(canvas) + + canvas.canvasUpdated = false + + update(-1) + } + } + + GetTicker().add(update) + + const resizeObserver = new ResizeObserver(() => + { + if(!roomPreviewer || !elementRef.current) return + + const width = elementRef.current.parentElement.offsetWidth + + roomPreviewer.modifyRoomCanvas(width, height) + + update(-1) + }) + + resizeObserver.observe(elementRef.current) + + return () => + { + resizeObserver.disconnect() + + GetTicker().remove(update) + } + + }, [ renderingCanvas, roomPreviewer, elementRef, height ]) + + return ( + <> +
+ { children } + + ) +} diff --git a/src/common/layout/LayoutRarityLevelView.tsx b/src/common/layout/LayoutRarityLevelView.tsx index 283137475..e7a46465e 100644 --- a/src/common/layout/LayoutRarityLevelView.tsx +++ b/src/common/layout/LayoutRarityLevelView.tsx @@ -1,5 +1,5 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from '..'; +import { FC, useMemo } from "react" +import { BaseProps } from ".." interface LayoutRarityLevelViewProps extends BaseProps { @@ -8,21 +8,30 @@ interface LayoutRarityLevelViewProps extends BaseProps export const LayoutRarityLevelView: FC = props => { - const { level = 0, classNames = [], children = null, ...rest } = props; + const { level = 0, classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'nitro-rarity-level' ]; + const newClassNames: string[] = [ "bg-[url('/client-assets/images/spritesheet.png?v=2451779')] dark:bg-[url('/client-assets/images/spritesheet-dark.png?v=2451779')] bg-[-354px_-143px] w-9 h-7 flex items-center justify-center z-10" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) return ( - -
{ level }
+
+

{ level }

{ children } - - ); +
+ ) } diff --git a/src/common/layout/LayoutRoomPreviewerView.tsx b/src/common/layout/LayoutRoomPreviewerView.tsx index 69fbea84e..2316970c6 100644 --- a/src/common/layout/LayoutRoomPreviewerView.tsx +++ b/src/common/layout/LayoutRoomPreviewerView.tsx @@ -1,97 +1,98 @@ -import { ColorConverter, GetTicker, IRoomRenderingCanvas, RoomPreviewer, TextureUtils } from '@nitrots/nitro-renderer'; -import { FC, MouseEvent, ReactNode, useEffect, useRef, useState } from 'react'; +import { ColorConverter, GetTicker, IRoomRenderingCanvas, RoomPreviewer, TextureUtils } from "@nitrots/nitro-renderer" +import { FC, MouseEvent, ReactNode, useEffect, useRef, useState } from "react" export interface LayoutRoomPreviewerViewProps { roomPreviewer: RoomPreviewer; height?: number; + isBackground?: boolean; children?: ReactNode; } export const LayoutRoomPreviewerView: FC = props => { - const { roomPreviewer = null, height = 0, children = null } = props; - const [ renderingCanvas, setRenderingCanvas ] = useState(null); - const elementRef = useRef(); + const { roomPreviewer = null, height = 0, isBackground = true, children = null } = props + const [ renderingCanvas, setRenderingCanvas ] = useState(null) + const elementRef = useRef() const onClick = (event: MouseEvent) => { - if(!roomPreviewer) return; + if(!roomPreviewer) return - if(event.shiftKey) roomPreviewer.changeRoomObjectDirection(); - else roomPreviewer.changeRoomObjectState(); + if(event.shiftKey) roomPreviewer.changeRoomObjectDirection() + else roomPreviewer.changeRoomObjectState() } useEffect(() => { - if(!roomPreviewer) return; + if(!roomPreviewer) return const update = (time: number) => { - if(!roomPreviewer || !renderingCanvas || !elementRef.current) return; + if(!roomPreviewer || !renderingCanvas || !elementRef.current) return - roomPreviewer.updatePreviewRoomView(); + roomPreviewer.updatePreviewRoomView() - if(!renderingCanvas.canvasUpdated) return; + if(!renderingCanvas.canvasUpdated) return - elementRef.current.style.backgroundImage = `url(${ TextureUtils.generateImageUrl(renderingCanvas.master) })`; + elementRef.current.style.backgroundImage = `url(${ TextureUtils.generateImageUrl(renderingCanvas.master) })` } if(!renderingCanvas) { if(elementRef.current && roomPreviewer) { - const computed = document.defaultView.getComputedStyle(elementRef.current, null); + const computed = document.defaultView.getComputedStyle(elementRef.current, null) - let backgroundColor = computed.backgroundColor; + let backgroundColor = computed.backgroundColor - backgroundColor = ColorConverter.rgbStringToHex(backgroundColor); - backgroundColor = backgroundColor.replace('#', '0x'); + backgroundColor = ColorConverter.rgbStringToHex(backgroundColor) + backgroundColor = backgroundColor.replace("#", "0x") - roomPreviewer.backgroundColor = parseInt(backgroundColor, 16); + roomPreviewer.backgroundColor = parseInt(backgroundColor, 16) - const width = elementRef.current.parentElement.clientWidth; + const width = elementRef.current.parentElement.clientWidth - roomPreviewer.getRoomCanvas(width, height); + roomPreviewer.getRoomCanvas(width, height) - const canvas = roomPreviewer.getRenderingCanvas(); + const canvas = roomPreviewer.getRenderingCanvas() - setRenderingCanvas(canvas); + setRenderingCanvas(canvas) - canvas.canvasUpdated = true; + canvas.canvasUpdated = true - update(-1); + update(-1) } } - GetTicker().add(update); + GetTicker().add(update) const resizeObserver = new ResizeObserver(() => { - if(!roomPreviewer || !elementRef.current) return; + if(!roomPreviewer || !elementRef.current) return - const width = elementRef.current.parentElement.offsetWidth; + const width = elementRef.current.parentElement.offsetWidth - roomPreviewer.modifyRoomCanvas(width, height); + roomPreviewer.modifyRoomCanvas(width, height) - update(-1); - }); + update(-1) + }) - resizeObserver.observe(elementRef.current); + resizeObserver.observe(elementRef.current) return () => { - resizeObserver.disconnect(); + resizeObserver.disconnect() - GetTicker().remove(update); + GetTicker().remove(update) } - }, [ renderingCanvas, roomPreviewer, elementRef, height ]); + }, [ renderingCanvas, roomPreviewer, elementRef, height ]) return ( -
-
+
+
{ children }
- ); + ) } diff --git a/src/common/layout/LayoutRoomThumbnailView.tsx b/src/common/layout/LayoutRoomThumbnailView.tsx index 46d884f32..5acda3144 100644 --- a/src/common/layout/LayoutRoomThumbnailView.tsx +++ b/src/common/layout/LayoutRoomThumbnailView.tsx @@ -1,37 +1,65 @@ -import { FC, useMemo } from 'react'; -import { GetConfiguration } from '../../api'; -import { Base, BaseProps } from '../Base'; +import { FC, useMemo } from "react" +import { GetConfiguration } from "../../api" +import { BaseProps } from "../Base" export interface LayoutRoomThumbnailViewProps extends BaseProps { roomId?: number; customUrl?: string; + isRoom?: boolean; + isNavigator?: boolean; + type?: string; } export const LayoutRoomThumbnailView: FC = props => { - const { roomId = -1, customUrl = null, shrink = true, overflow = 'hidden', classNames = [], children = null, ...rest } = props; + const { roomId = -1, isRoom = false, isNavigator = false, type = "default", customUrl = null, classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'room-thumbnail', 'rounded', 'border' ]; + const newClassNames: string[] = [ "relative overflow-hidden shrink-0" ] + + if(type === "r63") newClassNames.push("!w-[70px] !h-16") + newClassNames.push("w-[106px] h-[107px]") - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) - const getImageUrl = useMemo(() => + const getClassName = useMemo(() => { - if(customUrl && customUrl.length) return (GetConfiguration('image.library.url') + customUrl); + let newClassName = getClassNames.join(" ") - return (GetConfiguration('thumbnails.url').replace('%thumbnail%', roomId.toString())); - }, [ customUrl, roomId ]); + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) + + const getImageUrl = useMemo(() => { + if (customUrl && customUrl.length) { + return `${GetConfiguration("image.library.url")}${customUrl}?cache=${Math.random()}` + } + + return `${GetConfiguration("thumbnails.url").replace("%thumbnail%", roomId.toString())}?cache=${Math.random()}` + }, [ customUrl, roomId ]) + + if(isNavigator) return ( +
+ ) return ( - - { getImageUrl && } +
+
+ { type === "r63" && <> + +
+ } + { (type === "default" || type === "r63Large") && <> + +
+ } { children } - - ); +
+ ) } diff --git a/src/common/layout/LayoutSubView.tsx b/src/common/layout/LayoutSubView.tsx new file mode 100644 index 000000000..a5ccdc034 --- /dev/null +++ b/src/common/layout/LayoutSubView.tsx @@ -0,0 +1,14 @@ +import { FC } from "react" +import { BaseProps } from ".." + +interface LayoutSubViewProps extends BaseProps +{ + onClick: React.MouseEventHandler; +} + +export const LayoutSubView: FC = ({ onClick }) => +{ + return ( + + ) +} diff --git a/src/common/layout/LayoutTimesView.tsx b/src/common/layout/LayoutTimesView.tsx new file mode 100644 index 000000000..38850f8bb --- /dev/null +++ b/src/common/layout/LayoutTimesView.tsx @@ -0,0 +1,14 @@ +import { FC } from "react" +import { BaseProps } from ".." + +interface LayoutTimesViewProps extends BaseProps +{ + onClick: React.MouseEventHandler; +} + +export const LayoutTimesView: FC = ({ onClick }) => +{ + return ( + + ) +} diff --git a/src/common/layout/LayoutTrophyView.tsx b/src/common/layout/LayoutTrophyView.tsx index 1320625ec..72c7b2bbc 100644 --- a/src/common/layout/LayoutTrophyView.tsx +++ b/src/common/layout/LayoutTrophyView.tsx @@ -1,11 +1,10 @@ -import { FC } from 'react'; -import { Base, Column, Flex, Text } from '..'; -import { LocalizeText } from '../../api'; -import { DraggableWindow } from '../draggable-window'; +import { FC } from "react" +import { LocalizeText } from "../../api" +import { DraggableWindow } from "../draggable-window" interface LayoutTrophyViewProps { - color: string; + color: number | string; message: string; date: string; senderName: string; @@ -15,25 +14,46 @@ interface LayoutTrophyViewProps export const LayoutTrophyView: FC = props => { - const { color = '', message = '', date = '', senderName = '', customTitle = null, onCloseClick = null } = props; + const { color = "", message = "", date = "", senderName = "", customTitle = null, onCloseClick = null } = props + + const getTrophyView = () => + { + let bg = "" + + if(color === 1) + { + bg = "bg-[0px_0px] [text-shadow:_0_1px_0_#F4C52F]" + } + else if(color === 2) + { + bg = "bg-[0px_-346px] [text-shadow:_0_1px_0_#cfcfcf]" + } + else if(color === 3) + { + bg = "bg-[0px_-173px] [text-shadow:_0_1px_0_#c17725]" + } + + return bg + } return ( - - - - - { LocalizeText('widget.furni.trophy.title') } - - - { customTitle && - { customTitle } } - { message } - - - { date } - { senderName } - - + +
+
+
+
+
+ { customTitle &&

{ customTitle }

} +

{ message }

+
+
+

{ date }

+

{ senderName }

+
+
+
- ); + ) } diff --git a/src/common/layout/UserProfileIconView.tsx b/src/common/layout/UserProfileIconView.tsx deleted file mode 100644 index d31fa66b4..000000000 --- a/src/common/layout/UserProfileIconView.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { FC, useMemo } from 'react'; -import { GetUserProfile } from '../../api'; -import { Base, BaseProps } from '../Base'; - -export interface UserProfileIconViewProps extends BaseProps -{ - userId?: number; - userName?: string; -} - -export const UserProfileIconView: FC = props => -{ - const { userId = 0, userName = null, classNames = [], pointer = true, children = null, ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'nitro-friends-spritesheet', 'icon-profile-sm' ]; - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ classNames ]); - - return ( - GetUserProfile(userId) } { ... rest }> - { children } - - ); -} diff --git a/src/common/layout/index.ts b/src/common/layout/index.ts index 3c4238e10..08f916678 100644 --- a/src/common/layout/index.ts +++ b/src/common/layout/index.ts @@ -1,23 +1,19 @@ -export * from './LayoutAvatarImageView'; -export * from './LayoutBackgroundImage'; -export * from './LayoutBadgeImageView'; -export * from './LayoutCounterTimeView'; -export * from './LayoutCurrencyIcon'; -export * from './LayoutFurniIconImageView'; -export * from './LayoutFurniImageView'; -export * from './LayoutGiftTagView'; -export * from './LayoutGridItem'; -export * from './LayoutImage'; -export * from './LayoutItemCountView'; -export * from './LayoutLoadingSpinnerView'; -export * from './LayoutMiniCameraView'; -export * from './LayoutNotificationAlertView'; -export * from './LayoutNotificationBubbleView'; -export * from './LayoutPetImageView'; -export * from './LayoutProgressBar'; -export * from './LayoutRarityLevelView'; -export * from './LayoutRoomPreviewerView'; -export * from './LayoutRoomThumbnailView'; -export * from './LayoutTrophyView'; -export * from './limited-edition'; -export * from './UserProfileIconView'; +export * from "./LayoutAvatarImageView" +export * from "./LayoutBadgeImageView" +export * from "./LayoutCounterTimeView" +export * from "./LayoutCurrencyIcon" +export * from "./LayoutFurniIconImageView" +export * from "./LayoutFurniImageView" +export * from "./LayoutGiftTagView" +export * from "./LayoutGridItem" +export * from "./LayoutImage" +export * from "./LayoutItemCountView" +export * from "./LayoutMiniCameraView" +export * from "./LayoutNotificationAlertView" +export * from "./LayoutNotificationBubbleView" +export * from "./LayoutPetImageView" +export * from "./LayoutRarityLevelView" +export * from "./LayoutRoomPreviewerView" +export * from "./LayoutRoomThumbnailView" +export * from "./LayoutTrophyView" +export * from "./limited-edition" diff --git a/src/common/layout/limited-edition/LayoutLimitedEditionCompactPlateView.tsx b/src/common/layout/limited-edition/LayoutLimitedEditionCompactPlateView.tsx index ee41c6c96..6d1d0c52a 100644 --- a/src/common/layout/limited-edition/LayoutLimitedEditionCompactPlateView.tsx +++ b/src/common/layout/limited-edition/LayoutLimitedEditionCompactPlateView.tsx @@ -1,6 +1,6 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from '../../Base'; -import { LayoutLimitedEditionStyledNumberView } from './LayoutLimitedEditionStyledNumberView'; +import { FC, useMemo } from "react" +import { BaseProps } from "../../Base" +import { LayoutLimitedEditionStyledNumberView } from "./LayoutLimitedEditionStyledNumberView" interface LayoutLimitedEditionCompactPlateViewProps extends BaseProps { @@ -10,26 +10,35 @@ interface LayoutLimitedEditionCompactPlateViewProps extends BaseProps = props => { - const { uniqueNumber = 0, uniqueSeries = 0, classNames = [], children = null, ...rest } = props; + const { uniqueNumber = 0, uniqueSeries = 0, classNames = [], className = "", children = null, ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'unique-compact-plate', 'z-index-1' ]; + const newClassNames: string[] = [ "bg-[url('/client-assets/images/spritesheet.png?v=2451779')] dark:bg-[url('/client-assets/images/spritesheet-dark.png?v=2451779')] bg-[-74px_-143px] w-[34px] h-[37px] flex flex-col justify-end items-center z-10" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) return ( - -
+
+
-
+
{ children } - - ); +
+ ) } diff --git a/src/common/layout/limited-edition/LayoutLimitedEditionCompletePlateView.tsx b/src/common/layout/limited-edition/LayoutLimitedEditionCompletePlateView.tsx index c83e2307d..113c38a43 100644 --- a/src/common/layout/limited-edition/LayoutLimitedEditionCompletePlateView.tsx +++ b/src/common/layout/limited-edition/LayoutLimitedEditionCompletePlateView.tsx @@ -1,9 +1,6 @@ -import { FC, useMemo } from 'react'; -import { LocalizeText } from '../../../api'; -import { Base, BaseProps } from '../../Base'; -import { Column } from '../../Column'; -import { Flex } from '../../Flex'; -import { LayoutLimitedEditionStyledNumberView } from './LayoutLimitedEditionStyledNumberView'; +import { FC, useMemo } from "react" +import { LocalizeText } from "../../../api" +import { BaseProps } from "../../Base" interface LayoutLimitedEditionCompletePlateViewProps extends BaseProps { @@ -13,29 +10,38 @@ interface LayoutLimitedEditionCompletePlateViewProps extends BaseProps = props => { - const { uniqueLimitedItemsLeft = 0, uniqueLimitedSeriesSize = 0, classNames = [], ...rest } = props; + const { uniqueLimitedItemsLeft = 0, uniqueLimitedSeriesSize = 0, classNames = [], className = "", ...rest } = props const getClassNames = useMemo(() => { - const newClassNames: string[] = [ 'unique-complete-plate' ]; + const newClassNames: string[] = [ "bg-[url('/client-assets/images/spritesheet.png?v=2451779')] dark:bg-[url('/client-assets/images/spritesheet-dark.png?v=2451779')] bg-[-146px_-142px] w-[170px] h-[29px]" ] - if(classNames.length) newClassNames.push(...classNames); + if(classNames.length) newClassNames.push(...classNames) - return newClassNames; - }, [ classNames ]); + return newClassNames + }, [ classNames ]) + + const getClassName = useMemo(() => + { + let newClassName = getClassNames.join(" ") + + if(className.length) newClassName += (" " + className) + + return newClassName.trim() + }, [ getClassNames, className ]) return ( - - - - { LocalizeText('unique.items.left') } -
-
- - { LocalizeText('unique.items.number.sold') } -
-
-
- - ); +
+
+
+

{ LocalizeText("unique.items.left") }

+

{ uniqueLimitedItemsLeft }

+
+
+

{ LocalizeText("unique.items.number.sold") }

+

{ uniqueLimitedSeriesSize }

+
+
+
+ ) } diff --git a/src/common/layout/limited-edition/LayoutLimitedEditionStyledNumberView.tsx b/src/common/layout/limited-edition/LayoutLimitedEditionStyledNumberView.tsx index fe34ba412..b39c0e03f 100644 --- a/src/common/layout/limited-edition/LayoutLimitedEditionStyledNumberView.tsx +++ b/src/common/layout/limited-edition/LayoutLimitedEditionStyledNumberView.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import { FC } from "react" interface LayoutLimitedEditionStyledNumberViewProps { @@ -7,12 +7,12 @@ interface LayoutLimitedEditionStyledNumberViewProps export const LayoutLimitedEditionStyledNumberView: FC = props => { - const { value = 0 } = props; - const numbers = value.toString().split(''); + const { value = 0 } = props + const numbers = value.toString().split("") return ( <> - { numbers.map((number, index) => ) } + { numbers.map((number, index) => ) } - ); + ) } diff --git a/src/common/layout/limited-edition/index.ts b/src/common/layout/limited-edition/index.ts index ee41cf9f9..c53718c29 100644 --- a/src/common/layout/limited-edition/index.ts +++ b/src/common/layout/limited-edition/index.ts @@ -1,3 +1,3 @@ -export * from './LayoutLimitedEditionCompactPlateView'; -export * from './LayoutLimitedEditionCompletePlateView'; -export * from './LayoutLimitedEditionStyledNumberView'; +export * from "./LayoutLimitedEditionCompactPlateView" +export * from "./LayoutLimitedEditionCompletePlateView" +export * from "./LayoutLimitedEditionStyledNumberView" diff --git a/src/common/transitions/TransitionAnimation.tsx b/src/common/transitions/TransitionAnimation.tsx index 6eefd2df4..cf6901f1f 100644 --- a/src/common/transitions/TransitionAnimation.tsx +++ b/src/common/transitions/TransitionAnimation.tsx @@ -1,9 +1,8 @@ -import { FC, ReactNode, useEffect, useState } from 'react'; -import { Transition } from 'react-transition-group'; -import { getTransitionAnimationStyle } from './TransitionAnimationStyles'; +import { FC, ReactNode, useEffect, useRef, useState } from "react" +import { Transition } from "react-transition-group" +import { getTransitionAnimationStyle } from "./TransitionAnimationStyles" -interface TransitionAnimationProps -{ +interface TransitionAnimationProps { type: string; inProp: boolean; timeout?: number; @@ -11,42 +10,43 @@ interface TransitionAnimationProps children?: ReactNode; } -export const TransitionAnimation: FC = props => -{ - const { type = null, inProp = false, timeout = 300, className = null, children = null } = props; +export const TransitionAnimation: FC = ({ + type, + inProp, + timeout = 300, + className = "", + children +}) => { + const nodeRef = useRef(null) + const [ isChildrenVisible, setChildrenVisible ] = useState(false) - const [ isChildrenVisible, setChildrenVisible ] = useState(false); + useEffect(() => { + let timeoutId: ReturnType | null = null - useEffect(() => - { - let timeoutData: ReturnType = null; - - if(inProp) - { - setChildrenVisible(true); - } - else - { - timeoutData = setTimeout(() => - { - setChildrenVisible(false); - clearTimeout(timeout); - }, timeout); + if (inProp) { + setChildrenVisible(true) + } else { + timeoutId = setTimeout(() => { + setChildrenVisible(false) + }, timeout) } - return () => - { - if(timeoutData) clearTimeout(timeoutData); + return () => { + if (timeoutId) clearTimeout(timeoutId) } - }, [ inProp, timeout ]); + }, [ inProp, timeout ]) return ( - - { state => ( -
- { isChildrenVisible && children } + + {(state) => ( +
+ {isChildrenVisible && children}
- ) } + )}
- ); -} + ) +} \ No newline at end of file diff --git a/src/common/transitions/TransitionAnimationStyles.ts b/src/common/transitions/TransitionAnimationStyles.ts index 0d512d0e1..dabade29e 100644 --- a/src/common/transitions/TransitionAnimationStyles.ts +++ b/src/common/transitions/TransitionAnimationStyles.ts @@ -1,136 +1,136 @@ -import { CSSProperties } from 'react'; -import { TransitionStatus } from 'react-transition-group'; -import { ENTERING, EXITING } from 'react-transition-group/Transition'; -import { TransitionAnimationTypes } from './TransitionAnimationTypes'; +import { CSSProperties } from "react" +import { TransitionStatus } from "react-transition-group" +import { ENTERING, EXITING } from "react-transition-group/Transition" +import { TransitionAnimationTypes } from "./TransitionAnimationTypes" export function getTransitionAnimationStyle(type: string, transition: TransitionStatus, timeout: number = 300): Partial { switch(type) { - case TransitionAnimationTypes.BOUNCE: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'bounceIn', - animationDuration: `${ timeout }ms` - } - case EXITING: - return { - animationName: 'bounceOut', - animationDuration: `${ timeout }ms` - } + case TransitionAnimationTypes.BOUNCE: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "bounceIn", + animationDuration: `${ timeout }ms` } - case TransitionAnimationTypes.SLIDE_LEFT: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'slideInLeft', - animationDuration: `${ timeout }ms` - } - case EXITING: - return { - animationName: 'slideOutLeft', - animationDuration: `${ timeout }ms` - } + case EXITING: + return { + animationName: "bounceOut", + animationDuration: `${ timeout }ms` } - case TransitionAnimationTypes.SLIDE_RIGHT: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'slideInRight', - animationDuration: `${ timeout }ms` - } - case EXITING: - return { - animationName: 'slideOutRight', - animationDuration: `${ timeout }ms` - } + } + case TransitionAnimationTypes.SLIDE_LEFT: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "slideInLeft", + animationDuration: `${ timeout }ms` } - case TransitionAnimationTypes.FLIP_X: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'flipInX', - animationDuration: `${ timeout }ms` - } - case EXITING: - return { - animationName: 'flipOutX', - animationDuration: `${ timeout }ms` - } + case EXITING: + return { + animationName: "slideOutLeft", + animationDuration: `${ timeout }ms` } - case TransitionAnimationTypes.FADE_UP: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'fadeInUp', - animationDuration: `${ timeout }ms` - } - case EXITING: - return { - animationName: 'fadeOutDown', - animationDuration: `${ timeout }ms` - } + } + case TransitionAnimationTypes.SLIDE_RIGHT: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "slideInRight", + animationDuration: `${ timeout }ms` } - case TransitionAnimationTypes.FADE_IN: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'fadeIn', - animationDuration: `${ timeout }ms` - } - case EXITING: - return { - animationName: 'fadeOut', - animationDuration: `${ timeout }ms` - } + case EXITING: + return { + animationName: "slideOutRight", + animationDuration: `${ timeout }ms` } - case TransitionAnimationTypes.FADE_DOWN: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'fadeInDown', - animationDuration: `${ timeout }ms` - } - case EXITING: - return { - animationName: 'fadeOutUp', - animationDuration: `${ timeout }ms` - } + } + case TransitionAnimationTypes.FLIP_X: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "flipInX", + animationDuration: `${ timeout }ms` } - case TransitionAnimationTypes.HEAD_SHAKE: - switch(transition) - { - default: - return {} - case ENTERING: - return { - animationName: 'headShake', - animationDuration: `${ timeout }ms` - } + case EXITING: + return { + animationName: "flipOutX", + animationDuration: `${ timeout }ms` } + } + case TransitionAnimationTypes.FADE_UP: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "fadeInUp", + animationDuration: `${ timeout }ms` + } + case EXITING: + return { + animationName: "fadeOutDown", + animationDuration: `${ timeout }ms` + } + } + case TransitionAnimationTypes.FADE_IN: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "fadeIn", + animationDuration: `${ timeout }ms` + } + case EXITING: + return { + animationName: "fadeOut", + animationDuration: `${ timeout }ms` + } + } + case TransitionAnimationTypes.FADE_DOWN: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "fadeInDown", + animationDuration: `${ timeout }ms` + } + case EXITING: + return { + animationName: "fadeOutUp", + animationDuration: `${ timeout }ms` + } + } + case TransitionAnimationTypes.HEAD_SHAKE: + switch(transition) + { + default: + return {} + case ENTERING: + return { + animationName: "headShake", + animationDuration: `${ timeout }ms` + } + } } - return null; + return null } diff --git a/src/common/transitions/TransitionAnimationTypes.ts b/src/common/transitions/TransitionAnimationTypes.ts index 4ecc23be1..77e7b547c 100644 --- a/src/common/transitions/TransitionAnimationTypes.ts +++ b/src/common/transitions/TransitionAnimationTypes.ts @@ -1,11 +1,11 @@ export class TransitionAnimationTypes { - public static BOUNCE: string = 'bounce'; - public static SLIDE_LEFT: string = 'slideLeft'; - public static SLIDE_RIGHT: string = 'slideRight'; - public static FLIP_X: string = 'flipX'; - public static FADE_IN: string = 'fadeIn'; - public static FADE_DOWN: string = 'fadeDown'; - public static FADE_UP: string = 'fadeUp'; - public static HEAD_SHAKE: string = 'headShake'; + public static BOUNCE: string = "bounce" + public static SLIDE_LEFT: string = "slideLeft" + public static SLIDE_RIGHT: string = "slideRight" + public static FLIP_X: string = "flipX" + public static FADE_IN: string = "fadeIn" + public static FADE_DOWN: string = "fadeDown" + public static FADE_UP: string = "fadeUp" + public static HEAD_SHAKE: string = "headShake" } diff --git a/src/common/transitions/index.ts b/src/common/transitions/index.ts index 283a00587..89028d672 100644 --- a/src/common/transitions/index.ts +++ b/src/common/transitions/index.ts @@ -1,3 +1,3 @@ -export * from './TransitionAnimation'; -export * from './TransitionAnimationStyles'; -export * from './TransitionAnimationTypes'; +export * from "./TransitionAnimation" +export * from "./TransitionAnimationStyles" +export * from "./TransitionAnimationTypes" diff --git a/src/common/types/AlignItemType.ts b/src/common/types/AlignItemType.ts index 5a61476df..6982626b2 100644 --- a/src/common/types/AlignItemType.ts +++ b/src/common/types/AlignItemType.ts @@ -1 +1 @@ -export type AlignItemType = 'start' | 'end' | 'center' | 'baseline' | 'stretch'; +export type AlignItemType = "start" | "end" | "center" | "baseline" | "stretch"; diff --git a/src/common/types/AlignSelfType.ts b/src/common/types/AlignSelfType.ts index 8e26378bd..f81e15fb0 100644 --- a/src/common/types/AlignSelfType.ts +++ b/src/common/types/AlignSelfType.ts @@ -1 +1 @@ -export type AlignSelfType = 'start' | 'end' | 'center' | 'baseline' | 'stretch'; +export type AlignSelfType = "start" | "end" | "center" | "baseline" | "stretch"; diff --git a/src/common/types/ButtonSizeType.ts b/src/common/types/ButtonSizeType.ts index 0f9dd4a0d..cf04e6e9a 100644 --- a/src/common/types/ButtonSizeType.ts +++ b/src/common/types/ButtonSizeType.ts @@ -1 +1 @@ -export type ButtonSizeType = 'lg' | 'sm'; +export type ButtonSizeType = "lg" | "sm"; diff --git a/src/common/types/ColorVariantType.ts b/src/common/types/ColorVariantType.ts index 1ff6f60b4..a1bce872f 100644 --- a/src/common/types/ColorVariantType.ts +++ b/src/common/types/ColorVariantType.ts @@ -1 +1 @@ -export type ColorVariantType = 'primary' | 'success' | 'danger' | 'secondary' | 'link' | 'black' | 'white' | 'dark' | 'warning' | 'muted' | 'light'; +export type ColorVariantType = "primary" | "success" | "orange" | "volter-bold" | "volter" | "wired" | "danger" | "underline" | "secondary" | "link" | "black" | "white" | "dark" | "warning" | "muted" | "light"; diff --git a/src/common/types/DisplayType.ts b/src/common/types/DisplayType.ts index 7551d7215..cf2c47539 100644 --- a/src/common/types/DisplayType.ts +++ b/src/common/types/DisplayType.ts @@ -1 +1 @@ -export type DisplayType = 'none' | 'inline' | 'inline-block' | 'block' | 'grid' | 'table' | 'table-cell' | 'table-row' | 'flex' | 'inline-flex'; +export type DisplayType = "none" | "inline" | "inline-block" | "block" | "grid" | "table" | "table-cell" | "table-row" | "flex" | "inline-flex"; diff --git a/src/common/types/FloatType.ts b/src/common/types/FloatType.ts index 63e495fe5..b5084af99 100644 --- a/src/common/types/FloatType.ts +++ b/src/common/types/FloatType.ts @@ -1 +1 @@ -export type FloatType = 'start' | 'end' | 'none'; +export type FloatType = "start" | "end" | "none"; diff --git a/src/common/types/FontWeightType.ts b/src/common/types/FontWeightType.ts index c7c92866c..db73d5598 100644 --- a/src/common/types/FontWeightType.ts +++ b/src/common/types/FontWeightType.ts @@ -1 +1 @@ -export type FontWeightType = 'bold' | 'bolder' | 'normal' | 'light' | 'lighter'; +export type FontWeightType = "bold" | "bolder" | "normal" | "light" | "lighter"; diff --git a/src/common/types/JustifyContentType.ts b/src/common/types/JustifyContentType.ts index 73a318d2d..da18a84ca 100644 --- a/src/common/types/JustifyContentType.ts +++ b/src/common/types/JustifyContentType.ts @@ -1 +1 @@ -export type JustifyContentType = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'; +export type JustifyContentType = "start" | "end" | "center" | "between" | "around" | "evenly"; diff --git a/src/common/types/OverflowType.ts b/src/common/types/OverflowType.ts index 9231ff9f4..acd830f59 100644 --- a/src/common/types/OverflowType.ts +++ b/src/common/types/OverflowType.ts @@ -1 +1 @@ -export type OverflowType = 'auto' | 'hidden' | 'visible' | 'scroll' | 'y-scroll' | 'unset'; +export type OverflowType = "auto" | "hidden" | "visible" | "scroll" | "y-scroll" | "unset"; diff --git a/src/common/types/PositionType.ts b/src/common/types/PositionType.ts index 4e20b2fbd..6e5e89277 100644 --- a/src/common/types/PositionType.ts +++ b/src/common/types/PositionType.ts @@ -1 +1 @@ -export type PositionType = 'static' | 'relative' | 'fixed' | 'absolute' | 'sticky'; +export type PositionType = "static" | "relative" | "fixed" | "absolute" | "sticky"; diff --git a/src/common/types/TextAlignType.ts b/src/common/types/TextAlignType.ts index cb8264806..1d0dd2d2c 100644 --- a/src/common/types/TextAlignType.ts +++ b/src/common/types/TextAlignType.ts @@ -1 +1 @@ -export type TextAlignType = 'start' | 'center' | 'end'; +export type TextAlignType = "start" | "center" | "end"; diff --git a/src/common/types/index.ts b/src/common/types/index.ts index 333177e28..44d08f8f3 100644 --- a/src/common/types/index.ts +++ b/src/common/types/index.ts @@ -1,14 +1,14 @@ -export * from './AlignItemType'; -export * from './AlignSelfType'; -export * from './ButtonSizeType'; -export * from './ColorVariantType'; -export * from './ColumnSizesType'; -export * from './DisplayType'; -export * from './FloatType'; -export * from './FontSizeType'; -export * from './FontWeightType'; -export * from './JustifyContentType'; -export * from './OverflowType'; -export * from './PositionType'; -export * from './SpacingType'; -export * from './TextAlignType'; +export * from "./AlignItemType" +export * from "./AlignSelfType" +export * from "./ButtonSizeType" +export * from "./ColorVariantType" +export * from "./ColumnSizesType" +export * from "./DisplayType" +export * from "./FloatType" +export * from "./FontSizeType" +export * from "./FontWeightType" +export * from "./JustifyContentType" +export * from "./OverflowType" +export * from "./PositionType" +export * from "./SpacingType" +export * from "./TextAlignType" diff --git a/src/common/utils/CreateTransitionToIcon.ts b/src/common/utils/CreateTransitionToIcon.ts index dbc59029c..645f4ba4f 100644 --- a/src/common/utils/CreateTransitionToIcon.ts +++ b/src/common/utils/CreateTransitionToIcon.ts @@ -1,14 +1,14 @@ -import { NitroToolbarAnimateIconEvent } from '@nitrots/nitro-renderer'; -import { GetRoomEngine } from '../../api'; +import { NitroToolbarAnimateIconEvent } from "@nitrots/nitro-renderer" +import { GetRoomEngine } from "../../api" export const CreateTransitionToIcon = (image: HTMLImageElement, fromElement: HTMLElement, icon: string) => { - const bounds = fromElement.getBoundingClientRect(); - const x = (bounds.x + (bounds.width / 2)); - const y = (bounds.y + (bounds.height / 2)); - const event = new NitroToolbarAnimateIconEvent(image, x, y); + const bounds = fromElement.getBoundingClientRect() + const x = (bounds.x + (bounds.width / 2)) + const y = (bounds.y + (bounds.height / 2)) + const event = new NitroToolbarAnimateIconEvent(image, x, y) - event.iconName = icon; + event.iconName = icon - GetRoomEngine().events.dispatchEvent(event); + GetRoomEngine().events.dispatchEvent(event) } diff --git a/src/common/utils/FriendlyTimeView.tsx b/src/common/utils/FriendlyTimeView.tsx deleted file mode 100644 index 95af3a3fc..000000000 --- a/src/common/utils/FriendlyTimeView.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { FriendlyTime } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useMemo, useState } from 'react'; -import { Base, BaseProps } from '..'; - -interface FriendlyTimeViewProps extends BaseProps -{ - seconds: number; - isShort?: boolean; -} - -export const FriendlyTimeView: FC = props => -{ - const { seconds = 0, isShort = false, children = null, ...rest } = props; - const [ updateId, setUpdateId ] = useState(-1); - - const getStartSeconds = useMemo(() => (Math.round(new Date().getSeconds()) - seconds), [ seconds ]); - - useEffect(() => - { - const interval = setInterval(() => setUpdateId(prevValue => (prevValue + 1)), 10000); - - return () => clearInterval(interval); - }, []); - - const value = (Math.round(new Date().getSeconds()) - getStartSeconds); - - return { isShort ? FriendlyTime.shortFormat(value) : FriendlyTime.format(value) }; -} diff --git a/src/common/utils/index.ts b/src/common/utils/index.ts index 11d60a343..784c05d8f 100644 --- a/src/common/utils/index.ts +++ b/src/common/utils/index.ts @@ -1,2 +1,2 @@ -export * from './CreateTransitionToIcon'; -export * from './FriendlyTimeView'; +export * from "./CreateTransitionToIcon" + diff --git a/src/components/achievements/AchievementsView.scss b/src/components/achievements/AchievementsView.scss deleted file mode 100644 index 3fa61ac01..000000000 --- a/src/components/achievements/AchievementsView.scss +++ /dev/null @@ -1,15 +0,0 @@ -.nitro-achievements { - width: $achievement-width; - height: $achievement-height; -} - -.nitro-achievements-back-arrow { - background: url('@/assets/images/achievements/back-arrow.png') no-repeat center; - width: 33px; - height: 34px; -} - -.nitro-achievements-badge-image { - width: 80px !important; - height: 80px !important; -} diff --git a/src/components/achievements/AchievementsView.tsx b/src/components/achievements/AchievementsView.tsx index 6c7940a77..b343c83d1 100644 --- a/src/components/achievements/AchievementsView.tsx +++ b/src/components/achievements/AchievementsView.tsx @@ -1,72 +1,79 @@ -import { ILinkEventTracker } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { AchievementUtilities, AddEventLinkTracker, LocalizeText, RemoveLinkEventTracker } from '../../api'; -import { Base, Column, LayoutImage, LayoutProgressBar, NitroCardContentView, NitroCardHeaderView, NitroCardSubHeaderView, NitroCardView, Text } from '../../common'; -import { useAchievements } from '../../hooks'; -import { AchievementCategoryView } from './views/AchievementCategoryView'; -import { AchievementsCategoryListView } from './views/category-list/AchievementsCategoryListView'; +import { ILinkEventTracker } from "@nitrots/nitro-renderer" +import { FC, useEffect, useState } from "react" +import { AchievementUtilities, AddEventLinkTracker, LocalizeText, RemoveLinkEventTracker } from "../../api" +import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from "../../common" +import { useAchievements } from "../../hooks" +import { AchievementCategoryView } from "./views/AchievementCategoryView" +import { AchievementsCategoryListView } from "./views/category-list/AchievementsCategoryListView" export const AchievementsView: FC<{}> = props => { - const [ isVisible, setIsVisible ] = useState(false); - const { achievementCategories = [], selectedCategoryCode = null, setSelectedCategoryCode = null, achievementScore = 0, getProgress = 0, getMaxProgress = 0, selectedCategory = null } = useAchievements(); + const [ isVisible, setIsVisible ] = useState(false) + const { achievementCategories = [], selectedCategoryCode = null, setSelectedCategoryCode = null, achievementScore = 0, getProgress = 0, getMaxProgress = 0, selectedCategory = null } = useAchievements() useEffect(() => { const linkTracker: ILinkEventTracker = { linkReceived: (url: string) => { - const parts = url.split('/'); + const parts = url.split("/") - if(parts.length < 2) return; + if(parts.length < 2) return switch(parts[1]) { - case 'show': - setIsVisible(true); - return; - case 'hide': - setIsVisible(false); - return; - case 'toggle': - setIsVisible(prevValue => !prevValue); - return; + case "show": + setIsVisible(true) + return + case "hide": + setIsVisible(false) + return + case "toggle": + setIsVisible(prevValue => !prevValue) + return } }, - eventUrlPrefix: 'achievements/' - }; + eventUrlPrefix: "achievements/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, []); + return () => RemoveLinkEventTracker(linkTracker) + }, []) - if(!isVisible) return null; + if(!isVisible) return null return ( - - setIsVisible(false) } /> - { selectedCategory && - - setSelectedCategoryCode(null) } className="nitro-achievements-back-arrow" /> - - { LocalizeText(`quests.${ selectedCategory.code }.name`) } - { LocalizeText('achievements.details.categoryprogress', [ 'progress', 'limit' ], [ selectedCategory.getProgress().toString(), selectedCategory.getMaxProgress().toString() ]) } - - - } - + + setIsVisible(false) } /> + + { selectedCategory && <> +
+
+ setSelectedCategoryCode(null) } /> +
+

{ LocalizeText(`quests.${ selectedCategory.code }.name`) }

+

{ LocalizeText("achievements.details.categoryprogress", [ "progress", "limit" ], [ selectedCategory.getProgress().toString(), selectedCategory.getMaxProgress().toString() ]) }

+
+
+
+
+ + } { !selectedCategory && - <> +
- - { LocalizeText('achievements.categories.score', [ 'score' ], [ achievementScore.toString() ]) } - - - } - { selectedCategory && - } +
+
+
+
+
+

{ LocalizeText("achievements.categories.totalprogress", [ "progress", "limit" ], [ getProgress.toString(), getMaxProgress.toString() ]) }

+
+

{ LocalizeText("achievements.categories.score", [ "score" ], [ achievementScore.toString() ]) }

+
+
} - ); -}; + ) +} diff --git a/src/components/achievements/views/AchievementBadgeView.tsx b/src/components/achievements/views/AchievementBadgeView.tsx deleted file mode 100644 index 5b0d4f93d..000000000 --- a/src/components/achievements/views/AchievementBadgeView.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { AchievementData } from '@nitrots/nitro-renderer'; -import { FC } from 'react'; -import { AchievementUtilities } from '../../../api'; -import { BaseProps, LayoutBadgeImageView } from '../../../common'; - -interface AchievementBadgeViewProps extends BaseProps -{ - achievement: AchievementData; - scale?: number; -} - -export const AchievementBadgeView: FC = props => -{ - const { achievement = null, scale = 1, ...rest } = props; - - if(!achievement) return null; - - return ; -} diff --git a/src/components/achievements/views/AchievementCategoryView.tsx b/src/components/achievements/views/AchievementCategoryView.tsx index 8774d2088..7d936a0e9 100644 --- a/src/components/achievements/views/AchievementCategoryView.tsx +++ b/src/components/achievements/views/AchievementCategoryView.tsx @@ -1,9 +1,8 @@ -import { FC, useEffect } from 'react'; -import { AchievementCategory } from '../../../api'; -import { Column } from '../../../common'; -import { useAchievements } from '../../../hooks'; -import { AchievementListView } from './achievement-list'; -import { AchievementDetailsView } from './AchievementDetailsView'; +import { FC, useEffect } from "react" +import { AchievementCategory } from "../../../api" +import { useAchievements } from "../../../hooks" +import { AchievementDetailsView } from "./AchievementDetailsView" +import { AchievementListView } from "./achievement-list" interface AchievementCategoryViewProps { @@ -12,26 +11,26 @@ interface AchievementCategoryViewProps export const AchievementCategoryView: FC = props => { - const { category = null } = props; - const { selectedAchievement = null, setSelectedAchievementId = null } = useAchievements(); + const { category = null } = props + const { selectedAchievement = null, setSelectedAchievementId = null } = useAchievements() useEffect(() => { - if(!category) return; + if(!category) return if(!selectedAchievement) { - setSelectedAchievementId(category?.achievements?.[0]?.achievementId); + setSelectedAchievementId(category?.achievements?.[0]?.achievementId) } - }, [ category, selectedAchievement, setSelectedAchievementId ]); + }, [ category, selectedAchievement, setSelectedAchievementId ]) - if(!category) return null; + if(!category) return null return ( - +
{ !!selectedAchievement && } - - ); +
+ ) } diff --git a/src/components/achievements/views/AchievementDetailsView.tsx b/src/components/achievements/views/AchievementDetailsView.tsx index b04fa183f..724996cb7 100644 --- a/src/components/achievements/views/AchievementDetailsView.tsx +++ b/src/components/achievements/views/AchievementDetailsView.tsx @@ -1,8 +1,7 @@ -import { AchievementData } from '@nitrots/nitro-renderer'; -import { FC } from 'react'; -import { AchievementUtilities, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from '../../../api'; -import { Column, Flex, LayoutCurrencyIcon, LayoutProgressBar, Text } from '../../../common'; -import { AchievementBadgeView } from './AchievementBadgeView'; +import { AchievementData } from "@nitrots/nitro-renderer" +import { FC } from "react" +import { AchievementUtilities, LocalizeBadgeDescription, LocalizeBadgeName, LocalizeText } from "../../../api" +import { LayoutBadgeImageView } from "../../../common" interface AchievementDetailsViewProps { @@ -11,43 +10,39 @@ interface AchievementDetailsViewProps export const AchievementDetailsView: FC = props => { - const { achievement = null } = props; + const { achievement = null } = props - if(!achievement) return null; + if(!achievement) return null return ( - - - - - { LocalizeText('achievements.details.level', [ 'level', 'limit' ], [ AchievementUtilities.getAchievementLevel(achievement).toString(), achievement.levelCount.toString() ]) } - - - - - +
+
+
+ +
+
+
+
+

{ LocalizeBadgeName(AchievementUtilities.getAchievementBadgeCode(achievement)) } - - +

+

{ LocalizeBadgeDescription(AchievementUtilities.getAchievementBadgeCode(achievement)) } - - - { ((achievement.levelRewardPoints > 0) || (achievement.scoreLimit > 0)) && - - { (achievement.levelRewardPoints > 0) && - - - { LocalizeText('achievements.details.reward') } - - - { achievement.levelRewardPoints } - - - } - { (achievement.scoreLimit > 0) && - } - } - - +

+

+ {LocalizeText("resolution.achievement.level")} {AchievementUtilities.getAchievementLevel(achievement).toString()}/{achievement.levelCount.toString()} +

+
+ { (achievement.scoreLimit > 0) && +
+
+
+
+
+

{(achievement.currentPoints + achievement.scoreAtStartOfLevel).toString() + "/" + (achievement.scoreLimit + achievement.scoreAtStartOfLevel).toString() }

+
+
} +
+
) } diff --git a/src/components/achievements/views/achievement-list/AchievementListItemView.tsx b/src/components/achievements/views/achievement-list/AchievementListItemView.tsx index 9da632bd2..005ce0cd7 100644 --- a/src/components/achievements/views/achievement-list/AchievementListItemView.tsx +++ b/src/components/achievements/views/achievement-list/AchievementListItemView.tsx @@ -1,8 +1,8 @@ -import { AchievementData } from '@nitrots/nitro-renderer'; -import { FC } from 'react'; -import { LayoutGridItem } from '../../../../common'; -import { useAchievements } from '../../../../hooks'; -import { AchievementBadgeView } from '../AchievementBadgeView'; +import { AchievementData } from "@nitrots/nitro-renderer" +import { FC } from "react" +import { AchievementUtilities } from "../../../../api" +import { LayoutBadgeImageView } from "../../../../common" +import { useAchievements } from "../../../../hooks" interface AchievementListItemViewProps { @@ -11,14 +11,14 @@ interface AchievementListItemViewProps export const AchievementListItemView: FC = props => { - const { achievement = null } = props; - const { selectedAchievement = null, setSelectedAchievementId = null } = useAchievements(); + const { achievement = null } = props + const { selectedAchievement = null, setSelectedAchievementId = null } = useAchievements() - if(!achievement) return null; + if(!achievement) return null return ( - 0) } onClick={ event => setSelectedAchievementId(achievement.achievementId) }> - - - ); +
setSelectedAchievementId(achievement.achievementId) }> + +
+ ) } diff --git a/src/components/achievements/views/achievement-list/AchievementListView.tsx b/src/components/achievements/views/achievement-list/AchievementListView.tsx index f0095817c..b002b450d 100644 --- a/src/components/achievements/views/achievement-list/AchievementListView.tsx +++ b/src/components/achievements/views/achievement-list/AchievementListView.tsx @@ -1,7 +1,6 @@ -import { AchievementData } from '@nitrots/nitro-renderer'; -import { FC } from 'react'; -import { AutoGrid } from '../../../../common'; -import { AchievementListItemView } from './AchievementListItemView'; +import { AchievementData } from "@nitrots/nitro-renderer" +import { FC } from "react" +import { AchievementListItemView } from "./AchievementListItemView" interface AchievementListViewProps { @@ -10,11 +9,11 @@ interface AchievementListViewProps export const AchievementListView: FC = props => { - const { achievements = null } = props; + const { achievements = null } = props return ( - +
{ achievements && (achievements.length > 0) && achievements.map((achievement, index) => ) } - - ); +
+ ) } diff --git a/src/components/achievements/views/achievement-list/index.ts b/src/components/achievements/views/achievement-list/index.ts index 87ccb432e..b89939b3d 100644 --- a/src/components/achievements/views/achievement-list/index.ts +++ b/src/components/achievements/views/achievement-list/index.ts @@ -1,2 +1,2 @@ -export * from './AchievementListItemView'; -export * from './AchievementListView'; +export * from "./AchievementListItemView" +export * from "./AchievementListView" diff --git a/src/components/achievements/views/category-list/AchievementsCategoryListItemView.tsx b/src/components/achievements/views/category-list/AchievementsCategoryListItemView.tsx index 91b96c6ed..2f125571e 100644 --- a/src/components/achievements/views/category-list/AchievementsCategoryListItemView.tsx +++ b/src/components/achievements/views/category-list/AchievementsCategoryListItemView.tsx @@ -1,6 +1,6 @@ -import { Dispatch, FC, SetStateAction } from 'react'; -import { AchievementUtilities, IAchievementCategory, LocalizeText } from '../../../../api'; -import { LayoutBackgroundImage, LayoutGridItem, Text } from '../../../../common'; +import { Dispatch, FC, SetStateAction } from "react" +import { AchievementUtilities, IAchievementCategory, LocalizeText } from "../../../../api" +import { LayoutItemCountView } from "../../../../common" interface AchievementCategoryListItemViewProps { @@ -11,21 +11,22 @@ interface AchievementCategoryListItemViewProps export const AchievementsCategoryListItemView: FC = props => { - const { category = null, selectedCategoryCode = null, setSelectedCategoryCode = null } = props; + const { category = null, selectedCategoryCode = null, setSelectedCategoryCode = null } = props - if(!category) return null; + if(!category) return null - const progress = AchievementUtilities.getAchievementCategoryProgress(category); - const maxProgress = AchievementUtilities.getAchievementCategoryMaxProgress(category); - const getCategoryImage = AchievementUtilities.getAchievementCategoryImageUrl(category, progress); - const getTotalUnseen = AchievementUtilities.getAchievementCategoryTotalUnseen(category); + const progress = AchievementUtilities.getAchievementCategoryProgress(category) + const maxProgress = AchievementUtilities.getAchievementCategoryMaxProgress(category) + const getCategoryImage = AchievementUtilities.getAchievementCategoryImageUrl(category, progress) + const getTotalUnseen = AchievementUtilities.getAchievementCategoryTotalUnseen(category) return ( - setSelectedCategoryCode(category.code) }> - { LocalizeText(`quests.${ category.code }.name`) } - - { progress } / { maxProgress } - - - ); +
setSelectedCategoryCode(category.code) }> +

{ LocalizeText(`quests.${ category.code }.name`) }

+
+

{ progress }/{ maxProgress }

+
+ { (getTotalUnseen > 0) && } +
+ ) } diff --git a/src/components/achievements/views/category-list/AchievementsCategoryListView.tsx b/src/components/achievements/views/category-list/AchievementsCategoryListView.tsx index ca362968e..51c3fd356 100644 --- a/src/components/achievements/views/category-list/AchievementsCategoryListView.tsx +++ b/src/components/achievements/views/category-list/AchievementsCategoryListView.tsx @@ -1,7 +1,6 @@ -import { Dispatch, FC, SetStateAction } from 'react'; -import { IAchievementCategory } from '../../../../api'; -import { AutoGrid } from '../../../../common'; -import { AchievementsCategoryListItemView } from './AchievementsCategoryListItemView'; +import { Dispatch, FC, SetStateAction } from "react" +import { IAchievementCategory } from "../../../../api" +import { AchievementsCategoryListItemView } from "./AchievementsCategoryListItemView" interface AchievementsCategoryListViewProps { @@ -12,11 +11,11 @@ interface AchievementsCategoryListViewProps export const AchievementsCategoryListView: FC = props => { - const { categories = null, selectedCategoryCode = null, setSelectedCategoryCode = null } = props; + const { categories = null, selectedCategoryCode = null, setSelectedCategoryCode = null } = props return ( - - { categories && (categories.length > 0) && categories.map((category, index) => ) } - - ); -}; +
+ { categories && (categories.length > 0) && categories.map((category, index) => ) } +
+ ) +} diff --git a/src/components/achievements/views/category-list/index.ts b/src/components/achievements/views/category-list/index.ts index 5a367f857..97ac5705a 100644 --- a/src/components/achievements/views/category-list/index.ts +++ b/src/components/achievements/views/category-list/index.ts @@ -1,2 +1,2 @@ -export * from './AchievementsCategoryListItemView'; -export * from './AchievementsCategoryListView'; +export * from "./AchievementsCategoryListItemView" +export * from "./AchievementsCategoryListView" diff --git a/src/components/achievements/views/index.ts b/src/components/achievements/views/index.ts index 576c6357b..83277c00f 100644 --- a/src/components/achievements/views/index.ts +++ b/src/components/achievements/views/index.ts @@ -1,5 +1,4 @@ -export * from './achievement-list'; -export * from './AchievementBadgeView'; -export * from './AchievementCategoryView'; -export * from './AchievementDetailsView'; -export * from './category-list'; +export * from "./AchievementCategoryView" +export * from "./AchievementDetailsView" +export * from "./achievement-list" +export * from "./category-list" diff --git a/src/components/avatar-editor/AvatarEditorView.scss b/src/components/avatar-editor/AvatarEditorView.scss deleted file mode 100644 index 22b873d40..000000000 --- a/src/components/avatar-editor/AvatarEditorView.scss +++ /dev/null @@ -1,336 +0,0 @@ -.nitro-avatar-editor-spritesheet { - background: url('@/assets/images/avatareditor/avatar-editor-spritesheet.png') transparent no-repeat; - - &.arrow-left-icon { - width: 28px; - height: 21px; - background-position: -226px -131px; - } - - &.arrow-right-icon { - width: 28px; - height: 21px; - background-position: -226px -162px; - } - - &.ca-icon { - width: 25px; - height: 25px; - background-position: -226px -61px; - - &.selected { - width: 25px; - height: 25px; - background-position: -226px -96px; - } - } - - &.cc-icon { - width: 31px; - height: 29px; - background-position: -145px -5px; - - &.selected { - width: 31px; - height: 29px; - background-position: -145px -44px; - } - } - - &.ch-icon { - width: 29px; - height: 24px; - background-position: -186px -39px; - - &.selected { - width: 29px; - height: 24px; - background-position: -186px -73px; - } - } - - &.clear-icon { - width: 27px; - height: 27px; - background-position: -145px -157px; - } - - &.cp-icon { - width: 30px; - height: 24px; - background-position: -145px -264px; - - &.selected { - width: 30px; - height: 24px; - background-position: -186px -5px; - } - } - - - &.ea-icon { - width: 35px; - height: 16px; - background-position: -226px -193px; - - &.selected { - width: 35px; - height: 16px; - background-position: -226px -219px; - } - } - - &.fa-icon { - width: 27px; - height: 20px; - background-position: -186px -137px; - - &.selected { - width: 27px; - height: 20px; - background-position: -186px -107px; - } - } - - &.female-icon { - width: 18px; - height: 27px; - background-position: -186px -202px; - - &.selected { - width: 18px; - height: 27px; - background-position: -186px -239px; - } - } - - &.ha-icon { - width: 25px; - height: 22px; - background-position: -226px -245px; - - &.selected { - width: 25px; - height: 22px; - background-position: -226px -277px; - } - } - - &.he-icon { - width: 31px; - height: 27px; - background-position: -145px -83px; - - &.selected { - width: 31px; - height: 27px; - background-position: -145px -120px; - } - } - - &.hr-icon { - width: 29px; - height: 25px; - background-position: -145px -194px; - - &.selected { - width: 29px; - height: 25px; - background-position: -145px -229px; - } - } - - &.lg-icon { - width: 19px; - height: 20px; - background-position: -303px -45px; - - &.selected { - width: 19px; - height: 20px; - background-position: -303px -75px; - } - } - - &.loading-icon { - width: 21px; - height: 25px; - background-position: -186px -167px; - } - - - &.male-icon { - width: 21px; - height: 21px; - background-position: -186px -276px; - - &.selected { - width: 21px; - height: 21px; - background-position: -272px -5px; - } - } - - - &.sellable-icon { - width: 17px; - height: 15px; - background-position: -303px -105px; - } - - - &.sh-icon { - width: 37px; - height: 10px; - background-position: -303px -5px; - - &.selected { - width: 37px; - height: 10px; - background-position: -303px -25px; - } - } - - - &.spotlight-icon { - width: 130px; - height: 305px; - background-position: -5px -5px; - } - - - &.wa-icon { - width: 36px; - height: 18px; - background-position: -226px -5px; - - &.selected { - width: 36px; - height: 18px; - background-position: -226px -33px; - } - } -} - -.nitro-avatar-editor-wardrobe-figure-preview { - background-color: $pale-sky; - overflow: hidden; - z-index: 1; - - .avatar-image { - position: absolute; - bottom: -15px; - margin: 0 auto; - z-index: 4; - } - - .avatar-shadow { - position: absolute; - left: 0; - right: 0; - bottom: 25px; - width: 40px; - height: 20px; - margin: 0 auto; - border-radius: 100%; - background-color: rgba(0, 0, 0, 0.20); - z-index: 2; - } - - &:after { - position: absolute; - content: ''; - top: 75%; - bottom: 0; - left: 0; - right: 0; - border-radius: 50%; - background-color: $pale-sky; - box-shadow: 0 0 8px 2px rgba($white,.6); - transform: scale(2); - } - - .button-container { - position: absolute; - bottom: 0; - z-index: 5; - } -} - -.nitro-avatar-editor { - width: $avatar-editor-width; - height: $avatar-editor-height; - - .category-item { - height: 40px; - } - - .figure-preview-container { - position: relative; - height: 100%; - background-color: $pale-sky; - overflow: hidden; - z-index: 1; - - .arrow-container { - position: absolute; - width: 100%; - margin: 0 auto; - padding: 0 10px; - display: flex; - justify-content: space-between; - bottom: 12px; - z-index: 5; - - .icon { - cursor: pointer; - } - } - - .avatar-image { - position: absolute; - left: 0; - right: 0; - bottom: 50px; - margin: 0 auto; - z-index: 4; - } - - .avatar-spotlight { - position: absolute; - top: -10px; - left: 0; - right: 0; - margin: 0 auto; - opacity: 0.3; - pointer-events: none; - z-index: 3; - } - - .avatar-shadow { - position: absolute; - left: 0; - right: 0; - bottom: 15px; - width: 70px; - height: 30px; - margin: 0 auto; - border-radius: 100%; - background-color: rgba(0, 0, 0, 0.20); - z-index: 2; - } - - &:after { - position: absolute; - content: ''; - top: 75%; - bottom: 0; - left: 0; - right: 0; - border-radius: 50%; - background-color: $pale-sky; - box-shadow: 0 0 8px 2px rgba($white,.6); - transform: scale(2); - } - } -} diff --git a/src/components/avatar-editor/AvatarEditorView.tsx b/src/components/avatar-editor/AvatarEditorView.tsx index 6b3766e23..b08a22bbe 100644 --- a/src/components/avatar-editor/AvatarEditorView.tsx +++ b/src/components/avatar-editor/AvatarEditorView.tsx @@ -1,316 +1,344 @@ -import { AvatarEditorFigureCategory, FigureSetIdsMessageEvent, GetWardrobeMessageComposer, IAvatarFigureContainer, ILinkEventTracker, UserFigureComposer, UserWardrobePageEvent } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { FaDice, FaTrash, FaUndo } from 'react-icons/fa'; -import { AddEventLinkTracker, AvatarEditorAction, AvatarEditorUtilities, BodyModel, FigureData, generateRandomFigure, GetAvatarRenderManager, GetClubMemberLevel, GetConfiguration, GetSessionDataManager, HeadModel, IAvatarEditorCategoryModel, LegModel, LocalizeText, RemoveLinkEventTracker, SendMessageComposer, TorsoModel } from '../../api'; -import { Button, ButtonGroup, Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; -import { useMessageEvent } from '../../hooks'; -import { AvatarEditorFigurePreviewView } from './views/AvatarEditorFigurePreviewView'; -import { AvatarEditorModelView } from './views/AvatarEditorModelView'; -import { AvatarEditorWardrobeView } from './views/AvatarEditorWardrobeView'; - -const DEFAULT_MALE_FIGURE: string = 'hr-100.hd-180-7.ch-215-66.lg-270-79.sh-305-62.ha-1002-70.wa-2007'; -const DEFAULT_FEMALE_FIGURE: string = 'hr-515-33.hd-600-1.ch-635-70.lg-716-66-62.sh-735-68'; +import { AvatarEditorFigureCategory, FigureSetIdsMessageEvent, GetWardrobeMessageComposer, IAvatarFigureContainer, ILinkEventTracker, SetClothingChangeDataMessageComposer, UserFigureComposer, UserWardrobePageEvent } from "@nitrots/nitro-renderer" +import { FC, useCallback, useEffect, useMemo, useState } from "react" +import { AddEventLinkTracker, AvatarEditorAction, AvatarEditorUtilities, BodyModel, FigureData, GetAvatarRenderManager, GetClubMemberLevel, GetConfiguration, GetSessionDataManager, HeadModel, IAvatarEditorCategoryModel, LegModel, LocalizeText, RemoveLinkEventTracker, SendMessageComposer, TorsoModel, generateRandomFigure } from "../../api" +import { Button, NitroCardContentView, NitroCardHeaderView, NitroCardView } from "../../common" +import { useMessageEvent } from "../../hooks" +import { AvatarEditorFigurePreviewView } from "./views/AvatarEditorFigurePreviewView" +import { AvatarEditorModelView } from "./views/AvatarEditorModelView" +import { AvatarEditorWardrobeView } from "./views/AvatarEditorWardrobeView" + +const DEFAULT_MALE_FIGURE: string = "hr-100.hd-180-7.ch-215-66.lg-270-79.sh-305-62.ha-1002-70.wa-2007" +const DEFAULT_FEMALE_FIGURE: string = "hr-515-33.hd-600-1.ch-635-70.lg-716-66-62.sh-735-68" +const DEFAULT_MALE_FOOTBALL_GATE: string = "ch-3109-92-1408.lg-3116-82-1408.sh-3115-1408-1408" +const DEFAULT_FEMALE_FOOTBALL_GATE: string = "ch-3112-1408-1408.lg-3116-71-1408.sh-3115-1408-1408" export const AvatarEditorView: FC<{}> = props => { - const [ isVisible, setIsVisible ] = useState(false); - const [ figures, setFigures ] = useState>(null); - const [ figureData, setFigureData ] = useState(null); - const [ categories, setCategories ] = useState>(null); - const [ activeCategory, setActiveCategory ] = useState(null); - const [ figureSetIds, setFigureSetIds ] = useState([]); - const [ boundFurnitureNames, setBoundFurnitureNames ] = useState([]); - const [ savedFigures, setSavedFigures ] = useState<[ IAvatarFigureContainer, string ][]>([]); - const [ isWardrobeVisible, setIsWardrobeVisible ] = useState(false); - const [ lastFigure, setLastFigure ] = useState(null); - const [ lastGender, setLastGender ] = useState(null); - const [ needsReset, setNeedsReset ] = useState(true); - const [ isInitalized, setIsInitalized ] = useState(false); - - const maxWardrobeSlots = useMemo(() => GetConfiguration('avatar.wardrobe.max.slots', 10), []); - - useMessageEvent(FigureSetIdsMessageEvent, event => - { - const parser = event.getParser(); - - setFigureSetIds(parser.figureSetIds); - setBoundFurnitureNames(parser.boundsFurnitureNames); - }); - - useMessageEvent(UserWardrobePageEvent, event => + const [ isVisible, setIsVisible ] = useState(false) + const [ figures, setFigures ] = useState>(null) + const [ figureData, setFigureData ] = useState(null) + const [ categories, setCategories ] = useState>(null) + const [ activeCategory, setActiveCategory ] = useState(null) + const [ figureSetIds, setFigureSetIds ] = useState([]) + const [ boundFurnitureNames, setBoundFurnitureNames ] = useState([]) + const [ savedFigures, setSavedFigures ] = useState<[ IAvatarFigureContainer, string ][]>([]) + const [ isWardrobeVisible, setIsWardrobeVisible ] = useState(false) + const [ lastFigure, setLastFigure ] = useState(null) + const [ lastGender, setLastGender ] = useState(null) + const [ needsReset, setNeedsReset ] = useState(true) + const [ isInitalized, setIsInitalized ] = useState(false) + const [ genderFootballGate, setGenderFootballGate ] = useState(null) + const [ objectFootballGate, setObjectFootballGate ] = useState(null) + + const maxWardrobeSlots = useMemo(() => GetConfiguration("avatar.wardrobe.max.slots", 10), []) + + const showRandomFigure = GetConfiguration("illumina.random.figure.enabled") + + const TAB_ICON_STYLE = { + hd: "bg-[0px_-55px] w-[26px] h-[30px]", + head: "bg-[-27px_-55px] w-[26px] h-[26px]", + torso: "bg-[-54px_-55px] w-[27px] h-[23px]", + legs: "bg-[-82px_-55px] w-[18px] h-6", + wardrobe: "bg-[-101px_-55px] w-[29px] h-[21px]" + } + + const TAB_ICON_ACTIVE_STYLE = { + hd: "bg-[0px_-24px] w-[26px] h-[30px]", + head: "bg-[-27px_-24px] w-[26px] h-[26px]", + torso: "bg-[-54px_-24px] w-[27px] h-[23px]", + legs: "bg-[-82px_-24px] w-[18px] h-6", + wardrobe: "bg-[-101px_-24px] w-[29px] h-[21px]" + } + + const onClose = () => { - const parser = event.getParser(); - const savedFigures: [ IAvatarFigureContainer, string ][] = []; - - let i = 0; - - while(i < maxWardrobeSlots) - { - savedFigures.push([ null, null ]); - - i++; - } - - for(let [ index, [ look, gender ] ] of parser.looks.entries()) - { - const container = GetAvatarRenderManager().createFigureContainer(look); - - savedFigures[(index - 1)] = [ container, gender ]; - } - - setSavedFigures(savedFigures); - }); + setGenderFootballGate(null) + setObjectFootballGate(null) + setIsVisible(false) + } const selectCategory = useCallback((name: string) => { - if(!categories) return; + if(!categories) return - setActiveCategory(categories.get(name)); - }, [ categories ]); + setActiveCategory(categories.get(name)) + }, [ categories ]) const resetCategories = useCallback(() => { - const categories = new Map(); + const categories = new Map() - categories.set(AvatarEditorFigureCategory.GENERIC, new BodyModel()); - categories.set(AvatarEditorFigureCategory.HEAD, new HeadModel()); - categories.set(AvatarEditorFigureCategory.TORSO, new TorsoModel()); - categories.set(AvatarEditorFigureCategory.LEGS, new LegModel()); + if (!genderFootballGate) + { + categories.set(AvatarEditorFigureCategory.GENERIC, new BodyModel()) + categories.set(AvatarEditorFigureCategory.HEAD, new HeadModel()) + categories.set(AvatarEditorFigureCategory.TORSO, new TorsoModel()) + categories.set(AvatarEditorFigureCategory.LEGS, new LegModel()) + } + else + { + categories.set(AvatarEditorFigureCategory.TORSO, new TorsoModel()) + categories.set(AvatarEditorFigureCategory.LEGS, new LegModel()) + } - setCategories(categories); - }, []); + setCategories(categories) + }, [ genderFootballGate ]) const setupFigures = useCallback(() => { - const figures: Map = new Map(); + const figures: Map = new Map() - const maleFigure = new FigureData(); - const femaleFigure = new FigureData(); + const maleFigure = new FigureData() + const femaleFigure = new FigureData() - maleFigure.loadAvatarData(DEFAULT_MALE_FIGURE, FigureData.MALE); - femaleFigure.loadAvatarData(DEFAULT_FEMALE_FIGURE, FigureData.FEMALE); + maleFigure.loadAvatarData(DEFAULT_MALE_FIGURE, FigureData.MALE) + femaleFigure.loadAvatarData(DEFAULT_FEMALE_FIGURE, FigureData.FEMALE) - figures.set(FigureData.MALE, maleFigure); - figures.set(FigureData.FEMALE, femaleFigure); + figures.set(FigureData.MALE, maleFigure) + figures.set(FigureData.FEMALE, femaleFigure) - setFigures(figures); - setFigureData(figures.get(FigureData.MALE)); - }, []); + setFigures(figures) + setFigureData(figures.get(FigureData.MALE)) + }, []) const loadAvatarInEditor = useCallback((figure: string, gender: string, reset: boolean = true) => { - gender = AvatarEditorUtilities.getGender(gender); + gender = AvatarEditorUtilities.getGender(gender) - let newFigureData = figureData; + let newFigureData = figureData - if(gender !== newFigureData.gender) newFigureData = figures.get(gender); + if(gender !== newFigureData.gender) newFigureData = figures.get(gender) - if(figure !== newFigureData.getFigureString()) newFigureData.loadAvatarData(figure, gender); + if(figure !== newFigureData.getFigureString()) newFigureData.loadAvatarData(figure, gender) - if(newFigureData !== figureData) setFigureData(newFigureData); + if(newFigureData !== figureData) setFigureData(newFigureData) if(reset) { - setLastFigure(figureData.getFigureString()); - setLastGender(figureData.gender); + setLastFigure(figureData.getFigureString()) + setLastGender(figureData.gender) } - }, [ figures, figureData ]); + }, [ figures, figureData ]) const processAction = useCallback((action: string) => { switch(action) { - case AvatarEditorAction.ACTION_CLEAR: - loadAvatarInEditor(figureData.getFigureStringWithFace(0, false), figureData.gender, false); - resetCategories(); - return; - case AvatarEditorAction.ACTION_RESET: - loadAvatarInEditor(lastFigure, lastGender); - resetCategories(); - return; - case AvatarEditorAction.ACTION_RANDOMIZE: - const figure = generateRandomFigure(figureData, figureData.gender, GetClubMemberLevel(), figureSetIds, [ FigureData.FACE ]); - - loadAvatarInEditor(figure, figureData.gender, false); - resetCategories(); - return; - case AvatarEditorAction.ACTION_SAVE: - SendMessageComposer(new UserFigureComposer(figureData.gender, figureData.getFigureString())); - setIsVisible(false); - return; + case AvatarEditorAction.ACTION_CLEAR: + loadAvatarInEditor(figureData.getFigureStringWithFace(0, false), figureData.gender, false) + resetCategories() + return + case AvatarEditorAction.ACTION_RESET: + loadAvatarInEditor(lastFigure, lastGender) + resetCategories() + return + case AvatarEditorAction.ACTION_RANDOMIZE: + const figure = generateRandomFigure(figureData, figureData.gender, GetClubMemberLevel(), figureSetIds, [ FigureData.FACE ]) + + loadAvatarInEditor(figure, figureData.gender, false) + resetCategories() + return + case AvatarEditorAction.ACTION_SAVE: + !genderFootballGate ? SendMessageComposer(new UserFigureComposer(figureData.gender, figureData.getFigureString())) : SendMessageComposer(new SetClothingChangeDataMessageComposer(objectFootballGate, genderFootballGate, figureData.getFigureString())) + onClose() + return } - }, [ figureData, lastFigure, lastGender, figureSetIds, loadAvatarInEditor, resetCategories ]) + }, [ loadAvatarInEditor, figureData, resetCategories, lastFigure, lastGender, figureSetIds, genderFootballGate, objectFootballGate ]) const setGender = useCallback((gender: string) => { - gender = AvatarEditorUtilities.getGender(gender); + gender = AvatarEditorUtilities.getGender(gender) - setFigureData(figures.get(gender)); - }, [ figures ]); + setFigureData(figures.get(gender)) + }, [ figures ]) useEffect(() => { const linkTracker: ILinkEventTracker = { linkReceived: (url: string) => { - const parts = url.split('/'); + const parts = url.split("/") + + setGenderFootballGate(parts[2] ? parts[2] : null) + setObjectFootballGate(parts[3] ? Number(parts[3]) : null) - if(parts.length < 2) return; + if(parts.length < 2) return switch(parts[1]) { - case 'show': - setIsVisible(true); - return; - case 'hide': - setIsVisible(false); - return; - case 'toggle': - setIsVisible(prevValue => !prevValue); - return; + case "show": + setIsVisible(true) + return + case "hide": + setIsVisible(false) + return + case "toggle": + setIsVisible(prevValue => !prevValue) + return } }, - eventUrlPrefix: 'avatar-editor/' - }; + eventUrlPrefix: "avatar-editor/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, []); + return () => RemoveLinkEventTracker(linkTracker) + }, []) + + useMessageEvent(FigureSetIdsMessageEvent, event => + { + const parser = event.getParser() + + setFigureSetIds(parser.figureSetIds) + setBoundFurnitureNames(parser.boundsFurnitureNames) + }) + + useMessageEvent(UserWardrobePageEvent, event => + { + const parser = event.getParser() + const savedFigures: [ IAvatarFigureContainer, string ][] = [] + + let i = 0 + + while(i < maxWardrobeSlots) + { + savedFigures.push([ null, null ]) + + i++ + } + + for(let [ index, [ look, gender ] ] of parser.looks.entries()) + { + const container = GetAvatarRenderManager().createFigureContainer(look) + + savedFigures[(index - 1)] = [ container, gender ] + } + + setSavedFigures(savedFigures) + }) useEffect(() => { - setSavedFigures(new Array(maxWardrobeSlots)); - }, [ maxWardrobeSlots ]); + setSavedFigures(new Array(maxWardrobeSlots)) + }, [ maxWardrobeSlots ]) useEffect(() => { - if(!isWardrobeVisible) return; + if(!isWardrobeVisible) return - setActiveCategory(null); - SendMessageComposer(new GetWardrobeMessageComposer()); - }, [ isWardrobeVisible ]); + setActiveCategory(null) + SendMessageComposer(new GetWardrobeMessageComposer()) + }, [ isWardrobeVisible ]) useEffect(() => { - if(!activeCategory) return; + if(!activeCategory) return - setIsWardrobeVisible(false); - }, [ activeCategory ]); + setIsWardrobeVisible(false) + }, [ activeCategory ]) useEffect(() => { - if(!categories) return; + if(!categories) return - selectCategory(AvatarEditorFigureCategory.GENERIC); - }, [ categories, selectCategory ]); + selectCategory(!genderFootballGate ? AvatarEditorFigureCategory.GENERIC : AvatarEditorFigureCategory.TORSO) + }, [ categories, genderFootballGate, selectCategory ]) useEffect(() => { - if(!figureData) return; + if(!figureData) return - AvatarEditorUtilities.CURRENT_FIGURE = figureData; + AvatarEditorUtilities.CURRENT_FIGURE = figureData - resetCategories(); + resetCategories() - return () => AvatarEditorUtilities.CURRENT_FIGURE = null; - }, [ figureData, resetCategories ]); + return () => AvatarEditorUtilities.CURRENT_FIGURE = null + }, [ figureData, resetCategories ]) useEffect(() => { - AvatarEditorUtilities.FIGURE_SET_IDS = figureSetIds; - AvatarEditorUtilities.BOUND_FURNITURE_NAMES = boundFurnitureNames; + AvatarEditorUtilities.FIGURE_SET_IDS = figureSetIds + AvatarEditorUtilities.BOUND_FURNITURE_NAMES = boundFurnitureNames - resetCategories(); + resetCategories() return () => { - AvatarEditorUtilities.FIGURE_SET_IDS = null; - AvatarEditorUtilities.BOUND_FURNITURE_NAMES = null; + AvatarEditorUtilities.FIGURE_SET_IDS = null + AvatarEditorUtilities.BOUND_FURNITURE_NAMES = null } - }, [ figureSetIds, boundFurnitureNames, resetCategories ]); + }, [ figureSetIds, boundFurnitureNames, resetCategories ]) useEffect(() => { - if(!isVisible) return; + if(!isVisible) return if(!figures) { - setupFigures(); + setupFigures() - setIsInitalized(true); + setIsInitalized(true) - return; + return } - }, [ isVisible, figures, setupFigures ]); + }, [ isVisible, figures, setupFigures ]) useEffect(() => { - if(!isVisible || !isInitalized || !needsReset) return; + if(!isVisible || !isInitalized || !needsReset) return - loadAvatarInEditor(GetSessionDataManager().figure, GetSessionDataManager().gender); - setNeedsReset(false); - }, [ isVisible, isInitalized, needsReset, loadAvatarInEditor ]); + loadAvatarInEditor(!genderFootballGate ? GetSessionDataManager().figure : (genderFootballGate === FigureData.MALE ? DEFAULT_MALE_FOOTBALL_GATE : DEFAULT_FEMALE_FOOTBALL_GATE), !genderFootballGate ? GetSessionDataManager().gender : genderFootballGate) + setNeedsReset(false) + }, [ isVisible, isInitalized, needsReset, loadAvatarInEditor, genderFootballGate ]) useEffect(() => { - if(isVisible) return; + if(!isVisible) return return () => { - setNeedsReset(true); + setNeedsReset(true) } - }, [ isVisible ]); + }, [ isVisible, genderFootballGate ]) - if(!isVisible || !figureData) return null; + if(!isVisible || !figureData) return null return ( - - setIsVisible(false) } /> - - { categories && (categories.size > 0) && Array.from(categories.keys()).map(category => - { - const isActive = (activeCategory && (activeCategory.name === category)); - - return ( - selectCategory(category) }> - { LocalizeText(`avatareditor.category.${ category }`) } - - ); - }) } - setIsWardrobeVisible(true) }> - { LocalizeText('avatareditor.category.wardrobe') } - - - - - + + + +
+
+ { categories && (categories.size > 0) && Array.from(categories.keys()).map(category => { + const isActive = (activeCategory && (activeCategory.name === category)) + + return ( + + ) + })} + { !genderFootballGate && } +
+
+
+
{ (activeCategory && !isWardrobeVisible) && - } + } { isWardrobeVisible && } - - +
+
- - - - - - - - - - + { showRandomFigure && processAction(AvatarEditorAction.ACTION_RANDOMIZE) }/> } + +
+
- ); + ) } diff --git a/src/components/avatar-editor/views/AvatarEditorFigurePreviewView.tsx b/src/components/avatar-editor/views/AvatarEditorFigurePreviewView.tsx index d5715acf0..af4864e21 100644 --- a/src/components/avatar-editor/views/AvatarEditorFigurePreviewView.tsx +++ b/src/components/avatar-editor/views/AvatarEditorFigurePreviewView.tsx @@ -1,8 +1,7 @@ -import { AvatarDirectionAngle } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { FigureData } from '../../../api'; -import { Base, Column, LayoutAvatarImageView } from '../../../common'; -import { AvatarEditorIcon } from './AvatarEditorIcon'; +import { AvatarDirectionAngle } from "@nitrots/nitro-renderer" +import { FC, useEffect, useState } from "react" +import { FigureData } from "../../../api" +import { LayoutAvatarImageView } from "../../../common" export interface AvatarEditorFigurePreviewViewProps { @@ -11,45 +10,44 @@ export interface AvatarEditorFigurePreviewViewProps export const AvatarEditorFigurePreviewView: FC = props => { - const { figureData = null } = props; - const [ updateId, setUpdateId ] = useState(-1); + const { figureData = null } = props + const [ updateId, setUpdateId ] = useState(-1) const rotateFigure = (direction: number) => { if(direction < AvatarDirectionAngle.MIN_DIRECTION) { - direction = (AvatarDirectionAngle.MAX_DIRECTION + (direction + 1)); + direction = (AvatarDirectionAngle.MAX_DIRECTION + (direction + 1)) } if(direction > AvatarDirectionAngle.MAX_DIRECTION) { - direction = (direction - (AvatarDirectionAngle.MAX_DIRECTION + 1)); + direction = (direction - (AvatarDirectionAngle.MAX_DIRECTION + 1)) } - figureData.direction = direction; + figureData.direction = direction } useEffect(() => { - if(!figureData) return; + if(!figureData) return - figureData.notify = () => setUpdateId(prevValue => (prevValue + 1)); + figureData.notify = () => setUpdateId(prevValue => (prevValue + 1)) return () => { - figureData.notify = null; + figureData.notify = null } - }, [ figureData ] ); + }, [ figureData ]) return ( - - - - - - rotateFigure(figureData.direction + 1) } /> - rotateFigure(figureData.direction - 1) } /> - - - ); +
+
+ +
+
+ rotateFigure(figureData.direction + 1) } /> +
+
+ ) } diff --git a/src/components/avatar-editor/views/AvatarEditorIcon.tsx b/src/components/avatar-editor/views/AvatarEditorIcon.tsx deleted file mode 100644 index a05baa1da..000000000 --- a/src/components/avatar-editor/views/AvatarEditorIcon.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { FC, useMemo } from 'react'; -import { Base, BaseProps } from '../../../common'; - -type AvatarIconType = 'male' | 'female' | 'clear' | 'sellable' | string; - -export interface AvatarEditorIconProps extends BaseProps -{ - icon: AvatarIconType; - selected?: boolean; -} - -export const AvatarEditorIcon: FC = props => -{ - const { icon = null, selected = false, classNames = [], children = null, ...rest } = props; - - const getClassNames = useMemo(() => - { - const newClassNames: string[] = [ 'nitro-avatar-editor-spritesheet' ]; - - if(icon && icon.length) newClassNames.push(icon + '-icon'); - - if(selected) newClassNames.push('selected'); - - if(classNames.length) newClassNames.push(...classNames); - - return newClassNames; - }, [ icon, selected, classNames ]); - - return -} diff --git a/src/components/avatar-editor/views/AvatarEditorModelView.tsx b/src/components/avatar-editor/views/AvatarEditorModelView.tsx index 6eb8fe3ed..99de24f10 100644 --- a/src/components/avatar-editor/views/AvatarEditorModelView.tsx +++ b/src/components/avatar-editor/views/AvatarEditorModelView.tsx @@ -1,88 +1,107 @@ -import { Dispatch, FC, SetStateAction, useCallback, useEffect, useState } from 'react'; -import { CategoryData, FigureData, IAvatarEditorCategoryModel } from '../../../api'; -import { Column, Flex, Grid } from '../../../common'; -import { AvatarEditorIcon } from './AvatarEditorIcon'; -import { AvatarEditorFigureSetView } from './figure-set/AvatarEditorFigureSetView'; -import { AvatarEditorPaletteSetView } from './palette-set/AvatarEditorPaletteSetView'; +import { Dispatch, FC, SetStateAction, useCallback, useEffect, useState } from "react" +import { CategoryData, FigureData, IAvatarEditorCategoryModel } from "../../../api" +import { Button } from "../../../common" +import { AvatarEditorFigureSetView } from "./figure-set/AvatarEditorFigureSetView" +import { AvatarEditorPaletteSetView } from "./palette-set/AvatarEditorPaletteSetView" + +const CATEGORY_FOOTBALL_GATE = [ "ch", "cp", "lg", "sh" ] + export interface AvatarEditorModelViewProps { model: IAvatarEditorCategoryModel; gender: string; + isFromFootballGate: boolean; setGender: Dispatch>; } export const AvatarEditorModelView: FC = props => { - const { model = null, gender = null, setGender = null } = props; - const [ activeCategory, setActiveCategory ] = useState(null); - const [ maxPaletteCount, setMaxPaletteCount ] = useState(1); + const { model = null, gender = null, isFromFootballGate = false, setGender = null } = props + const [ activeCategory, setActiveCategory ] = useState(null) + const [ maxPaletteCount, setMaxPaletteCount ] = useState(1) const selectCategory = useCallback((name: string) => { - const category = model.categories.get(name); + const category = model.categories.get(name) - if(!category) return; + if(!category) return - category.init(); + category.init() - setActiveCategory(category); + setActiveCategory(category) for(const part of category.parts) { - if(!part || !part.isSelected) continue; + if(!part || !part.isSelected) continue - setMaxPaletteCount(part.maxColorIndex || 1); + setMaxPaletteCount(part.maxColorIndex || 1) - break; + break } - }, [ model ]); + }, [ model ]) useEffect(() => { - model.init(); + model.init() for(const name of model.categories.keys()) { - selectCategory(name); + selectCategory(name) - break; + break } - }, [ model, selectCategory ]); + }, [ model, selectCategory ]) + + if(!model || !activeCategory) return null - if(!model || !activeCategory) return null; + const ICON_STYLE = { + ml: "bg-[0px_0px] size-4", + fm: "bg-[-17px_0px] w-3 h-[18px]", + hr: "bg-[-30px_0px] w-[27px] h-[18px]", + ha: "bg-[-58px_0px] w-7 h-4", + he: "bg-[-87px_0px] w-[21px] h-[18px]", + ea: "bg-[-109px_0px] w-8 h-4", + fa: "bg-[-142px_0px] w-[18px] h-[19px]", + ch: "bg-[-161px_0px] w-[26px] h-[18px]", + cp: "bg-[-188px_0px] w-[26px] h-[18px]", + cc: "bg-[-215px_0px] w-6 h-[18px]", + ca: "bg-[-240px_0px] w-[22px] h-[18px]", + lg: "bg-[-263px_0px] w-[19px] h-[18px]", + sh: "bg-[-283px_0px] w-9 h-2.5", + wa: "bg-[-320px_0px] w-9 h-[18px]" + } return ( - - +
+
{ model.canSetGender && <> - setGender(FigureData.MALE) }> - - - setGender(FigureData.FEMALE) }> - - + + } - { !model.canSetGender && model.categories && (model.categories.size > 0) && Array.from(model.categories.keys()).map(name => - { - const category = model.categories.get(name); + { !model.canSetGender && model.categories && (model.categories.size > 0) && Array.from(model.categories.keys()).map(name => { + const category = model.categories.get(name) return ( - selectCategory(name) }> - - - ); - }) } - - - - - - { (maxPaletteCount >= 1) && - } - { (maxPaletteCount === 2) && - } - - - ); + (!isFromFootballGate || (isFromFootballGate && CATEGORY_FOOTBALL_GATE.includes(category.name))) && + ) + })} +
+
+ +
+ { (maxPaletteCount >= 1) && + } + { (maxPaletteCount === 2) && + } +
+
+
+ ) } diff --git a/src/components/avatar-editor/views/AvatarEditorWardrobeView.tsx b/src/components/avatar-editor/views/AvatarEditorWardrobeView.tsx index 9811ab887..302fa8348 100644 --- a/src/components/avatar-editor/views/AvatarEditorWardrobeView.tsx +++ b/src/components/avatar-editor/views/AvatarEditorWardrobeView.tsx @@ -1,7 +1,7 @@ -import { IAvatarFigureContainer, SaveWardrobeOutfitMessageComposer } from '@nitrots/nitro-renderer'; -import { Dispatch, FC, SetStateAction, useCallback, useMemo } from 'react'; -import { FigureData, GetAvatarRenderManager, GetClubMemberLevel, GetConfiguration, LocalizeText, SendMessageComposer } from '../../../api'; -import { AutoGrid, Base, Button, Flex, LayoutAvatarImageView, LayoutCurrencyIcon, LayoutGridItem } from '../../../common'; +import { IAvatarFigureContainer, SaveWardrobeOutfitMessageComposer } from "@nitrots/nitro-renderer" +import { Dispatch, FC, SetStateAction, useCallback, useMemo } from "react" +import { FigureData, GetAvatarRenderManager, GetClubMemberLevel, GetConfiguration, LocalizeText, SendMessageComposer } from "../../../api" +import { Button, LayoutAvatarImageView } from "../../../common" export interface AvatarEditorWardrobeViewProps { @@ -13,67 +13,73 @@ export interface AvatarEditorWardrobeViewProps export const AvatarEditorWardrobeView: FC = props => { - const { figureData = null, savedFigures = [], setSavedFigures = null, loadAvatarInEditor = null } = props; + const { figureData = null, savedFigures = [], setSavedFigures = null, loadAvatarInEditor = null } = props - const hcDisabled = GetConfiguration('hc.disabled', false); + const hcDisabled = GetConfiguration("hc.disabled", false) const wearFigureAtIndex = useCallback((index: number) => { - if((index >= savedFigures.length) || (index < 0)) return; + if((index >= savedFigures.length) || (index < 0)) return - const [ figure, gender ] = savedFigures[index]; + const [ figure, gender ] = savedFigures[index] - loadAvatarInEditor(figure.getFigureString(), gender); - }, [ savedFigures, loadAvatarInEditor ]); + loadAvatarInEditor(figure.getFigureString(), gender) + }, [ savedFigures, loadAvatarInEditor ]) const saveFigureAtWardrobeIndex = useCallback((index: number) => { - if(!figureData || (index >= savedFigures.length) || (index < 0)) return; + if(!figureData || (index >= savedFigures.length) || (index < 0)) return - const newFigures = [ ...savedFigures ]; + const newFigures = [ ...savedFigures ] - const figure = figureData.getFigureString(); - const gender = figureData.gender; + const figure = figureData.getFigureString() + const gender = figureData.gender - newFigures[index] = [ GetAvatarRenderManager().createFigureContainer(figure), gender ]; + newFigures[index] = [ GetAvatarRenderManager().createFigureContainer(figure), gender ] - setSavedFigures(newFigures); - SendMessageComposer(new SaveWardrobeOutfitMessageComposer((index + 1), figure, gender)); - }, [ figureData, savedFigures, setSavedFigures ]); + setSavedFigures(newFigures) + SendMessageComposer(new SaveWardrobeOutfitMessageComposer((index + 1), figure, gender)) + }, [ figureData, savedFigures, setSavedFigures ]) const figures = useMemo(() => { - if(!savedFigures || !savedFigures.length) return []; + if(!savedFigures || !savedFigures.length) return [] - const items: JSX.Element[] = []; + const items: JSX.Element[] = [] savedFigures.forEach(([ figureContainer, gender ], index) => { - let clubLevel = 0; + let clubLevel = 0 - if(figureContainer) clubLevel = GetAvatarRenderManager().getFigureClubLevel(figureContainer, gender); + if(figureContainer) clubLevel = GetAvatarRenderManager().getFigureClubLevel(figureContainer, gender) items.push( - - { figureContainer && - } - - { !hcDisabled && (clubLevel > 0) && } - - - { figureContainer && - } - - - ); - }); - - return items; - }, [ savedFigures, hcDisabled, saveFigureAtWardrobeIndex, wearFigureAtIndex ]); +
+ + { !hcDisabled && (clubLevel > 0) && } +
+ +
+
+ ) + }) + + return items + }, [ savedFigures, hcDisabled, saveFigureAtWardrobeIndex, wearFigureAtIndex ]) return ( - - { figures } - - ); +
+
+

{ LocalizeText("avatareditor.wardrobe.title") }

+

{ LocalizeText("avatareditor.hotlooks.choose") }

+
+
+
+ { figures } +
+
+
+ ) } diff --git a/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetItemView.tsx b/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetItemView.tsx index fd28dc55d..56dc6bae0 100644 --- a/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetItemView.tsx +++ b/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetItemView.tsx @@ -1,7 +1,6 @@ -import { FC, useEffect, useState } from 'react'; -import { AvatarEditorGridPartItem, GetConfiguration } from '../../../../api'; -import { LayoutCurrencyIcon, LayoutGridItem, LayoutGridItemProps } from '../../../../common'; -import { AvatarEditorIcon } from '../AvatarEditorIcon'; +import { FC, useEffect, useState } from "react" +import { AvatarEditorGridPartItem, GetConfiguration } from "../../../../api" +import { LayoutGridItem, LayoutGridItemProps } from "../../../../common" export interface AvatarEditorFigureSetItemViewProps extends LayoutGridItemProps { @@ -10,26 +9,25 @@ export interface AvatarEditorFigureSetItemViewProps extends LayoutGridItemProps export const AvatarEditorFigureSetItemView: FC = props => { - const { partItem = null, children = null, ...rest } = props; - const [ updateId, setUpdateId ] = useState(-1); + const { partItem = null, children = null, ...rest } = props + const [ updateId, setUpdateId ] = useState(-1) - const hcDisabled = GetConfiguration('hc.disabled', false); + const hcDisabled = GetConfiguration("hc.disabled", false) useEffect(() => { - const rerender = () => setUpdateId(prevValue => (prevValue + 1)); + const rerender = () => setUpdateId(prevValue => (prevValue + 1)) - partItem.notify = rerender; + partItem.notify = rerender - return () => partItem.notify = null; - }, [ partItem ]); + return () => partItem.notify = null + }, [ partItem ]) return ( - - { !hcDisabled && partItem.isHC && } - { partItem.isClear && } - { partItem.isSellable && } + + { !hcDisabled && partItem.isHC && } + { partItem.isClear &&
} { children } - ); + ) } diff --git a/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetView.tsx b/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetView.tsx index 3755731c2..4c82c285d 100644 --- a/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetView.tsx +++ b/src/components/avatar-editor/views/figure-set/AvatarEditorFigureSetView.tsx @@ -1,44 +1,51 @@ -import { Dispatch, FC, SetStateAction, useCallback, useEffect, useRef } from 'react'; -import { AvatarEditorGridPartItem, CategoryData, IAvatarEditorCategoryModel } from '../../../../api'; -import { AutoGrid } from '../../../../common'; -import { AvatarEditorFigureSetItemView } from './AvatarEditorFigureSetItemView'; +import { Dispatch, FC, SetStateAction, useCallback, useEffect, useRef } from "react" +import { AvatarEditorGridPartItem, CategoryData, IAvatarEditorCategoryModel } from "../../../../api" +import { AvatarEditorFigureSetItemView } from "./AvatarEditorFigureSetItemView" export interface AvatarEditorFigureSetViewProps { model: IAvatarEditorCategoryModel; category: CategoryData; + isFromFootballGate: boolean; setMaxPaletteCount: Dispatch>; } +const TSHIRT_FOOTBALL_GATE = [ 3111, 3110, 3109, 3030, 3114, 266, 265, 262, 3113, 3112, 691, 690, 667 ] +const NUMBER_BEHIND_FOOTBALL_GATE = [ 3128, 3127, 3126, 3125, 3124, 3123, 3122, 3121, 3120, 3119 ] +const PANTS_FOOTBALL_GATE = [ 3116, 281, 275, 715, 700, 696, 3006 ] +const SHOES_FOOTBALL_GATE = [ 3115, 3068, 906 ] + export const AvatarEditorFigureSetView: FC = props => { - const { model = null, category = null, setMaxPaletteCount = null } = props; - const elementRef = useRef(null); + const { model = null, category = null, isFromFootballGate = false, setMaxPaletteCount = null } = props + const elementRef = useRef(null) const selectPart = useCallback((item: AvatarEditorGridPartItem) => { - const index = category.parts.indexOf(item); + const index = category.parts.indexOf(item) - if(index === -1) return; + if(index === -1) return - model.selectPart(category.name, index); + model.selectPart(category.name, index) - const partItem = category.getCurrentPart(); + const partItem = category.getCurrentPart() - setMaxPaletteCount(partItem.maxColorIndex || 1); - }, [ model, category, setMaxPaletteCount ]); + setMaxPaletteCount(partItem.maxColorIndex || 1) + }, [ model, category, setMaxPaletteCount ]) useEffect(() => { - if(!model || !category || !elementRef || !elementRef.current) return; + if(!model || !category || !elementRef || !elementRef.current) return - elementRef.current.scrollTop = 0; - }, [ model, category ]); + elementRef.current.scrollTop = 0 + }, [ model, category ]) return ( - - { (category.parts.length > 0) && category.parts.map((item, index) => - selectPart(item) } />) } - - ); +
+ { (category.parts.length > 0) && category.parts.map(item => + (!isFromFootballGate || (isFromFootballGate && TSHIRT_FOOTBALL_GATE.includes(item.id) || NUMBER_BEHIND_FOOTBALL_GATE.includes(item.id) || PANTS_FOOTBALL_GATE.includes(item.id) || SHOES_FOOTBALL_GATE.includes(item.id))) && + selectPart(item) } />) + } +
+ ) } diff --git a/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetItemView.tsx b/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetItemView.tsx index 638a9d18b..ba56b2483 100644 --- a/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetItemView.tsx +++ b/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetItemView.tsx @@ -1,6 +1,6 @@ -import { FC, useEffect, useState } from 'react'; -import { AvatarEditorGridColorItem, GetConfiguration } from '../../../../api'; -import { LayoutCurrencyIcon, LayoutGridItem, LayoutGridItemProps } from '../../../../common'; +import { FC, useEffect, useState } from "react" +import { AvatarEditorGridColorItem, GetConfiguration } from "../../../../api" +import { LayoutGridItemProps } from "../../../../common" export interface AvatarEditorPaletteSetItemProps extends LayoutGridItemProps { @@ -9,24 +9,25 @@ export interface AvatarEditorPaletteSetItemProps extends LayoutGridItemProps export const AvatarEditorPaletteSetItem: FC = props => { - const { colorItem = null, children = null, ...rest } = props; - const [ updateId, setUpdateId ] = useState(-1); + const { colorItem = null, children = null, ...rest } = props + const [ updateId, setUpdateId ] = useState(-1) - const hcDisabled = GetConfiguration('hc.disabled', false); + const hcDisabled = GetConfiguration("hc.disabled", false) useEffect(() => { - const rerender = () => setUpdateId(prevValue => (prevValue + 1)); + const rerender = () => setUpdateId(prevValue => (prevValue + 1)) - colorItem.notify = rerender; + colorItem.notify = rerender - return () => colorItem.notify = null; - }, [ colorItem ]); + return () => colorItem.notify = null + }, [ colorItem ]) return ( - - { !hcDisabled && colorItem.isHC && } - { children } - - ); +
+
+
+ { (!hcDisabled && colorItem.isHC) && } +
+ ) } diff --git a/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetView.tsx b/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetView.tsx index c55dcb47d..7d2fce9da 100644 --- a/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetView.tsx +++ b/src/components/avatar-editor/views/palette-set/AvatarEditorPaletteSetView.tsx @@ -1,7 +1,6 @@ -import { FC, useCallback, useEffect, useRef } from 'react'; -import { AvatarEditorGridColorItem, CategoryData, IAvatarEditorCategoryModel } from '../../../../api'; -import { AutoGrid } from '../../../../common'; -import { AvatarEditorPaletteSetItem } from './AvatarEditorPaletteSetItemView'; +import { FC, useCallback, useEffect, useRef } from "react" +import { AvatarEditorGridColorItem, CategoryData, IAvatarEditorCategoryModel } from "../../../../api" +import { AvatarEditorPaletteSetItem } from "./AvatarEditorPaletteSetItemView" export interface AvatarEditorPaletteSetViewProps { @@ -13,29 +12,23 @@ export interface AvatarEditorPaletteSetViewProps export const AvatarEditorPaletteSetView: FC = props => { - const { model = null, category = null, paletteSet = [], paletteIndex = -1 } = props; - const elementRef = useRef(null); + const { model = null, category = null, paletteSet = [], paletteIndex = -1 } = props + const elementRef = useRef(null) - const selectColor = useCallback((item: AvatarEditorGridColorItem) => - { - const index = paletteSet.indexOf(item); + const selectColor = useCallback((colorItem: AvatarEditorGridColorItem) => { + const index = paletteSet.indexOf(colorItem) + if (index === -1) return + model.selectColor(category.name, index, paletteIndex) + }, [ model, category, paletteSet, paletteIndex ]) - if(index === -1) return; - - model.selectColor(category.name, index, paletteIndex); - }, [ model, category, paletteSet, paletteIndex ]); - - useEffect(() => - { - if(!model || !category || !elementRef || !elementRef.current) return; - - elementRef.current.scrollTop = 0; - }, [ model, category ]); + useEffect(() => { + if (!model || !category || !elementRef || !elementRef.current) return + elementRef.current.scrollTop = 0 + }, [ model, category ]) return ( - - { (paletteSet.length > 0) && paletteSet.map((item, index) => - selectColor(item) } />) } - - ); +
+ { (paletteSet.length > 0) && paletteSet.map((item, index) => selectColor(item) } />) } +
+ ) } diff --git a/src/components/camera/CameraWidgetView.scss b/src/components/camera/CameraWidgetView.scss deleted file mode 100644 index aecd0b170..000000000 --- a/src/components/camera/CameraWidgetView.scss +++ /dev/null @@ -1,133 +0,0 @@ -.nitro-camera-capture { - position: relative; - - .header-close { - top: 8px; - right: 8px; - border-radius: $border-radius; - box-shadow: 0 0 0 1.5px $white; - border: 2px solid #921911; - background: repeating-linear-gradient( - rgba(245, 80, 65, 1), - rgba(245, 80, 65, 1) 50%, - rgba(194, 48, 39, 1) 50%, - rgba(194, 48, 39, 1) 100% - ); - cursor: pointer; - line-height: 1; - padding: 1px 3px; - - &:hover { - filter: brightness(1.2); - } - - &:active { - filter: brightness(0.8); - } - } - - .camera-area { - position: absolute; - top: 37px; - left: 10px; - width: 320px; - height: 320px; - } - - .camera-canvas { - position: relative; - width: 340px; - height: 462px; - background-image: url('@/assets/images/room-widgets/camera-widget/camera-spritesheet.png'); - background-position: -1px -1px; - z-index: 2; - - .camera-button { - width: 94px; - height: 94px; - cursor: pointer; - margin-top: 362px; - - background-image: url('@/assets/images/room-widgets/camera-widget/camera-spritesheet.png'); - background-position: -343px -321px; - - &:hover { - background-position: -535px -321px; - } - - &:active { - background-position: -439px -321px; - } - } - - .camera-view-finder { - background-image: url('@/assets/images/room-widgets/camera-widget/camera-spritesheet.png'); - background-position: -343px -1px; - } - - .camera-frame { - .camera-frame-preview-actions { - background: rgba(0, 0, 0, 0.5); - } - } - } - - .camera-roll { - width: 330px; - background: #bab8b4; - border-bottom-left-radius: 10px; - border-bottom-right-radius: 10px; - border: 1px solid black; - box-shadow: inset 1px 0px white, inset -1px -1px white; - - img { - width: 56px; - height: 56px; - border: 1px solid black; - object-fit: contain; - image-rendering: initial; - } - } -} - -.nitro-camera-editor { - width: $camera-editor-width; - height: $camera-editor-height; - - .picture-preview { - width: 320px; - height: 320px; - } - - .layout-grid-item { - height: 60px !important; - max-height: 60px !important; - } - - .effect-thumbnail-image { - img { - width: 50px; - height: 50px; - image-rendering: auto; - object-fit: contain; - } - } - - .remove-effect { - position: absolute; - top: 1px; - right: 1px; - padding: 2px; - font-size: 10px; - min-height: unset; - } -} - -.nitro-camera-checkout { - width: $camera-checkout-width; - - .picture-preview { - width: 320px; - height: 320px; - } -} diff --git a/src/components/camera/CameraWidgetView.tsx b/src/components/camera/CameraWidgetView.tsx index 00ab0a873..b021066e8 100644 --- a/src/components/camera/CameraWidgetView.tsx +++ b/src/components/camera/CameraWidgetView.tsx @@ -1,97 +1,97 @@ -import { ILinkEventTracker, RoomSessionEvent } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { AddEventLinkTracker, RemoveLinkEventTracker } from '../../api'; -import { useCamera, useRoomSessionManagerEvent } from '../../hooks'; -import { CameraWidgetCaptureView } from './views/CameraWidgetCaptureView'; -import { CameraWidgetCheckoutView } from './views/CameraWidgetCheckoutView'; -import { CameraWidgetEditorView } from './views/editor/CameraWidgetEditorView'; +import { ILinkEventTracker, RoomSessionEvent } from "@nitrots/nitro-renderer" +import { FC, useEffect, useState } from "react" +import { AddEventLinkTracker, RemoveLinkEventTracker } from "../../api" +import { useCamera, useRoomSessionManagerEvent } from "../../hooks" +import { CameraWidgetCaptureView } from "./views/CameraWidgetCaptureView" +import { CameraWidgetCheckoutView } from "./views/CameraWidgetCheckoutView" +import { CameraWidgetEditorView } from "./views/editor/CameraWidgetEditorView" -const MODE_NONE: number = 0; -const MODE_CAPTURE: number = 1; -const MODE_EDITOR: number = 2; -const MODE_CHECKOUT: number = 3; +const MODE_NONE: number = 0 +const MODE_CAPTURE: number = 1 +const MODE_EDITOR: number = 2 +const MODE_CHECKOUT: number = 3 export const CameraWidgetView: FC<{}> = props => { - const [ mode, setMode ] = useState(MODE_NONE); - const [ base64Url, setSavedPictureUrl ] = useState(null); - const { availableEffects = [], selectedPictureIndex = -1, cameraRoll = [], setCameraRoll = null, myLevel = 0, price = { credits: 0, duckets: 0, publishDucketPrice: 0 }} = useCamera(); + const [ mode, setMode ] = useState(MODE_NONE) + const [ base64Url, setSavedPictureUrl ] = useState(null) + const { availableEffects = [], selectedPictureIndex = -1, cameraRoll = [], setCameraRoll = null, myLevel = 0, price = { credits: 0, duckets: 0, publishDucketPrice: 0 } } = useCamera() const processAction = (type: string) => { switch(type) { - case 'close': - setMode(MODE_NONE); - return; - case 'edit': - setMode(MODE_EDITOR); - return; - case 'delete': - setCameraRoll(prevValue => - { - const clone = [ ...prevValue ]; + case "close": + setMode(MODE_NONE) + return + case "edit": + setMode(MODE_EDITOR) + return + case "delete": + setCameraRoll(prevValue => + { + const clone = [ ...prevValue ] - clone.splice(selectedPictureIndex, 1); + clone.splice(selectedPictureIndex, 1) - return clone; - }); - return; - case 'editor_cancel': - setMode(MODE_CAPTURE); - return; + return clone + }) + return + case "editor_cancel": + setMode(MODE_CAPTURE) + return } } const checkoutPictureUrl = (pictureUrl: string) => { - setSavedPictureUrl(pictureUrl); - setMode(MODE_CHECKOUT); + setSavedPictureUrl(pictureUrl) + setMode(MODE_CHECKOUT) } - useRoomSessionManagerEvent(RoomSessionEvent.ENDED, event => setMode(MODE_NONE)); + useRoomSessionManagerEvent(RoomSessionEvent.ENDED, event => setMode(MODE_NONE)) useEffect(() => { const linkTracker: ILinkEventTracker = { linkReceived: (url: string) => { - const parts = url.split('/'); + const parts = url.split("/") - if(parts.length < 2) return; + if(parts.length < 2) return switch(parts[1]) { - case 'show': - setMode(MODE_CAPTURE); - return; - case 'hide': - setMode(MODE_NONE); - return; - case 'toggle': - setMode(prevValue => - { - if(!prevValue) return MODE_CAPTURE; - else return MODE_NONE; - }); - return; + case "show": + setMode(MODE_CAPTURE) + return + case "hide": + setMode(MODE_NONE) + return + case "toggle": + setMode(prevValue => + { + if(!prevValue) return MODE_CAPTURE + else return MODE_NONE + }) + return } }, - eventUrlPrefix: 'camera/' - }; + eventUrlPrefix: "camera/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, []); + return () => RemoveLinkEventTracker(linkTracker) + }, []) - if(mode === MODE_NONE) return null; + if(mode === MODE_NONE) return null return ( <> - { (mode === MODE_CAPTURE) && processAction('close') } onEdit={ () => processAction('edit') } onDelete={ () => processAction('delete') } /> } - { (mode === MODE_EDITOR) && processAction('close') } onCancel={ () => processAction('editor_cancel') } onCheckout={ checkoutPictureUrl } availableEffects={ availableEffects } /> } - { (mode === MODE_CHECKOUT) && processAction('close') } onCancelClick={ () => processAction('editor_cancel') } price={ price }> } + { (mode === MODE_CAPTURE) && processAction("close") } onEdit={ () => processAction("edit") } onDelete={ () => processAction("delete") } /> } + { (mode === MODE_EDITOR) && processAction("close") } onCancel={ () => processAction("editor_cancel") } onCheckout={ checkoutPictureUrl } availableEffects={ availableEffects } /> } + { (mode === MODE_CHECKOUT) && processAction("close") } onCancelClick={ () => processAction("editor_cancel") } price={ price }> } - ); + ) } diff --git a/src/components/camera/views/CameraWidgetCaptureView.tsx b/src/components/camera/views/CameraWidgetCaptureView.tsx index 308bb8309..3b5c662f1 100644 --- a/src/components/camera/views/CameraWidgetCaptureView.tsx +++ b/src/components/camera/views/CameraWidgetCaptureView.tsx @@ -1,9 +1,8 @@ -import { NitroRectangle, TextureUtils } from '@nitrots/nitro-renderer'; -import { FC, useRef } from 'react'; -import { FaTimes } from 'react-icons/fa'; -import { CameraPicture, GetRoomEngine, GetRoomSession, LocalizeText, PlaySound, SoundNames } from '../../../api'; -import { Column, DraggableWindow, Flex } from '../../../common'; -import { useCamera, useNotification } from '../../../hooks'; +import { NitroRectangle, TextureUtils } from "@nitrots/nitro-renderer" +import { FC, useRef } from "react" +import { CameraPicture, GetRoomEngine, GetRoomSession, LocalizeText, PlaySound, SoundNames } from "../../../api" +import { Button, DraggableWindow } from "../../../common" +import { useCamera, useNotification } from "../../../hooks" export interface CameraWidgetCaptureViewProps { @@ -12,79 +11,81 @@ export interface CameraWidgetCaptureViewProps onDelete: () => void; } -const CAMERA_ROLL_LIMIT: number = 5; +const CAMERA_ROLL_LIMIT: number = 5 export const CameraWidgetCaptureView: FC = props => { - const { onClose = null, onEdit = null, onDelete = null } = props; - const { cameraRoll = null, setCameraRoll = null, selectedPictureIndex = -1, setSelectedPictureIndex = null } = useCamera(); - const { simpleAlert = null } = useNotification(); - const elementRef = useRef(); + const { onClose = null, onEdit = null, onDelete = null } = props + const { cameraRoll = null, setCameraRoll = null, selectedPictureIndex = -1, setSelectedPictureIndex = null } = useCamera() + const { simpleAlert = null } = useNotification() + const elementRef = useRef() - const selectedPicture = ((selectedPictureIndex > -1) ? cameraRoll[selectedPictureIndex] : null); + const selectedPicture = ((selectedPictureIndex > -1) ? cameraRoll[selectedPictureIndex] : null) const getCameraBounds = () => { - if(!elementRef || !elementRef.current) return null; + if(!elementRef || !elementRef.current) return null - const frameBounds = elementRef.current.getBoundingClientRect(); + const frameBounds = elementRef.current.getBoundingClientRect() - return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)); + return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height)) } const takePicture = () => { if(selectedPictureIndex > -1) { - setSelectedPictureIndex(-1); - return; + setSelectedPictureIndex(-1) + return } - const texture = GetRoomEngine().createTextureFromRoom(GetRoomSession().roomId, 1, getCameraBounds()); + const texture = GetRoomEngine().createTextureFromRoom(GetRoomSession().roomId, 1, getCameraBounds()) - const clone = [ ...cameraRoll ]; + const clone = [ ...cameraRoll ] if(clone.length >= CAMERA_ROLL_LIMIT) { - simpleAlert(LocalizeText('camera.full.body')); + simpleAlert(LocalizeText("camera.full.body")) - clone.pop(); + clone.pop() } - PlaySound(SoundNames.CAMERA_SHUTTER); - clone.push(new CameraPicture(texture, TextureUtils.generateImageUrl(texture))); + PlaySound(SoundNames.CAMERA_SHUTTER) + clone.push(new CameraPicture(texture, TextureUtils.generateImageUrl(texture))) - setCameraRoll(clone); + setCameraRoll(clone) } return ( - - { selectedPicture && } -
-
- -
- { !selectedPicture &&
} +
+ { selectedPicture && } +
+ + { !selectedPicture &&
} { selectedPicture && -
-
- - -
+
+
} -
-
+
+
{ (cameraRoll.length > 0) && - - { cameraRoll.map((picture, index) => - { - return setSelectedPictureIndex(index) } />; - }) } - } - +
+ { cameraRoll.map((picture, index) => ( +
setSelectedPictureIndex(index) } > +
+ { selectedPictureIndex === index && +
+ +
+
+
} +
+ ))} +
} +
- ); + ) } diff --git a/src/components/camera/views/CameraWidgetCheckoutView.tsx b/src/components/camera/views/CameraWidgetCheckoutView.tsx index 6ee92f5ad..cf887262f 100644 --- a/src/components/camera/views/CameraWidgetCheckoutView.tsx +++ b/src/components/camera/views/CameraWidgetCheckoutView.tsx @@ -1,8 +1,8 @@ -import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, CameraStorageUrlMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useMemo, useState } from 'react'; -import { CreateLinkEvent, GetConfiguration, GetRoomEngine, LocalizeText, SendMessageComposer } from '../../../api'; -import { Button, Column, Flex, LayoutCurrencyIcon, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../common'; -import { useMessageEvent } from '../../../hooks'; +import { CameraPublishStatusMessageEvent, CameraPurchaseOKMessageEvent, CameraStorageUrlMessageEvent, PublishPhotoMessageComposer, PurchasePhotoMessageComposer } from "@nitrots/nitro-renderer" +import { FC, useEffect, useMemo, useState } from "react" +import { CreateLinkEvent, GetConfiguration, GetRoomEngine, LocalizeText, SendMessageComposer } from "../../../api" +import { Button, LayoutCurrencyIcon, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardView } from "../../../common" +import { useMessageEvent } from "../../../hooks" export interface CameraWidgetCheckoutViewProps { @@ -14,146 +14,147 @@ export interface CameraWidgetCheckoutViewProps export const CameraWidgetCheckoutView: FC = props => { - const { base64Url = null, onCloseClick = null, onCancelClick = null, price = null } = props; - const [ pictureUrl, setPictureUrl ] = useState(null); - const [ publishUrl, setPublishUrl ] = useState(null); - const [ picturesBought, setPicturesBought ] = useState(0); - const [ wasPicturePublished, setWasPicturePublished ] = useState(false); - const [ isWaiting, setIsWaiting ] = useState(false); - const [ publishCooldown, setPublishCooldown ] = useState(0); + const { base64Url = null, onCloseClick = null, onCancelClick = null, price = null } = props + const [ pictureUrl, setPictureUrl ] = useState(null) + const [ publishUrl, setPublishUrl ] = useState(null) + const [ picturesBought, setPicturesBought ] = useState(0) + const [ wasPicturePublished, setWasPicturePublished ] = useState(false) + const [ isWaiting, setIsWaiting ] = useState(false) + const [ publishCooldown, setPublishCooldown ] = useState(0) - const publishDisabled = useMemo(() => GetConfiguration('camera.publish.disabled', false), []); + const publishDisabled = useMemo(() => GetConfiguration("camera.publish.disabled", false), []) useMessageEvent(CameraPurchaseOKMessageEvent, event => { - setPicturesBought(value => (value + 1)); - setIsWaiting(false); - }); + setPicturesBought(value => (value + 1)) + setIsWaiting(false) + }) useMessageEvent(CameraPublishStatusMessageEvent, event => { - const parser = event.getParser(); + const parser = event.getParser() - setPublishUrl(parser.extraDataId); - setPublishCooldown(parser.secondsToWait); - setWasPicturePublished(parser.ok); - setIsWaiting(false); - }); + setPublishUrl(parser.extraDataId) + setPublishCooldown(parser.secondsToWait) + setWasPicturePublished(parser.ok) + setIsWaiting(false) + }) useMessageEvent(CameraStorageUrlMessageEvent, event => { - const parser = event.getParser(); + const parser = event.getParser() - setPictureUrl(GetConfiguration('camera.url') + '/' + parser.url); - }); + setPictureUrl(GetConfiguration("camera.url") + "/" + parser.url) + }) const processAction = (type: string, value: string | number = null) => { switch(type) { - case 'close': - onCloseClick(); - return; - case 'buy': - if(isWaiting) return; + case "close": + onCloseClick() + return + case "buy": + if(isWaiting) return - setIsWaiting(true); - SendMessageComposer(new PurchasePhotoMessageComposer('')); - return; - case 'publish': - if(isWaiting) return; + setIsWaiting(true) + SendMessageComposer(new PurchasePhotoMessageComposer("")) + return + case "publish": + if(isWaiting) return - setIsWaiting(true); - SendMessageComposer(new PublishPhotoMessageComposer()); - return; - case 'cancel': - onCancelClick(); - return; + setIsWaiting(true) + SendMessageComposer(new PublishPhotoMessageComposer()) + return + case "cancel": + onCancelClick() + return } } useEffect(() => { - if(!base64Url) return; + if(!base64Url) return - GetRoomEngine().saveBase64AsScreenshot(base64Url); - }, [ base64Url ]); + GetRoomEngine().saveBase64AsScreenshot(base64Url) + }, [ base64Url ]) - if(!price) return null; + if(!price) return null return ( - - processAction('close') } /> + + processAction("close") } /> - +
{ (pictureUrl && pictureUrl.length) && - } + } { (!pictureUrl || !pictureUrl.length) && - - { LocalizeText('camera.loading') } - } - - - - - { LocalizeText('camera.purchase.header') } - - { ((price.credits > 0) || (price.duckets > 0)) && - - { LocalizeText('catalog.purchase.confirmation.dialog.cost') } - { (price.credits > 0) && - - { price.credits } - - } - { (price.duckets > 0) && - - { price.duckets } - - } - } +

{ LocalizeText("camera.loading") }

} +
+ { pictureUrl && !wasPicturePublished &&

{ LocalizeText("camera.confirm_phase.info") }

} + { !pictureUrl &&

{ LocalizeText("camera.purchase.pleasewait") }

} + { wasPicturePublished &&

{ LocalizeText("camera.publish.successful") }

} +
+
+
+
+

+ { LocalizeText("camera.purchase.header") } +

+ { ((price.credits > 0) || (price.duckets > 0)) && +
+

{ LocalizeText("catalog.purchase.confirmation.dialog.cost") } 

+ { (price.credits > 0) && +
+

{ price.credits }

+ +
} + { (price.duckets > 0) && +
+

{ price.duckets }

+ +
} +
} +
+ +
{ (picturesBought > 0) && - - { LocalizeText('camera.purchase.count.info') } { picturesBought } - CreateLinkEvent('inventory/toggle') }>{ LocalizeText('camera.open.inventory') } - } - - - - - +
+

+ { LocalizeText("camera.purchase.count.info") } { picturesBought } CreateLinkEvent("inventory/toggle") }>{ LocalizeText("camera.open.inventory") } +

+
} +
+
{ !publishDisabled && - - - - { LocalizeText(wasPicturePublished ? 'camera.publish.successful' : 'camera.publish.explanation') } - - - { LocalizeText(wasPicturePublished ? 'camera.publish.success.short.info' : 'camera.publish.detailed.explanation') } - - { wasPicturePublished && { LocalizeText('camera.link.to.published') } } - { !wasPicturePublished && (price.publishDucketPrice > 0) && - - { LocalizeText('catalog.purchase.confirmation.dialog.cost') } - - { price.publishDucketPrice } - - - } - { (publishCooldown > 0) &&
{ LocalizeText('camera.publish.wait', [ 'minutes' ], [ Math.ceil( publishCooldown / 60).toString() ]) }
} -
- { !wasPicturePublished && - - - } -
} - { LocalizeText('camera.warning.disclaimer') } - - - +
+
+
+

+ { LocalizeText("camera.publish.explanation") } +

+

+ { LocalizeText("camera.publish.detailed.explanation") } +

+ { wasPicturePublished && { LocalizeText("camera.link.to.published") } } + { !wasPicturePublished && +
+

{ LocalizeText("catalog.purchase.confirmation.dialog.cost") } 

+
+

{ price.publishDucketPrice }

+ +
+
} +
+ { !wasPicturePublished && + } +
+
} +

{ LocalizeText("camera.warning.disclaimer") }

+
- ); + ) } diff --git a/src/components/camera/views/CameraWidgetShowPhotoView.tsx b/src/components/camera/views/CameraWidgetShowPhotoView.tsx index 8614695df..f3c8df499 100644 --- a/src/components/camera/views/CameraWidgetShowPhotoView.tsx +++ b/src/components/camera/views/CameraWidgetShowPhotoView.tsx @@ -1,7 +1,5 @@ -import { FC, useEffect, useState } from 'react'; -import { FaArrowLeft, FaArrowRight } from 'react-icons/fa'; -import { GetUserProfile, IPhotoData, LocalizeText } from '../../../api'; -import { Flex, Grid, Text } from '../../../common'; +import { FC, useEffect, useState } from "react" +import { IPhotoData, LocalizeText } from "../../../api" export interface CameraWidgetShowPhotoViewProps { @@ -11,61 +9,49 @@ export interface CameraWidgetShowPhotoViewProps export const CameraWidgetShowPhotoView: FC = props => { - const { currentIndex = -1, currentPhotos = null } = props; - const [ imageIndex, setImageIndex ] = useState(0); + const { currentIndex = -1, currentPhotos = null } = props + const [ imageIndex, setImageIndex ] = useState(0) - const currentImage = (currentPhotos && currentPhotos.length) ? currentPhotos[imageIndex] : null; + const currentImage = (currentPhotos && currentPhotos.length) ? currentPhotos[imageIndex] : null const next = () => { setImageIndex(prevValue => { - let newIndex = (prevValue + 1); + let newIndex = (prevValue + 1) - if(newIndex >= currentPhotos.length) newIndex = 0; + if(newIndex >= currentPhotos.length) newIndex = 0 - return newIndex; - }); + return newIndex + }) } const previous = () => { setImageIndex(prevValue => { - let newIndex = (prevValue - 1); + let newIndex = (prevValue - 1) - if(newIndex < 0) newIndex = (currentPhotos.length - 1); + if(newIndex < 0) newIndex = (currentPhotos.length - 1) - return newIndex; - }); + return newIndex + }) } useEffect(() => { - setImageIndex(currentIndex); - }, [ currentIndex ]); + setImageIndex(currentIndex) + }, [ currentIndex ]) - if(!currentImage) return null; + if(!currentImage) return null return ( - - +
+
{ !currentImage.w && - { LocalizeText('camera.loading') } } - - { currentImage.m && currentImage.m.length && - { currentImage.m } } - - { (currentImage.n || '') } - { new Date(currentImage.t * 1000).toLocaleDateString() } - - { (currentPhotos.length > 1) && - - - GetUserProfile(currentImage.oi) }>{ currentImage.o } - - - } - - ); +

{ LocalizeText("camera.loading") }

} +
+

{ new Date(currentImage.t * 1000).toLocaleDateString() }

+
+ ) } diff --git a/src/components/camera/views/editor/CameraWidgetEditorView.tsx b/src/components/camera/views/editor/CameraWidgetEditorView.tsx index d7dfbf7a9..71d5825a8 100644 --- a/src/components/camera/views/editor/CameraWidgetEditorView.tsx +++ b/src/components/camera/views/editor/CameraWidgetEditorView.tsx @@ -1,10 +1,10 @@ -import { IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect, RoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { FaSave, FaSearchMinus, FaSearchPlus, FaTrash } from 'react-icons/fa'; -import ReactSlider from 'react-slider'; -import { CameraEditorTabs, CameraPicture, CameraPictureThumbnail, GetRoomCameraWidgetManager, LocalizeText } from '../../../../api'; -import { Button, ButtonGroup, Column, Flex, Grid, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView, Text } from '../../../../common'; -import { CameraWidgetEffectListView } from './effect-list/CameraWidgetEffectListView'; +import { IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect, RoomCameraWidgetSelectedEffect } from "@nitrots/nitro-renderer" +import { FC, useCallback, useEffect, useMemo, useState } from "react" +import ReactSlider from "react-slider" +import { CameraEditorTabs, CameraPicture, CameraPictureThumbnail, GetRoomCameraWidgetManager, LocalizeText } from "../../../../api" +import { Button, LayoutImage, NitroBigCardContentView, NitroBigCardHeaderView, NitroBigCardView, NitroCardTabsItemView, NitroCardTabsView } from "../../../../common" +import { LayoutTimesView } from "../../../../common/layout/LayoutTimesView" +import { CameraWidgetEffectListView } from "./effect-list/CameraWidgetEffectListView" export interface CameraWidgetEditorViewProps { @@ -16,42 +16,42 @@ export interface CameraWidgetEditorViewProps onCheckout: (pictureUrl: string) => void; } -const TABS: string[] = [ CameraEditorTabs.COLORMATRIX, CameraEditorTabs.COMPOSITE ]; +const TABS: string[] = [ CameraEditorTabs.COLORMATRIX, CameraEditorTabs.COMPOSITE ] export const CameraWidgetEditorView: FC = props => { - const { picture = null, availableEffects = null, myLevel = 1, onClose = null, onCancel = null, onCheckout = null } = props; - const [ currentTab, setCurrentTab ] = useState(TABS[0]); - const [ selectedEffectName, setSelectedEffectName ] = useState(null); - const [ selectedEffects, setSelectedEffects ] = useState([]); - const [ effectsThumbnails, setEffectsThumbnails ] = useState([]); - const [ isZoomed, setIsZoomed ] = useState(false); + const { picture = null, availableEffects = null, myLevel = 1, onClose = null, onCancel = null, onCheckout = null } = props + const [ currentTab, setCurrentTab ] = useState(TABS[0]) + const [ selectedEffectName, setSelectedEffectName ] = useState(null) + const [ selectedEffects, setSelectedEffects ] = useState([]) + const [ effectsThumbnails, setEffectsThumbnails ] = useState([]) + const [ isZoomed, setIsZoomed ] = useState(false) const getColorMatrixEffects = useMemo(() => { - return availableEffects.filter(effect => effect.colorMatrix); - }, [ availableEffects ]); + return availableEffects.filter(effect => effect.colorMatrix) + }, [ availableEffects ]) const getCompositeEffects = useMemo(() => { - return availableEffects.filter(effect => effect.texture); - }, [ availableEffects ]); + return availableEffects.filter(effect => effect.texture) + }, [ availableEffects ]) const getEffectList = useCallback(() => { if(currentTab === CameraEditorTabs.COLORMATRIX) { - return getColorMatrixEffects; + return getColorMatrixEffects } - return getCompositeEffects; - }, [ currentTab, getColorMatrixEffects, getCompositeEffects ]); + return getCompositeEffects + }, [ currentTab, getColorMatrixEffects, getCompositeEffects ]) const getSelectedEffectIndex = useCallback((name: string) => { - if(!name || !name.length || !selectedEffects || !selectedEffects.length) return -1; + if(!name || !name.length || !selectedEffects || !selectedEffects.length) return -1 - return selectedEffects.findIndex(effect => (effect.effect.name === name)); + return selectedEffects.findIndex(effect => (effect.effect.name === name)) }, [ selectedEffects ]) const getCurrentEffectIndex = useMemo(() => @@ -61,169 +61,173 @@ export const CameraWidgetEditorView: FC = props => const getCurrentEffect = useMemo(() => { - if(!selectedEffectName) return null; + if(!selectedEffectName) return null - return (selectedEffects[getCurrentEffectIndex] || null); - }, [ selectedEffectName, getCurrentEffectIndex, selectedEffects ]); + return (selectedEffects[getCurrentEffectIndex] || null) + }, [ selectedEffectName, getCurrentEffectIndex, selectedEffects ]) const setSelectedEffectAlpha = useCallback((alpha: number) => { - const index = getCurrentEffectIndex; + const index = getCurrentEffectIndex - if(index === -1) return; + if(index === -1) return setSelectedEffects(prevValue => { - const clone = [ ...prevValue ]; - const currentEffect = clone[index]; + const clone = [ ...prevValue ] + const currentEffect = clone[index] - clone[getCurrentEffectIndex] = new RoomCameraWidgetSelectedEffect(currentEffect.effect, alpha); + clone[getCurrentEffectIndex] = new RoomCameraWidgetSelectedEffect(currentEffect.effect, alpha) - return clone; - }); - }, [ getCurrentEffectIndex, setSelectedEffects ]); + return clone + }) + }, [ getCurrentEffectIndex, setSelectedEffects ]) const getCurrentPictureUrl = useMemo(() => { - return GetRoomCameraWidgetManager().applyEffects(picture.texture, selectedEffects, isZoomed).src; - }, [ picture, selectedEffects, isZoomed ]); + return GetRoomCameraWidgetManager().applyEffects(picture.texture, selectedEffects, isZoomed).src + }, [ picture, selectedEffects, isZoomed ]) const processAction = useCallback((type: string, effectName: string = null) => { switch(type) { - case 'close': - onClose(); - return; - case 'cancel': - onCancel(); - return; - case 'checkout': - onCheckout(getCurrentPictureUrl); - return; - case 'change_tab': - setCurrentTab(String(effectName)); - return; - case 'select_effect': { - let existingIndex = getSelectedEffectIndex(effectName); - - if(existingIndex >= 0) return; + case "close": + onClose() + return + case "cancel": + onCancel() + return + case "checkout": + onCheckout(getCurrentPictureUrl) + return + case "change_tab": + setCurrentTab(String(effectName)) + return + case "select_effect": { + let existingIndex = getSelectedEffectIndex(effectName) + + if(existingIndex >= 0) return - const effect = availableEffects.find(effect => (effect.name === effectName)); + const effect = availableEffects.find(effect => (effect.name === effectName)) - if(!effect) return; + if(!effect) return - setSelectedEffects(prevValue => - { - return [ ...prevValue, new RoomCameraWidgetSelectedEffect(effect, 1) ]; - }); + setSelectedEffects(prevValue => + { + return [ ...prevValue, new RoomCameraWidgetSelectedEffect(effect, 1) ] + }) - setSelectedEffectName(effect.name); - return; - } - case 'remove_effect': { - let existingIndex = getSelectedEffectIndex(effectName); + setSelectedEffectName(effect.name) + return + } + case "remove_effect": { + let existingIndex = getSelectedEffectIndex(effectName) - if(existingIndex === -1) return; + if(existingIndex === -1) return - setSelectedEffects(prevValue => - { - const clone = [ ...prevValue ]; + setSelectedEffects(prevValue => + { + const clone = [ ...prevValue ] - clone.splice(existingIndex, 1); + clone.splice(existingIndex, 1) - return clone; - }); + return clone + }) - if(selectedEffectName === effectName) setSelectedEffectName(null); - return; - } - case 'clear_effects': - setSelectedEffectName(null); - setSelectedEffects([]); - return; - case 'download': { - const image = new Image(); + if(selectedEffectName === effectName) setSelectedEffectName(null) + return + } + case "clear_effects": + setSelectedEffectName(null) + setSelectedEffects([]) + return + case "download": { + const image = new Image() - image.src = getCurrentPictureUrl + image.src = getCurrentPictureUrl - const newWindow = window.open(''); - newWindow.document.write(image.outerHTML); - return; - } - case 'zoom': - setIsZoomed(!isZoomed); - return; + const newWindow = window.open("") + newWindow.document.write(image.outerHTML) + return + } + case "zoom": + setIsZoomed(!isZoomed) + return } - }, [ isZoomed, availableEffects, selectedEffectName, getCurrentPictureUrl, getSelectedEffectIndex, onCancel, onCheckout, onClose, setIsZoomed, setSelectedEffects ]); + }, [ isZoomed, availableEffects, selectedEffectName, getCurrentPictureUrl, getSelectedEffectIndex, onCancel, onCheckout, onClose, setIsZoomed, setSelectedEffects ]) useEffect(() => { - const thumbnails: CameraPictureThumbnail[] = []; + const thumbnails: CameraPictureThumbnail[] = [] for(const effect of availableEffects) { - thumbnails.push(new CameraPictureThumbnail(effect.name, GetRoomCameraWidgetManager().applyEffects(picture.texture, [ new RoomCameraWidgetSelectedEffect(effect, 1) ], false).src)); + thumbnails.push(new CameraPictureThumbnail(effect.name, GetRoomCameraWidgetManager().applyEffects(picture.texture, [ new RoomCameraWidgetSelectedEffect(effect, 1) ], false).src)) } - setEffectsThumbnails(thumbnails); - }, [ picture, availableEffects ]); + setEffectsThumbnails(thumbnails) + }, [ picture, availableEffects ]) return ( - - processAction('close') } /> - - { TABS.map(tab => - { - return processAction('change_tab', tab) }> - }) } - - - - - - - - - + + + +
+ processAction("close") } /> +
+
+
+
+ { selectedEffectName && - - { LocalizeText('camera.effect.name.' + selectedEffectName) } +
+

{ LocalizeText("camera.effect.name." + selectedEffectName) }

setSelectedEffectAlpha(event) } - renderThumb={ (props, state) =>
{ state.valueNow }
} /> - } - - - - - - - - - - - - - - - - - ); + trackClassName="h-1.5 track" + renderThumb={ (props, state) =>
+
+
} /> +
} +
+
+ + +
+
+
+ + { TABS.map(tab => ( + processAction("change_tab", tab) }> + { LocalizeText(`camera.editor.filters.${tab}`) } + + ))} + + +
+
+
+ + +
+ + + ) } diff --git a/src/components/camera/views/editor/effect-list/CameraWidgetEffectListItemView.tsx b/src/components/camera/views/editor/effect-list/CameraWidgetEffectListItemView.tsx index cac3a34ba..e9c605bb1 100644 --- a/src/components/camera/views/editor/effect-list/CameraWidgetEffectListItemView.tsx +++ b/src/components/camera/views/editor/effect-list/CameraWidgetEffectListItemView.tsx @@ -1,8 +1,5 @@ -import { IRoomCameraWidgetEffect } from '@nitrots/nitro-renderer'; -import { FC } from 'react'; -import { FaLock, FaTimes } from 'react-icons/fa'; -import { LocalizeText } from '../../../../../api'; -import { Button, LayoutGridItem, Text } from '../../../../../common'; +import { IRoomCameraWidgetEffect } from "@nitrots/nitro-renderer" +import { FC } from "react" export interface CameraWidgetEffectListItemViewProps { @@ -16,25 +13,18 @@ export interface CameraWidgetEffectListItemViewProps export const CameraWidgetEffectListItemView: FC = props => { - const { effect = null, thumbnailUrl = null, isActive = false, isLocked = false, selectEffect = null, removeEffect = null } = props; + const { effect = null, thumbnailUrl = null, isActive = false, isLocked = false, selectEffect = null, removeEffect = null } = props return ( - (!isActive && selectEffect()) }> - { isActive && - } +
(!isActive && selectEffect()) }> { !isLocked && (thumbnailUrl && thumbnailUrl.length > 0) && -
- +
} + { isActive && +
+ +
+
} - { isLocked && - -
- -
- { effect.minLevel } -
} - - ); +
+ ) } diff --git a/src/components/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx b/src/components/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx index 3f67cea77..368123ea3 100644 --- a/src/components/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx +++ b/src/components/camera/views/editor/effect-list/CameraWidgetEffectListView.tsx @@ -1,8 +1,7 @@ -import { IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect } from '@nitrots/nitro-renderer'; -import { FC } from 'react'; -import { CameraPictureThumbnail } from '../../../../../api'; -import { Grid } from '../../../../../common'; -import { CameraWidgetEffectListItemView } from './CameraWidgetEffectListItemView'; +import { IRoomCameraWidgetEffect, IRoomCameraWidgetSelectedEffect } from "@nitrots/nitro-renderer" +import { FC } from "react" +import { CameraPictureThumbnail } from "../../../../../api" +import { CameraWidgetEffectListItemView } from "./CameraWidgetEffectListItemView" export interface CameraWidgetEffectListViewProps { @@ -15,17 +14,17 @@ export interface CameraWidgetEffectListViewProps export const CameraWidgetEffectListView: FC = props => { - const { myLevel = 0, selectedEffects = [], effects = [], thumbnails = [], processAction = null } = props; + const { myLevel = 0, selectedEffects = [], effects = [], thumbnails = [], processAction = null } = props return ( - +
{ effects && (effects.length > 0) && effects.map((effect, index) => { - const thumbnailUrl = (thumbnails.find(thumbnail => (thumbnail.effectName === effect.name))); - const isActive = (selectedEffects.findIndex(selectedEffect => (selectedEffect.effect.name === effect.name)) > -1); + const thumbnailUrl = (thumbnails.find(thumbnail => (thumbnail.effectName === effect.name))) + const isActive = (selectedEffects.findIndex(selectedEffect => (selectedEffect.effect.name === effect.name)) > -1) - return myLevel) } selectEffect={ () => processAction('select_effect', effect.name) } removeEffect={ () => processAction('remove_effect', effect.name) } /> + return myLevel) } selectEffect={ () => processAction("select_effect", effect.name) } removeEffect={ () => processAction("remove_effect", effect.name) } /> }) } - - ); +
+ ) } diff --git a/src/components/campaign/CalendarItemView.tsx b/src/components/campaign/CalendarItemView.tsx index 816fa75b5..9fc4673de 100644 --- a/src/components/campaign/CalendarItemView.tsx +++ b/src/components/campaign/CalendarItemView.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; -import { CalendarItemState, GetConfiguration, GetRoomEngine, GetSessionDataManager, ICalendarItem } from '../../api'; -import { Base, Column, Flex, LayoutImage } from '../../common'; +import { FC } from "react" +import { CalendarItemState, GetConfiguration, GetRoomEngine, GetSessionDataManager, ICalendarItem } from "../../api" +import { Base, Column, Flex, LayoutImage } from "../../common" interface CalendarItemViewProps { @@ -13,31 +13,31 @@ interface CalendarItemViewProps export const CalendarItemView: FC = props => { - const { itemId = -1, state = null, product = null, active = false, onClick = null } = props; + const { itemId = -1, state = null, product = null, active = false, onClick = null } = props const getFurnitureIcon = (name: string) => { - let furniData = GetSessionDataManager().getFloorItemDataByName(name); - let url = null; + let furniData = GetSessionDataManager().getFloorItemDataByName(name) + let url = null - if(furniData) url = GetRoomEngine().getFurnitureFloorIconUrl(furniData.id); + if(furniData) url = GetRoomEngine().getFurnitureFloorIconUrl(furniData.id) else { - furniData = GetSessionDataManager().getWallItemDataByName(name); + furniData = GetSessionDataManager().getWallItemDataByName(name) - if(furniData) url = GetRoomEngine().getFurnitureWallIconUrl(furniData.id); + if(furniData) url = GetRoomEngine().getFurnitureWallIconUrl(furniData.id) } - return url; + return url } return ( - onClick(itemId) }> + onClick(itemId) }> { (state === CalendarItemState.STATE_UNLOCKED) && { product && - ('image.library.url') + product.customImage : getFurnitureIcon(product.productName) } /> } + ("image.library.url") + product.customImage : getFurnitureIcon(product.productName) } /> } } { (state !== CalendarItemState.STATE_UNLOCKED) && @@ -48,5 +48,5 @@ export const CalendarItemView: FC = props => } } - ); + ) } diff --git a/src/components/campaign/CalendarView.tsx b/src/components/campaign/CalendarView.tsx index e29612945..5ea660f00 100644 --- a/src/components/campaign/CalendarView.tsx +++ b/src/components/campaign/CalendarView.tsx @@ -1,7 +1,7 @@ -import { FC, useState } from 'react'; -import { CalendarItemState, GetSessionDataManager, ICalendarItem, LocalizeText } from '../../api'; -import { Base, Button, Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common'; -import { CalendarItemView } from './CalendarItemView'; +import { FC, useState } from "react" +import { CalendarItemState, GetSessionDataManager, ICalendarItem, LocalizeText } from "../../api" +import { Base, Button, Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from "../../common" +import { CalendarItemView } from "./CalendarItemView" interface CalendarViewProps { @@ -15,96 +15,96 @@ interface CalendarViewProps missedDays: number[]; } -const TOTAL_SHOWN_ITEMS = 5; +const TOTAL_SHOWN_ITEMS = 5 export const CalendarView: FC = props => { - const { onClose = null, campaignName = null, currentDay = null, numDays = null, missedDays = null, openedDays = null, openPackage = null, receivedProducts = null } = props; - const [ selectedDay, setSelectedDay ] = useState(currentDay); - const [ index, setIndex ] = useState(Math.max(0, (selectedDay - 1))); + const { onClose = null, campaignName = null, currentDay = null, numDays = null, missedDays = null, openedDays = null, openPackage = null, receivedProducts = null } = props + const [ selectedDay, setSelectedDay ] = useState(currentDay) + const [ index, setIndex ] = useState(Math.max(0, (selectedDay - 1))) const getDayState = (day: number) => { - if(openedDays.includes(day)) return CalendarItemState.STATE_UNLOCKED; + if(openedDays.includes(day)) return CalendarItemState.STATE_UNLOCKED - if(day > currentDay) return CalendarItemState.STATE_LOCKED_FUTURE; + if(day > currentDay) return CalendarItemState.STATE_LOCKED_FUTURE - if(missedDays.includes(day)) return CalendarItemState.STATE_LOCKED_EXPIRED; + if(missedDays.includes(day)) return CalendarItemState.STATE_LOCKED_EXPIRED - return CalendarItemState.STATE_LOCKED_AVAILABLE; + return CalendarItemState.STATE_LOCKED_AVAILABLE } const dayMessage = (day: number) => { - const state = getDayState(day); + const state = getDayState(day) switch(state) { - case CalendarItemState.STATE_UNLOCKED: - return LocalizeText('campaign.calendar.info.unlocked'); - case CalendarItemState.STATE_LOCKED_FUTURE: - return LocalizeText('campaign.calendar.info.future'); - case CalendarItemState.STATE_LOCKED_EXPIRED: - return LocalizeText('campaign.calendar.info.expired'); - default: - return LocalizeText('campaign.calendar.info.available.desktop'); + case CalendarItemState.STATE_UNLOCKED: + return LocalizeText("campaign.calendar.info.unlocked") + case CalendarItemState.STATE_LOCKED_FUTURE: + return LocalizeText("campaign.calendar.info.future") + case CalendarItemState.STATE_LOCKED_EXPIRED: + return LocalizeText("campaign.calendar.info.expired") + default: + return LocalizeText("campaign.calendar.info.available.desktop") } } const onClickNext = () => { - const nextDay = (selectedDay + 1); + const nextDay = (selectedDay + 1) - if(nextDay === numDays) return; + if(nextDay === numDays) return - setSelectedDay(nextDay); + setSelectedDay(nextDay) - if((index + TOTAL_SHOWN_ITEMS) < (nextDay + 1)) setIndex(index + 1); + if((index + TOTAL_SHOWN_ITEMS) < (nextDay + 1)) setIndex(index + 1) } const onClickPrev = () => { - const prevDay = (selectedDay - 1); + const prevDay = (selectedDay - 1) - if(prevDay < 0) return; + if(prevDay < 0) return - setSelectedDay(prevDay); + setSelectedDay(prevDay) - if(index > prevDay) setIndex(index - 1); + if(index > prevDay) setIndex(index - 1) } const onClickItem = (item: number) => { if(selectedDay === item) { - const state = getDayState(item); + const state = getDayState(item) - if(state === CalendarItemState.STATE_LOCKED_AVAILABLE) openPackage(item, false); + if(state === CalendarItemState.STATE_LOCKED_AVAILABLE) openPackage(item, false) - return; + return } - setSelectedDay(item); + setSelectedDay(item) } const forceOpen = () => { - const id = selectedDay; - const state = getDayState(id); + const id = selectedDay + const state = getDayState(id) - if(state !== CalendarItemState.STATE_UNLOCKED) openPackage(id, true); + if(state !== CalendarItemState.STATE_UNLOCKED) openPackage(id, true) } return ( - + - + - + - { LocalizeText('campaign.calendar.heading.day', [ 'number' ], [ (selectedDay + 1).toString() ]) } + { LocalizeText("campaign.calendar.heading.day", [ "number" ], [ (selectedDay + 1).toString() ]) } { dayMessage(selectedDay) }
@@ -123,13 +123,13 @@ export const CalendarView: FC = props => { [ ...Array(TOTAL_SHOWN_ITEMS) ].map((e, i) => { - const day = (index + i); + const day = (index + i) return ( - ); + ) }) } diff --git a/src/components/campaign/CampaignView.scss b/src/components/campaign/CampaignView.scss index cea973f23..3d1706fca 100644 --- a/src/components/campaign/CampaignView.scss +++ b/src/components/campaign/CampaignView.scss @@ -1,7 +1,4 @@ .nitro-campaign-calendar { - width: $nitro-calendar-width; - height: $nitro-calendar-height; - .calendar-item { filter: brightness(80%); @@ -13,7 +10,7 @@ .campaign-spritesheet { display: block; - background: transparent url('@/assets/images/campaign/campaign_spritesheet.png') no-repeat; + //background: transparent url('@/client-assets/images/campaign/campaign_spritesheet.png?v=2451779') no-repeat; &.available { width: 69px; diff --git a/src/components/campaign/CampaignView.tsx b/src/components/campaign/CampaignView.tsx index fe803838e..9b1079eae 100644 --- a/src/components/campaign/CampaignView.tsx +++ b/src/components/campaign/CampaignView.tsx @@ -1,95 +1,95 @@ -import { CampaignCalendarData, CampaignCalendarDataMessageEvent, CampaignCalendarDoorOpenedMessageEvent, ILinkEventTracker, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { AddEventLinkTracker, CalendarItem, RemoveLinkEventTracker, SendMessageComposer } from '../../api'; -import { useMessageEvent } from '../../hooks'; -import { CalendarView } from './CalendarView'; +import { CampaignCalendarData, CampaignCalendarDataMessageEvent, CampaignCalendarDoorOpenedMessageEvent, ILinkEventTracker, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer } from "@nitrots/nitro-renderer" +import { FC, useEffect, useState } from "react" +import { AddEventLinkTracker, CalendarItem, RemoveLinkEventTracker, SendMessageComposer } from "../../api" +import { useMessageEvent } from "../../hooks" +import { CalendarView } from "./CalendarView" export const CampaignView: FC<{}> = props => { - const [ calendarData, setCalendarData ] = useState(null); - const [ lastOpenAttempt, setLastOpenAttempt ] = useState(-1); - const [ receivedProducts, setReceivedProducts ] = useState>(new Map()); - const [ isCalendarOpen, setCalendarOpen ] = useState(false); + const [ calendarData, setCalendarData ] = useState(null) + const [ lastOpenAttempt, setLastOpenAttempt ] = useState(-1) + const [ receivedProducts, setReceivedProducts ] = useState>(new Map()) + const [ isCalendarOpen, setCalendarOpen ] = useState(false) const openPackage = (id: number, asStaff = false) => { - if(!calendarData) return; + if(!calendarData) return - setLastOpenAttempt(id); + setLastOpenAttempt(id) if(asStaff) { - SendMessageComposer(new OpenCampaignCalendarDoorAsStaffComposer(calendarData.campaignName, id)); + SendMessageComposer(new OpenCampaignCalendarDoorAsStaffComposer(calendarData.campaignName, id)) } else { - SendMessageComposer(new OpenCampaignCalendarDoorComposer(calendarData.campaignName, id)); + SendMessageComposer(new OpenCampaignCalendarDoorComposer(calendarData.campaignName, id)) } } useMessageEvent(CampaignCalendarDataMessageEvent, event => { - const parser = event.getParser(); + const parser = event.getParser() - if(!parser) return; + if(!parser) return - setCalendarData(parser.calendarData); - }); + setCalendarData(parser.calendarData) + }) useMessageEvent(CampaignCalendarDoorOpenedMessageEvent, event => { - const parser = event.getParser(); + const parser = event.getParser() - if(!parser) return; + if(!parser) return - const lastAttempt = lastOpenAttempt; + const lastAttempt = lastOpenAttempt if(parser.doorOpened) { setCalendarData(prev => { - const copy = prev.clone(); - copy.openedDays.push(lastOpenAttempt); + const copy = prev.clone() + copy.openedDays.push(lastOpenAttempt) - return copy; - }); + return copy + }) setReceivedProducts(prev => { - const copy = new Map(prev); - copy.set(lastAttempt, new CalendarItem(parser.productName, parser.customImage,parser.furnitureClassName)); + const copy = new Map(prev) + copy.set(lastAttempt, new CalendarItem(parser.productName, parser.customImage,parser.furnitureClassName)) - return copy; - }); + return copy + }) } - setLastOpenAttempt(-1); - }); + setLastOpenAttempt(-1) + }) useEffect(() => { const linkTracker: ILinkEventTracker = { linkReceived: (url: string) => { - const value = url.split('/'); + const value = url.split("/") - if(value.length < 2) return; + if(value.length < 2) return switch(value[1]) { - case 'calendar': - setCalendarOpen(true); - break; + case "calendar": + setCalendarOpen(true) + break } }, - eventUrlPrefix: 'openView/' - }; + eventUrlPrefix: "openView/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, []); + return () => RemoveLinkEventTracker(linkTracker) + }, []) return ( <> diff --git a/src/components/catalog/CatalogView.scss b/src/components/catalog/CatalogView.scss deleted file mode 100644 index 824ddb7da..000000000 --- a/src/components/catalog/CatalogView.scss +++ /dev/null @@ -1,158 +0,0 @@ -.nitro-catalog { - width: $catalog-width; - height: $catalog-height; - - font[size='16'] { - font-size: 20px; - } - - .catalog-search-button { - min-width: 30px; - width: 30px; - } - - .quantity-input { - min-height: 17px; - height: 17px; - width: 28px; - padding: 0 4px; - text-align: right; - } -} - -.nitro-catalog-gift { - width: 325px; - - .gift-preview { - width: 80px; - height: 80px; - overflow: hidden; - display: flex; - justify-content: center; - align-items: center; - } - - .gift-color { - width: 15px; - height: 15px; - border-radius: $border-radius; - } -} - -.nitro-catalog-navigation-grid-container { - border-color: #b6bec5 !important; - background-color: #cdd3d9; - border: 2px solid; - - .nitro-catalog-navigation-section { - display: grid; - - .nitro-catalog-navigation-section { - padding-left: 5px; - border-left: 2px solid #b6bec5; - } - } - - .layout-grid-item { - font-size: $font-size-sm; - height: 23px !important; - border-color: unset !important; - background-color: #cdd3d9; - border: 0 !important; - padding: 1px 3px; - - .svg-inline--fa { - color: $black; - font-size: 10px; - padding: 1px; - } - } -} - -.nitro-catalog-layout-info-loyalty { - .info-loyalty-content { - background-repeat: no-repeat; - background-position: top right; - background-image: url('@/assets/images/catalog/diamond_info_illustration.gif'); - padding-right: 123px; - } - - .info-image { - width: 123px; - height: 350px; - background-image: url('@/assets/images/catalog/diamond_info_illustration.gif'); - } -} - -.nitro-catalog-layout-vip-buy-grid { - .layout-grid-item { - height: 50px !important; - max-height: 50px !important; - - .icon-hc-banner { - width: 68px; - height: 40px; - background: url('@/assets/images/catalog/hc_big.png') center - no-repeat; - } - } -} - -.nitro-catalog-layout-marketplace-grid { - .layout-grid-item { - height: 75px !important; - } -} - -.nitro-catalog-layout-vip-gifts-grid { - .layout-grid-item { - height: 55px !important; - max-height: 55px !important; - } -} - -.nitro-catalog-layout-marketplace-post-offer { - width: $marketplace-post-offer-width; - height: $marketplace-post-offer-height; -} - -.nitro-catalog-layout-bundle-grid { - .layout-grid-item { - background-color: transparent; - } -} - -.nitro-catalog-header { - width: 290px; - height: 60px; -} - -.autocomplete-gift-container { - background: #fff; - padding: 8px; - list-style-type: none; - min-width: 307px; - border-radius: 0.2rem; - position: absolute; - font-size: 0.7875rem; - top: 81px; - left: 8px; - border: 1px solid #b6c1ce; - margin: 0; - border-radius: 2px; - margin: 0; - box-sizing: border-box; - max-height: 280px; - overflow-y: auto; - z-index: 1; - - .autocomplete-gift-item { - width: 100%; - box-sizing: border-box; - &:hover { - background-color: #ebf4ff; - } - } -} - -@import './views/targeted-offer/Offer.scss'; diff --git a/src/components/catalog/CatalogView.tsx b/src/components/catalog/CatalogView.tsx index 6201c33a7..47e92fcd1 100644 --- a/src/components/catalog/CatalogView.tsx +++ b/src/components/catalog/CatalogView.tsx @@ -1,111 +1,104 @@ -import { ILinkEventTracker } from '@nitrots/nitro-renderer'; -import { FC, useEffect } from 'react'; -import { AddEventLinkTracker, GetConfiguration, LocalizeText, RemoveLinkEventTracker } from '../../api'; -import { Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; -import { useCatalog } from '../../hooks'; -import { CatalogIconView } from './views/catalog-icon/CatalogIconView'; -import { CatalogGiftView } from './views/gift/CatalogGiftView'; -import { CatalogNavigationView } from './views/navigation/CatalogNavigationView'; -import { GetCatalogLayout } from './views/page/layout/GetCatalogLayout'; -import { MarketplacePostOfferView } from './views/page/layout/marketplace/MarketplacePostOfferView'; +import { ILinkEventTracker } from "@nitrots/nitro-renderer" +import { FC, useEffect } from "react" +import { AddEventLinkTracker, GetConfiguration, LocalizeText, RemoveLinkEventTracker } from "../../api" +import { DraggableWindowPosition, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from "../../common" +import { useCatalog } from "../../hooks" +import { CatalogIconView } from "./views/catalog-icon/CatalogIconView" +import { CatalogGiftView } from "./views/gift/CatalogGiftView" +import { CatalogNavigationView } from "./views/navigation/CatalogNavigationView" +import { GetCatalogLayout } from "./views/page/layout/GetCatalogLayout" +import { MarketplacePostOfferView } from "./views/page/layout/marketplace/MarketplacePostOfferView" -export const CatalogView: FC<{}> = props => -{ - const { isVisible = false, setIsVisible = null, rootNode = null, currentPage = null, navigationHidden = false, setNavigationHidden = null, activeNodes = [], searchResult = null, setSearchResult = null, openPageByName = null, openPageByOfferId = null, activateNode = null, getNodeById } = useCatalog(); +export const CatalogView: FC<{}> = props => { + const { isVisible = false, setIsVisible = null, rootNode = null, currentPage = null, navigationHidden = false, setNavigationHidden = null, activeNodes = [], searchResult = null, setSearchResult = null, openPageByName = null, openPageByOfferId = null, activateNode = null, getNodeById } = useCatalog() - useEffect(() => - { + useEffect(() => { const linkTracker: ILinkEventTracker = { - linkReceived: (url: string) => - { - const parts = url.split('/'); - - if(parts.length < 2) return; - - switch(parts[1]) - { - case 'show': - setIsVisible(true); - return; - case 'hide': - setIsVisible(false); - return; - case 'toggle': - setIsVisible(prevValue => !prevValue); - return; - case 'open': - if(parts.length > 2) - { - if(parts.length === 4) - { - switch(parts[2]) - { - case 'offerId': - openPageByOfferId(parseInt(parts[3])); - return; + linkReceived: (url: string) => { + const parts = url.split("/") + + if (parts.length < 2) return + + switch (parts[1]) { + case "show": + setIsVisible(true) + return + case "hide": + setIsVisible(false) + return + case "toggle": + setIsVisible(prevValue => !prevValue) + return + case "open": + if (parts.length > 2) { + if (parts.length === 4) { + switch (parts[2]) { + case "offerId": + openPageByOfferId(parseInt(parts[3])) + return } } - else - { - openPageByName(parts[2]); + else { + openPageByName(parts[2]) } } - else - { - setIsVisible(true); + else { + setIsVisible(true) } - - return; + + return } }, - eventUrlPrefix: 'catalog/' - }; + eventUrlPrefix: "catalog/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, [ setIsVisible, openPageByOfferId, openPageByName ]); + return () => RemoveLinkEventTracker(linkTracker) + }, [setIsVisible, openPageByOfferId, openPageByName]) return ( <> - { isVisible && - - setIsVisible(false) } /> - - { rootNode && (rootNode.children.length > 0) && rootNode.children.map(child => - { - if(!child.isVisible) return null; + {isVisible && + + setIsVisible(false)} /> + +
+ {!navigationHidden && +
+ {activeNodes && (activeNodes.length > 0) && + } +
} +
+ + {rootNode && (rootNode.children.length > 0) && rootNode.children.map(child => { + if (!child.isVisible) return null - return ( - - { - if(searchResult) setSearchResult(null); + return ( + { + if (searchResult) setSearchResult(null) - activateNode(child); - } } > - - { GetConfiguration('catalog.tab.icons') && } - { child.localization } - - - ); - }) } - - - - { !navigationHidden && - - { activeNodes && (activeNodes.length > 0) && - } - } - - { GetCatalogLayout(currentPage, () => setNavigationHidden(true)) } - - + activateNode(child) + }} > +
+ {GetConfiguration("catalog.tab.icons") && } + {child.localization} +
+ + ) + })} + +
+
+ {GetCatalogLayout(currentPage, () => setNavigationHidden(true))} +
+
+
+
-
} +
} - ); -} + ) +} \ No newline at end of file diff --git a/src/components/catalog/views/CatalogPurchaseConfirmView.tsx b/src/components/catalog/views/CatalogPurchaseConfirmView.tsx deleted file mode 100644 index 30dcfc3b3..000000000 --- a/src/components/catalog/views/CatalogPurchaseConfirmView.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { FC } from 'react'; - -export const CatalogPurchaseConfirmView: FC<{}> = props => -{ - const {} = props; - - return ( -
- ); -} diff --git a/src/components/catalog/views/catalog-header/CatalogHeaderView.tsx b/src/components/catalog/views/catalog-header/CatalogHeaderView.tsx deleted file mode 100644 index eb8d92cef..000000000 --- a/src/components/catalog/views/catalog-header/CatalogHeaderView.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { FC, useEffect, useState } from 'react'; -import { GetConfiguration } from '../../../../api'; -import { Flex } from '../../../../common'; - -export interface CatalogHeaderViewProps -{ - imageUrl?: string; -} - -export const CatalogHeaderView: FC = props => -{ - const { imageUrl = null } = props; - const [ displayImageUrl, setDisplayImageUrl ] = useState(''); - - useEffect(() => - { - setDisplayImageUrl(imageUrl ?? GetConfiguration('catalog.asset.image.url').replace('%name%', 'catalog_header_roombuilder')); - }, [ imageUrl ]); - - return - - { - currentTarget.src = GetConfiguration('catalog.asset.image.url').replace('%name%', 'catalog_header_roombuilder'); - } } /> - ; -} diff --git a/src/components/catalog/views/catalog-icon/CatalogIconView.tsx b/src/components/catalog/views/catalog-icon/CatalogIconView.tsx index 7c28ac94e..faaf6ef01 100644 --- a/src/components/catalog/views/catalog-icon/CatalogIconView.tsx +++ b/src/components/catalog/views/catalog-icon/CatalogIconView.tsx @@ -1,6 +1,6 @@ -import { FC, useMemo } from 'react'; -import { GetConfiguration } from '../../../../api'; -import { LayoutImage } from '../../../../common/layout/LayoutImage'; +import { FC, useMemo } from "react" +import { GetConfiguration } from "../../../../api" +import { LayoutImage } from "../../../../common/layout/LayoutImage" export interface CatalogIconViewProps { @@ -9,12 +9,12 @@ export interface CatalogIconViewProps export const CatalogIconView: FC = props => { - const { icon = 0 } = props; + const { icon = 0 } = props const getIconUrl = useMemo(() => { - return ((GetConfiguration('catalog.asset.icon.url')).replace('%name%', icon.toString())); - }, [ icon ]); + return ((GetConfiguration("catalog.asset.icon.url")).replace("%name%", icon.toString())) + }, [ icon ]) - return ; + return } diff --git a/src/components/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx b/src/components/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx index 1eb673f12..872a9ea7b 100644 --- a/src/components/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx +++ b/src/components/catalog/views/catalog-room-previewer/CatalogRoomPreviewerView.tsx @@ -1,42 +1,42 @@ -import { NitroToolbarAnimateIconEvent, TextureUtils, ToolbarIconEnum } from '@nitrots/nitro-renderer'; -import { FC, useRef } from 'react'; -import { GetRoomEngine } from '../../../../api'; -import { LayoutRoomPreviewerView, LayoutRoomPreviewerViewProps } from '../../../../common'; -import { CatalogPurchasedEvent } from '../../../../events'; -import { useUiEvent } from '../../../../hooks'; +import { NitroToolbarAnimateIconEvent, TextureUtils, ToolbarIconEnum } from "@nitrots/nitro-renderer" +import { FC, useRef } from "react" +import { GetRoomEngine } from "../../../../api" +import { LayoutRoomPreviewerView, LayoutRoomPreviewerViewProps } from "../../../../common" +import { CatalogPurchasedEvent } from "../../../../events" +import { useUiEvent } from "../../../../hooks" export const CatalogRoomPreviewerView: FC = props => { - const { roomPreviewer = null } = props; - const elementRef = useRef(null); + const { roomPreviewer = null } = props + const elementRef = useRef(null) useUiEvent(CatalogPurchasedEvent.PURCHASE_SUCCESS, event => { - if(!elementRef) return; + if(!elementRef) return - const renderTexture = roomPreviewer.getRoomObjectCurrentImage(); + const renderTexture = roomPreviewer.getRoomObjectCurrentImage() - if(!renderTexture) return; + if(!renderTexture) return - const image = TextureUtils.generateImage(renderTexture); + const image = TextureUtils.generateImage(renderTexture) - if(!image) return; + if(!image) return - const bounds = elementRef.current.getBoundingClientRect(); + const bounds = elementRef.current.getBoundingClientRect() - const x = (bounds.x + (bounds.width / 2)); - const y = (bounds.y + (bounds.height / 2)); + const x = (bounds.x + (bounds.width / 2)) + const y = (bounds.y + (bounds.height / 2)) - const animateEvent = new NitroToolbarAnimateIconEvent(image, x, y); + const animateEvent = new NitroToolbarAnimateIconEvent(image, x, y) - animateEvent.iconName = ToolbarIconEnum.INVENTORY; + animateEvent.iconName = ToolbarIconEnum.INVENTORY - GetRoomEngine().events.dispatchEvent(animateEvent); - }); + GetRoomEngine().events.dispatchEvent(animateEvent) + }) return (
- ); + ) } diff --git a/src/components/catalog/views/gift/CatalogGiftView.tsx b/src/components/catalog/views/gift/CatalogGiftView.tsx index 64e1dd170..bf9b03e56 100644 --- a/src/components/catalog/views/gift/CatalogGiftView.tsx +++ b/src/components/catalog/views/gift/CatalogGiftView.tsx @@ -1,132 +1,132 @@ -import { GiftReceiverNotFoundEvent, PurchaseFromCatalogAsGiftComposer } from '@nitrots/nitro-renderer'; -import { ChangeEvent, FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { FaChevronLeft, FaChevronRight } from 'react-icons/fa'; -import { ColorUtils, GetSessionDataManager, LocalizeText, MessengerFriend, ProductTypeEnum, SendMessageComposer } from '../../../../api'; -import { Base, Button, ButtonGroup, classNames, Column, Flex, FormGroup, LayoutCurrencyIcon, LayoutFurniImageView, LayoutGiftTagView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; -import { CatalogEvent, CatalogInitGiftEvent, CatalogPurchasedEvent } from '../../../../events'; -import { useCatalog, useFriends, useMessageEvent, useUiEvent } from '../../../../hooks'; +import { GiftReceiverNotFoundEvent, PurchaseFromCatalogAsGiftComposer } from "@nitrots/nitro-renderer" +import { ChangeEvent, FC, useCallback, useEffect, useMemo, useState } from "react" +import { ColorUtils, GetSessionDataManager, LocalizeText, MessengerFriend, NotificationAlertType, ProductTypeEnum, SendMessageComposer } from "../../../../api" +import { Button, LayoutCurrencyIcon, LayoutFurniImageView, LayoutGiftTagView, NitroCardContentView, NitroCardHeaderView, NitroCardView } from "../../../../common" +import { CatalogEvent, CatalogInitGiftEvent, CatalogPurchasedEvent } from "../../../../events" +import { useCatalog, useFriends, useMessageEvent, useNotification, useUiEvent } from "../../../../hooks" export const CatalogGiftView: FC<{}> = props => { - const [ isVisible, setIsVisible ] = useState(false); - const [ pageId, setPageId ] = useState(0); - const [ offerId, setOfferId ] = useState(0); - const [ extraData, setExtraData ] = useState(''); - const [ receiverName, setReceiverName ] = useState(''); - const [ showMyFace, setShowMyFace ] = useState(true); - const [ message, setMessage ] = useState(''); - const [ colors, setColors ] = useState<{ id: number, color: string }[]>([]); - const [ selectedBoxIndex, setSelectedBoxIndex ] = useState(0); - const [ selectedRibbonIndex, setSelectedRibbonIndex ] = useState(0); - const [ selectedColorId, setSelectedColorId ] = useState(0); - const [ maxBoxIndex, setMaxBoxIndex ] = useState(0); - const [ maxRibbonIndex, setMaxRibbonIndex ] = useState(0); - const [ receiverNotFound, setReceiverNotFound ] = useState(false); - const { catalogOptions = null } = useCatalog(); - const { friends } = useFriends(); - const { giftConfiguration = null } = catalogOptions; - const [ boxTypes, setBoxTypes ] = useState([]); - const [ suggestions, setSuggestions ] = useState([]); - const [ isAutocompleteVisible, setIsAutocompleteVisible ] = useState(true); + const [ isVisible, setIsVisible ] = useState(false) + const [ pageId, setPageId ] = useState(0) + const [ offerId, setOfferId ] = useState(0) + const [ extraData, setExtraData ] = useState("") + const [ receiverName, setReceiverName ] = useState("") + const [ showMyFace, setShowMyFace ] = useState(true) + const [ message, setMessage ] = useState("") + const [ colors, setColors ] = useState<{ id: number, color: string }[]>([]) + const [ selectedBoxIndex, setSelectedBoxIndex ] = useState(0) + const [ selectedRibbonIndex, setSelectedRibbonIndex ] = useState(0) + const [ selectedColorId, setSelectedColorId ] = useState(0) + const [ maxBoxIndex, setMaxBoxIndex ] = useState(0) + const [ maxRibbonIndex, setMaxRibbonIndex ] = useState(0) + const [ receiverNotFound, setReceiverNotFound ] = useState(false) + const { catalogOptions = null } = useCatalog() + const { friends } = useFriends() + const { giftConfiguration = null } = catalogOptions + const [ boxTypes, setBoxTypes ] = useState([]) + const [ suggestions, setSuggestions ] = useState([]) + const [ isAutocompleteVisible, setIsAutocompleteVisible ] = useState(true) + const { simpleAlert = null } = useNotification() const onClose = useCallback(() => { - setIsVisible(false); - setPageId(0); - setOfferId(0); - setExtraData(''); - setReceiverName(''); - setShowMyFace(true); - setMessage(''); - setSelectedBoxIndex(0); - setSelectedRibbonIndex(0); - setIsAutocompleteVisible(false); - setSuggestions([]); - - if(colors.length) setSelectedColorId(colors[0].id); - }, [ colors ]); + setIsVisible(false) + setPageId(0) + setOfferId(0) + setExtraData("") + setReceiverName("") + setShowMyFace(true) + setMessage("") + setSelectedBoxIndex(0) + setSelectedRibbonIndex(0) + setIsAutocompleteVisible(false) + setSuggestions([]) + + if(colors.length) setSelectedColorId(colors[0].id) + }, [ colors ]) const isBoxDefault = useMemo(() => { - return giftConfiguration ? (giftConfiguration.defaultStuffTypes.findIndex(s => (s === boxTypes[selectedBoxIndex])) > -1) : false; - }, [ boxTypes, giftConfiguration, selectedBoxIndex ]); + return giftConfiguration ? (giftConfiguration.defaultStuffTypes.findIndex(s => (s === boxTypes[selectedBoxIndex])) > -1) : false + }, [ boxTypes, giftConfiguration, selectedBoxIndex ]) const boxExtraData = useMemo(() => { - if (!giftConfiguration) return ''; + if (!giftConfiguration) return "" - return ((boxTypes[selectedBoxIndex] * 1000) + giftConfiguration.ribbonTypes[selectedRibbonIndex]).toString(); - }, [ giftConfiguration, selectedBoxIndex, selectedRibbonIndex, boxTypes ]); + return ((boxTypes[selectedBoxIndex] * 1000) + giftConfiguration.ribbonTypes[selectedRibbonIndex]).toString() + }, [ giftConfiguration, selectedBoxIndex, selectedRibbonIndex, boxTypes ]) const isColorable = useMemo(() => { - if (!giftConfiguration) return false; + if (!giftConfiguration) return false - if (isBoxDefault) return false; + if (isBoxDefault) return false - const boxType = boxTypes[selectedBoxIndex]; + const boxType = boxTypes[selectedBoxIndex] - return (boxType === 8 || (boxType >= 3 && boxType <= 6)) ? false : true; - }, [ giftConfiguration, selectedBoxIndex, isBoxDefault, boxTypes ]); + return (boxType === 8 || (boxType >= 3 && boxType <= 6)) ? false : true + }, [ giftConfiguration, selectedBoxIndex, isBoxDefault, boxTypes ]) const colourId = useMemo(() => { - return isBoxDefault ? boxTypes[selectedBoxIndex] : selectedColorId; + return isBoxDefault ? boxTypes[selectedBoxIndex] : selectedColorId },[ isBoxDefault, boxTypes, selectedBoxIndex, selectedColorId ]) - const allFriends = friends.filter( (friend: MessengerFriend) => friend.id !== -1 ); + const allFriends = friends.filter((friend: MessengerFriend) => friend.id !== -1) const onTextChanged = (e: ChangeEvent) => { - const value = e.target.value; + const value = e.target.value - let suggestions = []; + let suggestions = [] if (value.length > 0) { - suggestions = allFriends.sort().filter((friend: MessengerFriend) => friend.name.includes(value)); + suggestions = allFriends.sort().filter((friend: MessengerFriend) => friend.name.includes(value)) } - setReceiverName(value); - setIsAutocompleteVisible(true); - setSuggestions(suggestions); - }; + setReceiverName(value) + setIsAutocompleteVisible(true) + setSuggestions(suggestions) + } const selectedReceiverName = (friendName: string) => { - setReceiverName(friendName); - setIsAutocompleteVisible(false); + setReceiverName(friendName) + setIsAutocompleteVisible(false) } const handleAction = useCallback((action: string) => { switch(action) { - case 'prev_box': - setSelectedBoxIndex(value => (value === 0 ? maxBoxIndex : value - 1)); - return; - case 'next_box': - setSelectedBoxIndex(value => (value === maxBoxIndex ? 0 : value + 1)); - return; - case 'prev_ribbon': - setSelectedRibbonIndex(value => (value === 0 ? maxRibbonIndex : value - 1)); - return; - case 'next_ribbon': - setSelectedRibbonIndex(value => (value === maxRibbonIndex ? 0 : value + 1)); - return; - case 'buy': - if(!receiverName || (receiverName.length === 0)) - { - setReceiverNotFound(true); - return; - } - - SendMessageComposer(new PurchaseFromCatalogAsGiftComposer(pageId, offerId, extraData, receiverName, message, colourId , selectedBoxIndex, selectedRibbonIndex, showMyFace)); - return; + case "prev_box": + setSelectedBoxIndex(value => (value === 0 ? maxBoxIndex : value - 1)) + return + case "next_box": + setSelectedBoxIndex(value => (value === maxBoxIndex ? 0 : value + 1)) + return + case "prev_ribbon": + setSelectedRibbonIndex(value => (value === 0 ? maxRibbonIndex : value - 1)) + return + case "next_ribbon": + setSelectedRibbonIndex(value => (value === maxRibbonIndex ? 0 : value + 1)) + return + case "buy": + if(!receiverName || (receiverName.length === 0)) + { + simpleAlert(LocalizeText("catalog.gift_wrapping.receiver_not_found.info"), NotificationAlertType.ALERT, null, null, LocalizeText("catalog.gift_wrapping.receiver_not_found.title")) + return + } + + SendMessageComposer(new PurchaseFromCatalogAsGiftComposer(pageId, offerId, extraData, receiverName, message, colourId , selectedBoxIndex, selectedRibbonIndex, showMyFace)) + return } - }, [ colourId, extraData, maxBoxIndex, maxRibbonIndex, message, offerId, pageId, receiverName, selectedBoxIndex, selectedRibbonIndex, showMyFace ]); + }, [ colourId, extraData, maxBoxIndex, maxRibbonIndex, message, offerId, pageId, receiverName, selectedBoxIndex, selectedRibbonIndex, showMyFace ]) - useMessageEvent(GiftReceiverNotFoundEvent, event => setReceiverNotFound(true)); + useMessageEvent(GiftReceiverNotFoundEvent, event => simpleAlert(LocalizeText("catalog.gift_wrapping.receiver_not_found.info"), NotificationAlertType.ALERT, null, null, LocalizeText("catalog.gift_wrapping.receiver_not_found.title"))) useUiEvent([ CatalogPurchasedEvent.PURCHASE_SUCCESS, @@ -134,156 +134,156 @@ export const CatalogGiftView: FC<{}> = props => { switch(event.type) { - case CatalogPurchasedEvent.PURCHASE_SUCCESS: - onClose(); - return; - case CatalogEvent.INIT_GIFT: - const castedEvent = (event as CatalogInitGiftEvent); - - onClose(); - - setPageId(castedEvent.pageId); - setOfferId(castedEvent.offerId); - setExtraData(castedEvent.extraData); - setIsVisible(true); - return; + case CatalogPurchasedEvent.PURCHASE_SUCCESS: + onClose() + return + case CatalogEvent.INIT_GIFT: + const castedEvent = (event as CatalogInitGiftEvent) + + onClose() + + setPageId(castedEvent.pageId) + setOfferId(castedEvent.offerId) + setExtraData(castedEvent.extraData) + setIsVisible(true) + return } - }); + }) useEffect(() => { - setReceiverNotFound(false); - }, [ receiverName ]); + setReceiverNotFound(false) + }, [ receiverName ]) const createBoxTypes = useCallback(() => { - if (!giftConfiguration) return; + if (!giftConfiguration) return setBoxTypes(prev => { - let newPrev = [ ...giftConfiguration.boxTypes ]; + let newPrev = [ ...giftConfiguration.boxTypes ] - newPrev.push(giftConfiguration.defaultStuffTypes[ Math.floor((Math.random() * (giftConfiguration.defaultStuffTypes.length - 1))) ]); + newPrev.push(giftConfiguration.defaultStuffTypes[ Math.floor((Math.random() * (giftConfiguration.defaultStuffTypes.length - 1))) ]) - setMaxBoxIndex(newPrev.length- 1); - setMaxRibbonIndex(newPrev.length - 1); + setMaxBoxIndex(newPrev.length - 1) + setMaxRibbonIndex(newPrev.length - 1) - return newPrev; + return newPrev }) },[ giftConfiguration ]) useEffect(() => { - if(!giftConfiguration) return; + if(!giftConfiguration) return - const newColors: { id: number, color: string }[] = []; + const newColors: { id: number, color: string }[] = [] for(const colorId of giftConfiguration.stuffTypes) { - const giftData = GetSessionDataManager().getFloorItemData(colorId); + const giftData = GetSessionDataManager().getFloorItemData(colorId) - if(!giftData) continue; + if(!giftData) continue - if(giftData.colors && giftData.colors.length > 0) newColors.push({ id: colorId, color: ColorUtils.makeColorNumberHex(giftData.colors[0]) }); + if(giftData.colors && giftData.colors.length > 0) newColors.push({ id: colorId, color: ColorUtils.makeColorNumberHex(giftData.colors[0]) }) } - createBoxTypes(); + createBoxTypes() if(newColors.length) { - setSelectedColorId(newColors[0].id); - setColors(newColors); + setSelectedColorId(newColors[0].id) + setColors(newColors) } - }, [ giftConfiguration, createBoxTypes ]); + }, [ giftConfiguration, createBoxTypes ]) useEffect(() => { - if (!isVisible) return; + if (!isVisible) return - createBoxTypes(); + createBoxTypes() },[ createBoxTypes, isVisible ]) + + const boxName = "catalog.gift_wrapping_new.box." + (isBoxDefault ? "default" : boxTypes[selectedBoxIndex]) + const ribbonName = `catalog.gift_wrapping_new.ribbon.${ selectedRibbonIndex }` + const priceText = "catalog.gift_wrapping_new." + (isBoxDefault ? "freeprice" : "price") - if(!giftConfiguration || !giftConfiguration.isEnabled || !isVisible) return null; - - const boxName = 'catalog.gift_wrapping_new.box.' + (isBoxDefault ? 'default' : boxTypes[selectedBoxIndex]); - const ribbonName = `catalog.gift_wrapping_new.ribbon.${ selectedRibbonIndex }`; - const priceText = 'catalog.gift_wrapping_new.' + (isBoxDefault ? 'freeprice' : 'price'); + if(!giftConfiguration || !giftConfiguration.isEnabled || !isVisible) return null return ( - - + + - - { LocalizeText('catalog.gift_wrapping.receiver') } - onTextChanged(e) } /> +
+
+ onTextChanged(e) } /> + +
{ (suggestions.length > 0 && isAutocompleteVisible) && - +
{ suggestions.map((friend: MessengerFriend) => ( - selectedReceiverName(friend.name) }>{ friend.name } +
selectedReceiverName(friend.name) }>{ friend.name }
)) } - +
} - { receiverNotFound && - { LocalizeText('catalog.gift_wrapping.receiver_not_found.title') } } - +
setMessage(value) } /> - - setShowMyFace(value => !value) } /> - - - +
{ selectedColorId && - +
- } - - - -
} +
+
+
+ - - - - { LocalizeText(boxName) } - - { LocalizeText(priceText, [ 'price' ], [ giftConfiguration.price.toString() ]) } - - - - - - -
+
+

{ LocalizeText(boxName) }

+
+

{ LocalizeText(priceText, [ "price" ], [ giftConfiguration.price.toString() ]) }

+ +
+
+
+
+
+ - - - { LocalizeText(ribbonName) } - - - - - - { LocalizeText('catalog.gift_wrapping.pick_color') } - - - { colors.map(color =>
+

{ LocalizeText(ribbonName) }

+
+
+
+
+

+ { LocalizeText("catalog.gift_wrapping.pick_color") } +

+
+ { colors.map(color => + + )} +
+
+
+ - - +
- ); -}; + ) +} diff --git a/src/components/catalog/views/navigation/CatalogNavigationItemView.tsx b/src/components/catalog/views/navigation/CatalogNavigationItemView.tsx index 45f7f43fb..a274da18d 100644 --- a/src/components/catalog/views/navigation/CatalogNavigationItemView.tsx +++ b/src/components/catalog/views/navigation/CatalogNavigationItemView.tsx @@ -1,35 +1,54 @@ -import { FC } from 'react'; -import { FaCaretDown, FaCaretUp } from 'react-icons/fa'; -import { ICatalogNode } from '../../../../api'; -import { Base, LayoutGridItem, Text } from '../../../../common'; -import { useCatalog } from '../../../../hooks'; -import { CatalogIconView } from '../catalog-icon/CatalogIconView'; -import { CatalogNavigationSetView } from './CatalogNavigationSetView'; +import { FC } from "react" +import { ICatalogNode } from "../../../../api" +import { useCatalog } from "../../../../hooks" +import { CatalogIconView } from "../catalog-icon/CatalogIconView" +import { CatalogNavigationSetView } from "./CatalogNavigationSetView" -export interface CatalogNavigationItemViewProps -{ - node: ICatalogNode; - child?: boolean; +interface CatalogNavigationItemViewProps { + node: ICatalogNode; + child?: boolean; } -export const CatalogNavigationItemView: FC = props => -{ - const { node = null, child = false } = props; - const { activateNode = null } = useCatalog(); - +export const CatalogNavigationItemView: FC = ({ node = null, child = false }) => { + const { activateNode = null } = useCatalog() + + const getItemClasses = () => { + return ` + flex items-center justify-between px-[9px] p-[3px] w-[166px] cursor-pointer group + ${node.isActive && !child ? "dark" : ""} + ${!child ? "illumina-card-item mb-[3px]" : "h-5 pl-4 italic"} + ${node.isActive && child ? "bg-[url('/client-assets/images/catalogue/child-item-bg.png?v=2451779')] dark:bg-[url('/client-assets/images/catalogue/child-item-dark-bg.png?v=2451779')]" : ""} + ${child ? "hover:bg-[url('/client-assets/images/catalogue/child-item-bg.png?v=2451779')] dark:hover:bg-[url('/client-assets/images/catalogue/child-item-dark-bg.png?v=2451779')]" : ""} + ` + } + + const getTextClasses = () => { + return ` + text-xs font-semibold !leading-3 w-full truncate text-clip + ${!node.isActive && child ? "text-[#63615d] dark:text-[#acacac] group-hover:text-[#63615d] dark:group-hover:text-[#acacac] group-hover:[text-shadow:_0_1px_0_#CCCCCC] dark:group-hover:[text-shadow:_0_1px_0_#211D19]" : ""} + ${!node.isActive && !child ? "text-dark [text-shadow:_0_1px_0_#fff] dark:[text-shadow:_0_1px_0_#33312B]" : ""} + ${node.isActive && child ? "text-[#2a2824] dark:text-white [text-shadow:_0_1px_0_#CCCCCC] dark:[text-shadow:_0_1px_0_#211D19]" : ""} + ${node.isActive && !child ? "text-white [text-shadow:_0_1px_0_#33312B]" : ""} + ` + } + return ( - - activateNode(node) } className={ child ? 'inset' : '' }> - - { node.localization } - { node.isBranch && + <> +
activateNode(node)}> +
+
+ +
+

{node.localization}

+
+ {node.isBranch && ( <> - { node.isOpen && } - { !node.isOpen && } - } - - { node.isOpen && node.isBranch && - } - - ); + {node.isOpen && } + {!node.isOpen && } + + )} +
+ {node.isOpen && node.isBranch && } + + ) } diff --git a/src/components/catalog/views/navigation/CatalogNavigationSetView.tsx b/src/components/catalog/views/navigation/CatalogNavigationSetView.tsx index 8bfdd480f..1f60fba9e 100644 --- a/src/components/catalog/views/navigation/CatalogNavigationSetView.tsx +++ b/src/components/catalog/views/navigation/CatalogNavigationSetView.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; -import { ICatalogNode } from '../../../../api'; -import { CatalogNavigationItemView } from './CatalogNavigationItemView'; +import { FC } from "react" +import { ICatalogNode } from "../../../../api" +import { CatalogNavigationItemView } from "./CatalogNavigationItemView" export interface CatalogNavigationSetViewProps { @@ -10,16 +10,16 @@ export interface CatalogNavigationSetViewProps export const CatalogNavigationSetView: FC = props => { - const { node = null, child = false } = props; + const { node = null, child = false } = props return ( <> { node && (node.children.length > 0) && node.children.map((n, index) => { - if(!n.isVisible) return null; + if(!n.isVisible) return null return }) } - ); + ) } diff --git a/src/components/catalog/views/navigation/CatalogNavigationView.tsx b/src/components/catalog/views/navigation/CatalogNavigationView.tsx index 2d03f06d8..c18d72121 100644 --- a/src/components/catalog/views/navigation/CatalogNavigationView.tsx +++ b/src/components/catalog/views/navigation/CatalogNavigationView.tsx @@ -1,10 +1,9 @@ -import { FC } from 'react'; -import { ICatalogNode } from '../../../../api'; -import { AutoGrid, Column } from '../../../../common'; -import { useCatalog } from '../../../../hooks'; -import { CatalogSearchView } from '../page/common/CatalogSearchView'; -import { CatalogNavigationItemView } from './CatalogNavigationItemView'; -import { CatalogNavigationSetView } from './CatalogNavigationSetView'; +import { FC } from "react" +import { ICatalogNode } from "../../../../api" +import { useCatalog } from "../../../../hooks" +import { CatalogSearchView } from "../page/common/CatalogSearchView" +import { CatalogNavigationItemView } from "./CatalogNavigationItemView" +import { CatalogNavigationSetView } from "./CatalogNavigationSetView" export interface CatalogNavigationViewProps { @@ -13,22 +12,18 @@ export interface CatalogNavigationViewProps export const CatalogNavigationView: FC = props => { - const { node = null } = props; - const { searchResult = null } = useCatalog(); + const { node = null } = props + const { searchResult = null } = useCatalog() return ( <> - - - { searchResult && (searchResult.filteredNodes.length > 0) && searchResult.filteredNodes.map((n, index) => - { - return ; - }) } - { !searchResult && - } - - +
+
+ { searchResult && (searchResult.filteredNodes.length > 0) && searchResult.filteredNodes.map((n, index) => )} + { !searchResult && } +
+
- ); + ) } diff --git a/src/components/catalog/views/page/common/CatalogGridOfferView.tsx b/src/components/catalog/views/page/common/CatalogGridOfferView.tsx index 507bb6c7d..6fb0b6205 100644 --- a/src/components/catalog/views/page/common/CatalogGridOfferView.tsx +++ b/src/components/catalog/views/page/common/CatalogGridOfferView.tsx @@ -1,8 +1,9 @@ -import { MouseEventType } from '@nitrots/nitro-renderer'; -import { FC, MouseEvent, useMemo, useState } from 'react'; -import { IPurchasableOffer, Offer, ProductTypeEnum } from '../../../../../api'; -import { LayoutAvatarImageView, LayoutGridItem, LayoutGridItemProps } from '../../../../../common'; -import { useCatalog, useInventoryFurni } from '../../../../../hooks'; +import { MouseEventType } from "@nitrots/nitro-renderer" +import { FC, MouseEvent, useMemo, useState } from "react" +import { IPurchasableOffer, Offer, ProductTypeEnum } from "../../../../../api" +import { LayoutAvatarImageView, LayoutGridItem, LayoutGridItemProps } from "../../../../../common" +import { useCatalog, useInventoryFurni } from "../../../../../hooks" +import { CatalogPriceGridDisplayWidgetView } from "../widgets/CatalogPriceGridDisplayWidgetViev" interface CatalogGridOfferViewProps extends LayoutGridItemProps { @@ -12,48 +13,53 @@ interface CatalogGridOfferViewProps extends LayoutGridItemProps export const CatalogGridOfferView: FC = props => { - const { offer = null, selectOffer = null, itemActive = false, ...rest } = props; - const [ isMouseDown, setMouseDown ] = useState(false); - const { requestOfferToMover = null } = useCatalog(); - const { isVisible = false } = useInventoryFurni(); + const { offer = null, selectOffer = null, itemActive = false, ...rest } = props + const [ isMouseDown, setMouseDown ] = useState(false) + const { requestOfferToMover = null } = useCatalog() + const { isVisible = false } = useInventoryFurni() const iconUrl = useMemo(() => { if(offer.pricingModel === Offer.PRICING_MODEL_BUNDLE) { - return null; + return null } - return offer.product.getIconUrl(offer); - }, [ offer ]); + return offer.product.getIconUrl(offer) + }, [ offer ]) const onMouseEvent = (event: MouseEvent) => { switch(event.type) { - case MouseEventType.MOUSE_DOWN: - selectOffer(offer); - setMouseDown(true); - return; - case MouseEventType.MOUSE_UP: - setMouseDown(false); - return; - case MouseEventType.ROLL_OUT: - if(!isMouseDown || !itemActive || !isVisible) return; - - requestOfferToMover(offer); - return; + case MouseEventType.MOUSE_DOWN: + selectOffer(offer) + setMouseDown(true) + return + case MouseEventType.MOUSE_UP: + setMouseDown(false) + return + case MouseEventType.ROLL_OUT: + if(!isMouseDown || !itemActive || !isVisible) return + + requestOfferToMover(offer) + return } } - const product = offer.product; + const product = offer.product - if(!product) return null; + if(!product) return null return ( - + { (offer.product.productType === ProductTypeEnum.ROBOT) && - } +
+ +
} +
+ +
- ); + ) } diff --git a/src/components/catalog/views/page/common/CatalogRedeemVoucherView.tsx b/src/components/catalog/views/page/common/CatalogRedeemVoucherView.tsx index 504bd4b8e..1b2df6fdc 100644 --- a/src/components/catalog/views/page/common/CatalogRedeemVoucherView.tsx +++ b/src/components/catalog/views/page/common/CatalogRedeemVoucherView.tsx @@ -1,9 +1,8 @@ -import { RedeemVoucherMessageComposer, VoucherRedeemErrorMessageEvent, VoucherRedeemOkMessageEvent } from '@nitrots/nitro-renderer'; -import { FC, useState } from 'react'; -import { FaTag } from 'react-icons/fa'; -import { LocalizeText, SendMessageComposer } from '../../../../../api'; -import { Button, Flex } from '../../../../../common'; -import { useMessageEvent, useNotification } from '../../../../../hooks'; +import { RedeemVoucherMessageComposer, VoucherRedeemErrorMessageEvent, VoucherRedeemOkMessageEvent } from "@nitrots/nitro-renderer" +import { FC, useState } from "react" +import { LocalizeText, NotificationAlertType, SendMessageComposer } from "../../../../../api" +import { Button } from "../../../../../common" +import { useMessageEvent, useNotification } from "../../../../../hooks" export interface CatalogRedeemVoucherViewProps { @@ -12,49 +11,52 @@ export interface CatalogRedeemVoucherViewProps export const CatalogRedeemVoucherView: FC = props => { - const { text = null } = props; - const [ voucher, setVoucher ] = useState(''); - const [ isWaiting, setIsWaiting ] = useState(false); - const { simpleAlert = null } = useNotification(); + const { text = null } = props + const [ voucher, setVoucher ] = useState("") + const [ isWaiting, setIsWaiting ] = useState(false) + const { simpleAlert = null } = useNotification() const redeemVoucher = () => { - if(!voucher || !voucher.length || isWaiting) return; + if(!voucher || !voucher.length || isWaiting) return - SendMessageComposer(new RedeemVoucherMessageComposer(voucher)); + SendMessageComposer(new RedeemVoucherMessageComposer(voucher)) - setIsWaiting(true); + setIsWaiting(true) } useMessageEvent(VoucherRedeemOkMessageEvent, event => { - const parser = event.getParser(); + const parser = event.getParser() - let message = LocalizeText('catalog.alert.voucherredeem.ok.description'); + let message = LocalizeText("catalog.alert.voucherredeem.ok.description") - if(parser.productName) message = LocalizeText('catalog.alert.voucherredeem.ok.description.furni', [ 'productName', 'productDescription' ], [ parser.productName, parser.productDescription ]); + if(parser.productName) message = LocalizeText("catalog.alert.voucherredeem.ok.description.furni", [ "productName", "productDescription" ], [ parser.productName, parser.productDescription ]) - simpleAlert(message, null, null, null, LocalizeText('catalog.alert.voucherredeem.ok.title')); + simpleAlert(message, NotificationAlertType.ALERT, null, null, LocalizeText("catalog.alert.voucherredeem.ok.title")) - setIsWaiting(false); - setVoucher(''); - }); + setIsWaiting(false) + setVoucher("") + }) useMessageEvent(VoucherRedeemErrorMessageEvent, event => { - const parser = event.getParser(); + const parser = event.getParser() - simpleAlert(LocalizeText(`catalog.alert.voucherredeem.error.description.${ parser.errorCode }`), null, null, null, LocalizeText('catalog.alert.voucherredeem.error.title')); + simpleAlert(LocalizeText(`catalog.alert.voucherredeem.error.description.${ parser.errorCode }`), NotificationAlertType.ALERT, null, null, LocalizeText("catalog.alert.voucherredeem.error.title")) - setIsWaiting(false); - }); + setIsWaiting(false) + }) return ( - - setVoucher(event.target.value) } /> - - - ); +
+

{ LocalizeText("shop.redeem.button") }

+
+ setVoucher(event.target.value) } /> + +
+
+ ) } diff --git a/src/components/catalog/views/page/common/CatalogSearchView.tsx b/src/components/catalog/views/page/common/CatalogSearchView.tsx index 69fb7892d..8045c325e 100644 --- a/src/components/catalog/views/page/common/CatalogSearchView.tsx +++ b/src/components/catalog/views/page/common/CatalogSearchView.tsx @@ -1,50 +1,48 @@ -import { IFurnitureData } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { FaSearch, FaTimes } from 'react-icons/fa'; -import { CatalogPage, CatalogType, FilterCatalogNode, FurnitureOffer, GetOfferNodes, GetSessionDataManager, ICatalogNode, ICatalogPage, IPurchasableOffer, LocalizeText, PageLocalization, SearchResult } from '../../../../../api'; -import { Button, Flex } from '../../../../../common'; -import { useCatalog } from '../../../../../hooks'; +import { IFurnitureData } from "@nitrots/nitro-renderer" +import { FC, useEffect, useState } from "react" +import { CatalogPage, CatalogType, FilterCatalogNode, FurnitureOffer, GetOfferNodes, GetSessionDataManager, ICatalogNode, ICatalogPage, IPurchasableOffer, LocalizeText, PageLocalization, SearchResult } from "../../../../../api" +import { useCatalog } from "../../../../../hooks" export const CatalogSearchView: FC<{}> = props => { - const [ searchValue, setSearchValue ] = useState(''); - const { currentType = null, rootNode = null, offersToNodes = null, searchResult = null, setSearchResult = null, setCurrentPage = null } = useCatalog(); + const [ searchValue, setSearchValue ] = useState("") + const { currentType = null, rootNode = null, offersToNodes = null, searchResult = null, setSearchResult = null, setCurrentPage = null } = useCatalog() useEffect(() => { - let search = searchValue?.toLocaleLowerCase().replace(' ', ''); + let search = searchValue?.toLocaleLowerCase().replace(" ", "") if(!search || !search.length) { - setSearchResult(null); + setSearchResult(null) - return; + return } const timeout = setTimeout(() => { const furnitureDatas = GetSessionDataManager().getAllFurnitureData({ loadFurnitureData: null - }); + }) - if(!furnitureDatas || !furnitureDatas.length) return; + if(!furnitureDatas || !furnitureDatas.length) return - const foundFurniture: IFurnitureData[] = []; - const foundFurniLines: string[] = []; + const foundFurniture: IFurnitureData[] = [] + const foundFurniLines: string[] = [] for(const furniture of furnitureDatas) { - if((currentType === CatalogType.BUILDER) && !furniture.availableForBuildersClub) continue; + if((currentType === CatalogType.BUILDER) && !furniture.availableForBuildersClub) continue - if((currentType === CatalogType.NORMAL) && furniture.excludeDynamic) continue; + if((currentType === CatalogType.NORMAL) && furniture.excludeDynamic) continue - const searchValues = [ furniture.className, furniture.name, furniture.description ].join(' ').replace(/ /gi, '').toLowerCase(); + const searchValues = [ furniture.className, furniture.name, furniture.description ].join(" ").replace(/ /gi, "").toLowerCase() if((currentType === CatalogType.BUILDER) && (furniture.purchaseOfferId === -1) && (furniture.rentOfferId === -1)) { - if((furniture.furniLine !== '') && (foundFurniLines.indexOf(furniture.furniLine) < 0)) + if((furniture.furniLine !== "") && (foundFurniLines.indexOf(furniture.furniLine) < 0)) { - if(searchValues.indexOf(search) >= 0) foundFurniLines.push(furniture.furniLine); + if(searchValues.indexOf(search) >= 0) foundFurniLines.push(furniture.furniLine) } } else @@ -52,45 +50,38 @@ export const CatalogSearchView: FC<{}> = props => const foundNodes = [ ...GetOfferNodes(offersToNodes, furniture.purchaseOfferId), ...GetOfferNodes(offersToNodes, furniture.rentOfferId) - ]; + ] if(foundNodes.length) { - if(searchValues.indexOf(search) >= 0) foundFurniture.push(furniture); + if(searchValues.indexOf(search) >= 0) foundFurniture.push(furniture) - if(foundFurniture.length === 250) break; + if(foundFurniture.length === 250) break } } } - const offers: IPurchasableOffer[] = []; + const offers: IPurchasableOffer[] = [] - for(const furniture of foundFurniture) offers.push(new FurnitureOffer(furniture)); + for(const furniture of foundFurniture) offers.push(new FurnitureOffer(furniture)) - let nodes: ICatalogNode[] = []; + let nodes: ICatalogNode[] = [] - FilterCatalogNode(search, foundFurniLines, rootNode, nodes); + FilterCatalogNode(search, foundFurniLines, rootNode, nodes) - setSearchResult(new SearchResult(search, offers, nodes.filter(node => (node.isVisible)))); - setCurrentPage((new CatalogPage(-1, 'default_3x3', new PageLocalization([], []), offers, false, 1) as ICatalogPage)); - }, 300); + setSearchResult(new SearchResult(search, offers, nodes.filter(node => (node.isVisible)))) + setCurrentPage((new CatalogPage(-1, "default_3x3", new PageLocalization([], []), offers, false, 1) as ICatalogPage)) + }, 300) - return () => clearTimeout(timeout); - }, [ offersToNodes, currentType, rootNode, searchValue, setCurrentPage, setSearchResult ]); + return () => clearTimeout(timeout) + }, [ offersToNodes, currentType, rootNode, searchValue, setCurrentPage, setSearchResult ]) return ( - - - setSearchValue(event.target.value) } /> - - { (!searchValue || !searchValue.length) && - } - { searchValue && !!searchValue.length && - } - - ); +
+ setSearchValue(event.target.value) } /> + {searchValue?.length > 1 + ? setSearchValue("") } /> + : } +
+ ) } diff --git a/src/components/catalog/views/page/layout/CatalogLayout.types.ts b/src/components/catalog/views/page/layout/CatalogLayout.types.ts index b05bccf97..2500dbf66 100644 --- a/src/components/catalog/views/page/layout/CatalogLayout.types.ts +++ b/src/components/catalog/views/page/layout/CatalogLayout.types.ts @@ -1,4 +1,4 @@ -import { ICatalogPage } from '../../../../../api'; +import { ICatalogPage } from "../../../../../api" export interface CatalogLayoutProps { diff --git a/src/components/catalog/views/page/layout/CatalogLayoutBadgeDisplayView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutBadgeDisplayView.tsx index 9b6ec6a8a..a5f46477e 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutBadgeDisplayView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutBadgeDisplayView.tsx @@ -1,54 +1,47 @@ -import { FC } from 'react'; -import { LocalizeText } from '../../../../../api'; -import { Base, Column, Flex, Grid, Text } from '../../../../../common'; -import { useCatalog } from '../../../../../hooks'; -import { CatalogBadgeSelectorWidgetView } from '../widgets/CatalogBadgeSelectorWidgetView'; -import { CatalogFirstProductSelectorWidgetView } from '../widgets/CatalogFirstProductSelectorWidgetView'; -import { CatalogItemGridWidgetView } from '../widgets/CatalogItemGridWidgetView'; -import { CatalogLimitedItemWidgetView } from '../widgets/CatalogLimitedItemWidgetView'; -import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; -import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; -import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { FC } from "react" +import { LayoutImage } from "../../../../../common" +import { useCatalog } from "../../../../../hooks" +import { CatalogBadgeSelectorWidgetView } from "../widgets/CatalogBadgeSelectorWidgetView" +import { CatalogFirstProductSelectorWidgetView } from "../widgets/CatalogFirstProductSelectorWidgetView" +import { CatalogItemGridWidgetView } from "../widgets/CatalogItemGridWidgetView" +import { CatalogPurchaseWidgetView } from "../widgets/CatalogPurchaseWidgetView" +import { CatalogSimplePriceWidgetView } from "../widgets/CatalogSimplePriceWidgetView" +import { CatalogViewProductWidgetView } from "../widgets/CatalogViewProductWidgetView" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayoutBadgeDisplayView: FC = props => { - const { page = null } = props; - const { currentOffer = null } = useCatalog(); + const { page = null } = props + const { currentOffer = null } = useCatalog() return ( <> - - - - - { LocalizeText('catalog_selectbadge') } - - - - +
+
{ !currentOffer && - <> - { !!page.localization.getImage(1) && } - - } - { currentOffer && - <> - - - - - - { currentOffer.localizationName } - - - - - - } - - +
+ { !!page.localization.getImage(1) && + } +
} + { currentOffer &&
+ +

{ currentOffer.localizationName }

+ +
} +
+
+ +
+
+ +
+
+
+
+ +
+
- ); + ) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx index 60ccdbae4..5f8e589a4 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutColorGroupingView.tsx @@ -1,17 +1,18 @@ -import { ColorConverter } from '@nitrots/nitro-renderer'; -import { FC, useMemo, useState } from 'react'; -import { FaFillDrip } from 'react-icons/fa'; -import { IPurchasableOffer } from '../../../../../api'; -import { AutoGrid, Base, Button, Column, Flex, Grid, LayoutGridItem, Text } from '../../../../../common'; -import { useCatalog } from '../../../../../hooks'; -import { CatalogGridOfferView } from '../common/CatalogGridOfferView'; -import { CatalogAddOnBadgeWidgetView } from '../widgets/CatalogAddOnBadgeWidgetView'; -import { CatalogLimitedItemWidgetView } from '../widgets/CatalogLimitedItemWidgetView'; -import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; -import { CatalogSpinnerWidgetView } from '../widgets/CatalogSpinnerWidgetView'; -import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; -import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { ColorConverter } from "@nitrots/nitro-renderer" +import { FC, useMemo, useState } from "react" +import { IPurchasableOffer } from "../../../../../api" +import { Button, LayoutImage } from "../../../../../common" +import { useCatalog } from "../../../../../hooks" +import { CatalogGridOfferView } from "../common/CatalogGridOfferView" +import { CatalogAddOnBadgeWidgetView } from "../widgets/CatalogAddOnBadgeWidgetView" +import { CatalogFirstProductSelectorWidgetView } from "../widgets/CatalogFirstProductSelectorWidgetView" +import { CatalogLimitedItemWidgetView } from "../widgets/CatalogLimitedItemWidgetView" +import { CatalogPurchaseWidgetView } from "../widgets/CatalogPurchaseWidgetView" +import { CatalogSimplePriceWidgetView } from "../widgets/CatalogSimplePriceWidgetView" +import { CatalogSpinnerWidgetView } from "../widgets/CatalogSpinnerWidgetView" +import { CatalogTotalPriceWidget } from "../widgets/CatalogTotalPriceWidget" +import { CatalogViewProductWidgetView } from "../widgets/CatalogViewProductWidgetView" +import { CatalogLayoutProps } from "./CatalogLayout.types" export interface CatalogLayoutColorGroupViewProps extends CatalogLayoutProps { @@ -20,86 +21,85 @@ export interface CatalogLayoutColorGroupViewProps extends CatalogLayoutProps export const CatalogLayoutColorGroupingView : FC = props => { - const { page = null } = props; - const [ colorableItems, setColorableItems ] = useState>(new Map()); - const { currentOffer = null, setCurrentOffer = null } = useCatalog(); - const [ colorsShowing, setColorsShowing ] = useState(false); + const { page = null } = props + const [ colorableItems, setColorableItems ] = useState>(new Map()) + const { currentOffer = null, setCurrentOffer = null } = useCatalog() const sortByColorIndex = (a: IPurchasableOffer, b: IPurchasableOffer) => { if (((!(a.product.furnitureData.colorIndex)) || (!(b.product.furnitureData.colorIndex)))) { - return 1; + return 1 } if (a.product.furnitureData.colorIndex > b.product.furnitureData.colorIndex) { - return 1; + return 1 } - if (a == b) + if (a === b) { - return 0; + return 0 } - return -1; + return -1 } const sortyByFurnitureClassName = (a: IPurchasableOffer, b: IPurchasableOffer) => { if (a.product.furnitureData.className > b.product.furnitureData.className) { - return 1; + return 1 } - if (a == b) + if (a === b) { - return 0; + return 0 } - return -1; + return -1 } const selectOffer = (offer: IPurchasableOffer) => { - offer.activate(); - setCurrentOffer(offer); + offer.activate() + setCurrentOffer(offer) } const selectColor = (colorIndex: number, productName: string) => { - const fullName = `${ productName }*${ colorIndex }`; - const index = page.offers.findIndex(offer => offer.product.furnitureData.fullName === fullName); + const fullName = `${ productName }*${ colorIndex }` + const index = page.offers.findIndex(offer => offer.product.furnitureData.fullName === fullName) if (index > -1) { - selectOffer(page.offers[index]); + selectOffer(page.offers[index]) } } const offers = useMemo(() => { - const offers: IPurchasableOffer[] = []; - const addedColorableItems = new Map(); - const updatedColorableItems = new Map(); + const offers: IPurchasableOffer[] = [] + const addedColorableItems = new Map() + const updatedColorableItems = new Map() - page.offers.sort(sortByColorIndex); + page.offers.sort(sortByColorIndex) page.offers.forEach(offer => { - if(!offer.product) return; + if(!offer.product) return - const furniData = offer.product.furnitureData; + const furniData = offer.product.furnitureData if(!furniData || !furniData.hasIndexedColor) { - offers.push(offer); + offers.push(offer) } else { - const name = furniData.className; - const colorIndex = furniData.colorIndex; + const name = furniData.className + const colorIndex = furniData.colorIndex if(!updatedColorableItems.has(name)) { - updatedColorableItems.set(name, []); + updatedColorableItems.set(name, []) } - let selectedColor = 0xFFFFFF; + let selectedColor = 0xFFFFFF if(furniData.colors) { @@ -107,70 +107,72 @@ export const CatalogLayoutColorGroupingView : FC - - - { (!colorsShowing || !currentOffer || !colorableItems.has(currentOffer.product.furnitureData.className)) && + }) + offers.sort(sortyByFurnitureClassName) + setColorableItems(updatedColorableItems) + return offers + }, [ page.offers ]) + + return (<> + +
+
+ { !currentOffer && +
+ { !!page.localization.getImage(1) && + } +
} + { currentOffer && +
+ + + +

{ currentOffer.localizationName }

+ {!currentOffer.bundlePurchaseAllowed && } +
} +
+
+
+ { (colorableItems.has(currentOffer?.product?.furnitureData?.className)) && offers.map((offer, index) => ) } - { (colorsShowing && currentOffer && colorableItems.has(currentOffer.product.furnitureData.className)) && - colorableItems.get(currentOffer.product.furnitureData.className).map((color, index) => selectColor(index, currentOffer.product.furnitureData.className) } />) +
+
+
+
+ { (currentOffer && colorableItems.has(currentOffer.product.furnitureData.className)) && + colorableItems.get(currentOffer.product.furnitureData.className).map((color, index) => ( + + )) } - - - - { !currentOffer && - <> - { !!page.localization.getImage(1) && } - - } - { currentOffer && - <> - - - - { currentOffer.product.furnitureData.hasIndexedColor && - } - - - - { currentOffer.localizationName } - - - - - - - - - } - - - ); +
+
+
+
+
+ + +
+ +
+ ) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx index b497e4e6b..d94ffecd3 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutDefaultView.tsx @@ -1,61 +1,55 @@ -import { FC } from 'react'; -import { GetConfiguration, ProductTypeEnum } from '../../../../../api'; -import { Column, Flex, Grid, LayoutImage, Text } from '../../../../../common'; -import { useCatalog } from '../../../../../hooks'; -import { CatalogHeaderView } from '../../catalog-header/CatalogHeaderView'; -import { CatalogAddOnBadgeWidgetView } from '../widgets/CatalogAddOnBadgeWidgetView'; -import { CatalogItemGridWidgetView } from '../widgets/CatalogItemGridWidgetView'; -import { CatalogLimitedItemWidgetView } from '../widgets/CatalogLimitedItemWidgetView'; -import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; -import { CatalogSpinnerWidgetView } from '../widgets/CatalogSpinnerWidgetView'; -import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; -import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { FC } from "react" +import { ProductTypeEnum } from "../../../../../api" +import { LayoutImage } from "../../../../../common" +import { useCatalog } from "../../../../../hooks" +import { CatalogAddOnBadgeWidgetView } from "../widgets/CatalogAddOnBadgeWidgetView" +import { CatalogItemGridWidgetView } from "../widgets/CatalogItemGridWidgetView" +import { CatalogLimitedItemWidgetView } from "../widgets/CatalogLimitedItemWidgetView" +import { CatalogPurchaseWidgetView } from "../widgets/CatalogPurchaseWidgetView" +import { CatalogSimplePriceWidgetView } from "../widgets/CatalogSimplePriceWidgetView" +import { CatalogSpinnerWidgetView } from "../widgets/CatalogSpinnerWidgetView" +import { CatalogTotalPriceWidget } from "../widgets/CatalogTotalPriceWidget" +import { CatalogViewProductWidgetView } from "../widgets/CatalogViewProductWidgetView" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayoutDefaultView: FC = props => { - const { page = null } = props; - const { currentOffer = null, currentPage = null } = useCatalog(); + const { page = null } = props + const { currentOffer = null, currentPage = null } = useCatalog() - return ( - <> - - - { GetConfiguration('catalog.headers') && - } - - - - { !currentOffer && - <> - { !!page.localization.getImage(1) && - } - + return (
+
+
+ { !currentOffer && +
+ { !!page.localization.getImage(1) && + } +
} + { currentOffer && +
+ { (currentOffer.product.productType !== ProductTypeEnum.BADGE) && <> + + + +

{ currentOffer.localizationName }

+ {!currentOffer.bundlePurchaseAllowed && } } - { currentOffer && - <> - - { (currentOffer.product.productType !== ProductTypeEnum.BADGE) && - <> - - - } - { (currentOffer.product.productType === ProductTypeEnum.BADGE) && } - - - - { currentOffer.localizationName } - - - - - - - - - } - - - - ); + { (currentOffer.product.productType === ProductTypeEnum.BADGE) && +
+ +
} +
} +
+
+ +
+
+
+
+ + +
+ +
+
) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutGuildCustomFurniView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutGuildCustomFurniView.tsx index cf1295177..74d17f53b 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutGuildCustomFurniView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutGuildCustomFurniView.tsx @@ -1,48 +1,35 @@ -import { FC } from 'react'; -import { Base, Column, Flex, Grid, Text } from '../../../../../common'; -import { useCatalog } from '../../../../../hooks'; -import { CatalogGuildBadgeWidgetView } from '../widgets/CatalogGuildBadgeWidgetView'; -import { CatalogGuildSelectorWidgetView } from '../widgets/CatalogGuildSelectorWidgetView'; -import { CatalogItemGridWidgetView } from '../widgets/CatalogItemGridWidgetView'; -import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; -import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; -import { CatalogViewProductWidgetView } from '../widgets/CatalogViewProductWidgetView'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { FC } from "react" +import { useCatalog } from "../../../../../hooks" +import { CatalogFirstProductSelectorWidgetView } from "../widgets/CatalogFirstProductSelectorWidgetView" +import { CatalogGuildBadgeWidgetView } from "../widgets/CatalogGuildBadgeWidgetView" +import { CatalogGuildSelectorWidgetView } from "../widgets/CatalogGuildSelectorWidgetView" +import { CatalogItemGridWidgetView } from "../widgets/CatalogItemGridWidgetView" +import { CatalogSimplePriceWidgetView } from "../widgets/CatalogSimplePriceWidgetView" +import { CatalogViewProductWidgetView } from "../widgets/CatalogViewProductWidgetView" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayouGuildCustomFurniView: FC = props => { - const { page = null } = props; - const { currentOffer = null } = useCatalog(); + const { page = null } = props + const { currentOffer = null } = useCatalog() return ( - - - - - - { !currentOffer && - <> - { !!page.localization.getImage(1) && } - - } - { currentOffer && - <> - - - - - - { currentOffer.localizationName } - - - - - - - - - } - - - ); + <> + +
+
+
+ +

{ currentOffer?.localizationName }

+ + +
+
+
+ +
+
+ + + ) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx index b5a89ca6e..54e284b74 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx @@ -1,49 +1,20 @@ -import { CatalogGroupsComposer } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { SendMessageComposer } from '../../../../../api'; -import { Base, Column, Flex, Grid, Text } from '../../../../../common'; -import { useCatalog } from '../../../../../hooks'; -import { CatalogFirstProductSelectorWidgetView } from '../widgets/CatalogFirstProductSelectorWidgetView'; -import { CatalogGuildSelectorWidgetView } from '../widgets/CatalogGuildSelectorWidgetView'; -import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; -import { CatalogTotalPriceWidget } from '../widgets/CatalogTotalPriceWidget'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { CatalogGroupsComposer } from "@nitrots/nitro-renderer" +import { FC, useEffect, useState } from "react" +import { SendMessageComposer } from "../../../../../api" +import { useCatalog } from "../../../../../hooks" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayouGuildForumView: FC = props => { - const { page = null } = props; - const [ selectedGroupIndex, setSelectedGroupIndex ] = useState(0); - const { currentOffer = null, setCurrentOffer = null, catalogOptions = null } = useCatalog(); - const { groups = null } = catalogOptions; + const { page = null } = props + const [ selectedGroupIndex, setSelectedGroupIndex ] = useState(0) + const { currentOffer = null, setCurrentOffer = null, catalogOptions = null } = useCatalog() + const { groups = null } = catalogOptions useEffect(() => { - SendMessageComposer(new CatalogGroupsComposer()); - }, [ page ]); + SendMessageComposer(new CatalogGroupsComposer()) + }, [ page ]) - return ( - <> - - - - - - - { !!currentOffer && - <> - - { currentOffer.localizationName } - - - - - - - - - } - - - - ); + return null } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutGuildFrontpageView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutGuildFrontpageView.tsx index d467aa438..f7d823908 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutGuildFrontpageView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutGuildFrontpageView.tsx @@ -1,29 +1,23 @@ -import { FC } from 'react'; -import { CreateLinkEvent, LocalizeText } from '../../../../../api'; -import { Base } from '../../../../../common/Base'; -import { Button } from '../../../../../common/Button'; -import { Column } from '../../../../../common/Column'; -import { Grid } from '../../../../../common/Grid'; -import { LayoutImage } from '../../../../../common/layout/LayoutImage'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { FC } from "react" +import { CreateLinkEvent, LocalizeText } from "../../../../../api" +import { Button } from "../../../../../common/Button" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayouGuildFrontpageView: FC = props => { - const { page = null } = props; + const { page = null } = props return ( - - - - - - - - - - - - ); +
+ + ) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx index 06c4c0347..888cbf34b 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutInfoLoyaltyView.tsx @@ -1,15 +1,17 @@ -import { FC } from 'react'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { FC } from "react" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayoutInfoLoyaltyView: FC = props => { - const { page = null } = props; + const { page = null } = props return ( -
-
-
+
+
+
+

+

- ); + ) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutPets2View.tsx b/src/components/catalog/views/page/layout/CatalogLayoutPets2View.tsx index 38ad284af..414890329 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutPets2View.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutPets2View.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; -import { CatalogLayoutProps } from './CatalogLayout.types'; -import { CatalogLayoutPets3View } from './CatalogLayoutPets3View'; +import { FC } from "react" +import { CatalogLayoutProps } from "./CatalogLayout.types" +import { CatalogLayoutPets3View } from "./CatalogLayoutPets3View" export const CatalogLayoutPets2View: FC = props => { diff --git a/src/components/catalog/views/page/layout/CatalogLayoutPets3View.tsx b/src/components/catalog/views/page/layout/CatalogLayoutPets3View.tsx index 2ce3e39cb..3cb68ae29 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutPets3View.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutPets3View.tsx @@ -1,27 +1,22 @@ -import { FC } from 'react'; -import { Base } from '../../../../../common/Base'; -import { Column } from '../../../../../common/Column'; -import { Flex } from '../../../../../common/Flex'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { FC } from "react" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayoutPets3View: FC = props => { - const { page = null } = props; + const { page = null } = props - const imageUrl = page.localization.getImage(1); + const imageUrl = page.localization.getImage(1) return ( - - - { imageUrl && } - - - - - - - - - - ); +
+
+
+ { imageUrl && } +

+

+

+

+

+
+ ) } diff --git a/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx index 92dd4bff1..f0438b01e 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutRoomAdsView.tsx @@ -1,109 +1,76 @@ -import { GetRoomAdPurchaseInfoComposer, GetUserEventCatsMessageComposer, PurchaseRoomAdMessageComposer, RoomAdPurchaseInfoEvent, RoomEntryData } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { LocalizeText, SendMessageComposer } from '../../../../../api'; -import { Base, Button, Column, Text } from '../../../../../common'; -import { useCatalog, useMessageEvent, useNavigator, useRoomPromote } from '../../../../../hooks'; -import { CatalogLayoutProps } from './CatalogLayout.types'; +import { GetRoomAdPurchaseInfoComposer, GetUserEventCatsMessageComposer, PurchaseRoomAdMessageComposer, RoomAdPurchaseInfoEvent, RoomEntryData } from "@nitrots/nitro-renderer" +import { FC, useEffect, useState } from "react" +import { SendMessageComposer } from "../../../../../api" +import { useCatalog, useMessageEvent, useNavigator, useRoomPromote } from "../../../../../hooks" +import { CatalogLayoutProps } from "./CatalogLayout.types" export const CatalogLayoutRoomAdsView: FC = props => { - const { page = null } = props; - const [ eventName, setEventName ] = useState(''); - const [ eventDesc, setEventDesc ] = useState(''); - const [ roomId, setRoomId ] = useState(-1); - const [ availableRooms, setAvailableRooms ] = useState([]); - const [ extended, setExtended ] = useState(false); - const [ categoryId, setCategoryId ] = useState(1); - const { categories = null } = useNavigator(); - const { setIsVisible = null } = useCatalog(); - const { promoteInformation, isExtended, setIsExtended } = useRoomPromote(); + const { page = null } = props + const [ eventName, setEventName ] = useState("") + const [ eventDesc, setEventDesc ] = useState("") + const [ roomId, setRoomId ] = useState(-1) + const [ availableRooms, setAvailableRooms ] = useState([]) + const [ extended, setExtended ] = useState(false) + const [ categoryId, setCategoryId ] = useState(1) + const { categories = null } = useNavigator() + const { setIsVisible = null } = useCatalog() + const { promoteInformation, isExtended, setIsExtended } = useRoomPromote() useEffect(() => { if(isExtended) { - setRoomId(promoteInformation.data.flatId); - setEventName(promoteInformation.data.eventName); - setEventDesc(promoteInformation.data.eventDescription); - setCategoryId(promoteInformation.data.categoryId); - setExtended(isExtended); // This is for sending to packet - setIsExtended(false); // This is from hook useRoomPromotte + setRoomId(promoteInformation.data.flatId) + setEventName(promoteInformation.data.eventName) + setEventDesc(promoteInformation.data.eventDescription) + setCategoryId(promoteInformation.data.categoryId) + setExtended(isExtended) // This is for sending to packet + setIsExtended(false) // This is from hook useRoomPromotte } - }, [ isExtended, eventName, eventDesc, categoryId ]); + }, [ isExtended, eventName, eventDesc, categoryId ]) const resetData = () => { - setRoomId(-1); - setEventName(''); - setEventDesc(''); - setCategoryId(1); - setIsExtended(false); - setIsVisible(false); + setRoomId(-1) + setEventName("") + setEventDesc("") + setCategoryId(1) + setIsExtended(false) + setIsVisible(false) } const purchaseAd = () => { - const pageId = page.pageId; - const offerId = page.offers.length >= 1 ? page.offers[0].offerId : -1; - const flatId = roomId; - const name = eventName; - const desc = eventDesc; - const catId = categoryId; + const pageId = page.pageId + const offerId = page.offers.length >= 1 ? page.offers[0].offerId : -1 + const flatId = roomId + const name = eventName + const desc = eventDesc + const catId = categoryId - SendMessageComposer(new PurchaseRoomAdMessageComposer(pageId, offerId, flatId, name, extended, desc, catId)); - resetData(); + SendMessageComposer(new PurchaseRoomAdMessageComposer(pageId, offerId, flatId, name, extended, desc, catId)) + resetData() } useMessageEvent(RoomAdPurchaseInfoEvent, event => { - const parser = event.getParser(); + const parser = event.getParser() - if(!parser) return; + if(!parser) return - setAvailableRooms(parser.rooms); - }); + setAvailableRooms(parser.rooms) + }) useEffect(() => { - SendMessageComposer(new GetRoomAdPurchaseInfoComposer()); + SendMessageComposer(new GetRoomAdPurchaseInfoComposer()) // TODO: someone needs to fix this for morningstar - SendMessageComposer(new GetUserEventCatsMessageComposer()); - }, []); + SendMessageComposer(new GetUserEventCatsMessageComposer()) + }, []) - return (<> - { LocalizeText('roomad.catalog_header') } - - { LocalizeText('roomad.catalog_text', [ 'duration' ], [ '120' ]) } - - - { LocalizeText('navigator.category') } - - - - { LocalizeText('roomad.catalog_name') } - setEventName(event.target.value) } readOnly={ extended } /> - - - { LocalizeText('roomad.catalog_description') } - - { LocalizeText('friendlist.invite.note') } - - - - +
+ +
+
+ + +
- ); -}; + ) +} diff --git a/src/components/friends/views/friends-list/FriendsListSearchView.tsx b/src/components/friends/views/friends-list/FriendsListSearchView.tsx deleted file mode 100644 index 69073a225..000000000 --- a/src/components/friends/views/friends-list/FriendsListSearchView.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { HabboSearchComposer, HabboSearchResultData, HabboSearchResultEvent } from '@nitrots/nitro-renderer'; -import { FC, useEffect, useState } from 'react'; -import { LocalizeText, OpenMessengerChat, SendMessageComposer } from '../../../../api'; -import { Base, Column, Flex, NitroCardAccordionItemView, NitroCardAccordionSetView, NitroCardAccordionSetViewProps, Text, UserProfileIconView } from '../../../../common'; -import { useFriends, useMessageEvent } from '../../../../hooks'; - -interface FriendsSearchViewProps extends NitroCardAccordionSetViewProps -{ - -} - -export const FriendsSearchView: FC = props => -{ - const { ...rest } = props; - const [ searchValue, setSearchValue ] = useState(''); - const [ friendResults, setFriendResults ] = useState(null); - const [ otherResults, setOtherResults ] = useState(null); - const { canRequestFriend = null, requestFriend = null } = useFriends(); - - useMessageEvent(HabboSearchResultEvent, event => - { - const parser = event.getParser(); - - setFriendResults(parser.friends); - setOtherResults(parser.others); - }); - - useEffect(() => - { - if(!searchValue || !searchValue.length) return; - - const timeout = setTimeout(() => - { - if(!searchValue || !searchValue.length) return; - - SendMessageComposer(new HabboSearchComposer(searchValue)); - }, 500); - - return () => clearTimeout(timeout); - }, [ searchValue ]); - - return ( - - setSearchValue(event.target.value) } /> - - { friendResults && - <> - { (friendResults.length === 0) && - { LocalizeText('friendlist.search.nofriendsfound') } } - { (friendResults.length > 0) && - - { LocalizeText('friendlist.search.friendscaption', [ 'cnt' ], [ friendResults.length.toString() ]) } -
- - { friendResults.map(result => - { - return ( - - - -
{ result.avatarName }
-
- - { result.isAvatarOnline && - OpenMessengerChat(result.avatarId) } title={ LocalizeText('friendlist.tip.im') } /> } - -
- ) - }) } -
-
} - } - { otherResults && - <> - { (otherResults.length === 0) && - { LocalizeText('friendlist.search.noothersfound') } } - { (otherResults.length > 0) && - - { LocalizeText('friendlist.search.otherscaption', [ 'cnt' ], [ otherResults.length.toString() ]) } -
- - { otherResults.map(result => - { - return ( - - - -
{ result.avatarName }
-
- - { canRequestFriend(result.avatarId) && - requestFriend(result.avatarId, result.avatarName) } title={ LocalizeText('friendlist.tip.addfriend') } /> } - -
- ) - }) } -
-
} - } -
-
- ); -} diff --git a/src/components/friends/views/friends-list/FriendsListView.tsx b/src/components/friends/views/friends-list/FriendsListView.tsx index d98e93a6d..17bba60be 100644 --- a/src/components/friends/views/friends-list/FriendsListView.tsx +++ b/src/components/friends/views/friends-list/FriendsListView.tsx @@ -1,51 +1,53 @@ -import { ILinkEventTracker, RemoveFriendComposer, SendRoomInviteComposer } from '@nitrots/nitro-renderer'; -import { FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { AddEventLinkTracker, LocalizeText, MessengerFriend, RemoveLinkEventTracker, SendMessageComposer } from '../../../../api'; -import { Button, Flex, NitroCardAccordionSetView, NitroCardAccordionView, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; -import { useFriends } from '../../../../hooks'; -import { FriendsListGroupView } from './friends-list-group/FriendsListGroupView'; -import { FriendsListRequestView } from './friends-list-request/FriendsListRequestView'; -import { FriendsRemoveConfirmationView } from './FriendsListRemoveConfirmationView'; -import { FriendsRoomInviteView } from './FriendsListRoomInviteView'; -import { FriendsSearchView } from './FriendsListSearchView'; +import { HabboSearchComposer, HabboSearchResultData, HabboSearchResultEvent, ILinkEventTracker, RemoveFriendComposer, SendRoomInviteComposer } from "@nitrots/nitro-renderer" +import { FC, useCallback, useEffect, useMemo, useState } from "react" +import { AddEventLinkTracker, LocalizeText, MessengerFriend, RemoveLinkEventTracker, SendMessageComposer } from "../../../../api" +import { Button, NitroCardContentView, NitroCardHeaderView, NitroCardView } from "../../../../common" +import { useFriends, useMessageEvent } from "../../../../hooks" +import { FriendsRemoveConfirmationView } from "./FriendsListRemoveConfirmationView" +import { FriendsRoomInviteView } from "./FriendsListRoomInviteView" +import { FriendsListGroupView } from "./friends-list-group/FriendsListGroupView" export const FriendsListView: FC<{}> = props => { - const [ isVisible, setIsVisible ] = useState(false); - const [ selectedFriendsIds, setSelectedFriendsIds ] = useState([]); - const [ showRoomInvite, setShowRoomInvite ] = useState(false); - const [ showRemoveFriendsConfirmation, setShowRemoveFriendsConfirmation ] = useState(false); - const { onlineFriends = [], offlineFriends = [], requests = [], requestFriend = null } = useFriends(); + const [ isVisible, setIsVisible ] = useState(false) + const [ isRequestVisible, setIsRequestVisible ] = useState(false) + const [ searchValue, setSearchValue ] = useState("") + const [ friendResults, setFriendResults ] = useState(null) + const [ otherResults, setOtherResults ] = useState(null) + const [ selectedFriendsIds, setSelectedFriendsIds ] = useState([]) + const [ showRoomInvite, setShowRoomInvite ] = useState(false) + const [ showRemoveFriendsConfirmation, setShowRemoveFriendsConfirmation ] = useState(false) + const { onlineFriends = [], offlineFriends = [], requests = [], requestFriend = null, requestResponse = null } = useFriends() const removeFriendsText = useMemo(() => { - if(!selectedFriendsIds || !selectedFriendsIds.length) return ''; + if(!selectedFriendsIds || !selectedFriendsIds.length) return "" - const userNames: string[] = []; + const userNames: string[] = [] for(const userId of selectedFriendsIds) { - let existingFriend: MessengerFriend = onlineFriends.find(f => f.id === userId); + let existingFriend: MessengerFriend = onlineFriends.find(f => f.id === userId) - if(!existingFriend) existingFriend = offlineFriends.find(f => f.id === userId); + if(!existingFriend) existingFriend = offlineFriends.find(f => f.id === userId) - if(!existingFriend) continue; + if(!existingFriend) continue - userNames.push(existingFriend.name); + userNames.push(existingFriend.name) } - return LocalizeText('friendlist.removefriendconfirm.userlist', [ 'user_names' ], [ userNames.join(', ') ]); - }, [ offlineFriends, onlineFriends, selectedFriendsIds ]); + return LocalizeText("friendlist.removefriendconfirm.userlist", [ "user_names" ], [ userNames.join(", ") ]) + }, [ offlineFriends, onlineFriends, selectedFriendsIds ]) const selectFriend = useCallback((userId: number) => { - if(userId < 0) return; + if(userId < 0) return setSelectedFriendsIds(prevValue => { - const newValue = [ ...prevValue ]; + const newValue = [ ...prevValue ] - const existingUserIdIndex: number = newValue.indexOf(userId); + const existingUserIdIndex: number = newValue.indexOf(userId) if(existingUserIdIndex > -1) { @@ -53,92 +55,188 @@ export const FriendsListView: FC<{}> = props => } else { - newValue.push(userId); + newValue.push(userId) } - return newValue; - }); - }, [ setSelectedFriendsIds ]); + return newValue + }) + }, [ setSelectedFriendsIds ]) const sendRoomInvite = (message: string) => { - if(!selectedFriendsIds.length || !message || !message.length || (message.length > 255)) return; + if(!selectedFriendsIds.length || !message || !message.length || (message.length > 255)) return - SendMessageComposer(new SendRoomInviteComposer(message, selectedFriendsIds)); + SendMessageComposer(new SendRoomInviteComposer(message, selectedFriendsIds)) - setShowRoomInvite(false); + setShowRoomInvite(false) } const removeSelectedFriends = () => { - if(selectedFriendsIds.length === 0) return; + if(selectedFriendsIds.length === 0) return setSelectedFriendsIds(prevValue => { - SendMessageComposer(new RemoveFriendComposer(...prevValue)); + SendMessageComposer(new RemoveFriendComposer(...prevValue)) - return []; - }); + return [] + }) - setShowRemoveFriendsConfirmation(false); + setShowRemoveFriendsConfirmation(false) } + useMessageEvent(HabboSearchResultEvent, event => + { + const parser = event.getParser() + + setFriendResults(parser.friends) + setOtherResults(parser.others) + }) + + useEffect(() => + { + if(!searchValue || !searchValue.length) return + + const timeout = setTimeout(() => + { + if(!searchValue || !searchValue.length) return + + SendMessageComposer(new HabboSearchComposer(searchValue)) + }, 500) + + return () => clearTimeout(timeout) + }, [ searchValue ]) + useEffect(() => { const linkTracker: ILinkEventTracker = { linkReceived: (url: string) => { - const parts = url.split('/'); + const parts = url.split("/") - if(parts.length < 2) return; + if(parts.length < 2) return switch(parts[1]) { - case 'show': - setIsVisible(true); - return; - case 'hide': - setIsVisible(false); - return; - case 'toggle': - setIsVisible(prevValue => !prevValue); - return; - case 'request': - if(parts.length < 4) return; - - requestFriend(parseInt(parts[2]), parts[3]); + case "show": + setIsVisible(true) + return + case "hide": + setIsVisible(false) + return + case "toggle": + setIsVisible(prevValue => !prevValue) + return + case "request": + if(parts.length < 4) return + + requestFriend(parseInt(parts[2]), parts[3]) } }, - eventUrlPrefix: 'friends/' - }; + eventUrlPrefix: "friends/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, [ requestFriend ]); + return () => RemoveLinkEventTracker(linkTracker) + }, [ requestFriend ]) - if(!isVisible) return null; + if(!isVisible) return null return ( <> - - setIsVisible(false) } /> - - - - - - - - - - - - { selectedFriendsIds && selectedFriendsIds.length > 0 && - - - - } + + setIsVisible(false) } /> + +
+
+ { searchValue?.length === 0 && isRequestVisible &&
+
+
+
+

{ LocalizeText("friendlist.tab.friendrequests") + ` (${ requests.length })` }

+
+
+
+ +
+
+
+ {/* */} + +
+
+
} + { searchValue?.length === 0 && !isRequestVisible &&
+
+
+

{ LocalizeText("friendlist.friends") + ` (${ onlineFriends.length })` }

+
+
+ +
+
+
+

{ LocalizeText("friendlist.friends.offlinecaption") + ` (${ offlineFriends.length })` }

+
+
+ +
+
} + { searchValue?.length > 0 && !isRequestVisible &&
+
+
+

{ LocalizeText("friendlist.search.friendscaption", [ "cnt" ], [ friendResults?.length.toString() ]) }

+
+
+ +
+
+
+

{ LocalizeText("friendlist.search.otherscaption", [ "cnt" ], [ otherResults?.length.toString() ]) }

+
+
+ +
+
} +
+
+ { setSearchValue(event.target.value), setIsRequestVisible(false) } } /> +
+ +
+ + { requests.length > 0 + ? <> + { isRequestVisible + ? + : + } + + : <> + { isRequestVisible && + } + } +
+
+
{ showRoomInvite && @@ -146,5 +244,5 @@ export const FriendsListView: FC<{}> = props => { showRemoveFriendsConfirmation && setShowRemoveFriendsConfirmation(false) } removeSelectedFriends={ removeSelectedFriends } /> } - ); -}; + ) +} diff --git a/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupItemView.tsx b/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupItemView.tsx index 03cd7e988..50b05aeb2 100644 --- a/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupItemView.tsx +++ b/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupItemView.tsx @@ -1,85 +1,168 @@ -import { FC, MouseEvent, useState } from 'react'; -import { LocalizeText, MessengerFriend, OpenMessengerChat } from '../../../../../api'; -import { Base, Flex, NitroCardAccordionItemView, UserProfileIconView } from '../../../../../common'; -import { useFriends } from '../../../../../hooks'; +import { HabboSearchResultData } from "@nitrots/nitro-renderer" +import { FC, MouseEvent, useEffect, useRef, useState } from "react" +import { GetUserProfile, MessengerFriend, MessengerRequest, OpenMessengerChat } from "../../../../../api" +import { LayoutAvatarImageView, LayoutBadgeImageView } from "../../../../../common" +import { useFriends } from "../../../../../hooks" -export const FriendsListGroupItemView: FC<{ friend: MessengerFriend, selected: boolean, selectFriend: (userId: number) => void }> = props => +export interface FriendsListGroupItemViewProps { - const { friend = null, selected = false, selectFriend = null } = props; - const [ isRelationshipOpen, setIsRelationshipOpen ] = useState(false); - const { followFriend = null, updateRelationship = null } = useFriends(); + friend?: MessengerFriend + request?: MessengerRequest + searchFriend?: HabboSearchResultData + isSearch?: boolean + isFriend?: boolean + selected?: boolean + selectFriend?: (userId: number) => void +} + +export const FriendsListGroupItemView: FC = props => +{ + const { friend = null, request = null, searchFriend = null, isSearch = false, isFriend = false, selected = false, selectFriend = null } = props + const [ isRelationshipOpen, setIsRelationshipOpen ] = useState(false) + const { followFriend = null, updateRelationship = null, canRequestFriend = null, requestFriend = null, requestResponse = null } = useFriends() + + const relationshipRef = useRef(null) const clickFollowFriend = (event: MouseEvent) => { - event.stopPropagation(); + event.stopPropagation() - followFriend(friend); + followFriend(friend) } - const openMessengerChat = (event: MouseEvent) => + const openMessengerChat = (friendId: number) => (event: MouseEvent) => { - event.stopPropagation(); - - OpenMessengerChat(friend.id); + event.stopPropagation() + OpenMessengerChat(friendId) } const openRelationship = (event: MouseEvent) => { - event.stopPropagation(); - - setIsRelationshipOpen(true); + event.stopPropagation() + setIsRelationshipOpen(prevState => !prevState) } const clickUpdateRelationship = (event: MouseEvent, type: number) => { - event.stopPropagation(); + event.stopPropagation() - updateRelationship(friend, type); + updateRelationship(friend, type) - setIsRelationshipOpen(false); + setIsRelationshipOpen(false) } - + const getCurrentRelationshipName = () => { - if(!friend) return 'none'; + if(!friend) return "!bg-none" switch(friend.relationshipStatus) { - case MessengerFriend.RELATIONSHIP_HEART: return 'heart'; - case MessengerFriend.RELATIONSHIP_SMILE: return 'smile'; - case MessengerFriend.RELATIONSHIP_BOBBA: return 'bobba'; - default: return 'none'; + case MessengerFriend.RELATIONSHIP_HEART: return "bg-[-292px_-23px]" + case MessengerFriend.RELATIONSHIP_SMILE: return "bg-[-320px_-23px]" + case MessengerFriend.RELATIONSHIP_BOBBA: return "bg-[-306px_-23px]" + default: return "!bg-none" } } - if(!friend) return null; + useEffect(() => { + const handleClickOutside: any = (event: MouseEvent) => { + if (relationshipRef.current && !relationshipRef.current.contains(event.target as Node)) { + setIsRelationshipOpen(false) + } + } + + document.addEventListener("mousedown", handleClickOutside) + return () => { + document.removeEventListener("mousedown", handleClickOutside) + } + }, []) + + if(searchFriend && isSearch) return ( +
+
+ { searchFriend.isAvatarOnline || isFriend + ? + :
} +
+
GetUserProfile(searchFriend.avatarId) }> + +
+

{ searchFriend.avatarName }

+
+
+
+ { isFriend && +
+ +
} + { canRequestFriend(searchFriend.avatarId) && !isFriend && +
requestFriend(searchFriend.avatarId, searchFriend.avatarName) }> + +
} +
+
+ ) + + if(request && !isSearch) return ( +
+
+ { request.id > 0 && } +
+
GetUserProfile(request.id) }> + +
+

{ request.name }

+
+
+
+
requestResponse(request.id, true) }> + +
+
requestResponse(request.id, false) }> + +
+
+
+ ) + + if(friend && !isSearch) return ( +
selectFriend(friend.id) }> +
+ { friend.id > 0 && friend.online && } + { friend.id > 0 && !friend.online &&
} + { friend.id <= 0 && } +
+
GetUserProfile(friend.id) }> + +
+

{ friend.name }

+
+
+
+ +
+ +
+
+
+ +
+ { friend.followingAllowed && <> +
+
+ +
+ } +
+ { isRelationshipOpen && +
+
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_NONE) } /> +
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_HEART) } /> +
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_SMILE) } /> +
clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_BOBBA) } /> +
} +
+ ) - return ( - selectFriend(friend.id) }> - - event.stopPropagation() }> - - -
{ friend.name }
-
- - { !isRelationshipOpen && - <> - { friend.followingAllowed && - } - { friend.online && - } - { (friend.id > 0) && - } - } - { isRelationshipOpen && - <> - clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_HEART) } /> - clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_SMILE) } /> - clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_BOBBA) } /> - clickUpdateRelationship(event, MessengerFriend.RELATIONSHIP_NONE) } /> - } - -
- ); + return null } diff --git a/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupView.tsx b/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupView.tsx index c593003a0..705030450 100644 --- a/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupView.tsx +++ b/src/components/friends/views/friends-list/friends-list-group/FriendsListGroupView.tsx @@ -1,23 +1,55 @@ -import { FC } from 'react'; -import { MessengerFriend } from '../../../../../api'; -import { FriendsListGroupItemView } from './FriendsListGroupItemView'; +import { HabboSearchResultData } from "@nitrots/nitro-renderer" +import { FC } from "react" +import { LocalizeText, MessengerFriend, MessengerRequest } from "../../../../../api" +import { FriendsListGroupItemView } from "./FriendsListGroupItemView" interface FriendsListGroupViewProps { - list: MessengerFriend[]; - selectedFriendsIds: number[]; - selectFriend: (userId: number) => void; + list?: MessengerFriend[]; + requests?: MessengerRequest[]; + searchList?: HabboSearchResultData[]; + searchListOther?: HabboSearchResultData[]; + selectedFriendsIds?: number[]; + selectFriend?: (userId: number) => void; } export const FriendsListGroupView: FC = props => { - const { list = null, selectedFriendsIds = null, selectFriend = null } = props; + const { list = null, requests = null, searchList = null, searchListOther = null, selectedFriendsIds = null, selectFriend = null } = props - if(!list || !list.length) return null; + if(searchList) return ( + <> + { (searchList.length === 0) && +

{ LocalizeText("friendlist.search.nofriendsfound") }

} + { (searchList.length > 0) && +
+ { searchList.map((result, index) => )} +
} + + ) - return ( + if(searchListOther) return ( <> + { (searchListOther.length === 0) && +

{ LocalizeText("friendlist.search.noothersfound") }

} + { (searchListOther.length > 0) && +
+ { searchListOther.map((result, index) => )} +
} + + ) + + if(requests) return ( +
+ { requests.map((request, index) => ) } +
+ ) + + if(list) return ( +
{ list.map((item, index) => = 0) } selectFriend={ selectFriend } />) } - - ); +
+ ) + + return null } diff --git a/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestItemView.tsx b/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestItemView.tsx deleted file mode 100644 index de5d3a3b0..000000000 --- a/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestItemView.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { FC } from 'react'; -import { MessengerRequest } from '../../../../../api'; -import { Base, Flex, NitroCardAccordionItemView, UserProfileIconView } from '../../../../../common'; -import { useFriends } from '../../../../../hooks'; - -export const FriendsListRequestItemView: FC<{ request: MessengerRequest }> = props => -{ - const { request = null } = props; - const { requestResponse = null } = useFriends(); - - if(!request) return null; - - return ( - - - -
{ request.name }
-
- - requestResponse(request.id, true) } /> - requestResponse(request.id, false) } /> - -
- ); -} diff --git a/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestView.tsx b/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestView.tsx deleted file mode 100644 index 5f6e99184..000000000 --- a/src/components/friends/views/friends-list/friends-list-request/FriendsListRequestView.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { FC } from 'react'; -import { LocalizeText } from '../../../../../api'; -import { Button, Column, Flex, NitroCardAccordionSetView, NitroCardAccordionSetViewProps } from '../../../../../common'; -import { useFriends } from '../../../../../hooks'; -import { FriendsListRequestItemView } from './FriendsListRequestItemView'; - -export const FriendsListRequestView: FC = props => -{ - const { children = null, ...rest } = props; - const { requests = [], requestResponse = null } = useFriends(); - - if(!requests.length) return null; - - return ( - - - - { requests.map((request, index) => ) } - - - - - - { children } - - ); -} diff --git a/src/components/friends/views/messenger/FriendsMessengerView.tsx b/src/components/friends/views/messenger/FriendsMessengerView.tsx index 9246e7ae8..b692c94d2 100644 --- a/src/components/friends/views/messenger/FriendsMessengerView.tsx +++ b/src/components/friends/views/messenger/FriendsMessengerView.tsx @@ -1,37 +1,37 @@ -import { FollowFriendMessageComposer, ILinkEventTracker } from '@nitrots/nitro-renderer'; -import { FC, KeyboardEvent, useEffect, useRef, useState } from 'react'; -import { FaTimes } from 'react-icons/fa'; -import { AddEventLinkTracker, GetSessionDataManager, GetUserProfile, LocalizeText, RemoveLinkEventTracker, ReportType, SendMessageComposer } from '../../../../api'; -import { Base, Button, ButtonGroup, Column, Flex, Grid, LayoutAvatarImageView, LayoutBadgeImageView, LayoutGridItem, LayoutItemCountView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; -import { useHelp, useMessenger } from '../../../../hooks'; -import { FriendsMessengerThreadView } from './messenger-thread/FriendsMessengerThreadView'; +import { FollowFriendMessageComposer, ILinkEventTracker } from "@nitrots/nitro-renderer" +import { FC, KeyboardEvent, useEffect, useRef, useState } from "react" +import { AddEventLinkTracker, GetSessionDataManager, GetUserProfile, LocalizeText, RemoveLinkEventTracker, ReportType, SendMessageComposer } from "../../../../api" +import { Button, LayoutAvatarImageView, LayoutBadgeImageView, NitroCardContentView, NitroCardHeaderView, NitroCardView } from "../../../../common" +import { LayoutTimesView } from "../../../../common/layout/LayoutTimesView" +import { useHelp, useMessenger } from "../../../../hooks" +import { FriendsMessengerThreadView } from "./messenger-thread/FriendsMessengerThreadView" export const FriendsMessengerView: FC<{}> = props => { - const [ isVisible, setIsVisible ] = useState(false); - const [ lastThreadId, setLastThreadId ] = useState(-1); - const [ messageText, setMessageText ] = useState(''); - const { visibleThreads = [], activeThread = null, getMessageThread = null, sendMessage = null, setActiveThreadId = null, closeThread = null } = useMessenger(); - const { report = null } = useHelp(); - const messagesBox = useRef(); + const [ isVisible, setIsVisible ] = useState(false) + const [ lastThreadId, setLastThreadId ] = useState(-1) + const [ messageText, setMessageText ] = useState("") + const { visibleThreads = [], activeThread = null, getMessageThread = null, sendMessage = null, setActiveThreadId = null, closeThread = null } = useMessenger() + const { report = null } = useHelp() + const messagesBox = useRef() - const followFriend = () => (activeThread && activeThread.participant && SendMessageComposer(new FollowFriendMessageComposer(activeThread.participant.id))); - const openProfile = () => (activeThread && activeThread.participant && GetUserProfile(activeThread.participant.id)); + const followFriend = () => (activeThread && activeThread.participant && SendMessageComposer(new FollowFriendMessageComposer(activeThread.participant.id))) + const openProfile = () => (activeThread && activeThread.participant && GetUserProfile(activeThread.participant.id)) const send = () => { - if(!activeThread || !messageText.length) return; + if(!activeThread || !messageText.length) return - sendMessage(activeThread, GetSessionDataManager().userId, messageText); + sendMessage(activeThread, GetSessionDataManager().userId, messageText) - setMessageText(''); + setMessageText("") } const onKeyDown = (event: KeyboardEvent) => { - if(event.key !== 'Enter') return; + if(event.key !== "Enter") return - send(); + send() } useEffect(() => @@ -39,46 +39,46 @@ export const FriendsMessengerView: FC<{}> = props => const linkTracker: ILinkEventTracker = { linkReceived: (url: string) => { - const parts = url.split('/'); + const parts = url.split("/") if(parts.length === 2) { - if(parts[1] === 'open') + if(parts[1] === "open") { - setIsVisible(true); + setIsVisible(true) - return; + return } - if(parts[1] === 'toggle') + if(parts[1] === "toggle") { - setIsVisible(prevValue => !prevValue); + setIsVisible(prevValue => !prevValue) - return; + return } - const thread = getMessageThread(parseInt(parts[1])); + const thread = getMessageThread(parseInt(parts[1])) - if(!thread) return; + if(!thread) return - setActiveThreadId(thread.threadId); - setIsVisible(true); + setActiveThreadId(thread.threadId) + setIsVisible(true) } }, - eventUrlPrefix: 'friends-messenger/' - }; + eventUrlPrefix: "friends-messenger/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, [ getMessageThread, setActiveThreadId ]); + return () => RemoveLinkEventTracker(linkTracker) + }, [ getMessageThread, setActiveThreadId ]) useEffect(() => { - if(!isVisible || !activeThread) return; + if(!isVisible || !activeThread) return - messagesBox.current.scrollTop = messagesBox.current.scrollHeight; - }, [ isVisible, activeThread ]); + messagesBox.current.scrollTop = messagesBox.current.scrollHeight + }, [ isVisible, activeThread ]) useEffect(() => { @@ -86,92 +86,86 @@ export const FriendsMessengerView: FC<{}> = props => { if(lastThreadId > 0) { - setActiveThreadId(lastThreadId); + setActiveThreadId(lastThreadId) } else { - if(visibleThreads.length > 0) setActiveThreadId(visibleThreads[0].threadId); + if(visibleThreads.length > 0) setActiveThreadId(visibleThreads[0].threadId) } - return; + return } if(!isVisible && activeThread) { - setLastThreadId(activeThread.threadId); - setActiveThreadId(-1); + setLastThreadId(activeThread.threadId) + setActiveThreadId(-1) + } + }, [ isVisible, activeThread, lastThreadId, visibleThreads, setActiveThreadId ]) + + useEffect(() => { + if(visibleThreads.length === 0) { + setIsVisible(false) } - }, [ isVisible, activeThread, lastThreadId, visibleThreads, setActiveThreadId ]); + }, [ visibleThreads ]) - if(!isVisible) return null; + if(!isVisible) return null return ( - - setIsVisible(false) } /> + + setIsVisible(false) } isClose={ false } /> - - - { LocalizeText('toolbar.icon.label.messenger') } - - - { visibleThreads && (visibleThreads.length > 0) && visibleThreads.map(thread => - { - return ( - setActiveThreadId(thread.threadId) }> - { thread.unread && - } - - - { (thread.participant.id > 0) && - } - { (thread.participant.id <= 0) && - } - - { thread.participant.name } - - - ); - }) } - - - - - { activeThread && - <> - { LocalizeText('messenger.window.separator', [ 'FRIEND_NAME' ], [ activeThread.participant.name ]) } - - - - - - - - - + - - - - - - - - setMessageText(event.target.value) } onKeyDown={ onKeyDown } /> - - - } - - +
+ { + closeThread(activeThread.threadId) + const lastVisibleThread = visibleThreads[visibleThreads.length - 1] + setActiveThreadId(lastVisibleThread.threadId) + } } /> +
+
+ +
+
+ setMessageText(event.target.value) } onKeyDown={ onKeyDown } /> + +
+
} +
- ); + ) } diff --git a/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx b/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx index ad3d755b7..282815947 100644 --- a/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx +++ b/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx @@ -1,72 +1,69 @@ -import { FC, useMemo } from 'react'; -import { GetGroupChatData, GetSessionDataManager, LocalizeText, MessengerGroupType, MessengerThread, MessengerThreadChat, MessengerThreadChatGroup } from '../../../../../api'; -import { Base, Flex, LayoutAvatarImageView } from '../../../../../common'; +import { FollowFriendMessageComposer } from "@nitrots/nitro-renderer" +import { FC, useMemo } from "react" +import { GetGroupChatData, GetSessionDataManager, LocalizeText, MessengerGroupType, MessengerThread, MessengerThreadChat, MessengerThreadChatGroup, SendMessageComposer } from "../../../../../api" +import { Button, LayoutAvatarImageView } from "../../../../../common" export const FriendsMessengerThreadGroup: FC<{ thread: MessengerThread, group: MessengerThreadChatGroup }> = props => { - const { thread = null, group = null } = props; + const { thread = null, group = null } = props - const groupChatData = useMemo(() => ((group.type === MessengerGroupType.GROUP_CHAT) && GetGroupChatData(group.chats[0].extraData)), [ group ]); + const groupChatData = useMemo(() => ((group.type === MessengerGroupType.GROUP_CHAT) && GetGroupChatData(group.chats[0].extraData)), [ group ]) const isOwnChat = useMemo(() => { - if(!thread || !group) return false; + if(!thread || !group) return false - if((group.type === MessengerGroupType.PRIVATE_CHAT) && (group.userId === GetSessionDataManager().userId)) return true; + if((group.type === MessengerGroupType.PRIVATE_CHAT) && (group.userId === GetSessionDataManager().userId)) return true - if(groupChatData && group.chats.length && (groupChatData.userId === GetSessionDataManager().userId)) return true; + if(groupChatData && group.chats.length && (groupChatData.userId === GetSessionDataManager().userId)) return true - return false; - }, [ thread, group, groupChatData ]); + return false + }, [ thread, group, groupChatData ]) - if(!thread || !group) return null; + if(!thread || !group) return null - if(!group.userId) - { - return ( - <> - { group.chats.map((chat, index) => - { - return ( - - - { (chat.type === MessengerThreadChat.SECURITY_NOTIFICATION) && - - - { chat.message } - } - { (chat.type === MessengerThreadChat.ROOM_INVITE) && - - - { (LocalizeText('messenger.invitation') + ' ') }{ chat.message } - } - - - ); - }) } - - ); - } + if(!group.userId) return ( + <> + { group.chats.map((chat, index) => ( +
+ { (chat.type === MessengerThreadChat.SECURITY_NOTIFICATION) && +
+ +

{ chat.message }

+
} + { (chat.type === MessengerThreadChat.ROOM_INVITE) && +
+ +
+

{ (LocalizeText("messenger.invitation")) }

+

{ chat.message }

+ +
+
} +
+ ))} + + ) return ( - - - { ((group.type === MessengerGroupType.PRIVATE_CHAT) && !isOwnChat) && - } - { (groupChatData && !isOwnChat) && - } - - - +
+ { isOwnChat && } +
+

{ isOwnChat && GetSessionDataManager().userName } { !isOwnChat && (groupChatData ? groupChatData.username : thread.participant.name) } - - { group.chats.map((chat, index) => { chat.message }) } - - { isOwnChat && - - - } - - ); +

+
+ { group.chats.map((chat, index) =>

{ chat.message }

) } +
+
+ { ((group.type === MessengerGroupType.PRIVATE_CHAT) && !isOwnChat) && + } + { (groupChatData && !isOwnChat) && + } +
+ ) } diff --git a/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadView.tsx b/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadView.tsx index 962a66822..e30f69914 100644 --- a/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadView.tsx +++ b/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadView.tsx @@ -1,16 +1,16 @@ -import { FC } from 'react'; -import { MessengerThread } from '../../../../../api'; -import { FriendsMessengerThreadGroup } from './FriendsMessengerThreadGroup'; +import { FC } from "react" +import { MessengerThread } from "../../../../../api" +import { FriendsMessengerThreadGroup } from "./FriendsMessengerThreadGroup" export const FriendsMessengerThreadView: FC<{ thread: MessengerThread }> = props => { - const { thread = null } = props; + const { thread = null } = props - thread.setRead(); + thread.setRead() return ( <> { (thread.groups.length > 0) && thread.groups.map((group, index) => ) } - ); + ) } diff --git a/src/components/game-center/GameCenterView.scss b/src/components/game-center/GameCenterView.scss deleted file mode 100644 index 246278d8c..000000000 --- a/src/components/game-center/GameCenterView.scss +++ /dev/null @@ -1,44 +0,0 @@ -.game-center-stage { - width: 100%; - height: calc(100% - 55px); - background-color: black; - position: absolute; - inset: 0; -} -.game-center-main { - width: 1280px; - height: calc(100% - 55px); - background: #93d4f3; - - .game-view { - background-position: bottom center; - background-repeat: no-repeat; - - > div { - color: inherit; - } - } - - .gameList-container { - min-height: 107px; - - .game-icon { - width: 83px; - height: 83px; - background-position: center; - background-repeat: no-repeat; - - &.selected { - position: relative; - &::after { - content: ''; - background-image: url('@/assets/images/gamecenter/selectedIcon.png'); - width: 83px; - height: 83px; - position: absolute; - inset: 0; - } - } - } - } -} diff --git a/src/components/game-center/GameCenterView.tsx b/src/components/game-center/GameCenterView.tsx index f0955ae68..c99ab26b5 100644 --- a/src/components/game-center/GameCenterView.tsx +++ b/src/components/game-center/GameCenterView.tsx @@ -1,50 +1,53 @@ -import { ILinkEventTracker } from '@nitrots/nitro-renderer'; -import { useEffect } from 'react'; -import { AddEventLinkTracker, RemoveLinkEventTracker } from '../../api'; -import { Flex } from '../../common'; -import { useGameCenter } from '../../hooks'; -import { GameListView } from './views/GameListView'; -import { GameStageView } from './views/GameStageView'; -import { GameView } from './views/GameView'; +import { ILinkEventTracker } from "@nitrots/nitro-renderer" +import { useEffect, useState } from "react" +import { AddEventLinkTracker, RemoveLinkEventTracker, VisitDesktop } from "../../api" +import { useGameCenter } from "../../hooks" +import { GameListView } from "./views/GameListView" +import { GameStageView } from "./views/GameStageView" +import { GameView } from "./views/GameView" export const GameCenterView = () => { - const{ isVisible, setIsVisible, games, accountStatus } = useGameCenter(); + const{ isVisible, setIsVisible, games, accountStatus } = useGameCenter() + const [ blackScreen, setBlackScreen ] = useState(false) useEffect(() => { - const toggleGameCenter = () => - { - setIsVisible(prev => !prev); - } const linkTracker: ILinkEventTracker = { linkReceived: (url: string) => { - const value = url.split('/'); + const value = url.split("/") switch(value[1]) { - case 'toggle': - toggleGameCenter(); - break; + case "show": + setBlackScreen(true) + VisitDesktop() + setTimeout(() => { + setIsVisible(true) + }, 250) + return + case "hide": + setIsVisible(false) + return } }, - eventUrlPrefix: 'games/' - }; + eventUrlPrefix: "games/" + } - AddEventLinkTracker(linkTracker); + AddEventLinkTracker(linkTracker) - return () => RemoveLinkEventTracker(linkTracker); - }, [ ]); + return () => RemoveLinkEventTracker(linkTracker) + }, [ ]) - if(!isVisible || !games || !accountStatus) return; + if(!isVisible || !games || !accountStatus) return - return - + return
+
- +
- +
} diff --git a/src/components/game-center/views/GameListView.tsx b/src/components/game-center/views/GameListView.tsx index 1211bc758..44a130ee4 100644 --- a/src/components/game-center/views/GameListView.tsx +++ b/src/components/game-center/views/GameListView.tsx @@ -1,32 +1,34 @@ -import { GameConfigurationData } from '@nitrots/nitro-renderer'; -import { LocalizeText } from '../../../api'; -import { Base, Flex } from '../../../common'; -import { useGameCenter } from '../../../hooks'; +import { LocalizeText } from "../../../api" +import { useGameCenter } from "../../../hooks" export const GameListView = () => { - const { games,selectedGame, setSelectedGame } = useGameCenter(); + const { games,selectedGame, setSelectedGame } = useGameCenter() - const getClasses = (game: GameConfigurationData) => + const getClasses = (game: any) => { - let classes = [ 'game-icon' ]; + let classes = [ "flex items-center justify-center size-[83px] bg-[url('/client-assets/images/gamecenter/game-item-bg.png')] bg-center bg-no-repeat cursor-pointer" ] - if(selectedGame === game) classes.push('selected'); + if(selectedGame === game) classes.push("bg-[url('/client-assets/images/gamecenter/game-item-selected-bg.png')]") - return classes.join(' '); + return classes.join(" ") } - const getIconImage = (game: GameConfigurationData): string => + const getIconImage = (game: any): string => { - return `url(${ game.assetUrl }${ game.gameNameId }_icon.png)` + return `url(${game.assetUrl }game_icon.png)` } - return - { LocalizeText('gamecenter.game_list_title') } - - { games && games.map((game,index) => - setSelectedGame(game) } style={ { backgroundImage: getIconImage(game) } }/> - ) } - - + return
+
+

{ LocalizeText("gamecenter.game_list_title") }

+
+ { games && games.map((game: any, index: number) => +
setSelectedGame(game) }> +
+
+ ) } +
+
+
} diff --git a/src/components/game-center/views/GameStageView.tsx b/src/components/game-center/views/GameStageView.tsx index 0a26fea46..ec4bb05a0 100644 --- a/src/components/game-center/views/GameStageView.tsx +++ b/src/components/game-center/views/GameStageView.tsx @@ -1,47 +1,47 @@ -import { Game2ExitGameMessageComposer } from '@nitrots/nitro-renderer'; -import { useEffect, useRef, useState } from 'react'; -import { SendMessageComposer } from '../../../api'; -import { Base } from '../../../common'; -import { useGameCenter } from '../../../hooks'; +import { Game2ExitGameMessageComposer } from "@nitrots/nitro-renderer" +import { useEffect, useRef, useState } from "react" +import { SendMessageComposer } from "../../../api" +import { Base } from "../../../common" +import { useGameCenter } from "../../../hooks" export const GameStageView = () => { - const { gameURL,setGameURL } = useGameCenter(); - const [ loadTimes, setLoadTimes ] = useState(0); - const ref = useRef(); + const { gameURL,setGameURL } = useGameCenter() + const [ loadTimes, setLoadTimes ] = useState(0) + const ref = useRef() useEffect(()=> { - if(!ref || ref && !ref.current) return; + if(!ref || ref && !ref.current) return - setLoadTimes(0); + setLoadTimes(0) - let frame: HTMLIFrameElement = document.createElement('iframe'); + let frame: HTMLIFrameElement = document.createElement("iframe") - frame.src = gameURL; - frame.classList.add('game-center-stage'); - frame.classList.add('h-100'); + frame.src = gameURL + frame.classList.add("game-center-stage") + frame.classList.add("h-100") frame.onload = () => { setLoadTimes(prev => prev += 1) } - ref.current.innerHTML = ''; - ref.current.appendChild(frame); + ref.current.innerHTML = "" + ref.current.appendChild(frame) - },[ ref, gameURL ]); + },[ ref, gameURL ]) useEffect(()=> { if(loadTimes > 1) { - setGameURL(null); - SendMessageComposer(new Game2ExitGameMessageComposer()); + setGameURL(null) + SendMessageComposer(new Game2ExitGameMessageComposer()) } },[ loadTimes,setGameURL ]) - if(!gameURL) return null; + if(!gameURL) return null return } diff --git a/src/components/game-center/views/GameView.tsx b/src/components/game-center/views/GameView.tsx index a9d641f7b..f98fdc218 100644 --- a/src/components/game-center/views/GameView.tsx +++ b/src/components/game-center/views/GameView.tsx @@ -1,58 +1,133 @@ -import { Game2GetAccountGameStatusMessageComposer, GetGameStatusMessageComposer, JoinQueueMessageComposer } from '@nitrots/nitro-renderer'; -import { useEffect } from 'react'; -import { ColorUtils, LocalizeText, SendMessageComposer } from '../../../api'; -import { Base, Button, Flex, LayoutItemCountView, Text } from '../../../common'; -import { useGameCenter } from '../../../hooks'; +import { Game2GetAccountGameStatusMessageComposer, GetGameStatusMessageComposer } from "@nitrots/nitro-renderer" +import { useEffect, useRef, useState } from "react" +import { GetSessionDataManager, LocalizeText, SendMessageComposer } from "../../../api" +import { Button, NitroBigCardContentView, NitroBigCardHeaderView, NitroBigCardView } from "../../../common" +import { LayoutTimesView } from "../../../common/layout/LayoutTimesView" +import { useGameCenter } from "../../../hooks" export const GameView = () => { - const { selectedGame, accountStatus } = useGameCenter(); - - useEffect(()=> - { - if(selectedGame) - { - SendMessageComposer(new GetGameStatusMessageComposer(selectedGame.gameId)); - SendMessageComposer(new Game2GetAccountGameStatusMessageComposer(selectedGame.gameId)); - } - },[ selectedGame ]) + const { selectedGame, accountStatus } = useGameCenter() + const [ isGameLoading, setIsGameLoading ] = useState(false) + const [ iframeSrc, setIframeSrc ] = useState(null) + const basejumpRef = useRef(null) const getBgColour = (): string => { - return ColorUtils.uintHexColor(selectedGame.bgColor) + return selectedGame.bgColor } const getBgImage = (): string => { - return `url(${ selectedGame.assetUrl }${ selectedGame.gameNameId }_theme.png)` + return `url(${ selectedGame.assetUrl }game_theme_bg.png)` + } + + const getBgLeftImage = (): string => + { + return `url(${ selectedGame.assetUrl }game_theme_left.png)` } - const getColor = () => + const getBgRightImage = (): string => { - return ColorUtils.uintHexColor(selectedGame.textColor); + return `url(${ selectedGame.assetUrl }game_theme_right.png)` } - const onPlay = () => + const onPlay = async (gameNameId: string) => { - SendMessageComposer(new JoinQueueMessageComposer(selectedGame.gameId)); + setIsGameLoading(true) + + if (gameNameId === "basejump") { + const fetchData = async () => { + const fastFoodData = { + "api-key": selectedGame.apiKey, + "user-id": GetSessionDataManager().userId.toString(), + "user-name": GetSessionDataManager().userName, + "user-avatar": GetSessionDataManager().figure, + "theme": selectedGame.theme + } + + const formData = new URLSearchParams(fastFoodData).toString() + + try { + const response = await fetch("https://api.thefastfoodgame.com/api", { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: formData + }) + + if (!response.ok) { + throw new Error("Network response was not ok") + } + + const serverOutput = await response.json() + + setIframeSrc(serverOutput.url) + } catch (error) { + alert(`There was a problem with the fetch operation: ${error}`) + } finally { + setIsGameLoading(false) + } + } + + fetchData() + } + //SendMessageComposer(new JoinQueueMessageComposer(selectedGame.gameId)) } - return - - { LocalizeText(`gamecenter.${ selectedGame.gameNameId }.description_title`) } - - { (accountStatus.hasUnlimitedGames || accountStatus.freeGamesLeft > 0) && <> - - } - { LocalizeText(`gamecenter.${ selectedGame.gameNameId }.description_content`) } - - - - - - + useEffect(()=> + { + if(selectedGame) + { + SendMessageComposer(new GetGameStatusMessageComposer(selectedGame.gameId)) + SendMessageComposer(new Game2GetAccountGameStatusMessageComposer(selectedGame.gameId)) + } + },[ selectedGame ]) + + return <> +
+
+
+
+

{ LocalizeText(`gamecenter.${ selectedGame.gameNameId }.description_title`) }

+ + { (accountStatus.hasUnlimitedGames || accountStatus.freeGamesLeft > 0) && <> + + } +

{ LocalizeText(`gamecenter.${ selectedGame.gameNameId }.description_content`) }

+
+
+
+
+
+
+ { isGameLoading && <> + + + +
+ setIsGameLoading(false) } /> +
+ + +
+
+ } + { iframeSrc && +
+