diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..13dabfb --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = tab +indent_size = 2 +insert_final_newline = false +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..050d8b8 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +GOOGLE_SHEET_ID=IS_FOUND_IN_URL_THAT_WAS_SHARED_TO_APP_EMAIL \ No newline at end of file diff --git a/.gcloudignore b/.gcloudignore new file mode 100644 index 0000000..4d7d693 --- /dev/null +++ b/.gcloudignore @@ -0,0 +1,17 @@ +# This file specifies files that are *not* uploaded to Google Cloud +# using gcloud. It follows the same syntax as .gitignore, with the addition of +# "#!include" directives (which insert the entries of the given .gitignore-style +# file at that point). +# +# For more information, run: +# $ gcloud topic gcloudignore +# +.gcloudignore +# If you would like to upload your .git directory, .gitignore file or files +# from your .gitignore file, remove the corresponding line +# below: +.git +.gitignore + +# Node.js dependencies: +node_modules/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6704566..f496db8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ +package-lock-old.json +public/tt-usernames.json + +#Google Spreadsheet API Key File +keys.json + # Logs logs *.log @@ -102,3 +108,13 @@ dist # TernJS port file .tern-port +/public/tt-usernames.json +/tt-usernames.js +/public/config.json +public/config.json +**/config.json +.vscode/TikTok-Chat-Reader.code-workspace + +/public/test.html +toDoData.json +/public/config.json diff --git a/.idx/dev.nix b/.idx/dev.nix new file mode 100644 index 0000000..5036d51 --- /dev/null +++ b/.idx/dev.nix @@ -0,0 +1,54 @@ +# To learn more about how to use Nix to configure your environment +# see: https://developers.google.com/idx/guides/customize-idx-env +{ pkgs, ... }: { + # Which nixpkgs channel to use. + channel = "stable-23.11"; # or "unstable" + + # Use https://search.nixos.org/packages to find packages + packages = [ + # pkgs.go + # pkgs.python311 + # pkgs.python311Packages.pip + pkgs.nodejs_20 + # pkgs.nodePackages.nodemon + ]; + + # Sets environment variables in the workspace + env = {}; + idx = { + # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" + extensions = [ + # "vscodevim.vim" + ]; + + # Enable previews + previews = { + enable = true; + previews = { + web = { + # Example: run "npm run dev" with PORT set to IDX's defined port for previews, + # and show it in IDX's web preview panel + command = ["node" "server.js"]; + manager = "web"; + env = { + # Environment variables to set for your server + PORT = "$PORT"; + }; + }; + }; + }; + + # Workspace lifecycle hooks + workspace = { + # Runs when a workspace is first created + onCreate = { + npm-install = "npm install"; + }; + # Runs when the workspace is (re)started + onStart = { + # Example: start a background task to watch and re-build backend code + # watch-backend = "npm run watch-backend"; + }; + }; + }; +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..bdb89d5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "isGitignoreExtActive": true, + "IDX.aI.enableInlineCompletion": true, + "IDX.aI.enableCodebaseIndexing": true, + "terminal.integrated.hideOnStartup": "always", + "workbench.editor.restoreViewState": false, + "explorer.autoReveal": false, + "security.workspace.trust.startupPrompt": "never", +} diff --git a/README.md b/README.md index 4938ed3..060923d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,28 @@ # TikTok-Chat-Reader A chat reader for TikTok LIVE utilizing TikTok-Live-Connector and Socket.IO to forward the data to the client. This demo project uses the unofficial TikTok API to retrieve chat comments, gifts and other events from TikTok LIVE. -## Demo: https://tiktok-chat-reader.zerody.one/ + +# Easy Installation, no host needed! +> [!TIP] +> I recently found out about [IDX.Google.com](https://idx.google.com) which can host this package for free, for personal usage. + +1. Fork this repo to your account. +2. Go to [IDX.Google.com](https://idx.google.com) - You'll probably have to sign in or connect your github account. +3. Open your forked project within the IDX Editor +4. It will auto launch the on the side like VSCode's built in previewer. + +--- + +## Original Demo: https://tiktok-chat-reader.zerody.one/ +^ That demo does not have the changes I've made. Please use the solution above using [idx.google.com](idx.google.com) to see this repo's capabilities. ## Installation To run the chat reader locally, follow these steps: 1. Install [Node.js](https://nodejs.org/) on your system -2. Clone this repository or download and extract [this ZIP file](https://github.com/zerodytrash/TikTok-Chat-Reader/archive/refs/heads/main.zip) +2. Clone this repository or download and extract [this ZIP file](https://github.com/Yohn/TikTok-Chat-Reader/archive/refs/heads/old.zip) 3. Open a console/terminal in the root directory of the project -4. Enter `npm i` to install all required dependencies +4. Enter `npm i` to install all required dependencies 5. Enter `node server.js` to start the application server Now you should see the following message: `Server running! Please visit http://localhost:8091`
@@ -18,6 +31,37 @@ Simply open http://localhost:8091/ in your browser. Thats it. If you have problems with Node.js, you can also just open the `index.html` from the `public` folder.
This will use the server backend of the [demo site](https://tiktok-chat-reader.zerody.one/), which is sufficient for testing purposes. If you want to offer it to others or make many connections at the same time, please consider using your own server. +> [!NOTE] +> I recently found out about [IDX.Google.com](https://idx.google.com) and you're able to fork this repo then open this repo within Google's IDX editor and see this working on the side without needing to download, and without the need for a host, for personal usage. + +## Yohn's Updates + - Separated everything away from the chat + - Likes (number is not correct + - New followers + - Shares + - When users under gifter level 25 join + - TTS - Text to Speech for comments (can be disabled) + - Different sounds for gifts (can be disabled) + - Best way to add / edit sounds is to add them to the config file + - A way to save gifts sent in live to a google spreadsheet. + - Will need to research yourself to add the `keys.json` file and to update your `.env` file + - [Medium post might be helpful](https://medium.com/@shkim04/beginner-guide-on-google-sheet-api-for-node-js-4c0b533b071a) might help + - Gifter badges + - Team Member badges + - Subscriber icon + - Moderator icon + - Battle scores, even for 2v2 + - Sometimes the battle scores come back to the wrong hosts. This is because of how its received from the [TikTok-Live-Connector](https://github.com/zerodytrash/TikTok-Live-Connector) + - Battle timer + - Sometimes the times off by a second, possibly more if the time booster was used + - If the gift is sent to someone in the guest boxes it will note that in the box area + - If the receiver was not tapping, commenting or sending gifts since connecting the receiver will be blank. + - Names entered to connect to the persons live are saved within the config file (works automatically) + - Notes can be saved into the config file, or within the cog menu + - Host info + - Top 3 gifters before connecting to the live + ## Screenshot -![TikTok LIVE Chat Reader (Demo)](https://user-images.githubusercontent.com/59258980/153956504-c585b14b-a50e-43f0-a994-64adcaface2e.png) +![Screenshot 1](https://github.com/Yohn/TikTok-Chat-Reader/assets/2002591/7584c463-8000-4e9e-b923-2e0c48106b18) +![image](https://github.com/Yohn/TikTok-Chat-Reader/assets/2002591/09805565-de42-42be-8600-09d80aaf3c5b) diff --git a/app.yaml b/app.yaml new file mode 100644 index 0000000..ee5a3fc --- /dev/null +++ b/app.yaml @@ -0,0 +1,2 @@ +runtime: nodejs18 +service: default \ No newline at end of file diff --git a/keys.example.json b/keys.example.json new file mode 100644 index 0000000..2c7151e --- /dev/null +++ b/keys.example.json @@ -0,0 +1,13 @@ +{ + "type": "service_account", + "project_id": "appname", + "private_key_id": "some md5 or sha string", + "private_key": "-----BEGIN PRIVATE KEY-----\nA REALLY LONG STRING==\n-----END PRIVATE KEY-----\n", + "client_email": "appname@appname.iam.gserviceaccount.com", + "client_id": "1234", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x123/appname%40appname.gserviceaccount.com", + "universe_domain": "googleapis.com" +} diff --git a/package-lock.json b/package-lock.json index 6196393..6dc774d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,23 @@ { - "name": "TikTok-Chat-Reader", - "lockfileVersion": 2, + "name": "yohns-tiktok-upgrade", + "version": "0.8.1", + "lockfileVersion": 3, "requires": true, "packages": { "": { + "name": "yohns-tiktok-upgrade", + "version": "0.8.1", + "license": "MIT", "dependencies": { - "dotenv": "^16.0.0", - "express": "^4.17.2", - "socket.io": "^4.4.1", - "tiktok-live-connector": "^1.0.0" + "dotenv": "^16.3.1", + "edit-json-file": "^1.8.0", + "express": "^4.18.2", + "googleapis": "^74.1.0", + "socket.io": "^4.7.2", + "tiktok-live-connector": "^1.2.3" + }, + "engines": { + "node": ">=20.13.1" } }, "node_modules/@protobufjs/aspromise": { @@ -66,19 +75,17 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" - }, - "node_modules/@types/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", + "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==" }, "node_modules/@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", + "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/long": { "version": "4.0.2", @@ -86,9 +93,23 @@ "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, "node_modules/@types/node": { - "version": "18.7.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.15.tgz", - "integrity": "sha512-XnjpaI8Bgc3eBag2Aw4t2Uj/49lLBSStHWfqKvIuXD7FIrZyMLWp8KuAFHAqxMZYTF9l08N1ctUn9YNybZJVmQ==" + "version": "22.13.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", + "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } }, "node_modules/accepts": { "version": "1.3.8", @@ -102,11 +123,51 @@ "node": ">= 0.6" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/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==" + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "engines": { + "node": ">=8" + } + }, "node_modules/axios": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", @@ -115,6 +176,25 @@ "follow-redirects": "^1.14.7" } }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", @@ -123,21 +203,29 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "engines": { + "node": "*" + } + }, "node_modules/body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.10.3", - "raw-body": "2.5.1", + "qs": "6.13.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -146,10 +234,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.9.tgz", + "integrity": "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -166,13 +259,28 @@ "node": ">= 0.8" } }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -190,17 +298,17 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "engines": { "node": ">= 0.6" } @@ -223,12 +331,15 @@ } }, "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/debug": { @@ -257,11 +368,47 @@ } }, "node_modules/dotenv": { - "version": "16.0.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.2.tgz", - "integrity": "sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/edit-json-file": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/edit-json-file/-/edit-json-file-1.8.0.tgz", + "integrity": "sha512-IBOpbe2aQufNl5oZ4jsr2AmNVUy5bO7jS5hk0cCyWhOLdH59Xv41B3XQObE/JB89Ae5qDY9hVsq13/hgGhFBZg==", + "dependencies": { + "find-value": "^1.0.12", + "iterate-object": "^1.3.4", + "r-json": "^1.2.10", + "set-value": "^4.1.0", + "w-json": "^1.3.10" } }, "node_modules/ee-first": { @@ -270,55 +417,54 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "engines": { "node": ">= 0.8" } }, "node_modules/engine.io": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", - "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz", + "integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==", "dependencies": { - "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", - "cookie": "~0.4.1", + "cookie": "~0.7.2", "cors": "~2.8.5", "debug": "~4.3.1", - "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "engine.io-parser": "~5.2.1", + "ws": "~8.17.1" }, "engines": { - "node": ">=10.0.0" + "node": ">=10.2.0" } }, "node_modules/engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", "engines": { "node": ">=10.0.0" } }, "node_modules/engine.io/node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "engines": { "node": ">= 0.6" } }, "node_modules/engine.io/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -330,18 +476,46 @@ } }, "node_modules/engine.io/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==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "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-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -359,12 +533,15 @@ } }, "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" + "d": "^1.0.2", + "ext": "^1.7.0" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/escape-html": { @@ -372,6 +549,20 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -380,37 +571,54 @@ "node": ">= 0.6" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.0", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.10.3", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -419,6 +627,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/ext": { @@ -429,18 +641,23 @@ "type": "^2.7.2" } }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -451,10 +668,15 @@ "node": ">= 0.8" } }, + "node_modules/find-value": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/find-value/-/find-value-1.0.12.tgz", + "integrity": "sha512-OCpo8LTk8eZ2sdDCwbU2Lc3ivYsdM6yod6jP2jHcNEFcjPhkgH0+POzTIol7xx1LZgtbI5rkO5jqxsG5MWtPjQ==" + }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", @@ -487,38 +709,165 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "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/gaxios": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.3.3.tgz", + "integrity": "sha512-gSaYYIO1Y3wUtdfHmjDUZ8LWaxJQpiavzbF5Kq53akSzvmVg0RfyOcFDbO1KJ/KCGRFz2qG+lS81F0nkr7cRJA==", + "dependencies": { + "abort-controller": "^3.0.0", + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/gcp-metadata": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.3.1.tgz", + "integrity": "sha512-x850LS5N7V1F3UcV7PoupzGsyD6iVwTVvsh3tbXfkctZnBnjW5yu5z1/3k3SehF7TyoTIe78rJs02GMMy+LF+A==", + "dependencies": { + "gaxios": "^4.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=10" + } }, "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "dependencies": { - "function-bind": "^1.1.1" + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" }, "engines": { - "node": ">= 0.4.0" + "node": ">= 0.4" + } + }, + "node_modules/google-auth-library": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.14.1.tgz", + "integrity": "sha512-5Rk7iLNDFhFeBYc3s8l1CqzbEBcdhwR193RlD4vSNFajIcINKI8W8P0JLmBpwymHqqWbX34pJDQu39cSy/6RsA==", + "dependencies": { + "arrify": "^2.0.0", + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "fast-text-encoding": "^1.0.0", + "gaxios": "^4.0.0", + "gcp-metadata": "^4.2.0", + "gtoken": "^5.0.4", + "jws": "^4.0.0", + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/google-p12-pem": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.1.4.tgz", + "integrity": "sha512-HHuHmkLgwjdmVRngf5+gSmpkyaRI6QmOg77J8tkNBHhNEI62sGHyw4/+UkgyZEI7h84NbWprXDJ+sa3xOYFvTg==", + "deprecated": "Package is no longer maintained", + "dependencies": { + "node-forge": "^1.3.1" + }, + "bin": { + "gp12-pem": "build/src/bin/gp12-pem.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/googleapis": { + "version": "74.2.0", + "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-74.2.0.tgz", + "integrity": "sha512-AF8RwmTbz8GGIza9LViokOUAsrEkB6gKwvIGXbgWEWzZO1+DRsbKSstHotDgUA4zdXhVtGkOW7uqNs/wz4rYNA==", + "dependencies": { + "google-auth-library": "^7.0.2", + "googleapis-common": "^5.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/googleapis-common": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-5.1.0.tgz", + "integrity": "sha512-RXrif+Gzhq1QAzfjxulbGvAY3FPj8zq/CYcvgjzDbaBNCD6bUl+86I7mUs4DKWHGruuK26ijjR/eDpWIDgNROA==", + "dependencies": { + "extend": "^3.0.2", + "gaxios": "^4.0.0", + "google-auth-library": "^7.14.0", + "qs": "^6.7.0", + "url-template": "^2.0.8", + "uuid": "^8.0.0" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gtoken": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.3.2.tgz", + "integrity": "sha512-gkvEKREW7dXWF8NV8pVrKfW7WqReAmjjkMBh6lNCCGOM4ucS0r0YyXXl0r/9Yj8wcW/32ISkfc8h5mPTDbtifQ==", + "dependencies": { + "gaxios": "^4.0.0", + "google-p12-pem": "^3.1.3", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "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==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "engines": { "node": ">= 0.4" }, @@ -526,6 +875,17 @@ "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/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -541,6 +901,39 @@ "node": ">= 0.8" } }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/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==" + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -565,28 +958,120 @@ "node": ">= 0.10" } }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-primitive": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-3.0.1.tgz", + "integrity": "sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "engines": { - "node": ">= 0.6" + "node": ">=0.10.0" + } + }, + "node_modules/iterate-object": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/iterate-object/-/iterate-object-1.3.4.tgz", + "integrity": "sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw==" + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "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==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/methods": { "version": "1.1.2", @@ -644,10 +1129,37 @@ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "engines": { + "node": ">= 6.13.0" + } + }, "node_modules/node-gyp-build": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", - "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -663,9 +1175,12 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -690,14 +1205,14 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, "node_modules/protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -732,11 +1247,11 @@ } }, "node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -745,6 +1260,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/r-json": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/r-json/-/r-json-1.3.0.tgz", + "integrity": "sha512-xesd+RHCpymPCYd9DvDvUr1w1IieSChkqYF1EpuAYrvCfLXji9NP36DvyYZJZZB5soVDvZ0WUtBoZaU1g5Yt9A==", + "dependencies": { + "w-json": "1.3.10" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -754,9 +1277,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -792,9 +1315,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -814,68 +1337,174 @@ "node": ">= 0.8.0" } }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/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==" }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/set-value": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-4.1.0.tgz", + "integrity": "sha512-zTEg4HL0RwVrqcWs3ztF+x1vkxfm0lP+MQQFPiMJTKVceBwEV0A569Ou8l9IYQG8jOZdMVI1hGsc0tmeD2o/Lw==", + "funding": [ + "https://github.com/sponsors/jonschlinkert", + "https://paypal.me/jonathanschlinkert", + "https://jonschlinkert.dev/sponsor" + ], + "dependencies": { + "is-plain-object": "^2.0.4", + "is-primitive": "^3.0.1" + }, + "engines": { + "node": ">=11.0" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "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==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/socket.io": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", - "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", + "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", + "cors": "~2.8.5", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.6.0", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.4" }, "engines": { - "node": ">=10.0.0" + "node": ">=10.2.0" } }, "node_modules/socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==" + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", + "dependencies": { + "debug": "~4.3.4", + "ws": "~8.17.1" + } + }, + "node_modules/socket.io-adapter/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socket.io-adapter/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==" }, "node_modules/socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" @@ -885,11 +1514,11 @@ } }, "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -901,16 +1530,16 @@ } }, "node_modules/socket.io-parser/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==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/socket.io/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -922,9 +1551,9 @@ } }, "node_modules/socket.io/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==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/statuses": { "version": "2.0.1", @@ -935,9 +1564,9 @@ } }, "node_modules/tiktok-live-connector": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tiktok-live-connector/-/tiktok-live-connector-1.0.0.tgz", - "integrity": "sha512-L2r8ZWqrmaRtsQ1zZsli0C7Ny7+fHMKtDV0kdnLQ9advB6tyEi+AIQrMIuObnPqYwl6YkP+JkmOKIBQ4z0hYAQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/tiktok-live-connector/-/tiktok-live-connector-1.2.3.tgz", + "integrity": "sha512-8zsJ2ZKRnDHJoNVoCsyRXWuQHHVcNF95hvxhrxdzjzLmJxxBunLrNptfnYzCIfSWl4qYtYBOp7Vf4cnD6GXc2g==", "funding": [ { "type": "Ko-fi", @@ -965,10 +1594,15 @@ "node": ">=0.6" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==" }, "node_modules/type-is": { "version": "1.6.18", @@ -990,6 +1624,11 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -998,10 +1637,15 @@ "node": ">= 0.8" } }, + "node_modules/url-template": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", + "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==" + }, "node_modules/utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -1018,6 +1662,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -1026,14 +1678,24 @@ "node": ">= 0.8" } }, + "node_modules/w-json": { + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/w-json/-/w-json-1.3.10.tgz", + "integrity": "sha512-XadVyw0xE+oZ5FGApXsdswv96rOhStzKqL53uSe5UaTadABGkWIg1+DTx8kiZ/VqTZTBneoL0l65RcPe4W3ecw==" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, "node_modules/websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.35.tgz", + "integrity": "sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q==", "dependencies": { "bufferutil": "^4.0.1", "debug": "^2.2.0", - "es5-ext": "^0.10.50", + "es5-ext": "^0.10.63", "typedarray-to-buffer": "^3.1.5", "utf-8-validate": "^5.0.2", "yaeti": "^0.0.6" @@ -1042,16 +1704,25 @@ "node": ">=4.0.0" } }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -1069,803 +1740,11 @@ "engines": { "node": ">=0.10.32" } - } - }, - "dependencies": { - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" - }, - "@types/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==" - }, - "@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" - }, - "@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, - "@types/node": { - "version": "18.7.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.15.tgz", - "integrity": "sha512-XnjpaI8Bgc3eBag2Aw4t2Uj/49lLBSStHWfqKvIuXD7FIrZyMLWp8KuAFHAqxMZYTF9l08N1ctUn9YNybZJVmQ==" - }, - "accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "requires": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, - "axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "requires": { - "follow-redirects": "^1.14.7" - } - }, - "base64id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", - "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==" - }, - "body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", - "requires": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.10.3", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - } - }, - "bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "requires": { - "safe-buffer": "5.2.1" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, - "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" - }, - "dotenv": { - "version": "16.0.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.2.tgz", - "integrity": "sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA==" - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" - }, - "engine.io": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", - "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", - "requires": { - "@types/cookie": "^0.4.1", - "@types/cors": "^2.8.12", - "@types/node": ">=10.0.0", - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.4.1", - "cors": "~2.8.5", - "debug": "~4.3.1", - "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" - }, - "dependencies": { - "cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==" - }, - "es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "requires": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" - }, - "express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", - "requires": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.0", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.10.3", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "requires": { - "type": "^2.7.2" - }, - "dependencies": { - "type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - } - } - }, - "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - } - }, - "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" - }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "long": { + "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" - }, - "next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - }, - "node-gyp-build": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", - "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==" - }, - "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==" - }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" - }, - "on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "requires": { - "ee-first": "1.1.1" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, - "protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - } - }, - "proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - } - }, - "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "requires": { - "side-channel": "^1.0.4" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "requires": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "requires": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "dependencies": { - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - } - } - }, - "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - } - }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "socket.io": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", - "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", - "requires": { - "accepts": "~1.3.4", - "base64id": "~2.0.0", - "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==" - }, - "socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", - "requires": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" - }, - "tiktok-live-connector": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tiktok-live-connector/-/tiktok-live-connector-1.0.0.tgz", - "integrity": "sha512-L2r8ZWqrmaRtsQ1zZsli0C7Ny7+fHMKtDV0kdnLQ9advB6tyEi+AIQrMIuObnPqYwl6YkP+JkmOKIBQ4z0hYAQ==", - "requires": { - "axios": "^0.25.0", - "protobufjs": "^6.11.2", - "websocket": "^1.0.34" - } - }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" - }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" - }, - "utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" - }, - "websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "requires": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - } - }, - "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", - "requires": {} - }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } } diff --git a/package.json b/package.json index 4d5e048..f3d0c52 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,24 @@ { + "name": "yohns-tiktok-upgrade", + "homepage": "https://github.com/Yohn/TikTok-Chat-Reader", + "version": "0.8.1", + "license": "MIT", + "description": "View TikTok live without actually being there, using zerodytrash's TikTok Live Connector", + "scripts": { + "start": "node server.js" + }, + "engines": { + "node": ">=20.13.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/Yohn/TikTok-Chat-Reader.git" + }, "dependencies": { - "dotenv": "^16.0.0", - "express": "^4.17.2", - "socket.io": "^4.4.1", - "tiktok-live-connector": "^1.0.5" - } -} + "dotenv": "^16.3.1", + "edit-json-file": "^1.8.0", + "express": "^4.18.2", + "googleapis": "^74.1.0", + "socket.io": "^4.7.2", + "tiktok-live-connector": "^1.2.3" + }} diff --git a/public/app.js b/public/app.js index ee026ba..f00c956 100644 --- a/public/app.js +++ b/public/app.js @@ -1,225 +1,760 @@ + // This will use the demo backend if you open index.html locally via file://, otherwise your server will be used let backendUrl = location.protocol === 'file:' ? "https://tiktok-chat-reader.zerody.one/" : undefined; let connection = new TikTokIOConnection(backendUrl); - +let socket = io(); +// (A) LOAD FILE SYSTEM MODU // Counter let viewerCount = 0; let likeCount = 0; -let diamondsCount = 0; - -// These settings are defined by obs.html -if (!window.settings) window.settings = {}; +let diamondsCount = 0; let usernames = {}; +let userIds = {}; +let gifter_ary = []; +let link_ary = {}; +let roomId = ''; +let uniqueId = ''; +let roomDisplayId = ''; +let roomDisplayNickname = ''; +let roomStart = ''; +let roomEnd = ''; + +let playSounds = 1; +let saveGifts = 2; +let voiceComments = 1; + +let battleStats = $('#battleParties') + +let ttn = []; + +let select2Options = { + theme: 'bootstrap-5', + dropdownParent: $('#soundModal') +} -$(document).ready(() => { - $('#connectButton').click(connect); - $('#uniqueIdInput').on('keyup', function (e) { - if (e.key === 'Enter') { - connect(); - } - }); +//const tts = new TTS() - if (window.settings.username) connect(); -}) +const userCog = $('#userCog') +const sounds = new Sounds() function connect() { - let uniqueId = window.settings.username || $('#uniqueIdInput').val(); - if (uniqueId !== '') { - - $('#stateText').text('Connecting...'); - - connection.connect(uniqueId, { - enableExtendedGiftInfo: true - }).then(state => { - $('#stateText').text(`Connected to roomId ${state.roomId}`); - - // reset stats - viewerCount = 0; - likeCount = 0; - diamondsCount = 0; - updateRoomStats(); - - }).catch(errorMessage => { - $('#stateText').text(errorMessage); - - // schedule next try if obs username set - if (window.settings.username) { - setTimeout(() => { - connect(window.settings.username); - }, 30000); - } - }) - - } else { - alert('no username entered'); - } -} - -// Prevent Cross site scripting (XSS) -function sanitize(text) { - return text.replace(/ { + //$('#stateText').text(`Connected to roomId ${state.roomId}`); + console.log(' -- state --'); + console.log(state) + console.log(' -- /state --'); + //Connected to roomId ${state.roomId} + roomId = state.roomId + // for sounds + + display_start = timeConverter(state.roomInfo.create_time) + $('#HostInfo').html(` +
+
+
+ ${state.roomInfo.owner.nickname} +
+ +
+ @${state.roomInfo.owner.display_id} +
+ Started: ${display_start} +
+
+
+
+ ${state.roomInfo.owner.bio_description.replace("\n", "
")} +
+
+
`); + $('#stateText').html('

Connected

'); + roomDisplayId = state.roomInfo.owner.display_id; + roomDisplayNickname = state.roomInfo.owner.nickname; + roomStart = state.roomInfo.create_time + + document.title = roomDisplayId+' - Yohns TikTok Live Chat Analytics Demo Beta 3'; + + let all_fans = state.roomInfo.top_fans + , total_fans = all_fans.length + , fan_tr = ''; + if(total_fans > 0){ + for(var i=0;i +
  • + top gifters pic + ${state.roomInfo.top_fans[i].user.nickname} + (${tick} coins) +
  • `; + //fan_tr += 'top gifters pic'+state.roomInfo.top_fans[i].user.nickname+''+state.roomInfo.top_fans[i].fan_ticket+' coins'; + } + $(fan_tr).insertAfter("#topGiftersDivider") + //document.getElementById('topGiftersDivider').innerHTML = fan_tr + } + // reset stats + viewerCount = 0; + likeCount = 0; + diamondsCount = 0; + updateRoomStats(); + + let g_length = state.availableGifts.length, ii, allGifts = [], html = '' + , giftDrop = ''; + for(ii=0;ii${list.name}` + } + //console.log(allGifts) + //var data = $.map(giftDrop, function (obj, two) { + // obj.text = obj.text || obj.name; // replace name with the property used for the text + // obj.oid = obj.id + // obj.id = obj.name + // return obj; + //}); + function select2Gifts(state){ + if (!state.id) { + return state.text; + } + //console.log('-- select2 gifts ---') + //console.log(state) + //console.log('-- /select2 gifts ---') + // + const coins = state.element.dataset.coins + const img = state.element.dataset.img + var $state = $(` ${state.text} ${coins} coins`); + return $state; + } + $('#group-gift').html(giftDrop).trigger('change')/*select2({ + //data : data, + templateResult: select2Gifts, + templateSelection: select2Gifts + }).*/ + $('#save-gift-sound').attr('disabled', false) + //sendToDb('gifts', 'check', allGifts) + + if(roomDisplayId in usernames){} else { + usernames[roomDisplayId] = { + userId : state.roomInfo.owner.id_str, + uniqueId : roomDisplayId, + nickname : roomDisplayNickname, + profilePictureUrl : state.roomInfo.owner.profilePictureUrl + } + userIds[state.roomInfo.owner.id_str] = { + userId : state.roomInfo.owner.id_str, + uniqueId : roomDisplayId, + nickname : roomDisplayNickname, + profilePictureUrl : state.roomInfo.owner.profilePictureUrl + } + } + + // the scores when connected + //? state.link_mic.battle_scores + /*[ + { + "score": 15193, + "user_id": 7028441764432709000 + }, + { + "score": 111, + "user_id": 6932573195062085000 + } + ],*/ + //? state.link_mic.battle_settings + /*{ + "battle_id": 7357466536107855000, + "channel_id": 7357464768338349000, + "duration": 301, + "finished": 0, + "match_type": 0, + "start_time": 1713043672, + "start_time_ms": 1713043672732, + "theme": "" + },*/ + //? state.link_mic.rival_anchor_id": 6932573195062085000, + }).catch(errorMessage => { + $('#stateText').text(errorMessage); + + // schedule next try if obs username set + if (window.settings.username) { + setTimeout(() => { + connect(window.settings.username); + }, 30000); + } + }) + } else { + alert('no username entered'); + } } -function updateRoomStats() { - $('#roomStats').html(`Viewers: ${viewerCount.toLocaleString()} Likes: ${likeCount.toLocaleString()} Earned Diamonds: ${diamondsCount.toLocaleString()}`) -} +// These settings are defined by obs.html +if (!window.settings) window.settings = {}; -function generateUsernameLink(data) { - return `${data.uniqueId}`; -} -function isPendingStreak(data) { - return data.giftType === 1 && !data.repeatEnd; -} +Config.updateConfig(); -/** - * Add a new message to the chat container - */ -function addChatItem(color, data, text, summarize) { - let container = location.href.includes('obs.html') ? $('.eventcontainer') : $('.chatcontainer'); - - if (container.find('div').length > 500) { - container.find('div').slice(0, 200).remove(); - } - - container.find('.temporary').remove();; - - container.append(` -
    - - - ${generateUsernameLink(data)}: - ${sanitize(text)} - -
    - `); - - container.stop(); - container.animate({ - scrollTop: container[0].scrollHeight - }, 400); -} +$(document).ready(() => { + $('#delete-note').on('click', ()=>{ + let name = $('#note-id').val() + console.log(name) + socket.emit('deleteNote', { + name: name + }) + }) + $('#save-gift-sound').on('click', () => { + let gift = $('#group-gift').val(), sound = $('#group-sound').val() + socket.emit('saveGiftSound', { + gift: gift, + sound: '/sounds/'+sound + }) + }) + $('#play-gift-sound').on('click', () => { + let sfile = $('#group-sound').val() + sounds.addSound('sounds/'+sfile) + }) + $('#new-note').on('click', () => { + $('#note-id').val('new') + $('#delete-note').slideUp('fast') + $('#new-note-name').val('') + $('#new-note-info').val('') + $('#new-note-form').collapse('show') + }) + $('#save-note').on('click', () => { + let id = $('#note-id').val(), + name = $('#new-note-name'), + info = $('#new-note-info'), + error = false, + box = '' + if(name.val() == ''){ + error = true + name.addClass('is-invalid') + } else { + name.removeClass('is-invalid') + } + if(name.val() == 'new'){ + error = true + name.addClass('is-invalid') + } + if(info.val() == ''){ + error = true + info.addClass('is-invalid') + } else { + info.removeClass('is-invalid') + } + if(error == false){ + let na2 = name.val().replace("'", "\'").replace('"', '\"') + , no2 = info.val() + socket.emit('saveNote', { + id: id, + name: na2, + note: no2 + }) + if(id == 'new'){ + $('#note-list').html(` + ${$('#note-list').html()}` + // , \''+no2.replace("
    ", "\n")+'\' + ) + } else { + //$(`#note-list button[onclick="loadNote('${na2}')]`) + } + $('#new-note-form').collapse('hide') + $('#note-id').val('new') + $('#new-note-name').val('') + $('#new-note-info').val('') + Config.updateConfig(); + //if(Array.isArray(json['notes'][note])){ + // box = json['notes'][note][0].replace("'", "\'") + //} else { + // box = json['notes'][note].replace("'", "\'") + //} + } + }) + $('#add-username').on('click', () => { + let name = $('#new-username'), uname = name.val() + if(uname == ''){ + // make error + name.addClass('is-invalid') + } else { + if(Config.names.includes(uname)){ + + } else { + name.removeClass('is-invalid') + socket.emit('addToNames', { + name : uname + }) + } + } + }) + $('#vc-on').on('click', () => { + voiceComments = 2 + speechSynthesis.cancel() + $('#vc-on').addClass('d-none') + $('#vc-off').removeClass('d-none') + }) + $('#vc-off').on('click', () => { + voiceComments = 1 + $('#vc-off').addClass('d-none') + $('#vc-on').removeClass('d-none') + }) + $('#s-on').on('click', () => { + playSounds = 2 + sounds.clearSounds() + $('#s-on').addClass('d-none') + $('#s-off').removeClass('d-none') + }) + $('#s-off').on('click', () => { + playSounds = 1 + $('#s-off').addClass('d-none') + $('#s-on').removeClass('d-none') + }) + $('#g-on').on('click', () => { + saveGifts = 2 + $('#g-on').addClass('d-none') + $('#g-off').removeClass('d-none') + }) + $('#g-off').on('click', () => { + saveGifts = 1 + $('#g-off').addClass('d-none') + $('#g-on').removeClass('d-none') + }) + $('#ch').on('click', () => { + + socket.emit('addToNames', { + name : 'another name' + }) + console.log('playSounds = '+playSounds) + console.log('saveGifts = '+saveGifts) + console.log('------------') + }) + $('#userSignUpLink').on('click', () => { + bootstrap.showAlert({title: "Sign Up Closed", body: "During testing phases, our sign up process will be closed. If you would like to test some new features, please contact Yohn."}) + }) + + $('#userLogin').on('click', () => { + userCog.find('.switch-toggle').toggleClass('d-none') + socket.emit('userLogin', { + email : $('#userEmail').val(), + pass : $('#userPassword').val() + }) + }) + + $('#copy-table').on('click', () => { + //console.log('copy btn clicked') + let gt = $('#gifter-table') + gt.find('save').removeClass('d-none') + let text = gt.html(), textarea = document.getElementById('hidden') + textarea.value = text; //.split(" ").join(','); + + //console.log('copy') + textarea.select(); + textarea.setSelectionRange(0, textarea.value.length) + navigator.clipboard.writeText(textarea.value); + textarea.setSelectionRange(0,0) + }) + $('#connectButton').click(connect); + $('#uniqueIdInput').on('keyup', function (e) { + if (e.key === 'Enter') { + connect(); + } + }); + + if (window.settings.username) connect(); + let pops = { + sanitize: false, + html: true, + trigger: 'focus' + }; + let chatcont = $('#chatcontainer') + $('#add-row').on('click', () => { + let row = $('#the-row').html() + chatcont.prepend(row) + chatcont.find('li[data-bs-toggle="popover"]:first').popover(pops) + }) + $('[data-bs-toggle="popover"]').popover(pops); +}) -/** - * Add a new gift to the gift container - */ -function addGiftItem(data) { - let container = location.href.includes('obs.html') ? $('.eventcontainer') : $('.giftcontainer'); - - if (container.find('div').length > 200) { - container.find('div').slice(0, 100).remove(); - } - - let streakId = data.userId.toString() + '_' + data.giftId; - - let html = ` -
    - - - ${generateUsernameLink(data)}: ${data.describe}
    -
    - - - - - - - - - - `; - - let existingStreakItem = container.find(`[data-streakid='${streakId}']`); - - if (existingStreakItem.length) { - existingStreakItem.replaceWith(html); - } else { - container.append(html); - } - - container.stop(); - container.animate({ - scrollTop: container[0].scrollHeight - }, 800); -} +//socket.on('readUsernames', (data) => { +// console.log(data) +//}) +socket.on('toDoData', (data) => { + console.log(data) +}) +socket.on('removeGiftSound', (data) => { + console.log(data) +}) +socket.on('saveGiftSound', (data) => { + console.log(data) +}) +socket.on('deleteNote', (data) => { + $('#note-results').html(``).collapse('show') + $('#note-id').val('new') + $('#new-note-name').val('') + $('#new-note-info').val('') + $('#new-note-form').collapse('hide') + $('#delete-note').slideUp('fast') + setTimeout(() => { + $('#note-results').collapse('hide') + //Config.updateConfig(); + Config.grabConfig('notes') + }, 2000) +}) +socket.on('saveNote', (data) => { + $('#note-results').html(``).collapse('show') + setTimeout(() => { + $('#note-results').collapse('hide') + //Config.updateConfig(); + Config.grabConfig('notes') + }, 5000) +}) +socket.on('addToNames', (data) => { + console.log('-----addToNames return-----') + console.log(data) + $('#name-list').prepend(`
  • + ${data.name} + 🗑️ +
  • `) + console.log('-----addToNames return-----') +}) +socket.on('removeNames', (data) => { + console.log('-----removeNames return-----') + console.log(data) + console.log('-----removeNames return-----') + $('li[data-list-name="'+data.name+'"]').slideUp('fast', () => {$(this).remove();}) +}) +socket.on('soundDirectory', (data) => { + for(const sound in data.files){ + $('#group-sound').append(``) + } + + $('#group-sound') + .select2({ + theme: 'bootstrap-5', + dropdownParent: $('#soundModal') + }).trigger('change') +}) +socket.on('loginTry', (data) => { + userCog.find('.switch-toggle').toggleClass('d-none') + if(data.r == 'ok'){ + console.log('logged in successful') + console.log(data) + console.log('/login in data') + let list = JSON.parse(data.info.userList) + , userListLen = list.length, u, usersHtml = '', userTags = ''; + if(userListLen > 0){ + for(u=0;u'; + } + $('#datalistOptions').html(usersHtml); + } + $('#settingLoginLi').html(`
  • + Autofill Hosts +
  • +
  • + Notes Hosts +
  • `)//addClass('d-none').after(data.replaceForm) + //$('#settingLoginLi') + // created: "12/21/2023 4:24:59" + // email: "yohns@live.com" + // keyFile: "Some key file" + // lastLogin: "" + // name: "Yohn" + // premiumUntil: "" + // sheetId: "", + // sounds: '{"rose":"rose"}', + // userList: '{"yohn.john", "dancehallwifi", "aviannaav", "imanalyn31"}'*/ + console.log(data) + } else { + console.log('could not login - 1') + } +}) // viewer stats connection.on('roomUser', (msg) => { - if (typeof msg.viewerCount === 'number') { - viewerCount = msg.viewerCount; - updateRoomStats(); - } + //console.log('-- roomUser --') + //console.log(msg) + //console.log('-- roomUser --') + if (typeof msg.viewerCount === 'number') { + viewerCount = msg.viewerCount; + updateRoomStats(); + updateTopGifters(msg.topViewers); + } }) // like stats connection.on('like', (msg) => { - if (typeof msg.totalLikeCount === 'number') { - likeCount = msg.totalLikeCount; - updateRoomStats(); - } - - if (window.settings.showLikes === "0") return; - - if (typeof msg.likeCount === 'number') { - addChatItem('#447dd4', msg, msg.label.replace('{0:user}', '').replace('likes', `${msg.likeCount} likes`)) - } + //console.log('-- likes --') + //console.log(msg) + //console.log('-- /likes --') + if (typeof msg.totalLikeCount === 'number') { + likeCount = msg.totalLikeCount; + updateRoomStats(); + } + + if (window.settings.showLikes === "0") return; + + if (typeof msg.likeCount === 'number') { + var uname = msg.uniqueId; + if(uname in link_ary){ + link_ary[uname] = link_ary[uname]+1 + } else { + link_ary[uname] = 1 + } + + let tlike = $('#likestotalcontainer,#alltotalcontainer') + $(`[data-uname="${msg.uniqueId}"]`).remove() + let thename = generateUsernameLink(msg) + tlike.prepend(` +
  • +
    +
    + +
    +
    + + ${thename}: + sent ${link_ary[uname]} likes + +
    +
    +
  • `) + if(msg.uniqueId in usernames){} else { + //let tempuname = {}; + usernames[msg.uniqueId] = { + userId : msg.userId, + uniqueId : msg.uniqueId, + nickname : msg.nickname, + profilePictureUrl : msg.profilePictureUrl + } + userIds[msg.userId] = { + userId : msg.userId, + uniqueId : msg.uniqueId, + nickname : msg.nickname, + profilePictureUrl : msg.profilePictureUrl + } + } + } }) // Member join let joinMsgDelay = 0; connection.on('member', (msg) => { - if (window.settings.showJoins === "0") return; - - let addDelay = 250; - if (joinMsgDelay > 500) addDelay = 100; - if (joinMsgDelay > 1000) addDelay = 0; - - joinMsgDelay += addDelay; - - setTimeout(() => { - joinMsgDelay -= addDelay; - addChatItem('#21b2c2', msg, 'joined', true); - }, joinMsgDelay); + //console.log('-- member --') + //console.log(msg) + //console.log('-- member --') + if (window.settings.showJoins === "0") return; + + let addDelay = 250; + if (joinMsgDelay > 500) addDelay = 100; + if (joinMsgDelay > 1000) addDelay = 0; + + joinMsgDelay += addDelay; + + setTimeout(() => { + joinMsgDelay -= addDelay; + addChatItem('#21b2c2', msg, msg.label.replace('{0:user}', ''), '#joinstotalcontainer,#alltotalcontainer'); //.joincontainer'); + }, joinMsgDelay); + // + sendToDb('member', 'join', { + userId: msg.userId, + uniqueId: msg.uniqueId, + nickname: msg.nickname, + timestamp: msg.createTime, + profilePictureUrl: msg.profilePictureUrl, + displayType: msg.displayType + }) + if(msg.uniqueId in usernames){} else { + //let tempuname = {}; + usernames[msg.uniqueId] = { + userId : msg.userId, + uniqueId : msg.uniqueId, + nickname : msg.nickname, + profilePictureUrl : msg.profilePictureUrl + } + userIds[msg.userId] = { + userId : msg.userId, + uniqueId : msg.uniqueId, + nickname : msg.nickname, + profilePictureUrl : msg.profilePictureUrl + } + } }) // New chat comment received connection.on('chat', (msg) => { - if (window.settings.showChats === "0") return; - - addChatItem('', msg, msg.comment); + console.log('-- chat --') + console.log(msg) + console.log('-- chat --') + if (window.settings.showChats === "0") return; + + //let msgcom = msg.hasOwnProperty('subemotes') ? insertEmotes(sanitize(msg.comment), msg.subemotes) : sanitize(msg.comment); + let msgcom = insertEmotes(sanitize(msg.comment), msg.emotes); + addChatItem('', msg, msgcom, '.chatcontainer'); }) // New gift received connection.on('gift', (data) => { - if (!isPendingStreak(data) && data.diamondCount > 0) { - diamondsCount += (data.diamondCount * data.repeatCount); - updateRoomStats(); - } + //if(data.giftName == 'Gift Box'){ + console.log('-- gift --') + console.log(data) + console.log('-- gift --') + //} + if (!isPendingStreak(data) && data.diamondCount > 0) { + diamondsCount += (data.diamondCount * data.repeatCount); + updateRoomStats(); + } + + if (window.settings.showGifts === "0") return; + + addGiftItem(data); +}) +// share, follow +connection.on('social', (data) => { + //console.log('-- social --') + //console.log(data) + //console.log('-- social --') + if (window.settings.showFollows === "0") return; - if (window.settings.showGifts === "0") return; + let color = data.displayType.includes('follow') ? '#ff005e' : '#2fb816'; + let conta = data.displayType.includes('follow') ? '#followstotalcontainer,#alltotalcontainer' : '#sharestotalcontainer,#alltotalcontainer'; + addChatItem(color, data, data.label.replace('{0:user}', ''), conta); //'.sharecontainer'); - addGiftItem(data); }) -// share, follow -connection.on('social', (data) => { - if (window.settings.showFollows === "0") return; +connection.on('questionNew', (data) => { + console.log('--- questionNew') + console.log(data) + console.log('--- questionNew') +}) +connection.on('linkMicBattle', (data) => { + //console.log('---- linkMicBattle') + //console.log(data) + //console.log('---- linkMicBattle') + let peopleSpan = 6 + if(data.battleUsers.length == 4){ + peopleSpan = 3 + } + let i, str = `' + } + str += ` +
    +
    +
    5:00
    +
    ` + //console.log(str) + $('#battleParties').html(str) + updateCountDown(299) + console.log('inserted battle stuff..') +}) - let color = data.displayType.includes('follow') ? '#ff005e' : '#2fb816'; - addChatItem(color, data, data.label.replace('{0:user}', '')); +connection.on('linkMicArmies', (data) => { + //console.log('linkMicArmies') + //console.log(data) + //console.log('/linkMicArmies') + let i; + //$('#battleStats').removeClass('d-none') + for(i=0;i'+helpers+'

    ' + $('#battle-'+data.battleArmies[i].hostUserId).html(''+data.battleArmies[i].points+''+giftersHere) + //$(helpers)('#battle-'+data.battleArmies[i].hostUserId) + } + //console.log('inserted info') +}) +connection.on('liveIntro', (data) => { + console.log('liveIntro') + console.log(data) + console.log('/liveIntro') + + addChatItem('#ff00cc', data, data.description, '.chatcontainer'); + + if(data.uniqueId in usernames){} else { + usernames[data.uniqueId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + userIds[data.userId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + } }) -connection.on('streamEnd', () => { - $('#stateText').text('Stream ended.'); +connection.on('envelope', (data) => { + console.log('envelope') + console.log(data) + console.log('/envelope') +}) +connection.on('subscribe', (data) => { + console.log('subscribe') + console.log(data) + console.log('/subscribe') +}) + +connection.on('streamEnd', (actionId) => { + let msg = 'Stream Ended'; + if (actionId === 3) { + msg = 'Stream ended by user'; + } + if (actionId === 4) { + msg = 'Stream ended by platform moderator (ban)'; + } + + var today = new Date(); + var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate(); + var time = today.getHours() + ":" + today.getMinutes(); // + ":" + today.getSeconds(); + var dateTime = date+' '+time; + //document.getElementById('dt').innerHTML = dateTime + $('#stateText').html(msg+'
    Ended At: '+dateTime); + + // schedule next try if obs username set + if (window.settings.username) { + setTimeout(() => { + connect(window.settings.username); + }, 30000); + } +}) - // schedule next try if obs username set - if (window.settings.username) { - setTimeout(() => { - connect(window.settings.username); - }, 30000); - } -}) \ No newline at end of file +window.addEventListener("beforeunload", function (e) { + e.preventDefault(); + e.returnValue = "" +}); \ No newline at end of file diff --git a/public/b5toast.js b/public/b5toast.js new file mode 100644 index 0000000..b3b7b96 --- /dev/null +++ b/public/b5toast.js @@ -0,0 +1,43 @@ +//change some settings +// https://github.com/AucT/b5toast +// https://auct.github.io/b5toast/b5toast_demo +// b5toast.show('warning', 'my message', 'optional title', optionalDelay); +const b5toastContainerElement = document.getElementById("toast-container"); + +//don't touch code below if you don't know what are you doing +const b5toast = { + delayInMilliseconds: 7000, + htmlToElement: function (html) { + const template = document.createElement("template"); + html = html.trim(); + template.innerHTML = html; + return template.content.firstChild; + }, + show: function (color, message, title, delay) { + title = title ? title : ""; + const html = ``; + const toastElement = b5toast.htmlToElement(html); + b5toastContainerElement.appendChild(toastElement); + const toast = new bootstrap.Toast(toastElement, { + delay: delay?delay:b5toast.delayInMilliseconds, + animation: true + }); + toast.show(); + setTimeout(() => toastElement.remove(), delay?delay:b5toast.delayInMilliseconds + 3000); // let a certain margin to allow the "hiding toast animation" + }, + + error: function (message, title, delay) { + b5toast.show("danger", message, title, delay); + }, + success: function (message, title, delay) { + b5toast.show("success", message, title, delay); + }, +}; \ No newline at end of file diff --git a/public/bootstrap-show-modal.js b/public/bootstrap-show-modal.js new file mode 100644 index 0000000..05721f8 --- /dev/null +++ b/public/bootstrap-show-modal.js @@ -0,0 +1,250 @@ +/** + * Author and copyright: Stefan Haack (https://shaack.com) + * Repository: https://github.com/shaack/bootstrap-show-modal + * License: MIT, see file 'LICENSE' + */ + +;(function (bootstrap) { + "use strict" + + let i = 0 + + function Modal(props) { + this.props = { + title: "", // the dialog title html + body: "", // the dialog body html + footer: "", // the dialog footer html (mainly used for buttons) + modalClass: "fade", // Additional css for ".modal", "fade" for fade effect + modalDialogClass: "", // Additional css for ".modal-dialog", like "modal-lg" or "modal-sm" for sizing + options: { // The Bootstrap modal options as described here: https://getbootstrap.com/docs/4.0/components/modal/#options + backdrop: 'static' // disallow closing on click in the background + }, + draggable: false, // make the dialog draggable + // Events: + onCreate: null, // Callback, called after the modal was created + onShown: null, // Callback, called after the modal was shown and completely faded in + onDispose: null, // Callback, called after the modal was disposed + onSubmit: null // Callback of bootstrap.showConfirm(), called after yes or no was pressed + } + for (let prop in props) { + // noinspection JSUnfilteredForInLoop + this.props[prop] = props[prop] + } + this.id = "bootstrap-show-modal-" + i + i++ + this.show() + if (this.props.onCreate) { + this.props.onCreate(this) + } + } + + Modal.prototype.createContainerElement = function () { + const self = this + this.element = document.createElement("div") + this.context = this.element + this.element.id = this.id + this.element.setAttribute("class", "modal " + this.props.modalClass) + this.element.setAttribute("tabindex", "-1") + this.element.setAttribute("role", "dialog") + this.element.setAttribute("aria-labelledby", this.id) + this.element.innerHTML = '' + document.body.appendChild(this.element) + this.titleElement = this.element.querySelector(".modal-title") + this.bodyElement = this.element.querySelector(".modal-body") + this.footerElement = this.element.querySelector(".modal-footer") + this.element.addEventListener('hidden.bs.modal', function () { + self.dispose() + }) + this.element.addEventListener('shown.bs.modal', function () { + if (self.props.onShown) { + self.props.onShown(self) + } + }) + } + + Modal.prototype.show = function () { + if (!this.element) { + this.createContainerElement() + if (this.props.options) { + const modalInstance = new bootstrap.Modal(this.element, this.props.options) + if (modalInstance) { + modalInstance.show() + } + } else { + const modalInstance = new bootstrap.Modal(this.element) + if (modalInstance) { + modalInstance.show() + } + } + const self = this + + this.element.addEventListener('shown.bs.modal', function () { + + if (self.props.resizeable) { + // alpha, resizing does not work yet + const resizer = document.createElement('div') + resizer.style.width = '20px' + resizer.style.height = '20px' + resizer.style.background = 'red' + resizer.style.position = 'absolute' + resizer.style.right = '0' + resizer.style.bottom = '0' + resizer.style.cursor = 'se-resize' + + self.modalContent = self.element.querySelector(".modal-content") + self.modalContent.appendChild(resizer) + + resizer.addEventListener('mousedown', initResize, false) + + function initResize(e) { + window.addEventListener('mousemove', resize, false) + window.addEventListener('mouseup', stopResize, false) + self.clientX = e.clientX + self.clientY = e.clientY + } + + function resize(e) { + self.modalContent.style.width = self.modalContent.getBoundingClientRect().width + (e.clientX - self.clientX) + 'px' + self.modalContent.style.height = self.modalContent.getBoundingClientRect().height + (e.clientY - self.clientY) + 'px' + self.clientX = e.clientX + self.clientY = e.clientY + } + + function stopResize() { + window.removeEventListener('mousemove', resize, false) + window.removeEventListener('mouseup', stopResize, false) + } + } + + if (self.props.draggable) { + const dialogHeader = self.element.querySelector('.modal-header') + dialogHeader.style.cursor = 'move' + let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0 + if (dialogHeader) { + dialogHeader.onmousedown = dragMouseDown + } else { + self.element.onmousedown = dragMouseDown + } + + function dragMouseDown(e) { + // get the mouse cursor position at startup + pos3 = e.clientX + pos4 = e.clientY + document.onmouseup = closeDragElement + // call a function whenever the cursor moves + document.onmousemove = elementDrag + } + + function elementDrag(e) { + // calculate the new cursor position + pos1 = pos3 - e.clientX + pos2 = pos4 - e.clientY + pos3 = e.clientX + pos4 = e.clientY + // set the element's new position + self.element.style.top = (self.element.offsetTop - pos2) + "px" + self.element.style.left = (self.element.offsetLeft - pos1) + "px" + } + + function closeDragElement() { + // stop moving when mouse button is released + document.onmouseup = null + document.onmousemove = null + } + + if (self.props.onShown) { + self.props.onShown(self) + } + } + }) + } else { + const modalInstance = bootstrap.Modal.getInstance(this.element) + if (modalInstance) { + modalInstance.show() + } + } + if (this.props.title) { + this.titleElement.style.display = "" + this.titleElement.innerHTML = this.props.title + } else { + this.titleElement.style.display = "none" + } + if (this.props.body) { + this.bodyElement.style.display = "" + this.bodyElement.innerHTML = this.props.body + } else { + this.bodyElement.style.display = "none" + } + if (this.props.footer) { + this.footerElement.style.display = "" + this.footerElement.innerHTML = this.props.footer + } else { + this.footerElement.style.display = "none" + } + } + + Modal.prototype.hide = function () { + const modalInstance = bootstrap.Modal.getInstance(this.element) + if (modalInstance) { + modalInstance.hide() + } + } + + Modal.prototype.dispose = function () { + const modalInstance = bootstrap.Modal.getInstance(this.element) + if (modalInstance) { + modalInstance.dispose() + } + document.body.removeChild(this.element) + if (this.props.onDispose) { + this.props.onDispose(this) + } + } + + bootstrap.showModal = function (props) { + if (props.buttons) { + let footer = "" + for (let key in props.buttons) { + // noinspection JSUnfilteredForInLoop + const buttonText = props.buttons[key] + footer += '' + } + props.footer = footer + } + return new Modal(props) + } + bootstrap.showAlert = function (props) { + props.buttons = {OK: 'OK'} + return this.showModal(props) + } + bootstrap.showConfirm = function (props) { + props.footer = '' + props.onCreate = function (modal) { + const modalInstance = bootstrap.Modal.getInstance(modal.element) + modal.element.querySelector(".btn-false").addEventListener("click", function () { + if (modalInstance) { + modalInstance.hide() + } + modal.props.onSubmit(false, modal) + }) + modal.element.querySelector(".btn-true").addEventListener("click", function () { + if (modalInstance) { + modalInstance.hide() + } + modal.props.onSubmit(true, modal) + }) + } + return this.showModal(props) + } + +}(bootstrap)) diff --git a/public/classes.js b/public/classes.js new file mode 100644 index 0000000..1ceba74 --- /dev/null +++ b/public/classes.js @@ -0,0 +1,220 @@ +let Config = { + buildNames(json){ + let datalist = document.getElementById('datalistOptions'); + datalist.innerHTML = '' + //let nameList = document.getElementById('name-list'); + let html = '', gsound = '', notes = '' + for(const item of json['names']){ + datalist.appendChild(new Option(item,item)); + html += `
  • + ${item} + + + + + +
  • ` + } + $('#name-list').html(html) + }, + buildNotes(json){ + let notes = '' + //for(const note in json['notes']){ + // console.log(note) + // notes += ` + + `; + const toastElement = b5toast.htmlToElement(html); + b5toastContainerElement.appendChild(toastElement); + const toast = new bootstrap.Toast(toastElement, { + delay: delay?delay:b5toast.delayInMilliseconds, + animation: true + }); + toast.show(); + setTimeout(() => toastElement.remove(), delay?delay:b5toast.delayInMilliseconds + 3000); // let a certain margin to allow the "hiding toast animation" + }, + + error: function (message, title, delay) { + b5toast.show("danger", message, title, delay); + }, + success: function (message, title, delay) { + b5toast.show("success", message, title, delay); + }, +}; \ No newline at end of file diff --git a/public/config.json b/public/config.json new file mode 100644 index 0000000..cf6ff8a --- /dev/null +++ b/public/config.json @@ -0,0 +1,313 @@ +{ + "sounds": { + "gift": { + "finger heart": "/sounds/cute-level-up.mp3", + "heart me": "/sounds/bruh.mp3", + "swan": "/sounds/Hed-P.E.SwanDive.mp3", + "hat and mustache": "/sounds/Voicy_Yeeeeehaaaawwww.mp3", + "whale diving": "/sounds/Voicy_Splashwatersoundeffect.mp3", + "it’s a match!": "/sounds/Voicy_Aww.mp3", + "cuddle with me": "/sounds/Voicy_Aww.mp3", + "you’re sweet": "/sounds/Voicy_Aww.mp3", + "falling for you": "/sounds/Voicy_Aww.mp3", + "lover’s glasses": "/sounds/Voicy_Aww.mp3", + "lock and key": "/sounds/Voicy_Aww.mp3", + "forever rosa": "/sounds/Voicy_Aww.mp3", + "love you": "/sounds/Voicy_Aww.mp3", + "hand hearts": "/sounds/Voicy_Aww.mp3", + "hand heart": "/sounds/Voicy_Aww.mp3", + "hearts": "/sounds/Voicy_Aww.mp3", + "money gun": "/sounds/Voicy_ColtPewPewPewBrawlstars.mp3", + "gem gun": "/sounds/Voicy_ColtPewPewPewBrawlstars.mp3", + "train": "/sounds/Voicy_TrainHornSoundEffect.mp3", + "motorcycle": "/sounds/motor-sesi.mp3", + "default": null, + "rose": "enchanted.wav" + }, + "subscribe": "/sounds/enchanted.wav", + "follow": "/sounds/bruh.mp3", + "unused": { + "rose": null, + "heart me": null, + "it’s a match": null, + "cuddle with me": null, + "you’re sweet": null, + "lover’s glasses": null, + "hand heart": null, + "hearts": null, + "gem gun": null, + "ice cream cone": null, + "tiktok": null, + "friendship necklace": null, + "rosa": null, + "perfume": null, + "doughnut": null, + "coral": null, + "magic rhythm": null, + "boxing gloves": null, + "duck": null, + "corgi": null, + "franktastic": null, + "gus the groundhog": null, + "henry the hedgehog": null, + "lucy the llama": null, + "sail away": null, + "superpower": null, + "elephant trunk": null, + "crystal shoe": null, + "mr. orange": null, + "fruit friends": null, + "reindeer": null, + "diva’s hat": null, + "crown": null, + "sunglasses": null, + "hanging lights": null, + "garland headpiece": null, + "cheer for you": null, + "panther paws": null, + "gamer cat": null, + "the passion rose": null, + "knight helmet": null, + "lemond buddy": null, + "cowboy hat": null, + "eye see you": null, + "confetti": null, + "mini star": null, + "paper crane": null, + "little crown": null, + "cap": null, + "like-pop": null, + "disco love": null, + "tiny diny": null, + "hi bear": null, + "fire": null, + "thumbs up": null, + "superstar": null, + "heart": null, + "lightning bolt ": null, + "cake slice": null, + "it’s corn": null, + "gg": null, + "chili": null, + "heart puff": null, + "you’re amazing": null, + "ufo landing": null, + "look! meteor shower": null, + "leon and lili": null, + "greeting card": null, + "starry night tourism": null, + "desert adventure": null, + "dreamy card": null, + "rose carriage": null, + "sweet memories": null, + "patrick's hat": null, + "hi march": null, + "lucky leprechaun": null, + "rainbow charms": null, + "aurora": null, + "birthday glasses": null, + "super cake": null, + "sam the whale": null, + "happy train": null, + "camping night": null, + "couple": null, + "falcon": null, + "beach house": null, + "rio de janeiro": null, + "rainforest": null, + "malayan tiger": null, + "gorilla": null, + "marvelous confetti": null, + "shiny air balloon": null, + "signature jet": null, + "premium shuttle": null, + "tiktok universe+": null, + "thunder falcon": null, + "fire phoenix": null, + "pegasus": null, + "star": null, + "team bracelet": null, + "cheer you up": null, + "hands up": null, + "here we go": null, + "happy party": null, + "fly love": null, + "trending figure": null, + "finger heart": null, + "celebration time": null, + "ellie the elephant": null, + "rave": null, + "spring train": null, + "old famous car": null, + "magic stage": null, + "whale diving": null, + "let us dance": null, + "crystal ball": null, + "asmr starter kit": null, + "diamond crown": null, + "drums": null, + "hot air balloon": null, + "train": null, + "beach date": null, + "love u": null, + "football": null, + "tango": null, + "swan": null, + "applause": null, + "birds": null, + "trophy": null, + "flower show": null, + "autumn leaves": null, + "money gun": null, + "sent you’re amazing": null, + "crystal heart": null, + "forever rosa": null, + "campfire": null, + "diamond ring of love": null, + "bridal veil": null, + "flower": null, + "love bomb": null, + "llama greetings": null, + "pug": null, + "husky": null, + "golden": null, + "falling for you": null, + "gold necklace": null, + "love letter": null, + "tulip box": null, + "coconut": null, + "lock and key": null, + "top live creator": null, + "cheems dog": null, + "blowing bubbles": null, + "love you": null, + "fruits hat": null, + "festa junina’s hat": null, + "kiss": null, + "mishka bear": null, + "hand hearts": null, + "game controller": null, + "play samba": null, + "hat and mustache": null, + "soccer ball": null, + "bouquet flower": null, + "headphones": null, + "asmr time ": null, + "mate tea": null, + "spinning top": null, + "taco": null, + "nachos": null, + "guacamole": null, + "russian crepes": null, + "amazing": null, + "choc chip cookie": null, + "loved": null, + "fantastic": null, + "coffee": null, + "chocolate": null, + "power hug": null, + "birthday cake": null, + "glow stick": null, + "bravo": null, + "health potion": null, + "panettone": null, + "white rose": null, + "happy father’s day": null, + "enchanted guitar": null, + "lucky airdrop box": null, + "travel with you": null, + "blooming ribbons": null, + "glowing jellyfish": null, + "dinosaur ": null, + "feather flock": null, + "watermelon love": null, + "mirror bloom": null, + "email message": null, + "galaxy": null, + "gold mine": null, + "fireworks": null, + "epic gg": null, + "travel in the us": null, + "lover’s lock": null, + "chasing the dream": null, + "champion": null, + "garland ": null, + "love drop": null, + "mystery firework": null, + "cooper flies home": null, + "star of red carpet": null, + "rabbit": null, + "star adventures": null, + "make-up box": null, + "baby dragon": null, + "pink dream": null, + "motorcycle": null, + "rhythmic bear": null, + "golden party": null, + "meteor shower": null, + "ferris wheel": null, + "gift box": null, + "flower overflow": null, + "leon the kitten": null, + "private jet": null, + "pool party": null, + "motorcycle together": null, + "mimi & fifi": null, + "flying jets": null, + "autumn farm": null, + "draco": null, + "wanda the witch": null, + "unicorn fantasy": null, + "lili the leopard": null, + "sports car": null, + "star throne": null, + "monster truck": null, + "sunset speedway": null, + "interstellar": null, + "red lightning": null, + "rosa nebula": null, + "leopard": null, + "amusement park": null, + "yacht": null, + "castle fantasy": null, + "tiktok shuttle": null, + "mystic castle": null, + "adam’s dream": null, + "phoenix": null, + "dragon flame": null, + "lion": null, + "zeus": null, + "leon and lion": null, + "seal and whale": null, + "tiktok stars": null, + "tiktok universe": null + } + }, + "enabled": { + "gift": true, + "subscribe": false, + "follow": true + }, + "firstFollowOnly": true, + "volume": 0.7, + "names": [ + "yohn.john", + "a__bruna", + "aviannaav", + "biarciane" + ], + "notes": [ + { + "name": "Invite to My Live", + "note": "dance hall ray ray\nspade \nglowrosen\nhigh class\ndmf savage\nisa\njimmy / rowdy\ncrunchy" + }, + { + "name": "Upcoming PKs", + "note": "April 13 7pm Joe / five spicy\n" + }, + { + "name": "To-Do", + "note": "- display delete note correctly\n- put sounds in playlist \n so they dont overlap" + } + ] +} \ No newline at end of file diff --git a/public/eye2.png b/public/eye2.png new file mode 100644 index 0000000..004e86d Binary files /dev/null and b/public/eye2.png differ diff --git a/public/functions.js b/public/functions.js new file mode 100644 index 0000000..3d62812 --- /dev/null +++ b/public/functions.js @@ -0,0 +1,670 @@ +const utterance = new SpeechSynthesisUtterance() +let currentCharacter, talkList = [] +utterance.addEventListener('boundary', e => { + currentCharacter = e.charIndex +}) +function playText(text) { + if(speechSynthesis.speaking){ + talkList.push(text) + return + } + if (speechSynthesis.paused && speechSynthesis.speaking) { + return speechSynthesis.resume() + } + utterance.text = text + utterance.rate = 1 //speedInput.value || 1 + //textInput.disabled = true + speechSynthesis.speak(utterance) +} +speechSynthesis.onend = ()=>{ + talkList.shift() + if(talkList.length > 0){ + utterance.text = talkList[0] + utterance.rate = 1 //speedInput.value || 1 + //textInput.disabled = true + speechSynthesis.speak(utterance) + } +} +// https://socket.io/how-to/upload-a-file +function upload(files) { + socket.emit("upload", files[0], (status) => { + console.log(status); + }); +} + +const updateCountDown = (time) => { + const etime = document.getElementById('battle-time') + const ebar = document.getElementById('battle-bar') + const totalTime = time + const t = setInterval(() => { + const minutes = Math.floor(time / 60) + const seconds = time % 60 + const sec = seconds < 10 ? '0'+seconds : seconds + const result = `${parseInt(minutes)}:${sec}` + const width = parseInt(((totalTime - time)/totalTime)*100) //+'%' + const wid = parseInt(100-width) + if(minutes == 0 && seconds < 31){ + ebar.classList.add("bg-warning") + etime.classList.add("bg-warning") + if(seconds < 11){ + ebar.classList.add("bg-danger") + ebar.classList.remove("bg-warning") + etime.classList.add("bg-danger") + etime.classList.remove("bg-warning") + } + } + etime.innerHTML = result + ebar.style.width = wid+'%' + time-- + if (minutes === 0 && seconds === 0) { + clearInterval(t) + } + }, 1000) +} + +String.prototype.removeLast = function(n) { + var string = this.split('') + string.length = string.length - n + return string.join('') +} + +function hasClass(elem, className) { + return elem.classList.contains(className); +} + +function calcDate(date1, date2) { + /* + * calcDate() : Calculates the difference between two dates + * @date1 : "First Date in the format MM-DD-YYYY" + * @date2 : "Second Date in the format MM-DD-YYYY" + * return : Array + */ + + //new date instance + const dt_date1 = new Date(date1); + const dt_date2 = new Date(date2); + + //Get the Timestamp + const date1_time_stamp = dt_date1.getTime(); + const date2_time_stamp = dt_date2.getTime(); + + let calc; + + //Check which timestamp is greater + if (date1_time_stamp > date2_time_stamp) { + calc = new Date(date1_time_stamp - date2_time_stamp); + } else { + calc = new Date(date2_time_stamp - date1_time_stamp); + } + //Retrieve the date, month and year + const calcFormatTmp = calc.getDate() + '-' + (calc.getMonth() + 1) + '-' + calc.getFullYear(); + //Convert to an array and store + const calcFormat = calcFormatTmp.split("-"); + //Subtract each member of our array from the default date + const days_passed = Number(Math.abs(calcFormat[0]) - 1); + const months_passed = Number(Math.abs(calcFormat[1]) - 1); + const years_passed = Number(Math.abs(calcFormat[2]) - 1970); + + //Set up custom text + const yrsTxt = ["year", "years"]; + const mnthsTxt = ["month", "months"]; + const daysTxt = ["day", "days"]; + + //Convert to days and sum together + const total_days = (years_passed * 365) + (months_passed * 30.417) + days_passed; + const total_secs = total_days * 24 * 60 * 60; + const total_mins = total_days * 24 * 60; + const total_hours = total_days * 24; + const total_weeks = ( total_days >= 7 ) ? total_days / 7 : 0; + + //display result with custom text + const result = ((years_passed == 1) ? years_passed + ' ' + yrsTxt[0] + ' ' : (years_passed > 1) ? + years_passed + ' ' + yrsTxt[1] + ' ' : '') + + ((months_passed == 1) ? months_passed + ' ' + mnthsTxt[0] : (months_passed > 1) ? + months_passed + ' ' + mnthsTxt[1] + ' ' : '') + + ((days_passed == 1) ? days_passed + ' ' + daysTxt[0] : (days_passed > 1) ? + days_passed + ' ' + daysTxt[1] : ''); + + //return the result + return { + "total_days": Math.round(total_days), + "total_weeks": Math.round(total_weeks), + "total_hours" : Math.round(total_hours), + "total_minutes" : Math.round(total_mins), + "total_seconds": Math.round(total_secs), + "result": result.trim() + } + +} + +function timeConverter(UNIX_timestamp){ + var a = new Date(UNIX_timestamp * 1000); + + var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; + const nthNumber = (number) => { + if (number > 3 && number < 21) return "th"; + switch (number % 10) { + case 1: + return "st"; + case 2: + return "nd"; + case 3: + return "rd"; + default: + return "th"; + } + }; + var year = a.getFullYear(); + var month = months[a.getMonth()]; + var date = a.getDate(); + var hour = a.getHours(); + var min = a.getMinutes(); + //var sec = a.getSeconds(); + var add0 = min < 10 ? 0 : '' + var time = month+' '+date+nthNumber(date)+' '+year+' '+hour+':'+add0+min; // + ':' + sec ; + return time; +} +function generateOverlay() { + let username = $('#uniqueIdInput').val(); + let url = `/obs.html?username=${username}&showLikes=1&showChats=1&showGifts=1&showFollows=1&showJoins=1&bgColor=rgb(24,23,28)&fontColor=rgb(227,229,235)&fontSize=1.3em`; + + if(username) { + window.open(url, '_blank'); + } else { + alert("Enter username"); + } +} + +function sendToDb(table, state, data){ + /*let letData = { + table: table, + state: state, + room: { + roomId: roomId, + uniqueId: uniqueId, + roomDisplayId: roomDisplayId, + roomDisplayNickname + }, + "data": data + } + //letData.table = table + //letData.data = data + $.ajax({ + type: 'POST', + url: 'https://somewebsites/api/in.php', + crossDomain: true, + data: letData, + dataType: 'text', //'json', + success: function(responseData, textStatus, jqXHR) { + //var value = responseData.someKey; + //console.log(responseData) + //console.log('/ response') + //console.log(textStatus) + //console.log('/ text') + //console.log(jqXHR) + //console.log('/ XHR') + }, + error: function (responseData, textStatus, errorThrown) { + console.log('POST failed.'); + console.log(responseData) + console.log('/ response') + //console.log(textStatus) + //console.log('/ text') + //console.log(jqXHR) + //console.log('/ XHR') + } + });*/ +} + +function loadNote(title){ // , note + let box = Array.isArray(Config.notes[title]) ? Config.notes[title][0] : Config.notes[title] + for(const note in Config['notes']){ + if(Config.notes[note].name == title){ + $('#note-id').val(title) + $('#new-note-name').val(title) + $('#new-note-info').val(Config.notes[note].note.replace("
    ", "\n")) + $('#new-note-form').collapse('show') + //$('#new-note').slideUp('fast') + $('#delete-note').slideUp('fast', function(){ + $('#delete-note').attr('data-note-title', title) + .removeClass('d-none').slideDown('fast') + }) + } + } +} + +function removeGift(th){ + let t = $(th), gift = t.data('name') + t.closest('li').slideUp() + socket.emit('removeGiftSound', { + gift : gift + }) +} + +function playSound(th){ + let t = $(th), url = t.data('url'), son = t.find('.s-on') + son.toggleClass('d-none') + t.find('.s-off').toggleClass('d-none') + if(son.hasClass('d-none')){ + sounds.addSound(url) + } +} + +// Prevent Cross site scripting (XSS) +function sanitize(text) { + return text ? text.replace(/${data.nickname}`; /*`; */ +} + +function isPendingStreak(data){ + return data.giftType === 1 && !data.repeatEnd; +} + +/** + * Add a new message to the chat container + */ +function insertEmotes(comment, subEmotes) { + // Sort emotes by placeInComment, in descending order + subEmotes.sort((a, b) => (b.placeInComment || 0) - (a.placeInComment || 0)); + + // Loop through the emotes and splice them into the comment + subEmotes.forEach(emoteObj => { + const position = emoteObj.placeInComment || 0; + const emoteImageTag = `emote`; + // Insert the image tag at the specified position + comment = comment.slice(0, position) + emoteImageTag + comment.slice(position); + }); + return comment; +} + +function addChatItem(color, data, text, cont) { + let container = location.href.includes('obs.html') ? $('.eventcontainer') : $(cont); + //🚔 👮 + let nickname, badgeLength = data.userBadges.length, afterName = '', b4Name = ''; + if(badgeLength > 0){ + for(let i = 0;i'; + } else if(data.userBadges[i].name == 'Moderator'){ + afterName += '👮'; + } else if(data.userBadges[i].badgeSceneType == 8){ + // gifter level + b4Name += '💎 '+data.userBadges[i].level+'' + } else if(data.userBadges[i].badgeSceneType == 10){ + // team level + b4Name += '💗 '+data.userBadges[i].level+'' + } else { + + } + } + } + nickname = data.nickname.replace("'", "\\'") + let isFoll = '', followInfo + if(data && typeof data === 'object' && data.followInfo){ + isFoll = data.followInfo.followStatus == 2 ? 'Friends w/ Host' + : data.followInfo.followStatus == 1 ? 'Following Host' : 'Not Following Host'; + followInfo = `
    + ${data.followInfo.followerCount} Followers + ${data.followInfo.followingCount} Following +
    `; + } + container.prepend(` +
  • @${data.uniqueId}
    +
    + ${isFoll} +
    + + +
    + ${followInfo} + View TikTok +
    '> +
    +
    + +
    +
    + + ${b4Name}${generateUsernameLink(data)}${afterName}: + ${text} + +
    +
    +
  • `); + //

    ${data.userDetails.bioDescription.replaceAll("'", "'")}

    + if(voiceComments == 1){ + if(cont == '.chatcontainer'){ + //tts.say() + playText(text) + } + } + container.find('li[data-bs-toggle="popover"]:first').popover({ + sanitize: false, + html: true, + customClass: 'user-pop' + //trigger: 'click', + //delay: {"show": 200, "hide": 500} + }).on('show.bs.popover', () => { + $('li[data-bs-toggle="popover"]').not($(this)).popover('hide'); + setTimeout(function(){ + $('li[data-bs-toggle="popover"]').popover('hide'); + },10000) + }) + container.find('[data-bs-toggle="tooltip"]:first').tooltip() + //new bootstrap.Tooltip(this) + //container.stop(); + //container.animate({ + // scrollTop: container[0].scrollHeight + //}, 400); + if(data.uniqueId in usernames){} else { + //let tempuname = {}; + usernames[data.uniqueId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + userIds[data.userId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + } +} + +function addShareItem(color, data, text, cont) { + let container = $('.sharecontainer'), sans = sanitize(text); + container.prepend(`
  • +
    + + + ${generateUsernameLink(data)}: + ${sans} + +
    +
  • `); + if(data.uniqueId in usernames){} else { + //let tempuname = {}; + usernames[data.uniqueId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + userIds[data.userId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + } + sendToDb('share', 'shared', { + timestamp: data.timestamp, + sharer: userIds[data.userId], + count: sans + }) +} +/** + * Add a new gift to the gift container + */ +function addGiftItem(data) { + let container = location.href.includes('obs.html') ? $('.eventcontainer') : $('.giftcontainer'); + if(data.uniqueId in usernames){} else { + //let tempuname = {}; + usernames[data.uniqueId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + userIds[data.userId] = { + userId : data.userId, + uniqueId : data.uniqueId, + nickname : data.nickname, + profilePictureUrl : data.profilePictureUrl + } + } + let streakId = data.uniqueId.toString() + '_' + data.giftId; + let isPending = isPendingStreak(data) + let diamonds = data.diamondCount * data.repeatCount + let diamondsLocal = parseInt(data.diamondCount * data.repeatCount).toLocaleString() + + /*test */ + let giftFor = '', tapName = ''; + if(data.receiverUserId in userIds){ + giftFor = 'to '+generateUsernameLink(userIds[data.receiverUserId]); + } + + let badgeLength = data.userBadges.length + let afterName = ''; + let b4Name = ''; + if(badgeLength > 0){ + for(let i = 0;i'; + } else if(data.userBadges[i].name == 'Moderator'){ + afterName += '👮'; + } else if(data.userBadges[i].badgeSceneType == 8){ + // gifter level + b4Name += '💎 '+data.userBadges[i].level+'' + } else if(data.userBadges[i].badgeSceneType == 10){ + // team level + b4Name += '💗 '+data.userBadges[i].level+'' + } else { + + } + } + } + + let html = `
  • +
    +
    + +
    +
    +

    ${b4Name} ${generateUsernameLink(data)} ${afterName}: ${data.describe} ${giftFor}

    +
    +
    + +
    +
    + Name: ${data.giftName} (ID:${data.giftId})
    + Repeat: x${data.repeatCount.toLocaleString()}
    + Cost: ${diamondsLocal} Diamonds +
    +
    +
    +
    +
  • `; + + + let existingStreakItem = container.find(`[data-streakid='${streakId}']`); + + if (existingStreakItem.length) { + existingStreakItem.replaceWith(html); + } else { + container.prepend(html); + } + + + if(!isPending){ + let gifter = data.uniqueId; + if(gifter in gifter_ary){ + gifter_ary[gifter].coins = parseInt(gifter_ary[gifter].coins)+parseInt(diamonds); + $('[data-gifter="'+gifter+'"]').remove() + } else { + gifter_ary[gifter] = { + username: data.nickname, + uniqueId: data.uniqueId, + userId: data.userId, + coins: diamonds, + likes: 0, + shares: 0 + } + } + let gifterTable = $('#gifter-table tbody') + //let tline = gifter_ary[gifter].username+','+gifter_ary[gifter].uniqueId+','+gifter_ary[gifter].coins+"\n"; + gifterTable.prepend(` +
    + + + + + + + `) + + if(saveGifts == 1){ + socket.emit('addGift', { + giftId: data.giftId, + userId: data.userId, + giftName: data.giftName, + uniqueId: data.uniqueId, + nickname: data.nickname, + timestamp: data.timestamp, + repeatCount: data.repeatCount, + receiverUser: data.receiverUserId in userIds ? userIds[data.receiverUserId].nickname : '', + receiverUserId: data.receiverUserId, + diamondCount: diamondsLocal, + giftPictureUrl: data.giftPictureUrl, + profilePictureUrl: data.profilePictureUrl, + }); + } + + let sPath = Config["sounds"]["gift"][data["giftName"].toLowerCase()] + || Config["sounds"]["gift"]["default"] + if(playSounds == 1 && Config["enabled"]["gift"] && sPath){ + console.log('play sound?') + sounds.addSound(sPath) + } + } +} + +function addLikeItem(color, data, text, summarize) { + let container = $('.likecontainer'); + //let tt = sanitize(text); + //console.log(tt); + if (container.find('div').length > 500) { + container.find('div').slice(0, 200).remove(); + } + //container.find('.temporary').remove(); + if(text != ''){ + container.prepend(`
  • +
    + + + ${generateUsernameLink(data)}: + ${sanitize(text)} + +
    +
  • `); + } +} + +function updateTopGifters(viewers){ + let container = $('#topViewers') + container.html('Loading Gifters...') + if(viewers.length > 0){ + let cc = 0, i, top = '', rest = '', drop = `` + for(i=0;i + + + ${viewers[i].user.uniqueId} + (${viewers[i].coinCount} coins) + + ` + } + drop += `` + + if(parseInt(viewers[i].coinCount) > 0 + && typeof viewers[i].user.username != undefined + && viewers[i].user.username != 'undefined' + && viewers[i].user.username != '' + && viewers[i].user.username != null){ + let gifter = viewers[i].user.uniqueId; + + if(msg.uniqueId in usernames){} else { + //let tempuname = {}; + usernames[viewers[i].user.uniqueId] = { + userId : viewers[i].user.userId, + uniqueId : viewers[i].user.uniqueId, + nickname : viewers[i].user.nickname, + profilePictureUrl : viewers[i].user.profilePictureUrl + } + userIds[viewers[i].user.userId] = { + userId : viewers[i].user.userId, + uniqueId : viewers[i].user.uniqueId, + nickname : viewers[i].user.nickname, + profilePictureUrl : viewers[i].user.profilePictureUrl + } + } + + if(gifter in gifter_ary){ + gifter_ary[gifter].coins = parseInt(viewers[i].coinCount); + $('[data-gifter="'+gifter+'"]').remove() + } else { + gifter_ary[gifter] = { + username: viewers[i].user.nickname, + uniqueId: viewers[i].user.uniqueId, + userId: viewers[i].user.userId, + coins: parseInt(viewers[i].coinCount), + likes: 0, + shares: 0 + } + + } + let gifterTable = $('#gifter-table tbody') + //let tline = gifter_ary[gifter].username+','+gifter_ary[gifter].uniqueId+','+gifter_ary[gifter].coins+"\n"; + gifterTable.prepend(` + + + + + + + + `) + } + } + } + container.html(''); + //console.log(top) + + } else { + container.html('no viewers..?') + //console.log('no viewers') + } +} + +function removeName(th){ + let th2 = $(th), name = th2.data('name') + socket.emit('removeNames', { + name : name + }) +} diff --git a/public/index.html b/public/index.html index 314e7c3..c069806 100644 --- a/public/index.html +++ b/public/index.html @@ -1,76 +1,555 @@ - + - - - - TikTok LIVE Chat Reader (Demo) - - - - - - - - - - - - - + + + + Yohn's TikTok Live Chat Analytics Demo Beta 1 + + + + + + + + + + + -
    -

    TikTok LIVE Chat Reader

    - Source: https://github.com/zerodytrash/TikTok-Chat-Reader -
    - -
    - A chat reader for TikTok LIVE utilizing TikTok-Live-Connector and Socket.IO to forward the data to the client. More Tools available at TikFinity. -
    - -
    -

    Enter the @username of a user who is currently live:

    - - - Generate Overlay URL -
    - -
    - Name: ${data.giftName} (ID:${data.giftId})
    - Repeat: x${data.repeatCount.toLocaleString()}
    - Cost: ${(data.diamondCount * data.repeatCount).toLocaleString()} Diamonds -
    ${gifter_ary[gifter].username}${gifter_ary[gifter].uniqueId}${parseInt(gifter_ary[gifter].coins).toLocaleString('en')}${gifter_ary[gifter].userId}${gifter_ary[gifter].likes}
    ${gifter_ary[gifter].username}${gifter_ary[gifter].uniqueId}${gifter_ary[gifter].coins}${gifter_ary[gifter].userId}${gifter_ary[gifter].likes}
    - - - - -
    -
    
    -            
    -
    -
    - - - - - - -
    -
    -

    Chats

    -
    -
    -
    -

    Gifts

    -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +

    TikTok LIVE Chat Reader

    +

    Best to use on a desktop / laptop PC, and the mobile might be slower to load. This is the second beta version for the public that has been published. There will be more updates to come soon.

    +

    This service does cost me $$ to run, and I will not know for sure how much until the end of the month.

    +

    The estimates so far is $10-20 for the server resources, but will probably increase the more we use this. Any little bit will help keep this project going. +

    This is a modified version from: zerodytrash/TikTok-Chat-Reader

    +

    Icons made by iconmonstr

    +

    CashApp: $yohnjohn84      Venmo: @John-BrittainIII

    +

    After you start your live, type in your @username (without the @) on TikTok in the box below.

    +
    +
    +
    +
    +
    + + + @ +
    + + +
    + + + +
    + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + Chats + + + + + + + +     + + + + +
    +
      +
      +
      +
      +
      +
      + Gifts + + + + + + + +     + + + + + + + +
      +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
          +
          +
          +
            +
            +
            +
              +
              +
              +
                +
                +
                +
                  +
                  +
                  +
                  +
                  +
                  + +
                  +
                  +
                  +
                  + + + + + + + + + + + + + +
                  UsernameNicknameCoins SentuserIdlikes
                  +
                  +
                  +
                  +
                  +
                  +
                  +
                  + + + + + + + + + + + + + +
                  + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/public/simple-tts.html b/public/simple-tts.html new file mode 100644 index 0000000..0633f66 --- /dev/null +++ b/public/simple-tts.html @@ -0,0 +1,77 @@ + + + + + + + Document + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/sounds/707.mp3 b/public/sounds/707.mp3 new file mode 100644 index 0000000..433db87 Binary files /dev/null and b/public/sounds/707.mp3 differ diff --git a/public/sounds/Hed-P.E.SwanDive.mp3 b/public/sounds/Hed-P.E.SwanDive.mp3 new file mode 100644 index 0000000..4655a4d Binary files /dev/null and b/public/sounds/Hed-P.E.SwanDive.mp3 differ diff --git a/public/sounds/Hed-P.E.SwanDive_Segment_0.mp3 b/public/sounds/Hed-P.E.SwanDive_Segment_0.mp3 new file mode 100644 index 0000000..580de49 Binary files /dev/null and b/public/sounds/Hed-P.E.SwanDive_Segment_0.mp3 differ diff --git a/public/sounds/JasonDerulo-Wiggle.mp3 b/public/sounds/JasonDerulo-Wiggle.mp3 new file mode 100644 index 0000000..3a6ff65 Binary files /dev/null and b/public/sounds/JasonDerulo-Wiggle.mp3 differ diff --git a/public/sounds/LennyKravitz-FlyAway.mp3 b/public/sounds/LennyKravitz-FlyAway.mp3 new file mode 100644 index 0000000..e777fad Binary files /dev/null and b/public/sounds/LennyKravitz-FlyAway.mp3 differ diff --git a/public/sounds/Voicy_Aww.mp3 b/public/sounds/Voicy_Aww.mp3 new file mode 100644 index 0000000..2589dd2 Binary files /dev/null and b/public/sounds/Voicy_Aww.mp3 differ diff --git a/public/sounds/Voicy_ColtPewPewPewBrawlstars.mp3 b/public/sounds/Voicy_ColtPewPewPewBrawlstars.mp3 new file mode 100644 index 0000000..ac301da Binary files /dev/null and b/public/sounds/Voicy_ColtPewPewPewBrawlstars.mp3 differ diff --git a/public/sounds/Voicy_Splashwatersoundeffect.mp3 b/public/sounds/Voicy_Splashwatersoundeffect.mp3 new file mode 100644 index 0000000..fbea2f1 Binary files /dev/null and b/public/sounds/Voicy_Splashwatersoundeffect.mp3 differ diff --git a/public/sounds/Voicy_TrainHornSoundEffect.mp3 b/public/sounds/Voicy_TrainHornSoundEffect.mp3 new file mode 100644 index 0000000..896302a Binary files /dev/null and b/public/sounds/Voicy_TrainHornSoundEffect.mp3 differ diff --git a/public/sounds/Voicy_Yeeeeehaaaawwww.mp3 b/public/sounds/Voicy_Yeeeeehaaaawwww.mp3 new file mode 100644 index 0000000..12c615e Binary files /dev/null and b/public/sounds/Voicy_Yeeeeehaaaawwww.mp3 differ diff --git a/public/sounds/adel-punch-2.mp3 b/public/sounds/adel-punch-2.mp3 new file mode 100644 index 0000000..0a1e9d1 Binary files /dev/null and b/public/sounds/adel-punch-2.mp3 differ diff --git a/public/sounds/bmwdriveby_GJNeKo3.mp3 b/public/sounds/bmwdriveby_GJNeKo3.mp3 new file mode 100644 index 0000000..9d4b1b2 Binary files /dev/null and b/public/sounds/bmwdriveby_GJNeKo3.mp3 differ diff --git a/public/sounds/bruh.mp3 b/public/sounds/bruh.mp3 new file mode 100644 index 0000000..55d5c44 Binary files /dev/null and b/public/sounds/bruh.mp3 differ diff --git a/public/sounds/cute-level-up.mp3 b/public/sounds/cute-level-up.mp3 new file mode 100644 index 0000000..b5e47b6 Binary files /dev/null and b/public/sounds/cute-level-up.mp3 differ diff --git a/public/sounds/enchanted.wav b/public/sounds/enchanted.wav new file mode 100644 index 0000000..82066a4 Binary files /dev/null and b/public/sounds/enchanted.wav differ diff --git a/public/sounds/fireworks.mp3 b/public/sounds/fireworks.mp3 new file mode 100644 index 0000000..af8b687 Binary files /dev/null and b/public/sounds/fireworks.mp3 differ diff --git a/public/sounds/ganstas-paradise-choir.mp3 b/public/sounds/ganstas-paradise-choir.mp3 new file mode 100644 index 0000000..ac89b00 Binary files /dev/null and b/public/sounds/ganstas-paradise-choir.mp3 differ diff --git a/public/sounds/guitar-riff-159089.mp3 b/public/sounds/guitar-riff-159089.mp3 new file mode 100644 index 0000000..6d50ebc Binary files /dev/null and b/public/sounds/guitar-riff-159089.mp3 differ diff --git a/public/sounds/jet-overhead-72101.mp3 b/public/sounds/jet-overhead-72101.mp3 new file mode 100644 index 0000000..405af7b Binary files /dev/null and b/public/sounds/jet-overhead-72101.mp3 differ diff --git a/public/sounds/launch-sequence-81945.mp3 b/public/sounds/launch-sequence-81945.mp3 new file mode 100644 index 0000000..f7bd3ca Binary files /dev/null and b/public/sounds/launch-sequence-81945.mp3 differ diff --git a/public/sounds/little-monster-man-whats-up-doc.mp3 b/public/sounds/little-monster-man-whats-up-doc.mp3 new file mode 100644 index 0000000..dc49917 Binary files /dev/null and b/public/sounds/little-monster-man-whats-up-doc.mp3 differ diff --git a/public/sounds/motor-sesi.mp3 b/public/sounds/motor-sesi.mp3 new file mode 100644 index 0000000..3ed3043 Binary files /dev/null and b/public/sounds/motor-sesi.mp3 differ diff --git a/public/sounds/pixabay.com-biodynamic-impact-braam-tonal-dark.mp3 b/public/sounds/pixabay.com-biodynamic-impact-braam-tonal-dark.mp3 new file mode 100644 index 0000000..dff99e8 Binary files /dev/null and b/public/sounds/pixabay.com-biodynamic-impact-braam-tonal-dark.mp3 differ diff --git a/public/sounds/stand-punch-3.mp3 b/public/sounds/stand-punch-3.mp3 new file mode 100644 index 0000000..84f2267 Binary files /dev/null and b/public/sounds/stand-punch-3.mp3 differ diff --git a/public/sounds/waterphone-174768.mp3 b/public/sounds/waterphone-174768.mp3 new file mode 100644 index 0000000..e61ce23 Binary files /dev/null and b/public/sounds/waterphone-174768.mp3 differ diff --git a/public/sounds/wow-171498.mp3 b/public/sounds/wow-171498.mp3 new file mode 100644 index 0000000..8e262cd Binary files /dev/null and b/public/sounds/wow-171498.mp3 differ diff --git a/public/style.css b/public/style.css index 6e5e383..3893c90 100644 --- a/public/style.css +++ b/public/style.css @@ -1,8 +1,12 @@ + body { font-family:Arial, Helvetica, sans-serif; - min-width: 800px; + /*min-width: 800px;*/ } +.c-pointer {cursor: pointer;} +.c-pointer svg:hover {fill: #087990;} + h1 { font-size: 1.8em; margin-top: 0px; @@ -21,11 +25,11 @@ a { font-size: 0.8em; font-weight: bold; } - -.usernamelink { +.coming-soon {display:none;} +/*.usernamelink { color: #18508f; text-decoration: none; -} +} */ #roomUserText { width: 100%; @@ -46,31 +50,25 @@ a { } .splitstatetable td { - width: 50%; + width: 33vw; } -.containerheader { - text-align: center; +.giftcontainer, .chatcontainer, .eventcontainer { + overflow-y: scroll; + height: calc(100vh - 272px); + word-wrap: break-word; } -.chatcontainer, .giftcontainer, .eventcontainer { +.likecontainer, .joincontainer, .sharecontainer { overflow-y: scroll; - height: calc(100vh - 240px); + height: calc(45vh - 160px); word-wrap: break-word; } .eventcontainer { - height: calc(100vh - 90px); + height: calc(100vh - 120px); } -.chatcontainer { - min-width: 400px; - max-width: calc(100vw - 430px); -} - -.giftcontainer { - min-width: 400px; -} .miniprofilepicture { height: 20px; @@ -81,4 +79,756 @@ a { height: 50px; width: 50px; margin-right: 10px; -} \ No newline at end of file +} + +.chat-img-badge { + max-height: 20px; + height: 20px; + width: auto; + } +.chat-img-emote { + max-height: 30px; + height: 30px; + width: auto; +} +.user-pop { + --bs-popover-max-width: 500px; + width: 450px; +} + +.gifter-level, .team-level { + background: #7f0edd; + font-size: 12px; + padding: 3px 5px 3px 2px; + border-radius: 5px; + margin:0 2px; +} +.gifter-level { + background: #2b47dd; +} +.team-level { + background: #c63311; +} + +/***!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Select 2 Dark Theme Style ***/ + +.select2-container--bootstrap-5 { + width: 100% !important; +} +.select2-container--bootstrap-5 .selection { + width: 100%; +} +.select2-container--bootstrap-5 .select2-selection { + border: 1px solid rgba(255, 255, 255, 0.1); + -webkit-border-radius: 0.25rem; + -moz-border-radius: 0.25rem; + border-radius: 0.25rem; + width: 100%; +} +.select2-container--bootstrap-5 .select2-selection--single { + height: calc(1.5em + 0.75rem + 5px); + padding: 0.375rem 1.75rem 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #ccc; + vertical-align: middle; + background-color: rgba(0, 0, 0, 0.2); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder { + color: #757575; + line-height: inherit; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { + padding: 2px 0 0 4px; + line-height: inherit; + margin: 0; + list-style: none; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow { + display: none; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-search--dropdown .select2-search__field { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #fff; + background-clip: padding-box; + border: 1px solid rgba(255, 255, 255, 0.1); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-border-radius: 0.25rem; + -moz-border-radius: 0.25rem; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-search--dropdown .select2-results__message { + color: #6c757d; +} +.select2-container--bootstrap-5 .select2-selection--multiple { + background-color: rgba(0, 0, 0, 0.2); + min-height: calc(1.5em + 0.75rem + 5px) !important; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered { + width: 100%; + padding: 0; + margin: 0; + list-style: none; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice { + color: #fff; + background-color: rgba(0, 0, 0, 0.2); + border: 1px solid rgba(255, 255, 255, 0.1); + -webkit-border-radius: 0.25rem; + -moz-border-radius: 0.25rem; + border-radius: 0.25rem; + cursor: pointer; + float: left; + padding: 0 5px; + margin: 4px 0 0 4px; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove { + color: #ccc; + opacity: 0.5; + padding: 0 0.1rem; + margin-right: 0.15rem; + border: none; + background-color: transparent; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover { + opacity: 1; +} +.select2-container--bootstrap-5 .select2-selection__clear { + float: left; + margin-left: 4px; +} +.select2-container--bootstrap-5 .select2-search--inline { + float: left; + margin-left: 4px; +} +.select2-container--bootstrap-5 .select2-search--inline .select2-search__field { + outline: 0; +} +.select2-container--bootstrap-5 .select2-container--disabled .select2-selection { + background-color: rgba(255, 255, 255, 0.1); + color: #7b758b; + cursor: not-allowed; + border-color: #ced4da; + -webkit-box-shadow: none; + box-shadow: none; +} +.select2-container--bootstrap-5 .select2-container--disabled .select2-selection .select2-selection__choice { + color: #b1afb2; + background-color: rgba(255, 255, 255, 0.4); + cursor: not-allowed; + border-color: rgba(255, 255, 255, 0.4); + -webkit-box-shadow: none; + box-shadow: none; +} +.select2-container--bootstrap-5 .select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove:hover { + opacity: 0.5; +} +.select2-container--bootstrap-5 .select2-dropdown { + background-color: #212529; + border-color: rgba(255, 255, 255, 0.1); +} +.select2-container--bootstrap-5 .select2-dropdown .select2-results__option[aria-selected=true] { + background-color: rgba(255, 255, 255, 0.1); +} +.select2-container--bootstrap-5 .select2-results__option--highlighted { + background-color: rgba(255, 255, 255, 0.1); + color: #fff; +} +.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option[aria-selected=true] { + background-color: rgba(255, 255, 255, 0.1); + color: #fff; +} +.select2-container--bootstrap-5 .select2-results__option--selectable.select2-results__option--selected { + color: rgba(255, 255, 255, 0.5); +} +.select2-container--bootstrap-5 .select2-results > .select2-results__options { + max-height: 200px; + overflow-y: auto; +} +.select2-container--bootstrap-5.select2-container--open .select2-selection { + border-color: #86b7fe; + outline: 0; + -webkit-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + -moz-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.select2-container--bootstrap-5[dir=rtl] .select2-selection--single { + background-position: left 0.75rem center; + padding: 0.375rem 0.75rem 0.375rem 1.75rem; +} +.select2-container--bootstrap-5[dir=rtl] .select2-selection--single .select2-selection__rendered { + /* padding: 2px 4px 0 0;*/ + padding: 0 4px 0 0; +} +.select2-container--bootstrap-5[dir=rtl] .select2-selection__arrow { + display: none; +} +.select2-container--bootstrap-5[dir=rtl] .select2-selection__clear, +.select2-container--bootstrap-5[dir=rtl] .select2-search--inline { + float: right; + margin-left: 0; + margin-right: 4px; +} +.select2-container--bootstrap-5[dir=rtl] .select2-selection--multiple .select2-selection__choice { + float: right; + margin: 4px 4px 0 0; +} +.select2-container--bootstrap-5[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove { + margin-right: 0; + margin-left: 0.15rem; +} + +.input-group .select2-container--bootstrap-5 { + display: flex; + align-content: center; + align-items: center; + flex-direction: row; + flex: 1; +} +.input-group .select2-container--bootstrap-5:not(:last-child) .select2-selection { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group .select2-container--bootstrap-5[dir=rtl] :not(:last-child) .select2-selection { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; +} +.input-group .input-group-text ~ .select2-container--bootstrap-5 .select2-selection { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group .input-group-text ~ .select2-container--bootstrap-5[dir=rtl] .select2-selection { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group .input-group-text ~ .select2-container--bootstrap-5[dir=rtl]:last-child .select2-selection { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +/***!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! End Select 2 Dark Theme Style ***/ +/*! + * Select2 v4 Bootstrap 5 theme v1.3.0 +*/ +.select2-container--bootstrap-5 { + display: block; +} +select + .select2-container--bootstrap-5 { + z-index: 1; +} + +.select2-container--bootstrap-5 *:focus { + outline: 0; +} +.select2-container--bootstrap-5 .select2-selection { + width: 100%; + min-height: calc(1.5em + 0.75rem + 2px); + padding: 0.375rem 0.75rem; + font-family: inherit; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .select2-container--bootstrap-5 .select2-selection { + transition: none; + } +} +.select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection { + border-bottom: 0 solid transparent; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection { + border-top: 0 solid transparent; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.select2-container--bootstrap-5 .select2-search { + width: 100%; +} +.select2-container--bootstrap-5 .select2-search--inline .select2-search__field { + vertical-align: top; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear, +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear { + position: absolute; + top: 50%; + right: 2.25rem; + width: 0.75rem; + height: 0.75rem; + padding: 0.25em 0.25em; + overflow: hidden; + text-indent: 100%; + white-space: nowrap; + transform: translateY(-50%); +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear > span, +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear > span { + display: none; +} + +.select2-container--bootstrap-5 + .select2-container--bootstrap-5 { + z-index: 1056; +} +.select2-container--bootstrap-5 .select2-dropdown { + z-index: 1056; + overflow: hidden; + border-radius: 0.25rem; +} +.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--below { + border-top: 0 solid transparent; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--above { + border-bottom: 0 solid transparent; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.select2-container--bootstrap-5 .select2-dropdown .select2-search { + padding: 0.375rem 0.75rem; +} +.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-family: inherit; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + background-clip: padding-box; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { + transition: none; + } +} +.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus { + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.select2-container--bootstrap-5 .select2-dropdown .select2-results__options:not(.select2-results__options--nested) { + max-height: 15rem; + overflow-y: auto; +} +.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option { + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; +} +.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] { + padding: 0; +} +.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group { + padding: 0.375rem 0.375rem; + font-weight: 500; + line-height: 1.5; +} +.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__options--nested .select2-results__option { + padding: 0.375rem 0.75rem; +} + +.select2-container--bootstrap-5 .select2-selection--single { + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { + padding: 0; + font-weight: 400; + line-height: 1.5; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder { + font-weight: 400; + line-height: 1.5; +} +.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__arrow { + display: none; +} + +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered { + display: flex; + flex-direction: row; + flex-wrap: wrap; + padding-left: 0; + margin: 0; + list-style: none; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { + display: flex; + flex-direction: row; + align-items: center; + padding: 0.35em 0.65em; + margin-right: 0.375rem; + margin-bottom: 0.375rem; + font-size: 1rem; + cursor: auto; + border-radius: 0.25rem; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove { + width: 0.75rem; + height: 0.75rem; + padding: 0.25em 0.25em; + margin-right: 0.25rem; + overflow: hidden; + text-indent: 100%; + white-space: nowrap; + border: 0; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove > span { + display: none; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-search { + display: block; + width: 100%; + height: 1.5rem; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field { + width: 100%; + height: 1.5rem; + margin-top: 0; + margin-left: 0; + font-family: inherit; + line-height: 1.5; +} +.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear { + right: 0.75rem; +} + +.select2-container--bootstrap-5.select2-container--disabled .select2-selection, .select2-container--bootstrap-5.select2-container--disabled.select2-container--focus .select2-selection { + cursor: not-allowed; + box-shadow: none; +} +.select2-container--bootstrap-5.select2-container--disabled .select2-selection--multiple .select2-selection__clear, .select2-container--bootstrap-5.select2-container--disabled.select2-container--focus .select2-selection--multiple .select2-selection__clear { + display: none; +} +.select2-container--bootstrap-5.select2-container--disabled .select2-selection--multiple .select2-selection__choice, .select2-container--bootstrap-5.select2-container--disabled.select2-container--focus .select2-selection--multiple .select2-selection__choice { + cursor: not-allowed; +} +.select2-container--bootstrap-5.select2-container--disabled .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove, .select2-container--bootstrap-5.select2-container--disabled.select2-container--focus .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove { + display: none; +} +.select2-container--bootstrap-5.select2-container--disabled .select2-selection--multiple .select2-selection__rendered:not(:empty), .select2-container--bootstrap-5.select2-container--disabled.select2-container--focus .select2-selection--multiple .select2-selection__rendered:not(:empty) { + padding-bottom: 0; +} +.select2-container--bootstrap-5.select2-container--disabled .select2-selection--multiple .select2-selection__rendered:not(:empty) + .select2-search, .select2-container--bootstrap-5.select2-container--disabled.select2-container--focus .select2-selection--multiple .select2-selection__rendered:not(:empty) + .select2-search { + display: none; +} + +.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu).select2-container--bootstrap-5 .select2-selection { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu).select2-container--bootstrap-5 .select2-selection { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group > .input-group-text ~ .select2-container--bootstrap-5 .select2-selection, +.input-group > .btn ~ .select2-container--bootstrap-5 .select2-selection, +.input-group > .dropdown-menu ~ .select2-container--bootstrap-5 .select2-selection { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group .select2-container--bootstrap-5 { + flex-grow: 1; +} +.input-group .select2-container--bootstrap-5 .select2-selection { + height: 100%; +} + +.is-valid + .select2-container--bootstrap-5 .select2-selection, .was-validated select:valid + .select2-container--bootstrap-5 .select2-selection { + border-color: #198754; +} +.is-valid + .select2-container--bootstrap-5.select2-container--focus .select2-selection, .is-valid + .select2-container--bootstrap-5.select2-container--open .select2-selection, .was-validated select:valid + .select2-container--bootstrap-5.select2-container--focus .select2-selection, .was-validated select:valid + .select2-container--bootstrap-5.select2-container--open .select2-selection { + border-color: #198754; + box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); +} +.is-valid + .select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection, .was-validated select:valid + .select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection { + border-bottom: 0 solid transparent; +} +.is-valid + .select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection, .was-validated select:valid + .select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection { + border-top: 0 solid transparent; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.is-invalid + .select2-container--bootstrap-5 .select2-selection, .was-validated select:invalid + .select2-container--bootstrap-5 .select2-selection { + border-color: #dc3545; +} +.is-invalid + .select2-container--bootstrap-5.select2-container--focus .select2-selection, .is-invalid + .select2-container--bootstrap-5.select2-container--open .select2-selection, .was-validated select:invalid + .select2-container--bootstrap-5.select2-container--focus .select2-selection, .was-validated select:invalid + .select2-container--bootstrap-5.select2-container--open .select2-selection { + border-color: #dc3545; + box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); +} +.is-invalid + .select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection, .was-validated select:invalid + .select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection { + border-bottom: 0 solid transparent; +} +.is-invalid + .select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection, .was-validated select:invalid + .select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection { + border-top: 0 solid transparent; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.select2-container--bootstrap-5 .select2--small.select2-selection { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.2rem; +} +.select2-container--bootstrap-5 .select2--small.select2-selection--single .select2-selection__clear, +.select2-container--bootstrap-5 .select2--small.select2-selection--multiple .select2-selection__clear { + width: 0.5rem; + height: 0.5rem; + padding: 0.125rem 0.125rem; +} +.select2-container--bootstrap-5 .select2--small.select2-selection--single .select2-search, +.select2-container--bootstrap-5 .select2--small.select2-selection--single .select2-search .select2-search__field, +.select2-container--bootstrap-5 .select2--small.select2-selection--multiple .select2-search, +.select2-container--bootstrap-5 .select2--small.select2-selection--multiple .select2-search .select2-search__field { + height: 1.5em; +} +.select2-container--bootstrap-5 .select2--small.select2-dropdown { + border-radius: 0.2rem; +} +.select2-container--bootstrap-5 .select2--small.select2-dropdown.select2-dropdown--below { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.select2-container--bootstrap-5 .select2--small.select2-dropdown.select2-dropdown--above { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.select2-container--bootstrap-5 .select2--small.select2-dropdown .select2-search .select2-search__field { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; +} +.select2-container--bootstrap-5 .select2--small.select2-dropdown .select2-results__options .select2-results__option { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; +} +.select2-container--bootstrap-5 .select2--small.select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group { + padding: 0.25rem 0.25rem; +} +.select2-container--bootstrap-5 .select2--small.select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__options--nested .select2-results__option { + padding: 0.25rem 0.5rem; +} +.select2-container--bootstrap-5 .select2--small.select2-selection--single { + padding: 0.25rem 2.25rem 0.25rem 0.5rem; +} +.select2-container--bootstrap-5 .select2--small.select2-selection--multiple .select2-selection__rendered .select2-selection__choice { + padding: 0.35em 0.65em; + font-size: 0.875rem; +} +.select2-container--bootstrap-5 .select2--small.select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove { + width: 0.5rem; + height: 0.5rem; + padding: 0.125rem 0.125rem; +} +.select2-container--bootstrap-5 .select2--small.select2-selection--multiple .select2-selection__clear { + right: 0.5rem; +} +.select2-container--bootstrap-5 .select2--large.select2-selection { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.3rem; +} +.select2-container--bootstrap-5 .select2--large.select2-selection--single .select2-selection__clear, +.select2-container--bootstrap-5 .select2--large.select2-selection--multiple .select2-selection__clear { + width: 1rem; + height: 1rem; + padding: 0.5rem 0.5rem; +} +.select2-container--bootstrap-5 .select2--large.select2-selection--single .select2-search, +.select2-container--bootstrap-5 .select2--large.select2-selection--single .select2-search .select2-search__field, +.select2-container--bootstrap-5 .select2--large.select2-selection--multiple .select2-search, +.select2-container--bootstrap-5 .select2--large.select2-selection--multiple .select2-search .select2-search__field { + height: 1.5em; +} +.select2-container--bootstrap-5 .select2--large.select2-dropdown { + border-radius: 0.3rem; +} +.select2-container--bootstrap-5 .select2--large.select2-dropdown.select2-dropdown--below { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.select2-container--bootstrap-5 .select2--large.select2-dropdown.select2-dropdown--above { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.select2-container--bootstrap-5 .select2--large.select2-dropdown .select2-search .select2-search__field { + padding: 0.5rem 1rem; + font-size: 1.25rem; +} +.select2-container--bootstrap-5 .select2--large.select2-dropdown .select2-results__options .select2-results__option { + padding: 0.5rem 1rem; + font-size: 1.25rem; +} +.select2-container--bootstrap-5 .select2--large.select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group { + padding: 0.5rem 0.5rem; +} +.select2-container--bootstrap-5 .select2--large.select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__options--nested .select2-results__option { + padding: 0.5rem 1rem; +} +.select2-container--bootstrap-5 .select2--large.select2-selection--single { + padding: 0.5rem 2.25rem 0.5rem 1rem; +} +.select2-container--bootstrap-5 .select2--large.select2-selection--multiple .select2-selection__rendered .select2-selection__choice { + padding: 0.35em 0.65em; + font-size: 1.25rem; +} +.select2-container--bootstrap-5 .select2--large.select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove { + width: 1rem; + height: 1rem; + padding: 0.5rem 0.5rem; +} +.select2-container--bootstrap-5 .select2--large.select2-selection--multiple .select2-selection__clear { + right: 1rem; +} + +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection { + min-height: calc(1.5em + 0.5rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.2rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear, +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear { + width: 0.5rem; + height: 0.5rem; + padding: 0.125rem 0.125rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--single .select2-search, +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--single .select2-search .select2-search__field, +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-search, +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field { + height: 1.5em; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-dropdown { + border-radius: 0.2rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--below { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--above { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group { + padding: 0.25rem 0.25rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__options--nested .select2-results__option { + padding: 0.25rem 0.5rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--single { + padding: 0.25rem 2.25rem 0.25rem 0.5rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { + padding: 0.35em 0.65em; + font-size: 0.875rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove { + width: 0.5rem; + height: 0.5rem; + padding: 0.125rem 0.125rem; +} +.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear { + right: 0.5rem; +} + +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection { + min-height: calc(1.5em + 1rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + border-radius: 0.3rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear, +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear { + width: 1rem; + height: 1rem; + padding: 0.5rem 0.5rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--single .select2-search, +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--single .select2-search .select2-search__field, +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-search, +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field { + height: 1.5em; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-dropdown { + border-radius: 0.3rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--below { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--above { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { + padding: 0.5rem 1rem; + font-size: 1.25rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option { + padding: 0.5rem 1rem; + font-size: 1.25rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group { + padding: 0.5rem 0.5rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__options--nested .select2-results__option { + padding: 0.5rem 1rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--single { + padding: 0.5rem 2.25rem 0.5rem 1rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { + padding: 0.35em 0.65em; + font-size: 1.25rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove { + width: 1rem; + height: 1rem; + padding: 0.5rem 0.5rem; +} +.form-select-lg ~ .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear { + right: 1rem; +} + diff --git a/public/users.js b/public/users.js new file mode 100644 index 0000000..2379a3f --- /dev/null +++ b/public/users.js @@ -0,0 +1,45 @@ +/** + * Wrapper for client-side TikTok connection over Socket.IO + * With reconnect functionality. + */ +class YohnsUsers { + constructor(backendUrl) { + this.socket = io(backendUrl); + this.uniqueId = null; + this.options = null; + + this.socket.on('connect', () => { + console.info("Socket connected!"); + }) + + this.socket.on('streamEnd', () => { + console.warn("LIVE has ended!"); + this.uniqueId = null; + }) + + } + + connect(uniqueId, options) { + this.uniqueId = uniqueId; + this.options = options || {}; + + this.setUniqueId(); + + return new Promise((resolve, reject) => { + this.socket.once('tiktokConnected', resolve); + this.socket.once('tiktokDisconnected', reject); + + setTimeout(() => { + reject('Connection Timeout'); + }, 15000) + }) + } + + setUniqueId() { + this.socket.emit('setUniqueId', this.uniqueId, this.options); + } + + on(eventName, eventHandler) { + this.socket.on(eventName, eventHandler); + } +} \ No newline at end of file diff --git a/server.js b/server.js index 3b6d916..c1476d3 100644 --- a/server.js +++ b/server.js @@ -1,13 +1,32 @@ require('dotenv').config(); +// thinking about trying to bring some sort of framework in here.. + const express = require('express'); const { createServer } = require('http'); const { Server } = require('socket.io'); const { TikTokConnectionWrapper, getGlobalConnectionCount } = require('./connectionWrapper'); const { clientBlocked } = require('./limiter'); +//const { updateUsernames, readUsernames } = require('./tt-usernames'); +// https://www.atatus.com/blog/read-write-a-json-file-with-node-js/ +// ^^ Possible alternative use for reading / writing files +const editJsonFile = require("edit-json-file"); +const {google} = require('googleapis'); + +//! used for finding files in the sounds folder + +//const {fs,writefile} = require('fs'); +const fs = require('fs'); +// setting up google apis +// https://medium.com/@shkim04/beginner-guide-on-google-sheet-api-for-node-js-4c0b533b071a +// https://github.com/googleworkspace/browser-samples/tree/main/sheets/snippets const app = express(); const httpServer = createServer(app); +app.use(express.urlencoded({ extended: true })); + +let file = editJsonFile(`${__dirname}/public/config.json`); +let toDoData = editJsonFile(`${__dirname}/toDoData.json`); // Enable cross origin resource sharing const io = new Server(httpServer, { @@ -15,7 +34,13 @@ const io = new Server(httpServer, { origin: '*' } }); - +let isLoggedIn = false, loggedInRow = -1, userRow = {}; +// sheets-api-nodejs helped with the connection +const auth = new google.auth.GoogleAuth({ + keyFile: "keys.json", //the key file + //url to spreadsheets API + scopes: "https://www.googleapis.com/auth/spreadsheets", +}); io.on('connection', (socket) => { let tiktokConnectionWrapper; @@ -63,24 +88,362 @@ io.on('connection', (socket) => { // Redirect message events tiktokConnectionWrapper.connection.on('roomUser', msg => socket.emit('roomUser', msg)); tiktokConnectionWrapper.connection.on('member', msg => socket.emit('member', msg)); - tiktokConnectionWrapper.connection.on('chat', msg => socket.emit('chat', msg)); + tiktokConnectionWrapper.connection.on('chat', (msg) => { + // lets tranalate before it even comes to the front end, + // instead of sending to front, to back, and again to the front. + // thats too many, come on now + socket.emit('chat', msg) + }); tiktokConnectionWrapper.connection.on('gift', msg => socket.emit('gift', msg)); tiktokConnectionWrapper.connection.on('social', msg => socket.emit('social', msg)); tiktokConnectionWrapper.connection.on('like', msg => socket.emit('like', msg)); - tiktokConnectionWrapper.connection.on('questionNew', msg => socket.emit('questionNew', msg)); + tiktokConnectionWrapper.connection.on('questionNew', (msg) => { + socket.emit('questionNew', msg); + toDoData.append('toDoData.questionNew', data) + toDoData.save(); + }) tiktokConnectionWrapper.connection.on('linkMicBattle', msg => socket.emit('linkMicBattle', msg)); tiktokConnectionWrapper.connection.on('linkMicArmies', msg => socket.emit('linkMicArmies', msg)); tiktokConnectionWrapper.connection.on('liveIntro', msg => socket.emit('liveIntro', msg)); - tiktokConnectionWrapper.connection.on('emote', msg => socket.emit('emote', msg)); - tiktokConnectionWrapper.connection.on('envelope', msg => socket.emit('envelope', msg)); - tiktokConnectionWrapper.connection.on('subscribe', msg => socket.emit('subscribe', msg)); + //tiktokConnectionWrapper.connection.on('emote', msg => socket.emit('emote', msg)); + tiktokConnectionWrapper.connection.on('envelope', (msg) => { + socket.emit('envelope', msg); + toDoData.append('toDoData.envelope', msg) + toDoData.save(); + }) + tiktokConnectionWrapper.connection.on('subscribe', (msg) => { + socket.emit('subscribe', msg); + toDoData.append('toDoData.subscribe', msg) + toDoData.save(); + }) + //tiktokConnectionWrapper.connection.on('rawData', (messageTypeName, binary) => socket.emit('rawData', messageTypeName)); + //console.log(messageTypeName, binary); }); + + //socket.on("upload", (file, callback) => { + // console.log(file); // + // // save the content to the disk, for example + // writeFile("sounds/", file, (err) => { + // console.log({ message: err ? "failure" : "success" }); + // }); + //}); + socket.on('disconnect', () => { if (tiktokConnectionWrapper) { tiktokConnectionWrapper.disconnect(); } }); + + socket.on('userUpdateSavedHosts', async (data) => { + if(typeof loggedInRow !== undefined){ + console.log('based on when we logged in') + console.log('user row = '+loggedInRow) + console.log(data) + console.log('/ userUpdateSavedHosts') + } + /* + @ from async above + ^ data.body = { + #? "mimeType": "application/json", + ^ "text": "{\n\t\"values\": [\n\t\t[\"patchapi\"]\n\t]\n}" + ^ } + + $ id = data.rowId + $ values = data.body + !googleSheets.spreadsheets.values.update({ + ! auth, + ! spreadsheetId, + ! range: `Sheet1!A${id}`, // {id} = the row # i believe? + ! valueInputOption: "RAW", + ! resource: { + ! values: values + ! } + !}) + */ + }) + + // data.place, data.vals + // google sheets + socket.on('userSaveNote', async (dat)=>{ + //Auth client Object + const authClientObject = await auth.getClient(); + //Google sheets instance + const googleSheetsInstance = google.sheets({ version: "v4", auth: authClientObject }); + + const spreadsheetId = process.env.GOOGLE_USER_SHEET_ID //process.env.GOOGLE_SHEET_ID; + const userNotes = await googleSheetsInstance.spreadsheets.values.get({ + auth, //auth object + spreadsheetId, //spreadsheet id + range: "Notes" //!A1:B1:C1:D1:E1:F1:G1:H1:I1:J1:K1:L1", //sheet name and range of cells + }); + let noteCount = userNotes.data.values.length, n, userNotesRow = {}; + for(n=0;n { + //Auth client Object + const authClientObject = await auth.getClient(); + //Google sheets instance + const googleSheetsInstance = google.sheets({ version: "v4", auth: authClientObject }); + + const spreadsheetId = process.env.GOOGLE_USER_SHEET_ID //process.env.GOOGLE_SHEET_ID; + const userList = await googleSheetsInstance.spreadsheets.values.get({ + auth, //auth object + spreadsheetId, //spreadsheet id + range: "Sheet1" //!A1:B1:C1:D1:E1:F1:G1:H1:I1:J1:K1:L1", //sheet name and range of cells + }); + let allUsers = userList.data.values.length, b + , found = false + , userRowData = {}, newSettingsMenu = ` +
                • +
                • Saved Hosts
                • +
                • + ` + + for(b=1;b { + //console.log(data) + //Auth client Object + const authClientObject = await auth.getClient(); + //Google sheets instance + const googleSheetsInstance = google.sheets({ version: "v4", auth: authClientObject }); + + // spreadsheet id + const spreadsheetId = process.env.GOOGLE_SHEET_ID //process.env.GOOGLE_SHEET_ID; + await googleSheetsInstance.spreadsheets.values.append({ + auth, //auth object + spreadsheetId, //spreadsheet id + range: "Sheet1", //!A1:B1:C1:D1:E1:F1:G1:H1:I1:J1:K1:L1", //sheet name and range of cells + valueInputOption: "USER_ENTERED", // The information will be passed according to what the user passes in as date, number or text + resource: { + values: [[ + //data.timestamp.toLocaleDateString("en-US"), + Intl.DateTimeFormat(this.locale, { + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric" + }).format(data.timestamp), + data.userId, + data.uniqueId, + data.nickname, + '=IMAGE("'+data.profilePictureUrl+'",2)', + data.giftId, + data.giftName, + '=IMAGE("'+data.giftPictureUrl+'",2)', + data.repeatCount, + data.diamondCount, + data.receiverUser, + data.receiverUserId + ]] //[[dat, username, nickname, coinsSent, userId]] + }, + }); + + //response.send("Gift Saved!") + }) + + var sounds = fs.readdirSync('public/sounds/'); + socket.emit('soundDirectory', { + r : 'done', + files : sounds + }); + socket.on('saveGiftSound', async (data) => { + let msg + if(data.gift == '' || data.sound == ''){ + // error + msg = 'Gift or Sound not found.' + } else { + file.set('sounds.gift.'+data.gift, data.sound) + file.save(); + msg = 'Sound had been saved for gift - '+data.gift+'.' + } + socket.emit('saveGiftSound', { + r : `` + }); + }) + socket.on('removeGiftSound', async (data) => { + file.set('sounds.gift.'+data.gift, data.sound) + file.save(); + msg = 'Gift sound had been removed for - '+data.gift+'.' + socket.emit('removeGiftSound', { + r : `` + }); + }) + + socket.on('toDoData', async (data) => { + toDoData.append('toDoData.'+data.socket, data.data) + toDoData.save(); + socket.emit('toDoData', { + r : `Saved to-do Data!` + }); + }) + socket.on('deleteNote', async (data) => { + let find = data.name, list = file.get('notes'), + list_len = list.length, i, ob = [] + file.unset('notes') + console.log('find -- '+find+' --- find') + console.log(list_len+' total notes') + for(i=0;i { + let msg = '' + if(data.id == 'new'){ + //file.append('notes.'+data.name, data.note) + file.append('notes', {name : data.name, note : data.note}) + msg = 'New Note Saved!' + } else { + let find = data.id, list = file.get('notes'), + list_len = list.length, i, ob = [] + //console.log(list) + //file.set('notes', undefined) + //console.log(find) + //console.log('----find') + ////console.log('remove - '+dname) + for(i=0;i { + let dname = data.name, json = file.get('names') + if(json.includes(dname) == false){ + file.append('names', dname) + file.save(); + socket.emit('addToNames', { + r : 'done', + name : dname + }); + } + }) + socket.on('removeNames', async (data) => { + let dname = data.name, list = file.get('names'), + list_len = list.length, i, ob = [] + //file.set('sounds.'+dname, 'somestr') + file.set('names', undefined) + //console.log(data) + //console.log('remove - '+dname) + for(i=0;i { + // //response.send(readUsernames()) + // socket.emit('readUsernames', { + // names : readUsernames() + // }); + //}) }); // Emit global connection statistics diff --git a/toDoData.json b/toDoData.json new file mode 100644 index 0000000..2c1af9d --- /dev/null +++ b/toDoData.json @@ -0,0 +1,567 @@ +{ + "toDoData": { + "questionNew": [ + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥 BATTLE 4/11 8:30 EST", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4179, + "followerCount": 9042, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 120, + "canOpen": 80, + "timestamp": 1712882266 + }, + { + "userId": "6959342354898961414", + "secUid": "MS4wLjABAAAAJCkXOfrX0n6fNb8aa3BKcsgqvrEc0aRuWEuDXT-uxq_laXJRHKeLdrSWLlC4JyBP", + "uniqueId": "coroagato1", + "nickname": "𝐂𝐨𝐫𝐨𝐚 𝐆𝐚𝐭𝐨 🦂❤️‍🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [ + { + "badgeSceneType": 3, + "type": "pm_mt_comment_friends_im", + "name": "Friends" + } + ], + "userSceneTypes": [ + 3 + ], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 3037, + "followerCount": 5048, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 20, + "canOpen": 16, + "timestamp": 1712882148 + }, + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4183, + "followerCount": 9048, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 120, + "canOpen": 80, + "timestamp": 1712908457 + }, + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4183, + "followerCount": 9048, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 120, + "canOpen": 80, + "timestamp": 1712908775 + }, + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4183, + "followerCount": 9048, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 120, + "canOpen": 80, + "timestamp": 1712908893 + }, + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4183, + "followerCount": 9056, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 40, + "canOpen": 30, + "timestamp": 1712909038 + }, + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4183, + "followerCount": 9061, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 35, + "canOpen": 25, + "timestamp": 1712909269 + }, + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4183, + "followerCount": 9062, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 20, + "canOpen": 16, + "timestamp": 1712909243 + } + ], + "subscribe": [ + { + "subscribeType": 1, + "subscribingStatus": 2, + "userId": "7184363233939014662", + "secUid": "MS4wLjABAAAAeFsQe5c7YVUUPT-UfxVG8UpXKJ_WyvjCcWCsPrL9U5CK6G6tuH9ozGa8hzSYqbTc", + "uniqueId": "its_meaiai24", + "nickname": "Queen Ai-ai👸", + "profilePictureUrl": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/26c070607910602bd18abc1ef42f50dc~c5_100x100.webp?lk3s=a5d48078&x-expires=1713747600&x-signature=4fyXtpAgFb5QfgFV%2B5ATB2ZR0XQ%3D", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/26c070607910602bd18abc1ef42f50dc~c5_100x100.webp?lk3s=a5d48078&x-expires=1713747600&x-signature=4fyXtpAgFb5QfgFV%2B5ATB2ZR0XQ%3D", + "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/26c070607910602bd18abc1ef42f50dc~c5_100x100.jpeg?lk3s=a5d48078&x-expires=1713747600&x-signature=TfrTMywE8fj5V%2BSOZYH5%2F33JsdA%3D" + ] + }, + "followInfo": { + "followingCount": 2189, + "followerCount": 5101, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "msgId": "7359765479415843585", + "createTime": "1713579034414", + "displayType": "pm_mt_goal_progress_comment", + "label": "{0:user} subscribed. Subscription goal progress: {1:string}/{2:string}" + }, + { + "subscribeType": 1, + "subscribingStatus": 2, + "userId": "7184363233939014662", + "secUid": "MS4wLjABAAAAeFsQe5c7YVUUPT-UfxVG8UpXKJ_WyvjCcWCsPrL9U5CK6G6tuH9ozGa8hzSYqbTc", + "uniqueId": "its_meaiai24", + "nickname": "Queen Ai-ai👸", + "profilePictureUrl": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/26c070607910602bd18abc1ef42f50dc~c5_100x100.webp?lk3s=a5d48078&x-expires=1713747600&x-signature=4fyXtpAgFb5QfgFV%2B5ATB2ZR0XQ%3D", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/26c070607910602bd18abc1ef42f50dc~c5_100x100.webp?lk3s=a5d48078&x-expires=1713747600&x-signature=4fyXtpAgFb5QfgFV%2B5ATB2ZR0XQ%3D", + "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/26c070607910602bd18abc1ef42f50dc~c5_100x100.jpeg?lk3s=a5d48078&x-expires=1713747600&x-signature=TfrTMywE8fj5V%2BSOZYH5%2F33JsdA%3D" + ] + }, + "followInfo": { + "followingCount": 2189, + "followerCount": 5101, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "msgId": "7359765479415843585", + "createTime": "1713579034414", + "displayType": "pm_mt_goal_progress_comment", + "label": "{0:user} subscribed. Subscription goal progress: {1:string}/{2:string}" + }, + { + "subscribeType": 1, + "subscribingStatus": 2, + "userId": "6811915334393152517", + "secUid": "MS4wLjABAAAAzDnx7SrdL-a8YH4CSODEakc40wh2qI_Czfi9Nux0Pwb26lT2yM3O9JMP3_c4T14s", + "uniqueId": "shazza_willow_wiggles", + "nickname": "Shazza-Willow&Wiggles🌶", + "profilePictureUrl": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/530f56859477e1fe1b2c99efda073b30~c5_100x100.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=DzR16RDelymD17wVRtQoJO7lW%2BY%3D", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/530f56859477e1fe1b2c99efda073b30~c5_100x100.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=DzR16RDelymD17wVRtQoJO7lW%2BY%3D", + "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/530f56859477e1fe1b2c99efda073b30~c5_100x100.jpeg?lk3s=a5d48078&x-expires=1713826800&x-signature=dWbDWyT6Bv4UL7qtXDFLNse%2Bplc%3D" + ] + }, + "followInfo": { + "followingCount": 2261, + "followerCount": 2253, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "msgId": "7360096725295745824", + "createTime": "1713656131949", + "displayType": "pm_mt_goal_progress_comment", + "label": "{0:user} subscribed. Subscription goal progress: {1:string}/{2:string}" + }, + { + "subMonth": 1, + "subscribingStatus": 1, + "userId": "6835586396888613894", + "secUid": "MS4wLjABAAAA4FqaHqpJ0Bf-DYZSH3J06Jho_j5dBJhPDK5bZocNr_x1-M7H6k_lByPNQvwDyhnA", + "uniqueId": "__tarz__", + "nickname": "✯ ⓉⒶⓇⓏ ✯", + "profilePictureUrl": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/a483bb5ec19139af90097830370f0959~c5_100x100.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=vDdJpO9sJW4fs8gNejyTdEoJIr4%3D", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/a483bb5ec19139af90097830370f0959~c5_100x100.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=vDdJpO9sJW4fs8gNejyTdEoJIr4%3D", + "https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/a483bb5ec19139af90097830370f0959~c5_100x100.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=jmQurSlnYW1PBuC6lq5Gowd7%2FZ0%3D", + "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/a483bb5ec19139af90097830370f0959~c5_100x100.jpeg?lk3s=a5d48078&x-expires=1713826800&x-signature=Fx8I%2FsfHX2bojJMoMbGh7lYK0l8%3D" + ] + }, + "followInfo": { + "followingCount": 546, + "followerCount": 154833, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "msgId": "7360098009356651280", + "createTime": "1713656445572", + "displayType": "pm_mt_goal_progress_comment", + "label": "{0:user} subscribed. Subscription goal progress: {1:string}/{2:string}" + }, + { + "subMonth": 1, + "subscribingStatus": 1, + "userId": "6618631836572991494", + "secUid": "MS4wLjABAAAAVtbfIcEm3KFofbhkIW_HGPwofWSi40jqaYqRL-1mM1omsAsh2Qv_d-dgeTTApdcH", + "uniqueId": "__tovbeli_", + "nickname": "__tovbeli_", + "profilePictureUrl": "https://p77-sign-sg.tiktokcdn.com/aweme/100x100/tos-alisg-avt-0068/ed1714d25d4cba1afe3929a3dc644245.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=iCpqoQMeq7KFHl9Jvp%2FeTCk5vHc%3D", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p77-sign-sg.tiktokcdn.com/aweme/100x100/tos-alisg-avt-0068/ed1714d25d4cba1afe3929a3dc644245.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=iCpqoQMeq7KFHl9Jvp%2FeTCk5vHc%3D", + "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/tos-alisg-avt-0068/ed1714d25d4cba1afe3929a3dc644245.webp?lk3s=a5d48078&x-expires=1713826800&x-signature=r0j2jJijFEX0QJaBnOu6MA7Q%2BmI%3D", + "https://p77-sign-sg.tiktokcdn.com/aweme/100x100/tos-alisg-avt-0068/ed1714d25d4cba1afe3929a3dc644245.jpeg?lk3s=a5d48078&x-expires=1713826800&x-signature=5SfRB6y2mBbEzQ8K6OiuPlPKeaU%3D" + ] + }, + "followInfo": { + "followingCount": 277, + "followerCount": 1427, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "msgId": "7360099234814806801", + "createTime": "1713656662875", + "displayType": "pm_mt_goal_progress_comment", + "label": "{0:user} subscribed. Subscription goal progress: {1:string}/{2:string}" + }, + { + "subMonth": 1, + "subscribingStatus": 1, + "userId": "7109605503030690858", + "secUid": "MS4wLjABAAAApO-SRcJNV37fAl_U1gDY0y7NwgRRO3SZRR4b6I_UMJ-lOKZvQTyQiTwSntQ8A3cK", + "uniqueId": "stephanie_2312_", + "nickname": "Stephanie", + "profilePictureUrl": "https://p19-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d720e0b1b590ebbb3d59bc03991e3fcf~c5_100x100.webp?lk3s=a5d48078&nonce=28838&refresh_token=7d293db8f877b947274a5a8e984fe254&x-expires=1716692400&x-signature=o0De0UrJzCxHbK2BA%2B%2BTvROck3E%3D&shp=a5d48078&shcp=fdd36af4", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p19-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d720e0b1b590ebbb3d59bc03991e3fcf~c5_100x100.webp?lk3s=a5d48078&nonce=28838&refresh_token=7d293db8f877b947274a5a8e984fe254&x-expires=1716692400&x-signature=o0De0UrJzCxHbK2BA%2B%2BTvROck3E%3D&shp=a5d48078&shcp=fdd36af4", + "https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d720e0b1b590ebbb3d59bc03991e3fcf~c5_100x100.webp?lk3s=a5d48078&nonce=58673&refresh_token=9f5655bdaaa0d5e98ff5256717f6aef0&x-expires=1716692400&x-signature=fBhgd3iOv2Ate%2B0YHl76p%2FrCdO8%3D&shp=a5d48078&shcp=fdd36af4", + "https://p19-pu-sign-useast8.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d720e0b1b590ebbb3d59bc03991e3fcf~c5_100x100.jpeg?lk3s=a5d48078&nonce=82498&refresh_token=49976bc54708b4273e71ce9ee07afb47&x-expires=1716692400&x-signature=XMTV7dkGscEaJmBhIRlCIqCckfY%3D&shp=a5d48078&shcp=fdd36af4" + ] + }, + "followInfo": { + "followingCount": 248, + "followerCount": 2361, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "msgId": "7372401767043975982", + "createTime": "1716521052578", + "displayType": "pm_mt_goal_progress_comment", + "label": "{0:user} subscribed. Subscription goal progress: {1:string}/{2:string}" + } + ], + "envelope": [ + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4808, + "followerCount": 9118, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 120, + "canOpen": 80, + "timestamp": 1714172137 + }, + { + "userId": "7215390038555935749", + "secUid": "MS4wLjABAAAAaRdp5SWQ_7H3hxAKehoENhZt-wu7z1Tm58QHVKYeLfiZBI9nZGUSHMMuprCHxq0x", + "uniqueId": "a__bruna", + "nickname": "A BRUNA🔥", + "profilePictureUrl": "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "followRole": 0, + "userBadges": [], + "userSceneTypes": [], + "userDetails": { + "createTime": "0", + "bioDescription": "", + "profilePictureUrls": [ + "https://p16-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png", + "https://p19-webcast.tiktokcdn.com/img/alisg/webcast-sg/envelope_comment_avatar.png~tplv-obj.png" + ] + }, + "followInfo": { + "followingCount": 4808, + "followerCount": 9120, + "followStatus": 0, + "pushStatus": 0 + }, + "isModerator": false, + "isNewGifter": false, + "isSubscriber": false, + "topGifterRank": null, + "gifterLevel": 0, + "teamMemberLevel": 0, + "coins": 120, + "canOpen": 80, + "timestamp": 1714172505 + } + ] + } +} \ No newline at end of file diff --git a/tt-usernames.js b/tt-usernames.js new file mode 100644 index 0000000..03d5dc0 --- /dev/null +++ b/tt-usernames.js @@ -0,0 +1,26 @@ +const fs = require('fs'); +const fileName = './tt-usernames.json'; +const file = require(fileName); + +function updateUsernames(name){ + file.key = "new value"; + + fs.writeFile(fileName, JSON.stringify(file), function writeJSON(err) { + if (err) return console.log(err); + console.log(JSON.stringify(file)); + console.log('writing to ' + fileName); + }); +} + +function readUsernames(){ + return [ + "yohn.john", + "aviannaav", + "babysitterhk", + ]; +} + +module.exports = { + updateUsernames, + readUsernames +}; \ No newline at end of file