diff options
-rw-r--r-- | .babelrc | 7 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | babel-import-promise/babel-import-promise.mjs | 31 | ||||
-rw-r--r-- | babel-import-promise/package.json | 5 | ||||
-rw-r--r-- | build.bat | 1 | ||||
-rw-r--r-- | features/networthGUI/index.js | 243 | ||||
-rw-r--r-- | features/statHistoryGui/index.js | 191 | ||||
-rw-r--r-- | features/suggestionsGui/index.js | 219 | ||||
-rw-r--r-- | initdev.bat | 1 | ||||
-rw-r--r-- | package-lock.json | 2181 | ||||
-rw-r--r-- | package.json | 7 | ||||
-rw-r--r-- | src/data/roomdata.json (renamed from data/roomdata.json) | 0 | ||||
-rw-r--r-- | src/datastructures/flatqueue.js (renamed from datastructures/flatqueue.js) | 0 | ||||
-rw-r--r-- | src/featureClass/class.js (renamed from featureClass/class.js) | 2 | ||||
-rw-r--r-- | src/featureClass/featureManager.js (renamed from featureClass/featureManager.js) | 13 | ||||
-rw-r--r-- | src/featureClass/forgeEvents.js (renamed from featureClass/forgeEvents.js) | 0 | ||||
-rw-r--r-- | src/features/bestiary/index.js (renamed from features/bestiary/index.js) | 2 | ||||
-rw-r--r-- | src/features/bestiary/metadata.json (renamed from features/bestiary/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/betterGuis/dungeonReadyGui.js (renamed from features/betterGuis/dungeonReadyGui.js) | 0 | ||||
-rw-r--r-- | src/features/betterGuis/index.js (renamed from features/betterGuis/index.js) | 10 | ||||
-rw-r--r-- | src/features/betterGuis/metadata.json (renamed from features/betterGuis/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/betterGuis/museumGui.js (renamed from features/betterGuis/museumGui.js) | 0 | ||||
-rw-r--r-- | src/features/changeLogGUI/index.js (renamed from features/changeLogGUI/index.js) | 16 | ||||
-rw-r--r-- | src/features/changeLogGUI/metadata.json (renamed from features/changeLogGUI/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/cosmetics/cosmetic.js (renamed from features/cosmetics/cosmetic.js) | 0 | ||||
-rw-r--r-- | src/features/cosmetics/cosmetic/dragon/dragonWings.js (renamed from features/cosmetics/cosmetic/dragon/dragonWings.js) | 2 | ||||
-rw-r--r-- | src/features/cosmetics/hiddenRequirement.js (renamed from features/cosmetics/hiddenRequirement.js) | 0 | ||||
-rw-r--r-- | src/features/cosmetics/index.js (renamed from features/cosmetics/index.js) | 36 | ||||
-rw-r--r-- | src/features/cosmetics/metadata.json (renamed from features/cosmetics/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/dataLoader/index.js (renamed from features/dataLoader/index.js) | 27 | ||||
-rw-r--r-- | src/features/dataLoader/metadata.json (renamed from features/dataLoader/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/dungeonMap/dungeonBossImages/f1.png (renamed from features/dungeonMap/dungeonBossImages/f1.png) | bin | 4681 -> 4681 bytes | |||
-rw-r--r-- | src/features/dungeonMap/index.js (renamed from features/dungeonMap/index.js) | 2 | ||||
-rw-r--r-- | src/features/dungeonMap/map.png (renamed from features/dungeonMap/map.png) | bin | 5648 -> 5648 bytes | |||
-rw-r--r-- | src/features/dungeonMap/metadata.json (renamed from features/dungeonMap/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/dungeonMap2/DungeonMapData.js (renamed from features/dungeonMap2/DungeonMapData.js) | 0 | ||||
-rw-r--r-- | src/features/dungeonMap2/DungeonMapRoom.js (renamed from features/dungeonMap2/DungeonMapRoom.js) | 0 | ||||
-rw-r--r-- | src/features/dungeonMap2/DungeonRoomStaticData.js (renamed from features/dungeonMap2/DungeonRoomStaticData.js) | 0 | ||||
-rw-r--r-- | src/features/dungeonMap2/index.js (renamed from features/dungeonMap2/index.js) | 2 | ||||
-rw-r--r-- | src/features/dungeonMap2/metadata.json (renamed from features/dungeonMap2/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/dungeonRoutes/index.js (renamed from features/dungeonRoutes/index.js) | 2 | ||||
-rw-r--r-- | src/features/dungeonRoutes/metadata.json (renamed from features/dungeonRoutes/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/dungeonRoutes/routesData.json (renamed from features/dungeonRoutes/routesData.json) | 0 | ||||
-rw-r--r-- | src/features/dungeonSolvers/f7data.json (renamed from features/dungeonSolvers/f7data.json) | 0 | ||||
-rw-r--r-- | src/features/dungeonSolvers/index.js (renamed from features/dungeonSolvers/index.js) | 50 | ||||
-rw-r--r-- | src/features/dungeonSolvers/metadata.json (renamed from features/dungeonSolvers/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/events/index.js (renamed from features/events/index.js) | 4 | ||||
-rw-r--r-- | src/features/events/metadata.json (renamed from features/events/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/eventsGUI/index.js (renamed from features/eventsGUI/index.js) | 2 | ||||
-rw-r--r-- | src/features/eventsGUI/metadata.json (renamed from features/eventsGUI/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/featureBase/index.js (renamed from features/featureBase/index.js) | 8 | ||||
-rw-r--r-- | src/features/featureBase/metadata.json (renamed from features/featureBase/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/fpsImproveGui/index.js (renamed from features/fpsImproveGui/index.js) | 11 | ||||
-rw-r--r-- | src/features/fpsImproveGui/metadata.json (renamed from features/fpsImproveGui/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/fragBot/index.js (renamed from features/fragBot/index.js) | 2 | ||||
-rw-r--r-- | src/features/fragBot/metadata.json (renamed from features/fragBot/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/friendsGUI/index.js (renamed from features/friendsGUI/index.js) | 2 | ||||
-rw-r--r-- | src/features/friendsGUI/metadata.json (renamed from features/friendsGUI/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/globalSettings/firstLoadPage.js (renamed from features/globalSettings/firstLoadPage.js) | 0 | ||||
-rw-r--r-- | src/features/globalSettings/firstLoadPages.js (renamed from features/globalSettings/firstLoadPages.js) | 0 | ||||
-rw-r--r-- | src/features/globalSettings/index.js (renamed from features/globalSettings/index.js) | 289 | ||||
-rw-r--r-- | src/features/globalSettings/metadata.json (renamed from features/globalSettings/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/globalSettings/warps.json (renamed from features/globalSettings/warps.json) | 0 | ||||
-rw-r--r-- | src/features/guild/index.js (renamed from features/guild/index.js) | 4 | ||||
-rw-r--r-- | src/features/guild/metadata.json (renamed from features/guild/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/hud/HudTextElement.js (renamed from features/hud/HudTextElement.js) | 0 | ||||
-rw-r--r-- | src/features/hud/index.js (renamed from features/hud/index.js) | 2 | ||||
-rw-r--r-- | src/features/hud/metadata.json (renamed from features/hud/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/lockedFeatures/index.js (renamed from features/lockedFeatures/index.js) | 2 | ||||
-rw-r--r-- | src/features/lockedFeatures/metadata.json (renamed from features/lockedFeatures/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/mining/coords.json (renamed from features/mining/coords.json) | 0 | ||||
-rw-r--r-- | src/features/mining/index.js (renamed from features/mining/index.js) | 4 | ||||
-rw-r--r-- | src/features/mining/metadata.json (renamed from features/mining/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/nether/index.js (renamed from features/nether/index.js) | 4 | ||||
-rw-r--r-- | src/features/nether/metadata.json (renamed from features/nether/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/networthGUI/index.js | 239 | ||||
-rw-r--r-- | src/features/networthGUI/metadata.json (renamed from features/networthGUI/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/performance/hiddenRequirement.js (renamed from features/performance/hiddenRequirement.js) | 0 | ||||
-rw-r--r-- | src/features/performance/index.js (renamed from features/performance/index.js) | 2 | ||||
-rw-r--r-- | src/features/performance/metadata.json (renamed from features/performance/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/senitherGui/index.js (renamed from features/senitherGui/index.js) | 272 | ||||
-rw-r--r-- | src/features/senitherGui/metadata.json (renamed from features/senitherGui/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/settings/helpDataLoader.js (renamed from features/settings/helpDataLoader.js) | 4 | ||||
-rw-r--r-- | src/features/settings/index.js (renamed from features/settings/index.js) | 2 | ||||
-rw-r--r-- | src/features/settings/locationSettingHolder.js (renamed from features/settings/locationSettingHolder.js) | 0 | ||||
-rw-r--r-- | src/features/settings/metadata.json (renamed from features/settings/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/FakeRequireToggle.js (renamed from features/settings/settingThings/FakeRequireToggle.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/button.js (renamed from features/settings/settingThings/button.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/dropdownSetting.js (renamed from features/settings/settingThings/dropdownSetting.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/imageLocation.js (renamed from features/settings/settingThings/imageLocation.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/location.js (renamed from features/settings/settingThings/location.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/settingBase.js (renamed from features/settings/settingThings/settingBase.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/textSetting.js (renamed from features/settings/settingThings/textSetting.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingThings/toggle.js (renamed from features/settings/settingThings/toggle.js) | 0 | ||||
-rw-r--r-- | src/features/settings/settingsCommunicator.js (renamed from features/settings/settingsCommunicator.js) | 0 | ||||
-rw-r--r-- | src/features/slayers/index.js (renamed from features/slayers/index.js) | 2 | ||||
-rw-r--r-- | src/features/slayers/metadata.json (renamed from features/slayers/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/soopyGui/GuiPage.js (renamed from features/soopyGui/GuiPage.js) | 0 | ||||
-rw-r--r-- | src/features/soopyGui/categoryManager.js (renamed from features/soopyGui/categoryManager.js) | 0 | ||||
-rw-r--r-- | src/features/soopyGui/index.js (renamed from features/soopyGui/index.js) | 2 | ||||
-rw-r--r-- | src/features/soopyGui/metadata.json (renamed from features/soopyGui/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/spamHider/index.js (renamed from features/spamHider/index.js) | 69 | ||||
-rw-r--r-- | src/features/spamHider/metadata.json (renamed from features/spamHider/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/specialMining/index.js (renamed from features/specialMining/index.js) | 2 | ||||
-rw-r--r-- | src/features/specialMining/metadata.json (renamed from features/specialMining/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/statHistoryGui/index.js | 189 | ||||
-rw-r--r-- | src/features/statHistoryGui/metadata.json (renamed from features/statHistoryGui/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/stat_next_to_name/index.js (renamed from features/stat_next_to_name/index.js) | 11 | ||||
-rw-r--r-- | src/features/stat_next_to_name/metadata.json (renamed from features/stat_next_to_name/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/streamsGUI/index.js (renamed from features/streamsGUI/index.js) | 43 | ||||
-rw-r--r-- | src/features/streamsGUI/metadata.json (renamed from features/streamsGUI/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/suggestionsGui/index.js | 217 | ||||
-rw-r--r-- | src/features/suggestionsGui/metadata.json (renamed from features/suggestionsGui/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/waypoints/index.js (renamed from features/waypoints/index.js) | 2 | ||||
-rw-r--r-- | src/features/waypoints/metadata.json (renamed from features/waypoints/metadata.json) | 0 | ||||
-rw-r--r-- | src/features/waypoints/minewaypoints_socket.js (renamed from features/waypoints/minewaypoints_socket.js) | 0 | ||||
-rw-r--r-- | src/features/waypoints/pathfind.js (renamed from features/waypoints/pathfind.js) | 0 | ||||
-rw-r--r-- | src/index.js (renamed from index.js) | 6 | ||||
-rw-r--r-- | src/logger.js (renamed from logger.js) | 2 | ||||
-rw-r--r-- | src/metadata.js (renamed from metadata.js) | 0 | ||||
-rw-r--r-- | src/metadata.json (renamed from metadata.json) | 3 | ||||
-rw-r--r-- | src/socketConnection.js (renamed from socketConnection.js) | 0 | ||||
-rw-r--r-- | src/utils/delayUtils.js (renamed from utils/delayUtils.js) | 0 | ||||
-rw-r--r-- | src/utils/networkUtils.js (renamed from utils/networkUtils.js) | 114 | ||||
-rw-r--r-- | src/utils/nonPooledThread.js (renamed from utils/nonPooledThread.js) | 0 | ||||
-rw-r--r-- | src/utils/numberUtils.js (renamed from utils/numberUtils.js) | 0 | ||||
-rw-r--r-- | src/utils/renderJavaUtils.js (renamed from utils/renderJavaUtils.js) | 0 | ||||
-rw-r--r-- | src/utils/renderLib2d.js (renamed from utils/renderLib2d.js) | 0 | ||||
-rw-r--r-- | src/utils/renderUtils.js (renamed from utils/renderUtils.js) | 0 | ||||
-rw-r--r-- | src/utils/statUtils.js (renamed from utils/statUtils.js) | 0 | ||||
-rw-r--r-- | src/utils/stringUtils.js (renamed from utils/stringUtils.js) | 0 | ||||
-rw-r--r-- | src/utils/utils.js (renamed from utils/utils.js) | 0 |
132 files changed, 3365 insertions, 1202 deletions
diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..f9416f5 --- /dev/null +++ b/.babelrc @@ -0,0 +1,7 @@ +{ + "presets": [], + "plugins": [ + "async-to-promises", + "./babel-import-promise/babel-import-promise.mjs" + ] +}
\ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..26ddfd8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +out/ +node_modules
\ No newline at end of file diff --git a/babel-import-promise/babel-import-promise.mjs b/babel-import-promise/babel-import-promise.mjs new file mode 100644 index 0000000..bdde752 --- /dev/null +++ b/babel-import-promise/babel-import-promise.mjs @@ -0,0 +1,31 @@ +export default function ({ types: t }) { + return { + visitor: { + Program(path, state) { + let shouldAdd = false + const MyVisitor = { + Function: { + enter: function enter(path) { + if (path.node.async) { + shouldAdd = true + } + } + }, + Identifier(path) { + if (path.node.name === "Promise") { + shouldAdd = true + } + } + }; + path.traverse(MyVisitor) + if (shouldAdd) { + let depth = state.filename.replace(state.cwd, "").split("\\").length - 2 + const identifier = t.identifier('Promise'); + const importDefaultSpecifier = t.importDefaultSpecifier(identifier); + const importDeclaration = t.importDeclaration([importDefaultSpecifier], t.stringLiteral("../".repeat(depth) + 'PromiseV2')); + path.unshiftContainer('body', importDeclaration); + } + } + } + }; +};
\ No newline at end of file diff --git a/babel-import-promise/package.json b/babel-import-promise/package.json new file mode 100644 index 0000000..e43c0c5 --- /dev/null +++ b/babel-import-promise/package.json @@ -0,0 +1,5 @@ +{ + "name": "babel-import-promise", + "version": "1.0.0", + "module": "babel-import-promise.mjs" +}
\ No newline at end of file diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..e1409ad --- /dev/null +++ b/build.bat @@ -0,0 +1 @@ +babel src -d "../SoopyV2" --copy-files
\ No newline at end of file diff --git a/features/networthGUI/index.js b/features/networthGUI/index.js deleted file mode 100644 index d4858b2..0000000 --- a/features/networthGUI/index.js +++ /dev/null @@ -1,243 +0,0 @@ -/// <reference types="../../../CTAutocomplete" /> -/// <reference lib="es2015" /> -import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; -import Feature from "../../featureClass/class"; -import GuiPage from "../soopyGui/GuiPage"; -import BoxWithLoading from "../../../guimanager/GuiElement/BoxWithLoading"; -import BoxWithTextAndDescription from "../../../guimanager/GuiElement/BoxWithTextAndDescription"; -import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; -import TextBox from "../../../guimanager/GuiElement/TextBox"; -import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent"; -import { numberWithCommas } from "../../utils/numberUtils"; -import { firstLetterWordCapital } from "../../utils/stringUtils"; -import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; -import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"; -import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; -import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; -import { fetch } from "../../utils/networkUtils"; -import Dropdown from "../../../guimanager/GuiElement/Dropdown"; -import SoopyContentChangeEvent from "../../../guimanager/EventListener/SoopyContentChangeEvent"; - -class NetworthGui extends Feature { - constructor() { - super() - } - - onEnable() { - this.initVariables() - - this.GuiPage = new NetworthPage() - - } - - initVariables() { - this.GuiPage = undefined - } - - onDisable() { - this.initVariables() - } -} - - -class NetworthPage extends GuiPage { - constructor() { - super(7) - - this.name = "Networth" - - this.pages = [this.newPage()] - - this.pages[0].addChild(new SoopyTextElement().setText("§0Networth").setMaxTextScale(3).setLocation(0.1, 0.05, 0.6, 0.1)) - this.pages[0].addChild(new SoopyTextElement().setText("§0(This is in beta and may be inaccurate)").setMaxTextScale(3).setLocation(0.1, 0.15, 0.8, 0.075)) - let button = new ButtonWithArrow().setText("§0Open in browser").setLocation(0.7, 0.05, 0.2, 0.1) - this.pages[0].addChild(button) - - button.addEvent(new SoopyMouseClickEvent().setHandler(() => { - java.awt.Desktop.getDesktop().browse( - new java.net.URI("https://soopy.dev/networth") - ); - })) - - this.nameInput = new TextBox().setPlaceholder("Click to search").setLocation(0.1, 0.225, 0.8, 0.1) - this.pages[0].addChild(this.nameInput) - - this.nameInput.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { - if (this.nameInput.text.selected && keyId === 28) { - this.playerLoad = this.nameInput.text.text - this.nameInput.setText("") - this.updateData(this.playerLoad) - } - })) - - this.statArea = new SoopyGuiElement().setLocation(0.05, 0.325, 0.9, 0.675).setScrollable(true) - this.pages[0].addChild(this.statArea) - - this.loadingElm = new BoxWithLoading().setLocation(0.35, 0.4, 0.3, 0.2) - this.errorElm = new BoxWithTextAndDescription().setLocation(0.2, 0.3, 0.6, 0.4).setText("Error!").setDesc("An error occured while loading the data!") - this.statArea.addChild(this.loadingElm) - - this.playerLoad = undefined - - this.sidebarElement = new SoopyGuiElement().setLocation(0, 0, 1, 1) - - this.sidebarUsernameSearch = new TextBox().setLocation(0.15, 0.05, 0.7, 0.1).setPlaceholder("Click to search") - this.sidebarElement.addChild(this.sidebarUsernameSearch) - - this.sidebarUsernameSearch.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { - if (this.sidebarUsernameSearch.text.selected && keyId === 28) { - let search = this.sidebarUsernameSearch.text.text - this.sidebarUsernameSearch.setText("") - this.sidebarSearch(search) - } - })) - - this.lbBackButton = new ButtonWithArrow().setLocation(0.05, 0.05, 0.1, 0.1).setText("§0Back").setDirectionRight(false) - this.lbNextButton = new ButtonWithArrow().setLocation(0.85, 0.05, 0.1, 0.1).setText("§0Next") - this.sidebarElement.addChild(this.lbBackButton) - this.sidebarElement.addChild(this.lbNextButton) - this.lbBackButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { - if (this.currentLbPage > 0) this.goToLeaderboardPage(this.currentLbPage - 1) - })) - this.lbNextButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { - this.goToLeaderboardPage(this.currentLbPage + 1) - })) - - this.leaderboardArea = new SoopyGuiElement().setLocation(0.05, 0.15, 0.9, 0.85).setScrollable(true) - this.sidebarElement.addChild(this.leaderboardArea) - - this.currentLbPage = 0 - - this.finaliseLoading() - } - - updateData(player, profIn) { - this.playerLoad = player - - this.statArea._scrollAmount = 0 - this.statArea.location.scroll.y.set(0, 100) - - this.statArea.clearChildren() - this.statArea.addChild(this.loadingElm) - - fetch("http://soopy.dev/api/v2/player/" + player).json(playerData => { - - if (player !== this.playerLoad) return - - if (!playerData.success) { - this.statArea.clearChildren() - this.statArea.addChild(this.errorElm) - this.errorElm.setText("§0" + playerData.error.name) - this.errorElm.setDesc("§0" + playerData.error.description) - return - } - - fetch("http://soopy.dev/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData => { - - if (player !== this.playerLoad) return - - this.statArea.clearChildren() - - if (!skyblockData.success) { - this.statArea.addChild(this.errorElm) - this.errorElm.setText("§0" + skyblockData.error.name) - this.errorElm.setDesc("§0" + skyblockData.error.description) - return - } - - let selectedProf = profIn || skyblockData.data.stats.bestProfileId - - let nwData = skyblockData.data.profiles[selectedProf].members[playerData.data.uuid].soopyNetworth - let nameElm = new SoopyTextElement().setText(playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")).setMaxTextScale(2).setLocation(0.1, 0.05, 0.8, 0.1) - this.statArea.addChild(nameElm) - - let profOptions = {} - Object.keys(skyblockData.data.profiles).forEach(p => { - profOptions[p] = skyblockData.data.profiles[p].stats.cute_name - }) - - let profileSelect = new Dropdown().setOptions(profOptions).setSelectedOption(selectedProf).setLocation(0.1, 0.15, 0.3, 0.1).addEvent(new SoopyContentChangeEvent().setHandler(newval => { - this.updateData(player, newval) - })) - this.statArea.addChild(profileSelect) - this.statArea.addChild(new SoopyTextElement().setText("§0Networth: §2$" + numberWithCommas(Math.round(nwData.networth)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.45, 0.15, 0.4, 0.1)) - this.statArea.addChild(new SoopyTextElement().setText("§0Purse: §2$" + numberWithCommas(Math.round(nwData.purse)).replace(/,/g, "§7,§2") + "§0 | Bank: §2$" + numberWithCommas(Math.round(nwData.bank)).replace(/,/g, "§7,§2") + "§0 | Sack: §2$" + numberWithCommas(Math.round(nwData.sack)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.1, 0.25, 0.8, 0.1)) - - Object.keys(nwData.categories).sort((a, b) => nwData.categories[b].total - nwData.categories[a].total).forEach((name, i) => { - let renderName = firstLetterWordCapital(name.replace(/_/g, " ")) - - let data = nwData.categories[name] - - let box = new SoopyBoxElement().setLocation(i % 2 === 0 ? 0 : 0.525, 0.45 + Math.floor(i / 2) * 0.35, 0.475, 0.25) - - box.addChild(new SoopyMarkdownElement().setLocation(0, 0, 1, 1).setText(data.items.filter(i => i.name).splice(0, 5).map(a => { - let name = (a.name.startsWith("§f") || a.name.startsWith("§7[Lvl ")) ? a.name.replace("§f", "§7") : a.name - return "§0" + name + "§0: §2$" + numberWithCommas(Math.round(a.p)).replace(/,/g, "§7,§2") - }).join("\n"))) - - let boxName = new SoopyTextElement().setLocation(i % 2 === 0 ? 0 : 0.525, 0.4 + Math.floor(i / 2) * 0.35, 0.475, 0.05).setText("§0" + renderName + "§0: §2$" + numberWithCommas(Math.round(data.total)).replace(/,/g, "§7,§2")) - - this.statArea.addChild(box) - this.statArea.addChild(boxName) - }) - - if (selectedProf === skyblockData.data.stats.bestProfileId) { - fetch("http://soopy.dev/api/v2/leaderboard/networth/user/" + playerData.data.uuid).json(leaderboardData => { - if (player !== this.playerLoad) return - - if (leaderboardData.success) nameElm.setText("§0#" + numberWithCommas(leaderboardData.data.data.position + 1) + " " + playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")) - }) - } - }) - }) - } - - onOpen() { - this.playerLoad = Player.getName() - this.updateData(Player.getName()) - - this.goToLeaderboardPage(0) - - this.openSidebarPage(this.sidebarElement) - } - - sidebarSearch(user) { - fetch("http://soopy.dev/api/v2/leaderboard/networth/user/" + user).json(data => { - if (!data.success) { - return - } - - let position = data.data.data.position - - this.goToLeaderboardPage(Math.floor(position / 100), false) - - this.leaderboardArea._scrollAmount = -((position % 100) * 0.1 - 0.45) * this.leaderboardArea.location.getHeightExact() - this.leaderboardArea.location.scroll.y.set(-((position % 100) * 0.1 - 0.45) * this.leaderboardArea.location.getHeightExact(), 100) - }) - } - - goToLeaderboardPage(page, scroll = true) { - this.currentLbPage = page - - if (scroll) this.leaderboardArea._scrollAmount = 0 - if (scroll) this.leaderboardArea.location.scroll.y.set(0, 100) - - fetch("http://soopy.dev/api/v2/leaderboard/networth/" + page).json(data => { - this.leaderboardArea.clearChildren() - data.data.data.forEach((user, i) => { - this.leaderboardArea.addChild( - new SoopyTextElement().setText("§0#" + numberWithCommas(i + 1 + page * 100) + ": " + user.username).setMaxTextScale(1.5).setLocation(0.05, i * 0.05, 0.5, 0.05).setLore(["Click to show detailed stats"]).addEvent(new SoopyMouseClickEvent().setHandler(() => { - this.updateData(user.uuid) - })) - ) - this.leaderboardArea.addChild( - new SoopyTextElement().setText("§2$" + numberWithCommas(Math.round(user.networth)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.6, i * 0.05, 0.35, 0.05) - ) - }) - }) - } -} - -module.exports = { - class: new NetworthGui() -}
\ No newline at end of file diff --git a/features/statHistoryGui/index.js b/features/statHistoryGui/index.js deleted file mode 100644 index 282c40d..0000000 --- a/features/statHistoryGui/index.js +++ /dev/null @@ -1,191 +0,0 @@ -/// <reference types="../../../CTAutocomplete" /> -/// <reference lib="es2015" /> -import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; -import Feature from "../../featureClass/class"; -import GuiPage from "../soopyGui/GuiPage"; -import BoxWithLoading from "../../../guimanager/GuiElement/BoxWithLoading"; -import BoxWithTextAndDescription from "../../../guimanager/GuiElement/BoxWithTextAndDescription"; -import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; -import TextBox from "../../../guimanager/GuiElement/TextBox"; -import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent"; -import { firstLetterWordCapital } from "../../utils/stringUtils"; -import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; -import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; -import { fetch } from "../../utils/networkUtils"; -import SoopyImageElement from "../../../guimanager/GuiElement/SoopyImageElement"; -import renderLibs from "../../../guimanager/renderLibs"; -import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; -import Dropdown from "../../../guimanager/GuiElement/Dropdown"; -import SoopyContentChangeEvent from "../../../guimanager/EventListener/SoopyContentChangeEvent"; - -class StatHistoryGUI extends Feature { - constructor() { - super() - } - - onEnable() { - this.initVariables() - - this.GuiPage = new StatGraphPage() - - } - - initVariables() { - this.GuiPage = undefined - } - - onDisable() { - this.initVariables() - } -} - - -class StatGraphPage extends GuiPage { - constructor() { - super(7) - - this.name = "Stat Graphs" - - this.pages = [this.newPage()] - - this.pages[0].addChild(new SoopyTextElement().setText("§0Stat Graphs").setMaxTextScale(3).setLocation(0.1, 0.05, 0.6, 0.1)) - let button = new ButtonWithArrow().setText("§0Open in browser").setLocation(0.7, 0.05, 0.2, 0.1) - this.pages[0].addChild(button) - - button.addEvent(new SoopyMouseClickEvent().setHandler(() => { - java.awt.Desktop.getDesktop().browse( - new java.net.URI("https://soopy.dev/stathistory") - ); - })) - - this.nameInput = new TextBox().setPlaceholder("Click to search").setLocation(0.1, 0.225, 0.8, 0.1) - this.pages[0].addChild(this.nameInput) - - this.nameInput.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { - if (this.nameInput.text.selected && keyId === 28) { - this.playerLoad = this.nameInput.text.text - this.nameInput.setText("") - this.updateData(this.playerLoad) - } - })) - - this.statArea = new SoopyGuiElement().setLocation(0.05, 0.325, 0.9, 0.675).setScrollable(true) - this.pages[0].addChild(this.statArea) - - this.loadingElm = new BoxWithLoading().setLocation(0.35, 0.4, 0.3, 0.2) - this.errorElm = new BoxWithTextAndDescription().setLocation(0.2, 0.3, 0.6, 0.4).setText("Error!").setDesc("An error occured while loading the data!") - this.statArea.addChild(this.loadingElm) - - this.playerLoad = undefined - - this.finaliseLoading() - } - - updateData(player, profIn) { - this.closeSidebarPage() - - this.playerLoad = player - - this.statArea._scrollAmount = 0 - this.statArea.location.scroll.y.set(0, 100) - - this.statArea.clearChildren() - this.statArea.addChild(this.loadingElm) - - fetch("http://soopy.dev/api/v2/player/" + player).json(playerData => { - - if (player !== this.playerLoad) return - - if (!playerData.success) { - this.statArea.clearChildren() - this.statArea.addChild(this.errorElm) - this.errorElm.setText("§0" + playerData.error.name) - this.errorElm.setDesc("§0" + playerData.error.description) - return - } - this.statArea.clearChildren() - let nameElm = new SoopyTextElement().setText(playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")).setMaxTextScale(2).setLocation(0.1, 0.05, 0.5, 0.1) - this.statArea.addChild(nameElm) - this.statArea.addChild(this.loadingElm) - - fetch("http://soopy.dev/api/v2/player_skyblock/" + playerData.data.uuid).json(skyblockData => { - if (player !== this.playerLoad) return - - if (!skyblockData.success) { - this.statArea.clearChildren() - this.statArea.addChild(this.errorElm) - this.errorElm.setText("§0" + skyblockData.error.name) - this.errorElm.setDesc("§0" + skyblockData.error.description) - return - } - - let selectedProf = profIn || skyblockData.data.stats.bestProfileId - let profOptions = {} - Object.keys(skyblockData.data.profiles).forEach(p => { - profOptions[p] = skyblockData.data.profiles[p].stats.cute_name - }) - - let profileSelect = new Dropdown().setOptions(profOptions).setSelectedOption(selectedProf).setLocation(0.6, 0.05, 0.3, 0.1).addEvent(new SoopyContentChangeEvent().setHandler(newval => { - this.updateData(player, newval) - })) - this.statArea.addChild(profileSelect) - - fetch("http://soopy.dev/statgraphgenerations/" + playerData.data.uuid + "/" + selectedProf).json(graphData => { - if (player !== this.playerLoad) return - - new Thread(() => { - let y = 0.2 - Object.keys(graphData).forEach(type => { - let typeElm = new SoopyTextElement().setText("§0" + firstLetterWordCapital(type.replace("total", ""))).setMaxTextScale(2).setLocation(0.1, y, 0.8, 0.1) - this.statArea.addChild(typeElm) - y += 0.15 - let graph = Object.keys(graphData[type])[0] - renderLibs.getImage(graphData[type][graph], true) //load image synchronously into cache so it knows the height - let graphElm = new SoopyImageElement() - this.statArea.addChild(graphElm) - graphElm.setImage(graphData[type][graph]) - - graphElm.setLocation(0.1, y, 0.8, 0.25) - graphElm.loadHeightFromImage() - y += graphElm.location.size.y.get() + 0.05 - - if (Object.keys(graphData[type]).length > 1) { - graphElm.setLore(["Click to show more graphs"]) - graphElm.addEvent(new SoopyMouseClickEvent().setHandler(() => { - let sideBarElm = new SoopyGuiElement().setLocation(0, 0, 1, 1) - sideBarElm.scrollable = true - this.openSidebarPage(sideBarElm) - let y2 = 0.05 - new Thread(() => { - Object.keys(graphData[type]).forEach((graph, i) => { - if (i === 0) return - renderLibs.getImage(graphData[type][graph], true) //load image synchronously into cache so it knows the height - let graphElm = new SoopyImageElement() - sideBarElm.addChild(graphElm) - graphElm.setImage(graphData[type][graph]) - - graphElm.setLocation(0.1, y2, 0.8, 0.25) - graphElm.loadHeightFromImage() - y2 += graphElm.location.size.y.get() + 0.05 - }) - }).start() - - })) - } - - }) - }).start() - }) - }) - }) - } - - onOpen() { - this.playerLoad = Player.getName() - this.updateData(Player.getName()) - } -} - -module.exports = { - class: new StatHistoryGUI() -}
\ No newline at end of file diff --git a/features/suggestionsGui/index.js b/features/suggestionsGui/index.js deleted file mode 100644 index 919d76c..0000000 --- a/features/suggestionsGui/index.js +++ /dev/null @@ -1,219 +0,0 @@ -/// <reference types="../../../CTAutocomplete" /> -/// <reference lib="es2015" /> -import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; -import Feature from "../../featureClass/class"; -import GuiPage from "../soopyGui/GuiPage"; -import BoxWithLoading from "../../../guimanager/GuiElement/BoxWithLoading"; -import BoxWithTextAndDescription from "../../../guimanager/GuiElement/BoxWithTextAndDescription"; -import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; -import PasswordInput from "../../../guimanager/GuiElement/PasswordInput"; -import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent"; -import { numberWithCommas } from "../../utils/numberUtils"; -import { firstLetterWordCapital } from "../../utils/stringUtils"; -import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; -import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"; -import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; -import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; -import Dropdown from "../../../guimanager/GuiElement/Dropdown"; -import SoopyContentChangeEvent from "../../../guimanager/EventListener/SoopyContentChangeEvent"; -import { fetch } from "../../utils/networkUtils"; - -let allowed = new Set(["dc8c39647b294e03ae9ed13ebd65dd29", "83c5626ede2d4754b86064d558809615"]) - -class SuggestionGui extends Feature { - constructor() { - super() - } - - onEnable() { - this.initVariables() - - this.GuiPage = new SuggestionPage() - - } - - initVariables() { - this.GuiPage = undefined - } - - onDisable() { - this.initVariables() - } -} - - -class SuggestionPage extends GuiPage { - constructor() { - super(7) - - this.name = "Suggestions" - - this.pages = [this.newPage()] - - this.password = "" - - if (allowed.has(Player.getUUID().toString().replace(/-/g, ""))) { - let elm = new PasswordInput().setPlaceholder("Suggestions").setLocation(0.125, 0.05, 0.3, 0.1) - this.pages[0].addChild(elm) - - elm.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { - if (elm.text.selected && keyId === 28) { - this.password = elm.text.text - elm.setText("") - elm.text.selected = false - } - })) - } else { - this.pages[0].addChild(new SoopyTextElement().setText("§0Suggestions").setMaxTextScale(3).setLocation(0.125, 0.05, 0.3, 0.1)) - } - - let button = new ButtonWithArrow().setText("§0Suggest feature (Opens in browser)").setLocation(0.45, 0.05, 0.5, 0.1) - this.pages[0].addChild(button) - - button.addEvent(new SoopyMouseClickEvent().setHandler(() => { - java.awt.Desktop.getDesktop().browse( - new java.net.URI("https://soopy.dev/soopyv2suggestion?uuid=" + Player.getUUID().toString().replace(/-/g, "")) - ); - })) - - this.suggestionElements = {} - - this.suggestionsArea = new SoopyGuiElement().setLocation(0.05, 0.2, 0.9, 0.8).setScrollable(true) - this.pages[0].addChild(this.suggestionsArea) - - - fetch("http://soopy.dev/api/soopyv2/suggestionTags.json").json(data => { - this.tags = data - }) - - this.finaliseLoading() - } - - loadSuggestionPage() { - - fetch("http://soopy.dev/api/soopyv2/suggestion/new").json(data => { - this.suggestionElements = {} - this.suggestionsArea.clearChildren() - - let i = 0 - - data.suggestions.forEach((suggestion) => { - - if (suggestion.status === "pending_review" || suggestion.status === "closed") { - if (suggestion.uuid !== Player.getUUID().toString().replace(/-/g, "") && !allowed.has(Player.getUUID().toString().replace(/-/g, ""))) return - } - - let box = new SoopyBoxElement().setLocation(0, 0.175 * i, 1, 0.15).setLore(["Click for more information + vote buttons"]) - this.suggestionsArea.addChild(box) - - let title = new SoopyTextElement().setText("§0" + suggestion.title + " §7(" + this.tags.suggestionTags[suggestion.tag] + ")").setMaxTextScale(2).setLocation(0, 0, 0.8, 1) - box.addChild(title) - - let popularity = new SoopyTextElement().setText("§0Opinion: " + numberWithCommas(suggestion.likes - suggestion.dislikes)).setMaxTextScale(2).setLocation(0.85, 0, 0.1, 1) - box.addChild(popularity) - - this.suggestionElements[suggestion._id] = { - title: title, - popularity: popularity - } - - box.addEvent(new SoopyMouseClickEvent().setHandler(() => { - this.loadSuggestion(suggestion._id) - })) - - i++ - }); - }) - } - - loadSuggestion(id) { - fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/user/" + Player.getUUID().toString().replace(/-/g, "")).json(data => { - let sideBarElm = new SoopyGuiElement().setLocation(0, 0, 1, 1).setScrollable(true) - if (!data.success) { - sideBarElm.addChild(new SoopyTextElement().setText("§cError loading suggestion").setMaxTextScale(3).setLocation(0.5, 0.5, 0.5, 0.5)) - this.openSidebarPage(sideBarElm) - return - } - - this.suggestionElements[id].title.setText("§0" + data.suggestion.title + " §7(" + this.tags.suggestionTags[data.suggestion.tag] + ")") - this.suggestionElements[id].popularity.setText("§0Opinion: " + numberWithCommas(data.suggestion.likes - data.suggestion.dislikes)) - - - let title = new SoopyTextElement().setText("§0" + data.suggestion.title + " §7(" + this.tags.suggestionTags[data.suggestion.tag] + ")").setMaxTextScale(2).setLocation(0.05, 0.05, 0.9, 0.1) - sideBarElm.addChild(title) - - if (!allowed.has(Player.getUUID().toString().replace(/-/g, ""))) { - let suggestor = new SoopyTextElement().setText("§7Suggested by " + data.suggestion.username + " | Status: " + this.tags.statusTags[data.suggestion.status]).setMaxTextScale(1).setLocation(0.05, 0.15, 0.9, 0.05) - sideBarElm.addChild(suggestor) - } else { - let suggestor = new SoopyTextElement().setText("§7Suggested by " + data.suggestion.username + " | Status: ").setMaxTextScale(1).setLocation(0.05, 0.15, 0.6, 0.05) - sideBarElm.addChild(suggestor) - - let drop = new Dropdown().setLocation(0.65, 0.13, 0.3, 0.09).setOptions({ ...this.tags.statusTags, "delete": "Delete" }).setSelectedOption(data.suggestion.status) - sideBarElm.addChild(drop) - - drop.addEvent(new SoopyContentChangeEvent().setHandler((newVal) => { - if (newVal === "delete") { - fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/delete/" + this.password).async() - - this.loadSuggestionPage() - this.closeSidebarPage() - return - } - fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/status/" + newVal + "/" + this.password).async() - - this.loadSuggestion(id) - })) - } - - let likesText = new SoopyTextElement().setText("§0Dislikes: " + numberWithCommas(data.suggestion.dislikes) + " Likes: " + numberWithCommas(data.suggestion.likes)).setMaxTextScale(1).setLocation(0.35, 0.225, 0.3, 0.1) - sideBarElm.addChild(likesText) - if (!data.suggestion.hasDisliked) { - let dislikeButton = new ButtonWithArrow().setDirectionRight(false).setText("§cDislike").setLocation(0.05, 0.225, 0.275, 0.1) - sideBarElm.addChild(dislikeButton) - dislikeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { - this.voteSuggestion(id, "dislike") - })) - } else { - let dislikeButton = new ButtonWithArrow().setDirectionRight(false).setText("§cUndislike").setLocation(0.05, 0.225, 0.275, 0.1) - sideBarElm.addChild(dislikeButton) - dislikeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { - this.voteSuggestion(id, "clear") - })) - } - if (!data.suggestion.hasLiked) { - let likeButton = new ButtonWithArrow().setText("§aLike").setLocation(0.675, 0.225, 0.275, 0.1) - sideBarElm.addChild(likeButton) - likeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { - this.voteSuggestion(id, "like") - })) - } else { - let likeButton = new ButtonWithArrow().setText("§aUnlike").setLocation(0.675, 0.225, 0.275, 0.1) - sideBarElm.addChild(likeButton) - likeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { - this.voteSuggestion(id, "clear") - })) - } - - - let description = new SoopyMarkdownElement().setText(data.suggestion.description).setLocation(0.05, 0.325, 0.9, 0.6) - sideBarElm.addChild(description) - - this.openSidebarPage(sideBarElm) - }) - } - - voteSuggestion(id, type) { - fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/vote/" + (type) + "/" + Player.getUUID().toString().replace(/-/g, "")).async() - - this.loadSuggestion(id) - } - - onOpen() { - this.loadSuggestionPage() - } -} - -module.exports = { - class: new SuggestionGui() -}
\ No newline at end of file diff --git a/initdev.bat b/initdev.bat new file mode 100644 index 0000000..59a8e22 --- /dev/null +++ b/initdev.bat @@ -0,0 +1 @@ +npm i
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..db31296 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2181 @@ +{ + "name": "SoopyV2-dev", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/template": "^7.18.10", + "babel-plugin-async-to-promises": "^1.0.5", + "babel-plugin-transform-globals": "^1.0.1", + "fast-async": "^6.3.8" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/cli": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.18.10.tgz", + "integrity": "sha512-dLvWH+ZDFAkd2jPBSghrsFBuXrREvFwjpDycXbmUoeochqKYe4zNSLEJYErpLg8dvxvZYe79/MkN461XCwpnGw==", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.8", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.2.0", + "make-dir": "^2.1.0", + "slash": "^2.0.0" + }, + "bin": { + "babel": "bin/babel.js", + "babel-external-helpers": "bin/babel-external-helpers.js" + }, + "engines": { + "node": ">=6.9.0" + }, + "optionalDependencies": { + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", + "chokidar": "^3.4.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", + "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", + "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.1", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", + "dependencies": { + "@babel/types": "^7.19.0", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", + "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", + "dependencies": { + "@babel/compat-data": "^7.19.1", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", + "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", + "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.1", + "@babel/types": "^7.19.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", + "optional": true + }, + "node_modules/acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-es7-plugin": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", + "integrity": "sha512-7D+8kscFMf6F2t+8ZRYmv82CncDZETsaZ4dEl5lh3qQez7FVABk2Vz616SAbnIq1PbNsLVaZjl2oSkk5BWAKng==" + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "optional": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==" + }, + "node_modules/babel-code-frame/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha512-zAYl3tqerLItvG5cKYw7f1SpvIxS9zi7ohyGHaI9cgDUjAT6YcY9jIEH5CstetP5wHIVSceXwNS7Z5BpJg+rOw==", + "dependencies": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "node_modules/babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", + "dependencies": { + "babel-runtime": "^6.22.0" + } + }, + "node_modules/babel-plugin-async-to-promises": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/babel-plugin-async-to-promises/-/babel-plugin-async-to-promises-1.0.5.tgz", + "integrity": "sha512-N8xqEuHCcE+B13WIooPuAuqM0GfZ0cwrWkMj5pPgEiROnCEFT0NPGsjueJJY39BGkMUxIP9/8/oYbQuLw5p1WA==", + "dependencies": { + "babel-helper-hoist-variables": "^6.5.0", + "babel-template": "^6.3.13", + "babel-types": "^6.5.2", + "js-extend": "^1.0.1" + } + }, + "node_modules/babel-plugin-transform-globals": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-globals/-/babel-plugin-transform-globals-1.0.1.tgz", + "integrity": "sha512-grxyMsndc3zXTbOCpwPxfYr93riPyEq89wTW7P6mSzlrUy0OHWxHILaB+dTV3bJ+XKQeqi6lGcUgTydeFIoh2A==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", + "dependencies": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "node_modules/babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", + "dependencies": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "node_modules/babel-traverse/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/babel-traverse/node_modules/globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-traverse/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "dependencies": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "node_modules/babel-types/node_modules/to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "bin": { + "babylon": "bin/babylon.js" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "optional": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001402", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001402.tgz", + "integrity": "sha512-Mx4MlhXO5NwuvXGgVb+hg65HZ+bhUYsz8QtDGDo2QmaJS2GBX47Xfi2koL86lc8K+l+htXeTEB/Aeqvezoo6Ew==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "optional": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.254", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.254.tgz", + "integrity": "sha512-Sh/7YsHqQYkA6ZHuHMy24e6TE4eX6KZVsZb9E/DvU1nQRIrH4BflO/4k+83tfdYvDl+MObvlqHPRICzEdC9c6Q==" + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-async": { + "version": "6.3.8", + "resolved": "https://registry.npmjs.org/fast-async/-/fast-async-6.3.8.tgz", + "integrity": "sha512-TjlooyqrYm/gOXjD2UHNwfrWkvTbzU105Nk4bvcRTeRoL+wIeK6rqbqDg3CN9z5p37cE2iXhP6SxQFz8OVIaUg==", + "dependencies": { + "nodent-compiler": "^3.2.10", + "nodent-runtime": ">=3.2.1" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "optional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "optional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "optional": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "optional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/js-extend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-extend/-/js-extend-1.0.1.tgz", + "integrity": "sha512-wUcNh0PcNWCaeRBAAKHFpkdtUXYQo9G2oR9tSdK9UrsUaMoKGesGCEu4SBw6JGp4VXtXZQCZJ5vpHCiiwbat/Q==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + }, + "node_modules/nodent-compiler": { + "version": "3.2.13", + "resolved": "https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.2.13.tgz", + "integrity": "sha512-nzzWPXZwSdsWie34om+4dLrT/5l1nT/+ig1v06xuSgMtieJVAnMQFuZihUwREM+M7dFso9YoHfDmweexEXXrrw==", + "engines": "node >= 0.10.0", + "dependencies": { + "acorn": ">= 2.5.2 <= 5.7.5", + "acorn-es7-plugin": "^1.1.7", + "nodent-transform": "^3.2.9", + "source-map": "^0.5.7" + } + }, + "node_modules/nodent-runtime": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz", + "integrity": "sha512-7Ws63oC+215smeKJQCxzrK21VFVlCFBkwl0MOObt0HOpVQXs3u483sAmtkF33nNqZ5rSOQjB76fgyPBmAUrtCA==", + "hasInstallScript": true + }, + "node_modules/nodent-transform": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.9.tgz", + "integrity": "sha512-4a5FH4WLi+daH/CGD5o/JWRR8W5tlCkd3nrDSkxbOzscJTyTUITltvOJeQjg3HJ1YgEuNyiPhQbvbtRjkQBByQ==" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "optional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "optional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@babel/cli": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.18.10.tgz", + "integrity": "sha512-dLvWH+ZDFAkd2jPBSghrsFBuXrREvFwjpDycXbmUoeochqKYe4zNSLEJYErpLg8dvxvZYe79/MkN461XCwpnGw==", + "requires": { + "@jridgewell/trace-mapping": "^0.3.8", + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", + "chokidar": "^3.4.0", + "commander": "^4.0.1", + "convert-source-map": "^1.1.0", + "fs-readdir-recursive": "^1.1.0", + "glob": "^7.2.0", + "make-dir": "^2.1.0", + "slash": "^2.0.0" + } + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", + "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==" + }, + "@babel/core": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", + "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.1", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", + "requires": { + "@babel/types": "^7.19.0", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-compilation-targets": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", + "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", + "requires": { + "@babel/compat-data": "^7.19.1", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==" + }, + "@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "requires": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-simple-access": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==" + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==" + }, + "@babel/helpers": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "requires": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", + "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==" + }, + "@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + } + }, + "@babel/traverse": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", + "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.1", + "@babel/types": "^7.19.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "requires": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@nicolo-ribaudo/chokidar-2": { + "version": "2.1.8-no-fsevents.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", + "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", + "optional": true + }, + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" + }, + "acorn-es7-plugin": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", + "integrity": "sha512-7D+8kscFMf6F2t+8ZRYmv82CncDZETsaZ4dEl5lh3qQez7FVABk2Vz616SAbnIq1PbNsLVaZjl2oSkk5BWAKng==" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==" + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==" + } + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha512-zAYl3tqerLItvG5cKYw7f1SpvIxS9zi7ohyGHaI9cgDUjAT6YcY9jIEH5CstetP5wHIVSceXwNS7Z5BpJg+rOw==", + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-async-to-promises": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/babel-plugin-async-to-promises/-/babel-plugin-async-to-promises-1.0.5.tgz", + "integrity": "sha512-N8xqEuHCcE+B13WIooPuAuqM0GfZ0cwrWkMj5pPgEiROnCEFT0NPGsjueJJY39BGkMUxIP9/8/oYbQuLw5p1WA==", + "requires": { + "babel-helper-hoist-variables": "^6.5.0", + "babel-template": "^6.3.13", + "babel-types": "^6.5.2", + "js-extend": "^1.0.1" + } + }, + "babel-plugin-transform-globals": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-globals/-/babel-plugin-transform-globals-1.0.1.tgz", + "integrity": "sha512-grxyMsndc3zXTbOCpwPxfYr93riPyEq89wTW7P6mSzlrUy0OHWxHILaB+dTV3bJ+XKQeqi6lGcUgTydeFIoh2A==" + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "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" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==" + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "requires": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "caniuse-lite": { + "version": "1.0.30001402", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001402.tgz", + "integrity": "sha512-Mx4MlhXO5NwuvXGgVb+hg65HZ+bhUYsz8QtDGDo2QmaJS2GBX47Xfi2koL86lc8K+l+htXeTEB/Aeqvezoo6Ew==" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "optional": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" + }, + "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" + } + }, + "electron-to-chromium": { + "version": "1.4.254", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.254.tgz", + "integrity": "sha512-Sh/7YsHqQYkA6ZHuHMy24e6TE4eX6KZVsZb9E/DvU1nQRIrH4BflO/4k+83tfdYvDl+MObvlqHPRICzEdC9c6Q==" + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "fast-async": { + "version": "6.3.8", + "resolved": "https://registry.npmjs.org/fast-async/-/fast-async-6.3.8.tgz", + "integrity": "sha512-TjlooyqrYm/gOXjD2UHNwfrWkvTbzU105Nk4bvcRTeRoL+wIeK6rqbqDg3CN9z5p37cE2iXhP6SxQFz8OVIaUg==", + "requires": { + "nodent-compiler": "^3.2.10", + "nodent-runtime": ">=3.2.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "optional": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "optional": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "optional": true + }, + "js-extend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-extend/-/js-extend-1.0.1.tgz", + "integrity": "sha512-wUcNh0PcNWCaeRBAAKHFpkdtUXYQo9G2oR9tSdK9UrsUaMoKGesGCEu4SBw6JGp4VXtXZQCZJ5vpHCiiwbat/Q==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + }, + "nodent-compiler": { + "version": "3.2.13", + "resolved": "https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.2.13.tgz", + "integrity": "sha512-nzzWPXZwSdsWie34om+4dLrT/5l1nT/+ig1v06xuSgMtieJVAnMQFuZihUwREM+M7dFso9YoHfDmweexEXXrrw==", + "requires": { + "acorn": ">= 2.5.2 <= 5.7.5", + "acorn-es7-plugin": "^1.1.7", + "nodent-transform": "^3.2.9", + "source-map": "^0.5.7" + } + }, + "nodent-runtime": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz", + "integrity": "sha512-7Ws63oC+215smeKJQCxzrK21VFVlCFBkwl0MOObt0HOpVQXs3u483sAmtkF33nNqZ5rSOQjB76fgyPBmAUrtCA==" + }, + "nodent-transform": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.9.tgz", + "integrity": "sha512-4a5FH4WLi+daH/CGD5o/JWRR8W5tlCkd3nrDSkxbOzscJTyTUITltvOJeQjg3HJ1YgEuNyiPhQbvbtRjkQBByQ==" + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "optional": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "optional": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "update-browserslist-db": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", + "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..3eddb3c --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "dependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "babel-plugin-async-to-promises": "^1.0.5" + } +}
\ No newline at end of file diff --git a/data/roomdata.json b/src/data/roomdata.json index 4f9661d..4f9661d 100644 --- a/data/roomdata.json +++ b/src/data/roomdata.json diff --git a/datastructures/flatqueue.js b/src/datastructures/flatqueue.js index a011476..a011476 100644 --- a/datastructures/flatqueue.js +++ b/src/datastructures/flatqueue.js diff --git a/featureClass/class.js b/src/featureClass/class.js index f2d5549..987b460 100644 --- a/featureClass/class.js +++ b/src/featureClass/class.js @@ -1,4 +1,4 @@ -/// <reference types="../../CTAutocomplete" /> +/// <reference types="../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { delay } from "../utils/delayUtils" diff --git a/featureClass/featureManager.js b/src/featureClass/featureManager.js index a4cb53f..5a4b240 100644 --- a/featureClass/featureManager.js +++ b/src/featureClass/featureManager.js @@ -1,4 +1,4 @@ -/// <reference types="../../CTAutocomplete" /> +/// <reference types="../../../CTAutocomplete" /> /// <reference lib="es2015" /> const Instant = Java.type("java.time.Instant"); import logger from "../logger"; @@ -82,7 +82,8 @@ class FeatureManager { this.featureSettingsData = {} - let fetchD = fetch("http://soopy.dev/api/soopyv2/ping").async(d => { + let fetchD = fetch("http://soopy.dev/api/soopyv2/ping") + fetchD.load().then(() => { if (fetchD.responseCode() >= 400 || fetchD.responseCode() === -1) { ChatLib.chat(this.messagePrefix + "&cError: Could not connect to Soopy's server. This may cause issues with some features but will (hopefully) be back soon.") } @@ -90,7 +91,7 @@ class FeatureManager { new NonPooledThread(() => { this.loadSoopy() }).start() - }, true) + }) this.registerStep(false, 30, () => { if (this.featureSettingsDataLastUpdated) { @@ -238,7 +239,7 @@ class FeatureManager { } reportLagData(data) { - return fetch("http://soopy.dev/soopy/submitlag", { postData: data }).text() + return fetch("http://soopy.dev/soopy/submitlag", { postData: data }).textSync() } loadSoopyLag() { @@ -437,7 +438,7 @@ class FeatureManager { if (Event.context.enabled) { if (this.recordingPerformanceUsage) this.startRecordingPerformance(Event.context.getId(), event) let start = Date.now() - Event.func.call(Event.context, ...args) + Event.func?.call(Event.context, ...args) let time = Date.now() - start if (time > this.longEventTime) { logger.logMessage("Long event triggered [" + time + "ms] (" + Event.context.getId() + "/" + event + ")", 3) @@ -460,7 +461,7 @@ class FeatureManager { if (Event.context.enabled) { if (this.recordingPerformanceUsage) this.startRecordingPerformance(Event.context.getId(), event) let start = Date.now() - Event.func.call(Event.context, ...args) + Event.func?.call(Event.context, ...args) let time = Date.now() - start if (time > this.longEventTime) { logger.logMessage("Long event triggered [" + time + "ms] (" + Event.context.getId() + "/" + event + ")", 3) diff --git a/featureClass/forgeEvents.js b/src/featureClass/forgeEvents.js index fb723b1..fb723b1 100644 --- a/featureClass/forgeEvents.js +++ b/src/featureClass/forgeEvents.js diff --git a/features/bestiary/index.js b/src/features/bestiary/index.js index d21fc2a..da09463 100644 --- a/features/bestiary/index.js +++ b/src/features/bestiary/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import { numberWithCommas } from "../../utils/numberUtils"; diff --git a/features/bestiary/metadata.json b/src/features/bestiary/metadata.json index 3ff9383..3ff9383 100644 --- a/features/bestiary/metadata.json +++ b/src/features/bestiary/metadata.json diff --git a/features/betterGuis/dungeonReadyGui.js b/src/features/betterGuis/dungeonReadyGui.js index ad9a5dd..ad9a5dd 100644 --- a/features/betterGuis/dungeonReadyGui.js +++ b/src/features/betterGuis/dungeonReadyGui.js diff --git a/features/betterGuis/index.js b/src/features/betterGuis/index.js index 7e91d69..dcd8fb9 100644 --- a/features/betterGuis/index.js +++ b/src/features/betterGuis/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import logger from "../../logger"; @@ -218,15 +218,15 @@ class BetterGuis extends Feature { } postGuiRender(x, y, gui) { - if (gui instanceof net.minecraft.client.gui.inventory.GuiChest.GuiChest) + if (gui instanceof net.minecraft.client.gui.inventory.GuiChest) this.invSearchSoopyGui._render(x, y, 0); } guiMouseClick(x, y, button, gui) { - if (gui instanceof net.minecraft.client.gui.inventory.GuiChest.GuiChest) + if (gui instanceof net.minecraft.client.gui.inventory.GuiChest) this.invSearchSoopyGui._onClick(x, y, button); } guiKey(char, code, gui, event) { - if (!(gui instanceof net.minecraft.client.gui.inventory.GuiChest.GuiChest)) return; + if (!(gui instanceof net.minecraft.client.gui.inventory.GuiChest)) return; this.invSearchSoopyGui._onKeyPress(char, code); @@ -240,7 +240,7 @@ class BetterGuis extends Feature { } renderSlot(slot, gui, event) { - if (!(gui instanceof net.minecraft.client.gui.inventory.GuiChest.GuiChest)) return; + if (!(gui instanceof net.minecraft.client.gui.inventory.GuiChest)) return; if (!this.invSearchTextBox.getText()) return; let searchText = this.invSearchTextBox.getText().toLowerCase(); diff --git a/features/betterGuis/metadata.json b/src/features/betterGuis/metadata.json index 6aeed27..6aeed27 100644 --- a/features/betterGuis/metadata.json +++ b/src/features/betterGuis/metadata.json diff --git a/features/betterGuis/museumGui.js b/src/features/betterGuis/museumGui.js index 06497af..06497af 100644 --- a/features/betterGuis/museumGui.js +++ b/src/features/betterGuis/museumGui.js diff --git a/features/changeLogGUI/index.js b/src/features/changeLogGUI/index.js index f9bf97d..c9c25fe 100644 --- a/features/changeLogGUI/index.js +++ b/src/features/changeLogGUI/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; @@ -136,17 +136,15 @@ class ChangelogPage extends GuiPage { this.loadChangeLog() } - loadChangeLog() { - fetch("http://soopy.dev/api/soopyv2/changelog.json").json(data => { + async loadChangeLog() { + let data = await fetch("http://soopy.dev/api/soopyv2/changelog.json").json() - this.changelogData = data.changelog.reverse() + this.changelogData = data.changelog.reverse() - this.downloadableVersion = data.downloadableVersion - this.importantVersion = data.importantVersion - - this.updateText() - }) + this.downloadableVersion = data.downloadableVersion + this.importantVersion = data.importantVersion + this.updateText() } onOpen() { diff --git a/features/changeLogGUI/metadata.json b/src/features/changeLogGUI/metadata.json index 8dfbe4b..8dfbe4b 100644 --- a/features/changeLogGUI/metadata.json +++ b/src/features/changeLogGUI/metadata.json diff --git a/features/cosmetics/cosmetic.js b/src/features/cosmetics/cosmetic.js index 878e425..878e425 100644 --- a/features/cosmetics/cosmetic.js +++ b/src/features/cosmetics/cosmetic.js diff --git a/features/cosmetics/cosmetic/dragon/dragonWings.js b/src/features/cosmetics/cosmetic/dragon/dragonWings.js index 3f98ce3..944ba78 100644 --- a/features/cosmetics/cosmetic/dragon/dragonWings.js +++ b/src/features/cosmetics/cosmetic/dragon/dragonWings.js @@ -1,5 +1,5 @@ import renderLibs from "../../../../../guimanager/renderLibs.js"; -import { f, m, m } from "../../../../../mappings/mappings.js"; +import { f, m } from "../../../../../mappings/mappings.js"; import ToggleSetting from "../../../settings/settingThings/toggle.js"; import Cosmetic from "../../cosmetic.js"; diff --git a/features/cosmetics/hiddenRequirement.js b/src/features/cosmetics/hiddenRequirement.js index dbc3e06..dbc3e06 100644 --- a/features/cosmetics/hiddenRequirement.js +++ b/src/features/cosmetics/hiddenRequirement.js diff --git a/features/cosmetics/index.js b/src/features/cosmetics/index.js index 7c09bce..f3deece 100644 --- a/features/cosmetics/index.js +++ b/src/features/cosmetics/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import DragonWings from "./cosmetic/dragon/dragonWings" @@ -83,25 +83,25 @@ class Cosmetics extends Feature { } } - loadCosmeticsData() { - fetch("http://soopy.dev/api/soopyv2/cosmetics.json").json(data => { - this.cosmeticsData = data - this.playerHasACosmeticA = !!data[Player.getUUID().toString().replace(/-/g, "")] - if (this.playerHasACosmeticA && !this.postRenderEntityTrigger) { - // this.registerEvent("postRenderEntity", this.renderEntity) - this.postRenderEntityTrigger = register("postRenderEntity", (entity, pos, ticks, event) => { - if (ticks !== 1) return - if (this.uuidToCosmeticDirect[entity.getUUID().toString().replace(/-/g, "")]) { - let cosmetics = Object.values(this.uuidToCosmeticDirect[entity.getUUID().toString().replace(/-/g, "")]) - for (let cosmetic of cosmetics) { - cosmetic.onRenderEntity(ticks, true) - } + async loadCosmeticsData() { + let data = await fetch("http://soopy.dev/api/soopyv2/cosmetics.json").json() + + this.cosmeticsData = data + this.playerHasACosmeticA = !!data[Player.getUUID().toString().replace(/-/g, "")] + if (this.playerHasACosmeticA && !this.postRenderEntityTrigger) { + // this.registerEvent("postRenderEntity", this.renderEntity) + this.postRenderEntityTrigger = register("postRenderEntity", (entity, pos, ticks, event) => { + if (ticks !== 1) return + if (this.uuidToCosmeticDirect[entity.getUUID().toString().replace(/-/g, "")]) { + let cosmetics = Object.values(this.uuidToCosmeticDirect[entity.getUUID().toString().replace(/-/g, "")]) + for (let cosmetic of cosmetics) { + cosmetic.onRenderEntity(ticks, true) } - }) - } + } + }) + } - this.scanForNewCosmetics() - }) + this.scanForNewCosmetics() } setUserCosmeticsInformation(uuid, cosmetics) { diff --git a/features/cosmetics/metadata.json b/src/features/cosmetics/metadata.json index f198cff..f198cff 100644 --- a/features/cosmetics/metadata.json +++ b/src/features/cosmetics/metadata.json diff --git a/features/dataLoader/index.js b/src/features/dataLoader/index.js index 23cf744..eccafb4 100644 --- a/features/dataLoader/index.js +++ b/src/features/dataLoader/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import socketConnection from "../../socketConnection"; @@ -123,12 +123,12 @@ class DataLoader extends Feature { return this.ping || 0 } - step_5min() { - fetch("http://soopy.dev/api/v2/mayor").json(data => { - if (!data.success) return - this.mayorData = data.data - this.currentMayorPerks = new Set(data.data.mayor.perks.map(a => a.name)) - }) + async step_5min() { + let data = await fetch("http://soopy.dev/api/v2/mayor").json() + + if (!data.success) return + this.mayorData = data.data + this.currentMayorPerks = new Set(data.data.mayor.perks.map(a => a.name)) } worldLoad() { @@ -141,14 +141,13 @@ class DataLoader extends Feature { loadApiStepThing() { this.loadApiData("skyblock", false) } - loadApi() { - fetch("http://soopy.dev/api/v2/player_skyblock/" + Player.getUUID().replace(/-/g, "")).json(data => { + async loadApi() { + let data = await fetch("http://soopy.dev/api/v2/player_skyblock/" + Player.getUUID().replace(/-/g, "")).json() - if (!data.success) return + if (!data.success) return - this.api_loaded_event.trigger(data, "skyblock", true, true) - this.lastApiData.skyblock = data - }) + this.api_loaded_event.trigger(data, "skyblock", true, true) + this.lastApiData.skyblock = data } loadApiData(type, soopyServer) { @@ -168,7 +167,7 @@ class DataLoader extends Feature { } else { if (type === "skyblock") { - fetch("https://api.hypixel.net/skyblock/profiles?key=" + key + "&uuid=" + Player.getUUID().replace(/-/g, "")).json(data => { + fetch("https://api.hypixel.net/skyblock/profiles?key=" + key + "&uuid=" + Player.getUUID().replace(/-/g, "")).json().then(data => { if (!data.success) return this.api_loaded_event.trigger(data, "skyblock", false, true) diff --git a/features/dataLoader/metadata.json b/src/features/dataLoader/metadata.json index 4953f99..4953f99 100644 --- a/features/dataLoader/metadata.json +++ b/src/features/dataLoader/metadata.json diff --git a/features/dungeonMap/dungeonBossImages/f1.png b/src/features/dungeonMap/dungeonBossImages/f1.png Binary files differindex 5bc2d08..5bc2d08 100644 --- a/features/dungeonMap/dungeonBossImages/f1.png +++ b/src/features/dungeonMap/dungeonBossImages/f1.png diff --git a/features/dungeonMap/index.js b/src/features/dungeonMap/index.js index 6fb0511..456dff3 100644 --- a/features/dungeonMap/index.js +++ b/src/features/dungeonMap/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> const Color = Java.type("java.awt.Color") diff --git a/features/dungeonMap/map.png b/src/features/dungeonMap/map.png Binary files differindex ff16aca..ff16aca 100644 --- a/features/dungeonMap/map.png +++ b/src/features/dungeonMap/map.png diff --git a/features/dungeonMap/metadata.json b/src/features/dungeonMap/metadata.json index beef50e..beef50e 100644 --- a/features/dungeonMap/metadata.json +++ b/src/features/dungeonMap/metadata.json diff --git a/features/dungeonMap2/DungeonMapData.js b/src/features/dungeonMap2/DungeonMapData.js index 1b50c67..1b50c67 100644 --- a/features/dungeonMap2/DungeonMapData.js +++ b/src/features/dungeonMap2/DungeonMapData.js diff --git a/features/dungeonMap2/DungeonMapRoom.js b/src/features/dungeonMap2/DungeonMapRoom.js index d6ee014..d6ee014 100644 --- a/features/dungeonMap2/DungeonMapRoom.js +++ b/src/features/dungeonMap2/DungeonMapRoom.js diff --git a/features/dungeonMap2/DungeonRoomStaticData.js b/src/features/dungeonMap2/DungeonRoomStaticData.js index 75d5b1e..75d5b1e 100644 --- a/features/dungeonMap2/DungeonRoomStaticData.js +++ b/src/features/dungeonMap2/DungeonRoomStaticData.js diff --git a/features/dungeonMap2/index.js b/src/features/dungeonMap2/index.js index 61909a0..199bc05 100644 --- a/features/dungeonMap2/index.js +++ b/src/features/dungeonMap2/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; diff --git a/features/dungeonMap2/metadata.json b/src/features/dungeonMap2/metadata.json index 53e7e03..53e7e03 100644 --- a/features/dungeonMap2/metadata.json +++ b/src/features/dungeonMap2/metadata.json diff --git a/features/dungeonRoutes/index.js b/src/features/dungeonRoutes/index.js index e84bd2b..e59e908 100644 --- a/features/dungeonRoutes/index.js +++ b/src/features/dungeonRoutes/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; diff --git a/features/dungeonRoutes/metadata.json b/src/features/dungeonRoutes/metadata.json index c2f2a63..c2f2a63 100644 --- a/features/dungeonRoutes/metadata.json +++ b/src/features/dungeonRoutes/metadata.json diff --git a/features/dungeonRoutes/routesData.json b/src/features/dungeonRoutes/routesData.json index d701fc7..d701fc7 100644 --- a/features/dungeonRoutes/routesData.json +++ b/src/features/dungeonRoutes/routesData.json diff --git a/features/dungeonSolvers/f7data.json b/src/features/dungeonSolvers/f7data.json index 72e3ec6..72e3ec6 100644 --- a/features/dungeonSolvers/f7data.json +++ b/src/features/dungeonSolvers/f7data.json diff --git a/features/dungeonSolvers/index.js b/src/features/dungeonSolvers/index.js index cc7de31..a959a66 100644 --- a/features/dungeonSolvers/index.js +++ b/src/features/dungeonSolvers/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { f, m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; @@ -662,42 +662,40 @@ class DungeonSolvers extends Feature { this.scoreElement.setText(`&dScore: ${skillScore + exploreScore + speedScore + bonus}\n&aS+ ${sPlusText}\n&aS ${sText}`); } - scanFirstDeathForSpiritPet(username) { + async scanFirstDeathForSpiritPet(username) { if (this.firstDeath) return this.firstDeath = true if (!this.nameToUuid[username.toLowerCase()]) return let uuid = this.nameToUuid[username.toLowerCase()]?.replace(/-/g, "") if (this.FeatureManager.features["globalSettings"] && this.FeatureManager.features["globalSettings"].class.apiKeySetting.getValue()) { - fetch(`https://api.hypixel.net/skyblock/profiles?key=${this.FeatureManager.features["globalSettings"].class.apiKeySetting.getValue()}&uuid=${uuid}`).json(data => { - if (!data.success) return + let data = await fetch(`https://api.hypixel.net/skyblock/profiles?key=${this.FeatureManager.features["globalSettings"].class.apiKeySetting.getValue()}&uuid=${uuid}`).json() + if (!data.success) return - let latestProfile = [0, undefined] + let latestProfile = [0, undefined] - data.profiles.forEach(p => { - if (p.members[uuid].last_save > latestProfile[0]) { - latestProfile = [p.members[uuid].last_save, p.members[uuid].pets.some(pet => pet.type === "SPIRIT" && pet.tier === "LEGENDARY")] - } - }) - - if (latestProfile[1]) { - this.firstDeathHadSpirit = true - if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " has spirit pet!") - } else { - if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " does not have spirit pet!") + data.profiles.forEach(p => { + if (p.members[uuid].last_save > latestProfile[0]) { + latestProfile = [p.members[uuid].last_save, p.members[uuid].pets.some(pet => pet.type === "SPIRIT" && pet.tier === "LEGENDARY")] } }) + + if (latestProfile[1]) { + this.firstDeathHadSpirit = true + if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " has spirit pet!") + } else { + if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " does not have spirit pet!") + } } else { - fetch(`http://soopy.dev/api/v2/player_skyblock/${uuid}`).json(data => { - if (!data.success) return - - if (data.data.profiles[data2.data.stats.currentProfileId].members[uuid].pets.some(pet => pet.type === "SPIRIT" && pet.tier === "LEGENDARY")) { - this.firstDeathHadSpirit = true - if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " has spirit pet!") - } else { - if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " does not have spirit pet!") - } - }) + let data = await fetch(`http://soopy.dev/api/v2/player_skyblock/${uuid}`).json() + if (!data.success) return + + if (data.data.profiles[data2.data.stats.currentProfileId].members[uuid].pets.some(pet => pet.type === "SPIRIT" && pet.tier === "LEGENDARY")) { + this.firstDeathHadSpirit = true + if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " has spirit pet!") + } else { + if (this.scoreCalculation.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + username + " does not have spirit pet!") + } } } diff --git a/features/dungeonSolvers/metadata.json b/src/features/dungeonSolvers/metadata.json index 6467a3a..6467a3a 100644 --- a/features/dungeonSolvers/metadata.json +++ b/src/features/dungeonSolvers/metadata.json diff --git a/features/events/index.js b/src/features/events/index.js index 8c18c04..ea83312 100644 --- a/features/events/index.js +++ b/src/features/events/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { f, m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; @@ -9,9 +9,7 @@ import SettingBase from "../settings/settingThings/settingBase"; import ToggleSetting from "../settings/settingThings/toggle"; import HudTextElement from "../hud/HudTextElement"; import LocationSetting from "../settings/settingThings/location"; -import { fetch } from "../../utils/networkUtils" import ButtonSetting from "../settings/settingThings/button"; -import { delay } from "../../utils/delayUtils"; import TextSetting from "../settings/settingThings/textSetting"; let warpData = { diff --git a/features/events/metadata.json b/src/features/events/metadata.json index 363625f..363625f 100644 --- a/features/events/metadata.json +++ b/src/features/events/metadata.json diff --git a/features/eventsGUI/index.js b/src/features/eventsGUI/index.js index 1bbbae0..90e6993 100644 --- a/features/eventsGUI/index.js +++ b/src/features/eventsGUI/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Enum from "../../../guimanager/Enum"; import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; diff --git a/features/eventsGUI/metadata.json b/src/features/eventsGUI/metadata.json index b7b1f6f..b7b1f6f 100644 --- a/features/eventsGUI/metadata.json +++ b/src/features/eventsGUI/metadata.json diff --git a/features/featureBase/index.js b/src/features/featureBase/index.js index 7a11945..2a96a7f 100644 --- a/features/featureBase/index.js +++ b/src/features/featureBase/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; @@ -7,14 +7,14 @@ class FeatureBase extends Feature { super() } - onEnable(){ + onEnable() { this.initVariables() } - initVariables(){ + initVariables() { } - onDisable(){ + onDisable() { this.initVariables() } } diff --git a/features/featureBase/metadata.json b/src/features/featureBase/metadata.json index a6b411d..a6b411d 100644 --- a/features/featureBase/metadata.json +++ b/src/features/featureBase/metadata.json diff --git a/features/fpsImproveGui/index.js b/src/features/fpsImproveGui/index.js index 8387dbd..416d754 100644 --- a/features/fpsImproveGui/index.js +++ b/src/features/fpsImproveGui/index.js @@ -1,16 +1,7 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> -import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; import Feature from "../../featureClass/class"; import GuiPage from "../soopyGui/GuiPage"; -import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; -import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"; -import SoopyImageElement from "../../../guimanager/GuiElement/SoopyImageElement"; -import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; -import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; -import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; -import BoxWithText from "../../../guimanager/GuiElement/BoxWithText"; -import { fetch } from "../../utils/networkUtils"; class FpsImproveGui extends Feature { constructor() { diff --git a/features/fpsImproveGui/metadata.json b/src/features/fpsImproveGui/metadata.json index a292c1d..a292c1d 100644 --- a/features/fpsImproveGui/metadata.json +++ b/src/features/fpsImproveGui/metadata.json diff --git a/features/fragBot/index.js b/src/features/fragBot/index.js index c6a2fd9..2b89203 100644 --- a/features/fragBot/index.js +++ b/src/features/fragBot/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import SettingBase from "../settings/settingThings/settingBase"; diff --git a/features/fragBot/metadata.json b/src/features/fragBot/metadata.json index 5aaa6a9..5aaa6a9 100644 --- a/features/fragBot/metadata.json +++ b/src/features/fragBot/metadata.json diff --git a/features/friendsGUI/index.js b/src/features/friendsGUI/index.js index bae266b..d4ac2f4 100644 --- a/features/friendsGUI/index.js +++ b/src/features/friendsGUI/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { SoopyRenderEvent } from "../../../guimanager"; import ButtonWithArrowAndDescription from "../../../guimanager/GuiElement/ButtonWithArrowAndDescription"; diff --git a/features/friendsGUI/metadata.json b/src/features/friendsGUI/metadata.json index b7b1f6f..b7b1f6f 100644 --- a/features/friendsGUI/metadata.json +++ b/src/features/friendsGUI/metadata.json diff --git a/features/globalSettings/firstLoadPage.js b/src/features/globalSettings/firstLoadPage.js index 62805f5..62805f5 100644 --- a/features/globalSettings/firstLoadPage.js +++ b/src/features/globalSettings/firstLoadPage.js diff --git a/features/globalSettings/firstLoadPages.js b/src/features/globalSettings/firstLoadPages.js index 2975a69..2975a69 100644 --- a/features/globalSettings/firstLoadPages.js +++ b/src/features/globalSettings/firstLoadPages.js diff --git a/features/globalSettings/index.js b/src/features/globalSettings/index.js index 9ffbd36..b135337 100644 --- a/features/globalSettings/index.js +++ b/src/features/globalSettings/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import ButtonSetting from "../settings/settingThings/button"; @@ -142,12 +142,12 @@ class GlobalSettings extends Feature { }) this.warps = JSON.parse(FileLib.read("SoopyV2", "features/globalSettings/warps.json")) - + this.registerCommand("warp", (...name) => { - //send command to server - ChatLib.command("warp " + (name[0] || "")); + //send command to server + ChatLib.command("warp " + (name[0] || "")); }, (args) => { - return this.warps.filter(v => v.toLowerCase().startsWith(args[0])) + return this.warps.filter(v => v.toLowerCase().startsWith(args[0])) }) this.registerStep(true, 4, this.mobThings) @@ -271,7 +271,7 @@ class GlobalSettings extends Feature { if (this.twitchCommands.getValue() && message.startsWith("-") && message[1].toLowerCase().match(/[a-z]/)) { cancel(event) ChatLib.addToSentMessageHistory(message) - fetch("http://soopy.dev/api/soopyv2/botcommand?m=" + encodeURIComponent(message.replace("-", "")) + "&u=" + Player.getName()).text(text => { + fetch("http://soopy.dev/api/soopyv2/botcommand?m=" + encodeURIComponent(message.replace("-", "")) + "&u=" + Player.getName()).text().then(text => { ChatLib.chat(this.FeatureManager.messagePrefix + "&7" + message) toMessageWithLinks(this.FeatureManager.messagePrefix + text, "7").chat() }) @@ -287,7 +287,7 @@ class GlobalSettings extends Feature { name: Player.getHeldItem().getName(), lore: Player.getHeldItem().getLore().join("\n") } - }).text(text => { + }).text().then(text => { if (text.length > 20) { ChatLib.chat(this.FeatureManager.messagePrefix + "There was an error uploading the item data!") return @@ -306,7 +306,7 @@ class GlobalSettings extends Feature { let [_] = message.getUnformattedText().match(/\[ITEM:([0-9]+)\]/g) let id = _.replace("[ITEM:", "").replace(/\]$/g, "") - fetch("http://soopy.dev/api/soopyv2/itemdown/" + id).json(([name, lore]) => { + fetch("http://soopy.dev/api/soopyv2/itemdown/" + id).json().then(([name, lore]) => { for (let i = 0; i < message.getMessageParts().length; i++) { let component = message.getMessageParts()[i] @@ -319,7 +319,7 @@ class GlobalSettings extends Feature { } message.setRecursive(true) message.chat() - }).error(() => { + }).catch(() => { ChatLib.chat(this.FeatureManager.messagePrefix + "There was an error downloading the item data!") message.chat() }) @@ -337,85 +337,83 @@ class GlobalSettings extends Feature { // } ] - this.registerStep(false, 60, () => { + this.registerStep(false, 60, async () => { if (this.ahAlerts.length === 0) return - fetch("https://moulberry.codes/auction.json").json(data => { //TODO: use https://moulberry.codes/auction.json.gz - if (!data.success) return - - data.new_auctions.forEach(a => { - let itemData = decompress(a.item_bytes) - let itemJSON = itemData.toObject().i[0] - let itemId = itemJSON.tag.ExtraAttributes.id - - if (a.bin && this.ahAlerts.some(al => { - let ret = al.id === itemId && a.starting_bid <= al.maxPrice - - if (ret && al.nbt) { - if (al.nbt.some(nbtr => { - let steps = nbtr.split(".") - let o = itemJSON - steps.forEach(s => { - o = o?.[s] - }) - - return !o - })) ret = false - } + let data = await fetch("https://moulberry.codes/auction.json").json()//TODO: use https://moulberry.codes/auction.json.gz + if (!data.success) return + + data.new_auctions.forEach(a => { + let itemData = decompress(a.item_bytes) + let itemJSON = itemData.toObject().i[0] + let itemId = itemJSON.tag.ExtraAttributes.id + + if (a.bin && this.ahAlerts.some(al => { + let ret = al.id === itemId && a.starting_bid <= al.maxPrice + + if (ret && al.nbt) { + if (al.nbt.some(nbtr => { + let steps = nbtr.split(".") + let o = itemJSON + steps.forEach(s => { + o = o?.[s] + }) + + return !o + })) ret = false + } - return ret - })) { - Client.showTitle("SNIPE THING", "CHECK CHAT", 20, 60, 20) + return ret + })) { + Client.showTitle("SNIPE THING", "CHECK CHAT", 20, 60, 20) - new TextComponent(this.FeatureManager.messagePrefix + "Bin found " + numberWithCommas(a.starting_bid) + " " + a.item_name).setClick("run_command", "/viewauction " + a.uuid).chat() - } - }) + new TextComponent(this.FeatureManager.messagePrefix + "Bin found " + numberWithCommas(a.starting_bid) + " " + a.item_name).setClick("run_command", "/viewauction " + a.uuid).chat() + } }) }) - this.registerCommand("price", () => { - - fetch("http://soopy.dev/api/soopyv2/itemPriceDetailed", { + this.registerCommand("price", async () => { + let json = await fetch("http://soopy.dev/api/soopyv2/itemPriceDetailed", { postData: { item: Player.getHeldItem().getNBT().toObject() } - }).json(json => { - ChatLib.chat(this.FeatureManager.messagePrefix + "PRICE ANALYSIS (Total: $" + numberWithCommas(Math.round(json.price)) + ")") - // json.details.sort((a, b) => { - // if (typeof (a) === "string") return 1 - // if (typeof (b) === "string") return -1 - // return a[1] - b[1] - // }).forEach(d => { - // if (typeof (d) === "string") { - // ChatLib.chat(d) - // } else { - // ChatLib.chat("&f" + d[0] + "&7: &6" + numberWithCommas(Math.round(d[1]))) - // } - // }) - // ChatLib.chat(this.FeatureManager.messagePrefix + "Final price: " + numberWithCommas(Math.round(json.price))) - json.details.sort((b, a) => { - if (typeof (a) === "string") return 1 - if (typeof (b) === "string") return -1 - return a.price - b.price - }).forEach(d => { - if (typeof (d) === "string") { - ChatLib.chat(d) - } else { - if (!d.price) return - let lore = [] - d.items.sort((b, a) => { - if (typeof (a) === "string") return 1 - if (typeof (b) === "string") return -1 - return a[1] - b[1] - }).forEach(d2 => { - if (typeof (d2) === "string") { - lore.push(d2) - } else { - lore.push("&f" + d2[0] + "&7: $&6" + numberWithCommas(Math.round(d2[1]))) - } - }) - new TextComponent("&d" + d.name + "&7: $&6" + numberWithCommas(Math.round(d.price))).setHover("show_text", lore.join("\n")).chat() - } - }) + }).json() + + ChatLib.chat(this.FeatureManager.messagePrefix + "PRICE ANALYSIS (Total: $" + numberWithCommas(Math.round(json.price)) + ")") + // json.details.sort((a, b) => { + // if (typeof (a) === "string") return 1 + // if (typeof (b) === "string") return -1 + // return a[1] - b[1] + // }).forEach(d => { + // if (typeof (d) === "string") { + // ChatLib.chat(d) + // } else { + // ChatLib.chat("&f" + d[0] + "&7: &6" + numberWithCommas(Math.round(d[1]))) + // } + // }) + // ChatLib.chat(this.FeatureManager.messagePrefix + "Final price: " + numberWithCommas(Math.round(json.price))) + json.details.sort((b, a) => { + if (typeof (a) === "string") return 1 + if (typeof (b) === "string") return -1 + return a.price - b.price + }).forEach(d => { + if (typeof (d) === "string") { + ChatLib.chat(d) + } else { + if (!d.price) return + let lore = [] + d.items.sort((b, a) => { + if (typeof (a) === "string") return 1 + if (typeof (b) === "string") return -1 + return a[1] - b[1] + }).forEach(d2 => { + if (typeof (d2) === "string") { + lore.push(d2) + } else { + lore.push("&f" + d2[0] + "&7: $&6" + numberWithCommas(Math.round(d2[1]))) + } + }) + new TextComponent("&d" + d.name + "&7: $&6" + numberWithCommas(Math.round(d.price))).setHover("show_text", lore.join("\n")).chat() + } }) }) @@ -713,7 +711,7 @@ class GlobalSettings extends Feature { // } guiClicked(mouseX, mouseY, button, gui, event) { - if (gui.class.toString() === "class net.minecraft.client.gui.inventory.GuiChest" && Player.getContainer().getName() === "Cookie Clicker v0.01") { + if (Player.getContainer() && Player.getContainer().getName() === "Cookie Clicker v0.01") { let hoveredSlot = gui.getSlotUnderMouse() if (!hoveredSlot) return @@ -787,7 +785,7 @@ class GlobalSettings extends Feature { this.currentPlayerOpen = uuid this.currentPlayerNetworth = {} - fetch("http://soopy.dev/api/v2/player_skyblock/" + uuid).json(data => { + fetch("http://soopy.dev/api/v2/player_skyblock/" + uuid).json().then(data => { if (!data.success) return if (this.currentPlayerOpen === data.data.uuid) { @@ -814,76 +812,73 @@ class GlobalSettings extends Feature { return field2.get(e) } - soopyWeight(user) { + async soopyWeight(user) { ChatLib.chat(this.FeatureManager.messagePrefix + "Finding senither weight for " + user) - fetch("http://soopy.dev/api/v2/player/" + user).json(userData => { - if (!userData.success) { - ChatLib.chat(this.FeatureManager.messagePrefix + "&cError loading data: " + userData.error.description) - return - } + let userData = await fetch("http://soopy.dev/api/v2/player/" + user).json() + if (!userData.success) { + ChatLib.chat(this.FeatureManager.messagePrefix + "&cError loading data: " + userData.error.description) + return + } - fetch("http://soopy.dev/api/v2/player_skyblock/" + userData.data.uuid).json(sbData => { + let sbData = await fetch("http://soopy.dev/api/v2/player_skyblock/" + userData.data.uuid).json() - if (!sbData.success) { - ChatLib.chat(this.FeatureManager.messagePrefix + "&cError loading data: " + sbData.error.description) - return - } + if (!sbData.success) { + ChatLib.chat(this.FeatureManager.messagePrefix + "&cError loading data: " + sbData.error.description) + return + } - ChatLib.chat("&c" + ChatLib.getChatBreak("-")) - ChatLib.chat(userData.data.stats.nameWithPrefix + "'s senither weight (best profile):") - ChatLib.chat("&aTotal: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.total))) - new Message(new TextComponent("&aSkills: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill.total))) - .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill).map(skill => { - if (skill === "total") { - return null - } - return "&a" + firstLetterCapital(skill) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill[skill].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill[skill].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill[skill].overflow)) + ")" - }).filter(a => a).join("\n"))).chat() - new Message(new TextComponent("&aSlayer: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer.total))) - .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer).map(slayer => { - if (slayer === "total") { - return null - } - return "&a" + firstLetterCapital(slayer) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer[slayer].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer[slayer].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer[slayer].overflow)) + ")" - }).filter(a => a).join("\n"))).chat() - new Message(new TextComponent("&aDungeon: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons.total))) - .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons).map(dungeons => { - if (dungeons === "total") { - return null - } - return "&a" + firstLetterCapital(dungeons) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons[dungeons].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons[dungeons].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons[dungeons].overflow)) + ")" - }).filter(a => a).join("\n"))).chat() - if (sbData.data.stats.bestProfileId !== sbData.data.stats.currentProfileId) { - ChatLib.chat(userData.data.stats.nameWithPrefix + "'s senither weight (current profile):") - ChatLib.chat("&aTotal: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.total))) - new Message(new TextComponent("&aSkills: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill.total))) - .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill).map(skill => { - if (skill === "total") { - return null - } - return "&a" + firstLetterCapital(skill) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill[skill].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill[skill].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill[skill].overflow)) + ")" - }).filter(a => a).join("\n"))).chat() - new Message(new TextComponent("&aSlayer: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer.total))) - .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer).map(slayer => { - if (slayer === "total") { - return null - } - return "&a" + firstLetterCapital(slayer) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer[slayer].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer[slayer].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer[slayer].overflow)) + ")" - }).filter(a => a).join("\n"))).chat() - new Message(new TextComponent("&aDungeon: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons.total))) - .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons).map(dungeons => { - if (dungeons === "total") { - return null - } - return "&a" + firstLetterCapital(dungeons) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons[dungeons].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons[dungeons].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons[dungeons].overflow)) + ")" - }).filter(a => a).join("\n"))).chat() + ChatLib.chat("&c" + ChatLib.getChatBreak("-")) + ChatLib.chat(userData.data.stats.nameWithPrefix + "'s senither weight (best profile):") + ChatLib.chat("&aTotal: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.total))) + new Message(new TextComponent("&aSkills: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill.total))) + .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill).map(skill => { + if (skill === "total") { + return null } - ChatLib.chat("&c" + ChatLib.getChatBreak("-")) - - }) - }) + return "&a" + firstLetterCapital(skill) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill[skill].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill[skill].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.skill[skill].overflow)) + ")" + }).filter(a => a).join("\n"))).chat() + new Message(new TextComponent("&aSlayer: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer.total))) + .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer).map(slayer => { + if (slayer === "total") { + return null + } + return "&a" + firstLetterCapital(slayer) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer[slayer].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer[slayer].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.slayer[slayer].overflow)) + ")" + }).filter(a => a).join("\n"))).chat() + new Message(new TextComponent("&aDungeon: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons.total))) + .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons).map(dungeons => { + if (dungeons === "total") { + return null + } + return "&a" + firstLetterCapital(dungeons) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons[dungeons].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons[dungeons].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.bestProfileId].members[userData.data.uuid].weight.dungeons[dungeons].overflow)) + ")" + }).filter(a => a).join("\n"))).chat() + if (sbData.data.stats.bestProfileId !== sbData.data.stats.currentProfileId) { + ChatLib.chat(userData.data.stats.nameWithPrefix + "'s senither weight (current profile):") + ChatLib.chat("&aTotal: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.total))) + new Message(new TextComponent("&aSkills: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill.total))) + .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill).map(skill => { + if (skill === "total") { + return null + } + return "&a" + firstLetterCapital(skill) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill[skill].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill[skill].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.skill[skill].overflow)) + ")" + }).filter(a => a).join("\n"))).chat() + new Message(new TextComponent("&aSlayer: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer.total))) + .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer).map(slayer => { + if (slayer === "total") { + return null + } + return "&a" + firstLetterCapital(slayer) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer[slayer].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer[slayer].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.slayer[slayer].overflow)) + ")" + }).filter(a => a).join("\n"))).chat() + new Message(new TextComponent("&aDungeon: &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons.total))) + .setHover("show_text", Object.keys(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons).map(dungeons => { + if (dungeons === "total") { + return null + } + return "&a" + firstLetterCapital(dungeons) + ": &b" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons[dungeons].total)) + " &7(" + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons[dungeons].weight)) + " | " + numberWithCommas(Math.round(sbData.data.profiles[sbData.data.stats.currentProfileId].members[userData.data.uuid].weight.dungeons[dungeons].overflow)) + ")" + }).filter(a => a).join("\n"))).chat() + } + ChatLib.chat("&c" + ChatLib.getChatBreak("-")) } showFirstLoadPage() { @@ -901,7 +896,7 @@ class GlobalSettings extends Feature { if (key) { try { var url = "https://api.hypixel.net/key?key=" + key - let data = fetch(url).json() + let data = fetch(url).jsonSync() // console.log(data) @@ -1009,7 +1004,7 @@ class GlobalSettings extends Feature { if (key) { try { var url = "https://api.hypixel.net/key?key=" + key - let data = fetch(url).json() + let data = fetch(url).jsonSync() if (data.success) { return true @@ -1029,7 +1024,7 @@ class GlobalSettings extends Feature { new Thread(() => { try { var url = "https://api.hypixel.net/key?key=" + this.module.apiKeySetting.getValue() - let data = fetch(url).json() + let data = fetch(url).jsonSync() if (data.success) { new Notification("§aSuccess!", ["Your api key is valid!"]) diff --git a/features/globalSettings/metadata.json b/src/features/globalSettings/metadata.json index 801716f..801716f 100644 --- a/features/globalSettings/metadata.json +++ b/src/features/globalSettings/metadata.json diff --git a/features/globalSettings/warps.json b/src/features/globalSettings/warps.json index e84c78c..e84c78c 100644 --- a/features/globalSettings/warps.json +++ b/src/features/globalSettings/warps.json diff --git a/features/guild/index.js b/src/features/guild/index.js index e8e2895..27b143b 100644 --- a/features/guild/index.js +++ b/src/features/guild/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import { toMessageWithLinks } from "../../utils/utils"; @@ -14,7 +14,7 @@ class Guild extends Feature { onEnable() { this.bridgeBots = new Set() - fetch("http://soopy.dev/api/soopyv2/gbots.json").json(bots => { + fetch("http://soopy.dev/api/soopyv2/gbots.json").json().then(bots => { bots.forEach(b => this.bridgeBots.add(b)) }) diff --git a/features/guild/metadata.json b/src/features/guild/metadata.json index babd19d..babd19d 100644 --- a/features/guild/metadata.json +++ b/src/features/guild/metadata.json diff --git a/features/hud/HudTextElement.js b/src/features/hud/HudTextElement.js index cdde6f3..cdde6f3 100644 --- a/features/hud/HudTextElement.js +++ b/src/features/hud/HudTextElement.js diff --git a/features/hud/index.js b/src/features/hud/index.js index 8791cb4..8805dac 100644 --- a/features/hud/index.js +++ b/src/features/hud/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import SoopyNumber from "../../../guimanager/Classes/SoopyNumber"; import Feature from "../../featureClass/class"; diff --git a/features/hud/metadata.json b/src/features/hud/metadata.json index 67f5671..67f5671 100644 --- a/features/hud/metadata.json +++ b/src/features/hud/metadata.json diff --git a/features/lockedFeatures/index.js b/src/features/lockedFeatures/index.js index bea9e53..7557619 100644 --- a/features/lockedFeatures/index.js +++ b/src/features/lockedFeatures/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import ToggleSetting from "../settings/settingThings/toggle"; diff --git a/features/lockedFeatures/metadata.json b/src/features/lockedFeatures/metadata.json index 7506cc2..7506cc2 100644 --- a/features/lockedFeatures/metadata.json +++ b/src/features/lockedFeatures/metadata.json diff --git a/features/mining/coords.json b/src/features/mining/coords.json index 246731b..246731b 100644 --- a/features/mining/coords.json +++ b/src/features/mining/coords.json diff --git a/features/mining/index.js b/src/features/mining/index.js index 55031c9..0e9c7c0 100644 --- a/features/mining/index.js +++ b/src/features/mining/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import { m } from "../../../mappings/mappings"; @@ -123,7 +123,7 @@ class Mining extends Feature { if (startingTime === 0) return if (startingTime === -1) { startingTime = 0 - fetch("https://api.hypixel.net/skyblock/bazaar").json(data => { + fetch("https://api.hypixel.net/skyblock/bazaar").json().then(data => { startingTime = Date.now() Object.keys(data.products).forEach(id => { diff --git a/features/mining/metadata.json b/src/features/mining/metadata.json index ce9ed40..ce9ed40 100644 --- a/features/mining/metadata.json +++ b/src/features/mining/metadata.json diff --git a/features/nether/index.js b/src/features/nether/index.js index 77d8f27..4b14c48 100644 --- a/features/nether/index.js +++ b/src/features/nether/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { f, m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; @@ -143,7 +143,7 @@ class Nether extends Feature { this.controlLocLast = undefined this.controlLoc = undefined this.controlSkeleton = undefined - this.miniboss = undefined + this.miniboss = undefined }) this.registerChat("You completed your rescue quest! Visit the Town Board to claim the rewards,", () => { diff --git a/features/nether/metadata.json b/src/features/nether/metadata.json index 2a7c145..2a7c145 100644 --- a/features/nether/metadata.json +++ b/src/features/nether/metadata.json diff --git a/src/features/networthGUI/index.js b/src/features/networthGUI/index.js new file mode 100644 index 0000000..b1ff5c2 --- /dev/null +++ b/src/features/networthGUI/index.js @@ -0,0 +1,239 @@ +/// <reference types="../../../../CTAutocomplete" /> +/// <reference lib="es2015" /> +import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; +import Feature from "../../featureClass/class"; +import GuiPage from "../soopyGui/GuiPage"; +import BoxWithLoading from "../../../guimanager/GuiElement/BoxWithLoading"; +import BoxWithTextAndDescription from "../../../guimanager/GuiElement/BoxWithTextAndDescription"; +import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; +import TextBox from "../../../guimanager/GuiElement/TextBox"; +import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent"; +import { numberWithCommas } from "../../utils/numberUtils"; +import { firstLetterWordCapital } from "../../utils/stringUtils"; +import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; +import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"; +import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; +import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; +import { fetch } from "../../utils/networkUtils"; +import Dropdown from "../../../guimanager/GuiElement/Dropdown"; +import SoopyContentChangeEvent from "../../../guimanager/EventListener/SoopyContentChangeEvent"; + +class NetworthGui extends Feature { + constructor() { + super() + } + + onEnable() { + this.initVariables() + + this.GuiPage = new NetworthPage() + + } + + initVariables() { + this.GuiPage = undefined + } + + onDisable() { + this.initVariables() + } +} + + +class NetworthPage extends GuiPage { + constructor() { + super(7) + + this.name = "Networth" + + this.pages = [this.newPage()] + + this.pages[0].addChild(new SoopyTextElement().setText("§0Networth").setMaxTextScale(3).setLocation(0.1, 0.05, 0.6, 0.1)) + this.pages[0].addChild(new SoopyTextElement().setText("§0(This is in beta and may be inaccurate)").setMaxTextScale(3).setLocation(0.1, 0.15, 0.8, 0.075)) + let button = new ButtonWithArrow().setText("§0Open in browser").setLocation(0.7, 0.05, 0.2, 0.1) + this.pages[0].addChild(button) + + button.addEvent(new SoopyMouseClickEvent().setHandler(() => { + java.awt.Desktop.getDesktop().browse( + new java.net.URI("https://soopy.dev/networth") + ); + })) + + this.nameInput = new TextBox().setPlaceholder("Click to search").setLocation(0.1, 0.225, 0.8, 0.1) + this.pages[0].addChild(this.nameInput) + + this.nameInput.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { + if (this.nameInput.text.selected && keyId === 28) { + this.playerLoad = this.nameInput.text.text + this.nameInput.setText("") + this.updateData(this.playerLoad) + } + })) + + this.statArea = new SoopyGuiElement().setLocation(0.05, 0.325, 0.9, 0.675).setScrollable(true) + this.pages[0].addChild(this.statArea) + + this.loadingElm = new BoxWithLoading().setLocation(0.35, 0.4, 0.3, 0.2) + this.errorElm = new BoxWithTextAndDescription().setLocation(0.2, 0.3, 0.6, 0.4).setText("Error!").setDesc("An error occured while loading the data!") + this.statArea.addChild(this.loadingElm) + + this.playerLoad = undefined + + this.sidebarElement = new SoopyGuiElement().setLocation(0, 0, 1, 1) + + this.sidebarUsernameSearch = new TextBox().setLocation(0.15, 0.05, 0.7, 0.1).setPlaceholder("Click to search") + this.sidebarElement.addChild(this.sidebarUsernameSearch) + + this.sidebarUsernameSearch.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { + if (this.sidebarUsernameSearch.text.selected && keyId === 28) { + let search = this.sidebarUsernameSearch.text.text + this.sidebarUsernameSearch.setText("") + this.sidebarSearch(search) + } + })) + + this.lbBackButton = new ButtonWithArrow().setLocation(0.05, 0.05, 0.1, 0.1).setText("§0Back").setDirectionRight(false) + this.lbNextButton = new ButtonWithArrow().setLocation(0.85, 0.05, 0.1, 0.1).setText("§0Next") + this.sidebarElement.addChild(this.lbBackButton) + this.sidebarElement.addChild(this.lbNextButton) + this.lbBackButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + if (this.currentLbPage > 0) this.goToLeaderboardPage(this.currentLbPage - 1) + })) + this.lbNextButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.goToLeaderboardPage(this.currentLbPage + 1) + })) + + this.leaderboardArea = new SoopyGuiElement().setLocation(0.05, 0.15, 0.9, 0.85).setScrollable(true) + this.sidebarElement.addChild(this.leaderboardArea) + + this.currentLbPage = 0 + + this.finaliseLoading() + } + + async updateData(player, profIn) { + this.playerLoad = player + + this.statArea._scrollAmount = 0 + this.statArea.location.scroll.y.set(0, 100) + + this.statArea.clearChildren() + this.statArea.addChild(this.loadingElm) + + let playerData = await fetch("http://soopy.dev/api/v2/player/" + player).json() + + if (player !== this.playerLoad) return + + if (!playerData.success) { + this.statArea.clearChildren() + this.statArea.addChild(this.errorElm) + this.errorElm.setText("§0" + playerData.error.name) + this.errorElm.setDesc("§0" + playerData.error.description) + return + } + + let skyblockData = await fetch("http://soopy.dev/api/v2/player_skyblock/" + playerData.data.uuid).json() + + if (player !== this.playerLoad) return + + this.statArea.clearChildren() + + if (!skyblockData.success) { + this.statArea.addChild(this.errorElm) + this.errorElm.setText("§0" + skyblockData.error.name) + this.errorElm.setDesc("§0" + skyblockData.error.description) + return + } + + let selectedProf = profIn || skyblockData.data.stats.bestProfileId + + let nwData = skyblockData.data.profiles[selectedProf].members[playerData.data.uuid].soopyNetworth + let nameElm = new SoopyTextElement().setText(playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")).setMaxTextScale(2).setLocation(0.1, 0.05, 0.8, 0.1) + this.statArea.addChild(nameElm) + + let profOptions = {} + Object.keys(skyblockData.data.profiles).forEach(p => { + profOptions[p] = skyblockData.data.profiles[p].stats.cute_name + }) + + let profileSelect = new Dropdown().setOptions(profOptions).setSelectedOption(selectedProf).setLocation(0.1, 0.15, 0.3, 0.1).addEvent(new SoopyContentChangeEvent().setHandler(newval => { + this.updateData(player, newval) + })) + this.statArea.addChild(profileSelect) + this.statArea.addChild(new SoopyTextElement().setText("§0Networth: §2$" + numberWithCommas(Math.round(nwData.networth)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.45, 0.15, 0.4, 0.1)) + this.statArea.addChild(new SoopyTextElement().setText("§0Purse: §2$" + numberWithCommas(Math.round(nwData.purse)).replace(/,/g, "§7,§2") + "§0 | Bank: §2$" + numberWithCommas(Math.round(nwData.bank)).replace(/,/g, "§7,§2") + "§0 | Sack: §2$" + numberWithCommas(Math.round(nwData.sack)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.1, 0.25, 0.8, 0.1)) + + Object.keys(nwData.categories).sort((a, b) => nwData.categories[b].total - nwData.categories[a].total).forEach((name, i) => { + let renderName = firstLetterWordCapital(name.replace(/_/g, " ")) + + let data = nwData.categories[name] + + let box = new SoopyBoxElement().setLocation(i % 2 === 0 ? 0 : 0.525, 0.45 + Math.floor(i / 2) * 0.35, 0.475, 0.25) + + box.addChild(new SoopyMarkdownElement().setLocation(0, 0, 1, 1).setText(data.items.filter(i => i.name).splice(0, 5).map(a => { + let name = (a.name.startsWith("§f") || a.name.startsWith("§7[Lvl ")) ? a.name.replace("§f", "§7") : a.name + return "§0" + name + "§0: §2$" + numberWithCommas(Math.round(a.p)).replace(/,/g, "§7,§2") + }).join("\n"))) + + let boxName = new SoopyTextElement().setLocation(i % 2 === 0 ? 0 : 0.525, 0.4 + Math.floor(i / 2) * 0.35, 0.475, 0.05).setText("§0" + renderName + "§0: §2$" + numberWithCommas(Math.round(data.total)).replace(/,/g, "§7,§2")) + + this.statArea.addChild(box) + this.statArea.addChild(boxName) + }) + + if (selectedProf === skyblockData.data.stats.bestProfileId) { + let leaderboardData = await fetch("http://soopy.dev/api/v2/leaderboard/networth/user/" + playerData.data.uuid).json() + if (player !== this.playerLoad) return + + if (leaderboardData.success) nameElm.setText("§0#" + numberWithCommas(leaderboardData.data.data.position + 1) + " " + playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")) + + } + } + + onOpen() { + this.playerLoad = Player.getName() + this.updateData(Player.getName()) + + this.goToLeaderboardPage(0) + + this.openSidebarPage(this.sidebarElement) + } + + async sidebarSearch(user) { + let data = await fetch("http://soopy.dev/api/v2/leaderboard/networth/user/" + user).json() + if (!data.success) { + return + } + + let position = data.data.data.position + + this.goToLeaderboardPage(Math.floor(position / 100), false) + + this.leaderboardArea._scrollAmount = -((position % 100) * 0.1 - 0.45) * this.leaderboardArea.location.getHeightExact() + this.leaderboardArea.location.scroll.y.set(-((position % 100) * 0.1 - 0.45) * this.leaderboardArea.location.getHeightExact(), 100) + } + + async goToLeaderboardPage(page, scroll = true) { + this.currentLbPage = page + + if (scroll) this.leaderboardArea._scrollAmount = 0 + if (scroll) this.leaderboardArea.location.scroll.y.set(0, 100) + + let data = await fetch("http://soopy.dev/api/v2/leaderboard/networth/" + page).json() + this.leaderboardArea.clearChildren() + data.data.data.forEach((user, i) => { + this.leaderboardArea.addChild( + new SoopyTextElement().setText("§0#" + numberWithCommas(i + 1 + page * 100) + ": " + user.username).setMaxTextScale(1.5).setLocation(0.05, i * 0.05, 0.5, 0.05).setLore(["Click to show detailed stats"]).addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.updateData(user.uuid) + })) + ) + this.leaderboardArea.addChild( + new SoopyTextElement().setText("§2$" + numberWithCommas(Math.round(user.networth)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.6, i * 0.05, 0.35, 0.05) + ) + }) + } +} + +module.exports = { + class: new NetworthGui() +}
\ No newline at end of file diff --git a/features/networthGUI/metadata.json b/src/features/networthGUI/metadata.json index 26e6f60..26e6f60 100644 --- a/features/networthGUI/metadata.json +++ b/src/features/networthGUI/metadata.json diff --git a/features/performance/hiddenRequirement.js b/src/features/performance/hiddenRequirement.js index bc74bfc..bc74bfc 100644 --- a/features/performance/hiddenRequirement.js +++ b/src/features/performance/hiddenRequirement.js diff --git a/features/performance/index.js b/src/features/performance/index.js index 22a37fc..634b994 100644 --- a/features/performance/index.js +++ b/src/features/performance/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import SettingBase from "../settings/settingThings/settingBase"; diff --git a/features/performance/metadata.json b/src/features/performance/metadata.json index 673854b..673854b 100644 --- a/features/performance/metadata.json +++ b/src/features/performance/metadata.json diff --git a/features/senitherGui/index.js b/src/features/senitherGui/index.js index 1a68092..a3e005c 100644 --- a/features/senitherGui/index.js +++ b/src/features/senitherGui/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { SoopyRenderEvent } from "../../../guimanager"; import ButtonWithArrowAndDescription from "../../../guimanager/GuiElement/ButtonWithArrowAndDescription"; @@ -24,21 +24,21 @@ class SenitherGui extends Feature { super() } - onEnable(){ + onEnable() { this.initVariables() this.GuiPage = new SettingPage() - this.registerStep(true, 5, ()=>{ + this.registerStep(true, 5, () => { this.GuiPage.step.call(this.GuiPage) }) } - initVariables(){ + initVariables() { this.GuiPage = undefined } - onDisable(){ + onDisable() { this.GuiPage.delete() this.initVariables() @@ -47,25 +47,25 @@ class SenitherGui extends Feature { class SettingPage extends GuiPage { - constructor(){ + constructor() { super(7) - + this.name = "Senither Leaderboard" this.pages = [this.newPage(), this.newPage()] - this.pages[0].addEvent(new SoopyRenderUpdateEvent().setHandler(()=>{this.lastRender = Date.now()})) - + this.pages[0].addEvent(new SoopyRenderUpdateEvent().setHandler(() => { this.lastRender = Date.now() })) + let senitherTitle = new SoopyTextElement().setText("§0Senither Leaderboard").setMaxTextScale(3).setLocation(0.1, 0.05, 0.8, 0.1) this.pages[0].addChild(senitherTitle) this.guildButton = new ButtonWithArrowAndDescription().setText("§0Guild Leaderboard").setLocation(0.1, 0.2, 0.35, 0.2) - this.guildButton.addEvent(new SoopyMouseClickEvent().setHandler(()=>{ + this.guildButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { this.clickedGuildButton() })) this.pages[0].addChild(this.guildButton) this.playerButton = new ButtonWithArrowAndDescription().setText("§0Player Leaderboard").setLocation(0.55, 0.2, 0.35, 0.2) - this.playerButton.addEvent(new SoopyMouseClickEvent().setHandler(()=>{ + this.playerButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { this.clickedPlayerButton() })) this.pages[0].addChild(this.playerButton) @@ -81,19 +81,19 @@ class SettingPage extends GuiPage { this.leaveAndJoinsBox.addChild(new BoxWithLoading().setLocation(0.2, 0.2, 0.6, 0.6)) - this.playerPage = new SoopyGuiElement().setLocation(0,0,1,1) + this.playerPage = new SoopyGuiElement().setLocation(0, 0, 1, 1) let playerTitle = new SoopyTextElement().setText("§0Player Leaderboard").setMaxTextScale(3).setLocation(0.1, 0.05, 0.8, 0.1) this.playerPage.addChild(playerTitle) this.playerSearchBox = new TextBox().setPlaceholder("Click to search").setLocation(0.2, 0.15, 0.6, 0.1) this.playerPage.addChild(this.playerSearchBox) - this.playerPage.addChild(new SoopyTextElement().setText("§7Pos").setLocation(0.1,0.3,0.075*0.8,0.1)) - this.playerPage.addChild(new SoopyTextElement().setText("§7Name").setLocation(0.1+0.1*0.8,0.3,0.2*0.8,0.1)) - this.playerPage.addChild(new SoopyTextElement().setText("§7Guild").setLocation(0.1+0.325*0.8,0.3,0.2*0.8,0.1)) - let weight = new SoopyTextElement().setText("§0Weight").setLocation(0.1+0.55*0.8,0.3,0.2*0.8,0.1).setLore(["Click to set sorting to weight"]) + this.playerPage.addChild(new SoopyTextElement().setText("§7Pos").setLocation(0.1, 0.3, 0.075 * 0.8, 0.1)) + this.playerPage.addChild(new SoopyTextElement().setText("§7Name").setLocation(0.1 + 0.1 * 0.8, 0.3, 0.2 * 0.8, 0.1)) + this.playerPage.addChild(new SoopyTextElement().setText("§7Guild").setLocation(0.1 + 0.325 * 0.8, 0.3, 0.2 * 0.8, 0.1)) + let weight = new SoopyTextElement().setText("§0Weight").setLocation(0.1 + 0.55 * 0.8, 0.3, 0.2 * 0.8, 0.1).setLore(["Click to set sorting to weight"]) this.playerPage.addChild(weight) - weight.addEvent(new SoopyMouseClickEvent().setHandler(()=>{ + weight.addEvent(new SoopyMouseClickEvent().setHandler(() => { this.playerSortThing = "weight" this.playerInformationUpdated = false this.playersBox.location.scroll.y.set(0, 100) @@ -144,14 +144,14 @@ class SettingPage extends GuiPage { "carpentry_xp": "Carpentry Xp", "runecrafting": "Runecrafting Level", "runecrafting_xp": "Runecrafting Xp", - }).setSelectedOption("average_skill_progress").setLocation(0.1+0.75*0.8,0.3,0.25*0.8,0.1).renderBox(false).setColorPrefix("&7") - + }).setSelectedOption("average_skill_progress").setLocation(0.1 + 0.75 * 0.8, 0.3, 0.25 * 0.8, 0.1).renderBox(false).setColorPrefix("&7") + this.playerPage.addChild(dropdown) dropdown.text.setMaxTextScale(1) this.playerSortThing = "weight" - dropdown.addEvent(new SoopyContentChangeEvent().setHandler(newVal=>{ + dropdown.addEvent(new SoopyContentChangeEvent().setHandler(newVal => { this.playerSortThing = newVal this.selectedPlayerVal = newVal this.playerInformationUpdated = false @@ -168,13 +168,13 @@ class SettingPage extends GuiPage { // element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(p.weight)).setLocation(0.55,0,0.2,1)) // element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(p[this.selectedPlayerVal])).setLocation(0.75,0,0.2,1)) - this.playersBox = new SoopyGuiElement().setLocation(0.1,0.4,0.8,0.6).setScrollable(true) + this.playersBox = new SoopyGuiElement().setLocation(0.1, 0.4, 0.8, 0.6).setScrollable(true) this.playerPage.addChild(this.playersBox) this.playerSearch = "" this.playerInformationUpdated = true - this.playerSearchBox.text.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun)=>{ - if(newVal.includes("&")){ + this.playerSearchBox.text.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun) => { + if (newVal.includes("&")) { resetFun() return; } @@ -182,7 +182,7 @@ class SettingPage extends GuiPage { this.playersBox.location.scroll.y.set(0, 100) this.playersBox._scrollAmount = 0 - + this.playerInformationUpdated = false })) this.updatingPlayerInfo = false @@ -191,19 +191,19 @@ class SettingPage extends GuiPage { this.guildData = undefined - this.guildPage = new SoopyGuiElement().setLocation(0,0,1,1) + this.guildPage = new SoopyGuiElement().setLocation(0, 0, 1, 1) let guildTitle = new SoopyTextElement().setText("§0Guild Leaderboard").setMaxTextScale(3).setLocation(0.1, 0.05, 0.8, 0.1) this.guildPage.addChild(guildTitle) this.guildSearchBox = new TextBox().setPlaceholder("Click to search").setLocation(0.2, 0.15, 0.6, 0.1) this.guildPage.addChild(this.guildSearchBox) this.guildSearch = "" - this.guildSearchBox.text.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun)=>{ + this.guildSearchBox.text.addEvent(new SoopyContentChangeEvent().setHandler((newVal, oldVal, resetFun) => { this.guildSearch = newVal this.guildsBox.location.scroll.y.set(0, 100) this.guildsBox._scrollAmount = 0 - + this.regenGuildElements() })) @@ -212,40 +212,40 @@ class SettingPage extends GuiPage { this.oldSortElm = undefined - sortify = (sort, name, elm)=>{ - elm.addEvent(new SoopyMouseClickEvent().setHandler(()=>{ - if(this.oldSortElm){ - this.oldSortElm[0].setText("&7"+this.oldSortElm[1]) + sortify = (sort, name, elm) => { + elm.addEvent(new SoopyMouseClickEvent().setHandler(() => { + if (this.oldSortElm) { + this.oldSortElm[0].setText("&7" + this.oldSortElm[1]) } this.oldSortElm = [elm, name] this.guildSortThing = sort - - elm.setText("&0"+name) + + elm.setText("&0" + name) this.regenGuildElements() })) elm.setLore(["Click to sort by " + name.toLowerCase()]) - if(sort===this.guildSortThing){ + if (sort === this.guildSortThing) { this.oldSortElm = [elm, name] - elm.setText("&0"+name) - }else{ - elm.setText("&7"+name) + elm.setText("&0" + name) + } else { + elm.setText("&7" + name) } return elm } - this.guildPage.addChild(new SoopyTextElement().setText("§7Pos").setLocation(0.1,0.3,0.075*0.8,0.1)) - this.guildPage.addChild(new SoopyTextElement().setText("§7Name").setLocation(0.1+0.1*0.8,0.3,0.2*0.8,0.1)) - this.guildPage.addChild(sortify("weight.total", "Weight", new SoopyTextElement().setLocation(0.1+0.325*0.8,0.3,0.15*0.8,0.1))) - this.guildPage.addChild(sortify("members", "Members", new SoopyTextElement().setLocation(0.1+0.475*0.8,0.3,(0.1+0.05/4)*0.8,0.1))) - this.guildPage.addChild(sortify("average_skill_progress", "Skill", new SoopyTextElement().setLocation(0.1+0.5875*0.8,0.3,(0.1+0.05/4)*0.8,0.1))) - this.guildPage.addChild(sortify("average_slayer", "Slayer", new SoopyTextElement().setLocation(0.1+0.7*0.8,0.3,(0.15+0.05/4)*0.8,0.1))) - this.guildPage.addChild(sortify("average_catacomb", "Catacombs", new SoopyTextElement().setLocation(0.1+0.8625*0.8,0.3,(0.1+0.05/4)*0.8,0.1))) + this.guildPage.addChild(new SoopyTextElement().setText("§7Pos").setLocation(0.1, 0.3, 0.075 * 0.8, 0.1)) + this.guildPage.addChild(new SoopyTextElement().setText("§7Name").setLocation(0.1 + 0.1 * 0.8, 0.3, 0.2 * 0.8, 0.1)) + this.guildPage.addChild(sortify("weight.total", "Weight", new SoopyTextElement().setLocation(0.1 + 0.325 * 0.8, 0.3, 0.15 * 0.8, 0.1))) + this.guildPage.addChild(sortify("members", "Members", new SoopyTextElement().setLocation(0.1 + 0.475 * 0.8, 0.3, (0.1 + 0.05 / 4) * 0.8, 0.1))) + this.guildPage.addChild(sortify("average_skill_progress", "Skill", new SoopyTextElement().setLocation(0.1 + 0.5875 * 0.8, 0.3, (0.1 + 0.05 / 4) * 0.8, 0.1))) + this.guildPage.addChild(sortify("average_slayer", "Slayer", new SoopyTextElement().setLocation(0.1 + 0.7 * 0.8, 0.3, (0.15 + 0.05 / 4) * 0.8, 0.1))) + this.guildPage.addChild(sortify("average_catacomb", "Catacombs", new SoopyTextElement().setLocation(0.1 + 0.8625 * 0.8, 0.3, (0.1 + 0.05 / 4) * 0.8, 0.1))) - this.guildsBox = new SoopyGuiElement().setLocation(0.1,0.4,0.8,0.6).setScrollable(true) + this.guildsBox = new SoopyGuiElement().setLocation(0.1, 0.4, 0.8, 0.6).setScrollable(true) this.guildPage.addChild(this.guildsBox) @@ -253,43 +253,43 @@ class SettingPage extends GuiPage { this.finaliseLoading() } - step(){ - if(!this.playerInformationUpdated && !this.updatingPlayerInfo){ + step() { + if (!this.playerInformationUpdated && !this.updatingPlayerInfo) { this.loadPlayerInformation() } let pbHeight = this.playersBox.location.getHeightExact() let pbY = this.playersBox.location.getYExact() - this.playersBox.children.forEach(b=>{ + this.playersBox.children.forEach(b => { b.visable = true // console.log(this.playersBox._scrollAmount) - if(b.location.getYExact()+0.3*pbHeight < pbY){ - // console.log(2) + if (b.location.getYExact() + 0.3 * pbHeight < pbY) { + // console.log(2) b.visable = false } - if(b.location.getYExact()-0.1*pbHeight > pbHeight+pbY){ - // console.log(3) + if (b.location.getYExact() - 0.1 * pbHeight > pbHeight + pbY) { + // console.log(3) b.visable = false } }) let gbHeight = this.guildsBox.location.getHeightExact() let gbY = this.guildsBox.location.getYExact() - this.guildsBox.children.forEach(b=>{ + this.guildsBox.children.forEach(b => { b.visable = true // console.log(this.playersBox._scrollAmount) - if(b.location.getYExact()+0.3*gbHeight < gbY){ - // console.log(2) + if (b.location.getYExact() + 0.3 * gbHeight < gbY) { + // console.log(2) b.visable = false } - if(b.location.getYExact()-0.1*gbHeight > gbHeight+gbY){ - // console.log(3) + if (b.location.getYExact() - 0.1 * gbHeight > gbHeight + gbY) { + // console.log(3) b.visable = false } }) } - clickedGuildButton(){ + clickedGuildButton() { this.pages[1].clearChildren() this.pages[1].addChild(this.guildPage) @@ -304,62 +304,61 @@ class SettingPage extends GuiPage { this.loadGuildInformation() } - loadGuildInformation(){ - fetch("https://hypixel-app-api.senither.com/leaderboard/").json(data=>{ - this.guildData = data.data - - this.regenGuildElements() - }) + async loadGuildInformation() { + let data = awaitfetch("https://hypixel-app-api.senither.com/leaderboard/").json() + this.guildData = data.data + + this.regenGuildElements() } - regenGuildElements(){ + regenGuildElements() { this.guildsBox.clearChildren() let yPosThing = 0 - this.guildData.sort((a, b)=>{ - return getThing(b, this.guildSortThing.split("."))-getThing(a, this.guildSortThing.split(".")) - }).forEach((g, i)=>{ + this.guildData.sort((a, b) => { + return getThing(b, this.guildSortThing.split(".")) - getThing(a, this.guildSortThing.split(".")) + }).forEach((g, i) => { - if(g.name.toLowerCase().includes(this.guildSearch.toLowerCase())){ - let element = new SoopyBoxElement().setLocation(0,yPosThing*0.175, 1, 0.15) + if (g.name.toLowerCase().includes(this.guildSearch.toLowerCase())) { + let element = new SoopyBoxElement().setLocation(0, yPosThing * 0.175, 1, 0.15) - element.addEvent(new SoopyHoverChangeEvent().setHandler(()=>{ - if(element.hovered){ - if(element.color[0]+element.color[1]+element.color[2]<0.5*(255+255+255)){ + element.addEvent(new SoopyHoverChangeEvent().setHandler(() => { + if (element.hovered) { + if (element.color[0] + element.color[1] + element.color[2] < 0.5 * (255 + 255 + 255)) { element.setColorOffset(10, 10, 10, 100) - }else{ + } else { element.setColorOffset(-10, -10, -10, 100) } - }else{ + } else { element.setColorOffset(0, 0, 0, 100) } })) - element.addChild(new SoopyTextElement().setText("§0#"+(i+1)).setLocation(0,0,0.075,1)) - element.addChild(new SoopyTextElement().setText("§0"+g.name).setLocation(0.1,0,0.2,1)) - element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(Math.floor(g.weight.total))).setLocation(0.325,0,0.15,1).setLore(["§6" + numberWithCommas(g.weight.skill) + " §7skill weight", "§6" + numberWithCommas(g.weight.slayer) + " §7slayer weight", "§6" + numberWithCommas(g.weight.catacomb) + " §7dungeons weight", "§6"+g.weight.multiplier + " §7multiplier"])) - element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(g.members)).setLocation(0.475,0,0.1,1)) - element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(g.average_skill_progress)).setLocation(0.5875,0,0.1,1)) - element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(Math.floor(g.average_slayer))).setLocation(0.7,0,0.15,1)) - element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(g.average_catacomb)).setLocation(0.8625,0,0.1,1)) + element.addChild(new SoopyTextElement().setText("§0#" + (i + 1)).setLocation(0, 0, 0.075, 1)) + element.addChild(new SoopyTextElement().setText("§0" + g.name).setLocation(0.1, 0, 0.2, 1)) + element.addChild(new SoopyTextElement().setText("§0" + numberWithCommas(Math.floor(g.weight.total))).setLocation(0.325, 0, 0.15, 1).setLore(["§6" + numberWithCommas(g.weight.skill) + " §7skill weight", "§6" + numberWithCommas(g.weight.slayer) + " §7slayer weight", "§6" + numberWithCommas(g.weight.catacomb) + " §7dungeons weight", "§6" + g.weight.multiplier + " §7multiplier"])) + element.addChild(new SoopyTextElement().setText("§0" + numberWithCommas(g.members)).setLocation(0.475, 0, 0.1, 1)) + element.addChild(new SoopyTextElement().setText("§0" + numberWithCommas(g.average_skill_progress)).setLocation(0.5875, 0, 0.1, 1)) + element.addChild(new SoopyTextElement().setText("§0" + numberWithCommas(Math.floor(g.average_slayer))).setLocation(0.7, 0, 0.15, 1)) + element.addChild(new SoopyTextElement().setText("§0" + numberWithCommas(g.average_catacomb)).setLocation(0.8625, 0, 0.1, 1)) // element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(g.members)).setLocation(0.75,0,0.2,1)) this.guildsBox.addChild(element) yPosThing++ } - // this.guildPage.addChild(new SoopyTextElement().setText("§0Pos").setLocation(0.1,0.3,0.075*0.8,0.1)) - // this.guildPage.addChild(new SoopyTextElement().setText("§0Name").setLocation(0.1+0.1*0.8,0.3,0.2*0.8,0.1)) - // this.guildPage.addChild(new SoopyTextElement().setText("§0Weight").setLocation(0.1+0.325*0.8,0.3,0.15*0.8,0.1)) - // this.guildPage.addChild(new SoopyTextElement().setText("§0Members").setLocation(0.1+0.475*0.8,0.3,(0.1+0.05/4)*0.8,0.1)) - // this.guildPage.addChild(new SoopyTextElement().setText("§0Skill").setLocation(0.1+0.5875*0.8,0.3,(0.1+0.05/4)*0.8,0.1)) - // this.guildPage.addChild(new SoopyTextElement().setText("§0Slayer").setLocation(0.1+0.7*0.8,0.3,(0.15+0.05/4)*0.8,0.1)) - // this.guildPage.addChild(new SoopyTextElement().setText("§0Catacombs").setLocation(0.1+0.8625*0.8,0.3,(0.1+0.05/4)*0.8,0.1)) + // this.guildPage.addChild(new SoopyTextElement().setText("§0Pos").setLocation(0.1,0.3,0.075*0.8,0.1)) + // this.guildPage.addChild(new SoopyTextElement().setText("§0Name").setLocation(0.1+0.1*0.8,0.3,0.2*0.8,0.1)) + // this.guildPage.addChild(new SoopyTextElement().setText("§0Weight").setLocation(0.1+0.325*0.8,0.3,0.15*0.8,0.1)) + // this.guildPage.addChild(new SoopyTextElement().setText("§0Members").setLocation(0.1+0.475*0.8,0.3,(0.1+0.05/4)*0.8,0.1)) + // this.guildPage.addChild(new SoopyTextElement().setText("§0Skill").setLocation(0.1+0.5875*0.8,0.3,(0.1+0.05/4)*0.8,0.1)) + // this.guildPage.addChild(new SoopyTextElement().setText("§0Slayer").setLocation(0.1+0.7*0.8,0.3,(0.15+0.05/4)*0.8,0.1)) + // this.guildPage.addChild(new SoopyTextElement().setText("§0Catacombs").setLocation(0.1+0.8625*0.8,0.3,(0.1+0.05/4)*0.8,0.1)) }) } - clickedPlayerButton(){ + clickedPlayerButton() { this.pages[1].clearChildren() this.pages[1].addChild(this.playerPage) @@ -374,66 +373,63 @@ class SettingPage extends GuiPage { this.playerInformationUpdated = false } - loadPlayerInformation(){ - if(this.updatingPlayerInfo) return + async loadPlayerInformation() { + if (this.updatingPlayerInfo) return this.updatingPlayerInfo = true this.playerInformationUpdated = true - fetch("https://hypixel-app-api.senither.com/leaderboard/players?perPage=100&page=1&sort=" + this.playerSortThing + (this.playerSearch?"&username="+this.playerSearch:"")).json(players=>{ - this.playersBox.clearChildren() - players.data.forEach((p, i)=>{ - let element = new SoopyBoxElement().setLocation(0,i*0.175, 1, 0.15) - - element.addEvent(new SoopyHoverChangeEvent().setHandler(()=>{ - if(element.hovered){ - if(element.color[0]+element.color[1]+element.color[2]<0.5*(255+255+255)){ - element.setColorOffset(10, 10, 10, 100) - }else{ - element.setColorOffset(-10, -10, -10, 100) - } - }else{ - element.setColorOffset(0, 0, 0, 100) + let players = await fetch("https://hypixel-app-api.senither.com/leaderboard/players?perPage=100&page=1&sort=" + this.playerSortThing + (this.playerSearch ? "&username=" + this.playerSearch : "")).json() + this.playersBox.clearChildren() + players.data.forEach((p, i) => { + let element = new SoopyBoxElement().setLocation(0, i * 0.175, 1, 0.15) + + element.addEvent(new SoopyHoverChangeEvent().setHandler(() => { + if (element.hovered) { + if (element.color[0] + element.color[1] + element.color[2] < 0.5 * (255 + 255 + 255)) { + element.setColorOffset(10, 10, 10, 100) + } else { + element.setColorOffset(-10, -10, -10, 100) } - })) - - element.addChild(new SoopyTextElement().setText("§0#"+(i+1)).setLocation(0,0,0.075,1)) - element.addChild(new SoopyTextElement().setText("§0"+p.username).setLocation(0.1,0,0.2,1)) - element.addChild(new SoopyTextElement().setText("§0"+p.guild_name).setLocation(0.325,0,0.2,1)) - element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(p.weight)).setLocation(0.55,0,0.2,1)) - element.addChild(new SoopyTextElement().setText("§0"+numberWithCommas(p[this.selectedPlayerVal])).setLocation(0.75,0,0.2,1)) - - this.playersBox.addChild(element) - }) - this.updatingPlayerInfo = false - }) - } + } else { + element.setColorOffset(0, 0, 0, 100) + } + })) + + element.addChild(new SoopyTextElement().setText("§0#" + (i + 1)).setLocation(0, 0, 0.075, 1)) + element.addChild(new SoopyTextElement().setText("§0" + p.username).setLocation(0.1, 0, 0.2, 1)) + element.addChild(new SoopyTextElement().setText("§0" + p.guild_name).setLocation(0.325, 0, 0.2, 1)) + element.addChild(new SoopyTextElement().setText("§0" + numberWithCommas(p.weight)).setLocation(0.55, 0, 0.2, 1)) + element.addChild(new SoopyTextElement().setText("§0" + numberWithCommas(p[this.selectedPlayerVal])).setLocation(0.75, 0, 0.2, 1)) - loadFirstPageInformation(){ - fetch("https://hypixel-app-api.senither.com/leaderboard/stats").json(stats=>{ - this.guildButton.setDesc("§0Guilds tracked: " + numberWithCommas(stats.data.guilds)) - this.playerButton.setDesc("§0Players tracked: " + numberWithCommas(stats.data.players)) + this.playersBox.addChild(element) }) + this.updatingPlayerInfo = false + } - fetch("https://hypixel-app-api.senither.com/leaderboard/history?perPage=10&page=1").json(leaveAndJoins=>{ - this.leaveAndJoinsBox.clearChildren() - let y = 0 - leaveAndJoins.data.forEach(elm=>{ - this.leaveAndJoinsBox.addChild(new SoopyTextElement().setText(`§1${elm.username} §7${elm.type===0?"joined":"left"} §1${elm.guild_name}`).setLocation(0.05, y, 0.8, 0.1)) - this.leaveAndJoinsBox.addChild(new SoopyTextElement().setText(`§7${timeSince(elm.created_at)} ago`).setLocation(0.8125, y, 0.175, 0.1)) - y += 0.1 - }) + async loadFirstPageInformation() { + let stats = await fetch("https://hypixel-app-api.senither.com/leaderboard/stats").json() + this.guildButton.setDesc("§0Guilds tracked: " + numberWithCommas(stats.data.guilds)) + this.playerButton.setDesc("§0Players tracked: " + numberWithCommas(stats.data.players)) + + let leaveAndJoins = await fetch("https://hypixel-app-api.senither.com/leaderboard/history?perPage=10&page=1").json() + this.leaveAndJoinsBox.clearChildren() + let y = 0 + leaveAndJoins.data.forEach(elm => { + this.leaveAndJoinsBox.addChild(new SoopyTextElement().setText(`§1${elm.username} §7${elm.type === 0 ? "joined" : "left"} §1${elm.guild_name}`).setLocation(0.05, y, 0.8, 0.1)) + this.leaveAndJoinsBox.addChild(new SoopyTextElement().setText(`§7${timeSince(elm.created_at)} ago`).setLocation(0.8125, y, 0.175, 0.1)) + y += 0.1 }) } - onOpen(){ + onOpen() { this.loadFirstPageInformation() - - let sidebar = new SoopyGuiElement().setLocation(0.1,0.1,0.8,0.8).setScrollable(true).enableFrameBuffer() + + let sidebar = new SoopyGuiElement().setLocation(0.1, 0.1, 0.8, 0.8).setScrollable(true).enableFrameBuffer() this.openSidebarPage(sidebar) let markdown = new SoopyMarkdownElement().setText("# NOTE: \nAll credit for the idea, design of this gui, and loading of data goes to Senither who made the original leaderboard (https://hypixel-leaderboard.senither.com/)\n\nThis is just a recode of that to allow for checking the leaderboard from in-game") sidebar.addChild(markdown) - sidebar.addChild(new ButtonWithArrow().setText("§0Open Leaderboard Website").setLocation(0.1,markdown.getHeight()+0.05, 0.8, 0.2).addEvent(new SoopyMouseClickEvent().setHandler(()=>{ + sidebar.addChild(new ButtonWithArrow().setText("§0Open Leaderboard Website").setLocation(0.1, markdown.getHeight() + 0.05, 0.8, 0.2).addEvent(new SoopyMouseClickEvent().setHandler(() => { java.awt.Desktop.getDesktop().browse(new java.net.URI("https://hypixel-leaderboard.senither.com/")); }))) @@ -448,9 +444,9 @@ module.exports = { class: new SenitherGui() } -function getThing(obj, stack){ - while(stack.length > 0){ - obj= obj[stack.shift()] +function getThing(obj, stack) { + while (stack.length > 0) { + obj = obj[stack.shift()] } return obj diff --git a/features/senitherGui/metadata.json b/src/features/senitherGui/metadata.json index b7b1f6f..b7b1f6f 100644 --- a/features/senitherGui/metadata.json +++ b/src/features/senitherGui/metadata.json diff --git a/features/settings/helpDataLoader.js b/src/features/settings/helpDataLoader.js index 7c463b2..21ca241 100644 --- a/features/settings/helpDataLoader.js +++ b/src/features/settings/helpDataLoader.js @@ -5,7 +5,7 @@ class HelpDataLoader { this.availableHelpData = {} this.dataCach = {} - fetch("http://soopy.dev/api/soopyv2/settingshelpoptions.json").json(data => { + fetch("http://soopy.dev/api/soopyv2/settingshelpoptions.json").json().then(data => { Object.keys(data).forEach(category => { this.availableHelpData[category] = new Set(data[category]) }); @@ -27,7 +27,7 @@ class HelpDataLoader { return } - fetch("http://soopy.dev/api/soopyv2/settingshelp/" + category + "/" + id).text(data => { + fetch("http://soopy.dev/api/soopyv2/settingshelp/" + category + "/" + id).text().then(data => { if (!this.dataCach[category]) { this.dataCach[category] = {} } diff --git a/features/settings/index.js b/src/features/settings/index.js index 92fbeec..38ccb9d 100644 --- a/features/settings/index.js +++ b/src/features/settings/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; diff --git a/features/settings/locationSettingHolder.js b/src/features/settings/locationSettingHolder.js index af6f507..af6f507 100644 --- a/features/settings/locationSettingHolder.js +++ b/src/features/settings/locationSettingHolder.js diff --git a/features/settings/metadata.json b/src/features/settings/metadata.json index 8f2ace4..8f2ace4 100644 --- a/features/settings/metadata.json +++ b/src/features/settings/metadata.json diff --git a/features/settings/settingThings/FakeRequireToggle.js b/src/features/settings/settingThings/FakeRequireToggle.js index 41932f3..41932f3 100644 --- a/features/settings/settingThings/FakeRequireToggle.js +++ b/src/features/settings/settingThings/FakeRequireToggle.js diff --git a/features/settings/settingThings/button.js b/src/features/settings/settingThings/button.js index 77ba4b8..77ba4b8 100644 --- a/features/settings/settingThings/button.js +++ b/src/features/settings/settingThings/button.js diff --git a/features/settings/settingThings/dropdownSetting.js b/src/features/settings/settingThings/dropdownSetting.js index 0cf7b27..0cf7b27 100644 --- a/features/settings/settingThings/dropdownSetting.js +++ b/src/features/settings/settingThings/dropdownSetting.js diff --git a/features/settings/settingThings/imageLocation.js b/src/features/settings/settingThings/imageLocation.js index c459c82..c459c82 100644 --- a/features/settings/settingThings/imageLocation.js +++ b/src/features/settings/settingThings/imageLocation.js diff --git a/features/settings/settingThings/location.js b/src/features/settings/settingThings/location.js index 4e18446..4e18446 100644 --- a/features/settings/settingThings/location.js +++ b/src/features/settings/settingThings/location.js diff --git a/features/settings/settingThings/settingBase.js b/src/features/settings/settingThings/settingBase.js index 5320f40..5320f40 100644 --- a/features/settings/settingThings/settingBase.js +++ b/src/features/settings/settingThings/settingBase.js diff --git a/features/settings/settingThings/textSetting.js b/src/features/settings/settingThings/textSetting.js index edc0989..edc0989 100644 --- a/features/settings/settingThings/textSetting.js +++ b/src/features/settings/settingThings/textSetting.js diff --git a/features/settings/settingThings/toggle.js b/src/features/settings/settingThings/toggle.js index 24310d2..24310d2 100644 --- a/features/settings/settingThings/toggle.js +++ b/src/features/settings/settingThings/toggle.js diff --git a/features/settings/settingsCommunicator.js b/src/features/settings/settingsCommunicator.js index 053a7c1..053a7c1 100644 --- a/features/settings/settingsCommunicator.js +++ b/src/features/settings/settingsCommunicator.js diff --git a/features/slayers/index.js b/src/features/slayers/index.js index 1b890d4..ab7c9dc 100644 --- a/features/slayers/index.js +++ b/src/features/slayers/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import { f, m } from "../../../mappings/mappings"; diff --git a/features/slayers/metadata.json b/src/features/slayers/metadata.json index b186b29..b186b29 100644 --- a/features/slayers/metadata.json +++ b/src/features/slayers/metadata.json diff --git a/features/soopyGui/GuiPage.js b/src/features/soopyGui/GuiPage.js index 7a21d26..7a21d26 100644 --- a/features/soopyGui/GuiPage.js +++ b/src/features/soopyGui/GuiPage.js diff --git a/features/soopyGui/categoryManager.js b/src/features/soopyGui/categoryManager.js index 6709ff4..6709ff4 100644 --- a/features/soopyGui/categoryManager.js +++ b/src/features/soopyGui/categoryManager.js diff --git a/features/soopyGui/index.js b/src/features/soopyGui/index.js index 1b26af1..b19c159 100644 --- a/features/soopyGui/index.js +++ b/src/features/soopyGui/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; diff --git a/features/soopyGui/metadata.json b/src/features/soopyGui/metadata.json index 8f2ace4..8f2ace4 100644 --- a/features/soopyGui/metadata.json +++ b/src/features/soopyGui/metadata.json diff --git a/features/spamHider/index.js b/src/features/spamHider/index.js index 1d13e57..697e571 100644 --- a/features/spamHider/index.js +++ b/src/features/spamHider/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import SoopyContentChangeEvent from "../../../guimanager/EventListener/SoopyContentChangeEvent"; import Feature from "../../featureClass/class"; @@ -131,45 +131,44 @@ class SpamHider extends Feature { this.SpamHiderMessagesRenderer.render(100, 100, 1, 1) } - loadSpamMessages() { - fetch("http://soopy.dev/api/soopyv2/spamHiderMessages.json").json(messages => { - this.hideMessages = messages.hideMessages - this.moveMessages = messages.moveMessages + async loadSpamMessages() { + let messages = await fetch("http://soopy.dev/api/soopyv2/spamHiderMessages.json").json() + this.hideMessages = messages.hideMessages + this.moveMessages = messages.moveMessages - this.hideMessagesDict = { - all: [] - } - - this.hideMessagesRexex = [] - this.hideMessages.forEach(message => { - let regex = new RegExp(message.replace(/[\\^$*+?.()|[\]{}]/g, '$&') - .replace(/\$\{\*\}/g, "(?:.+)")) - if (!message.substring(0, 5).includes("$")) { - if (!this.hideMessagesDict[message.substring(0, 5)]) this.hideMessagesDict[message.substring(0, 5)] = [] - this.hideMessagesDict[message.substring(0, 5)].push(regex) - } else { - this.hideMessagesDict.all.push(regex) - } - this.hideMessagesRexex.push(regex) - }) + this.hideMessagesDict = { + all: [] + } - this.moveMessagesDict = { - all: [] + this.hideMessagesRexex = [] + this.hideMessages.forEach(message => { + let regex = new RegExp(message.replace(/[\\^$*+?.()|[\]{}]/g, '$&') + .replace(/\$\{\*\}/g, "(?:.+)")) + if (!message.substring(0, 5).includes("$")) { + if (!this.hideMessagesDict[message.substring(0, 5)]) this.hideMessagesDict[message.substring(0, 5)] = [] + this.hideMessagesDict[message.substring(0, 5)].push(regex) + } else { + this.hideMessagesDict.all.push(regex) } + this.hideMessagesRexex.push(regex) + }) - this.moveMessagesRexex = [] - this.moveMessages.forEach(message => { - let regex = new RegExp(message.replace(/[\\^$*+?.()|[\]{}]/g, '$&') - .replace(/\$\{\*\}/g, "(?:.+)")) + this.moveMessagesDict = { + all: [] + } - if (!message.substring(0, 5).includes("$")) { - if (!this.moveMessagesDict[message.substring(0, 5)]) this.moveMessagesDict[message.substring(0, 5)] = [] - this.moveMessagesDict[message.substring(0, 5)].push(regex) - } else { - this.moveMessagesDict.all.push(regex) - } - this.moveMessagesRexex.push(regex) - }) + this.moveMessagesRexex = [] + this.moveMessages.forEach(message => { + let regex = new RegExp(message.replace(/[\\^$*+?.()|[\]{}]/g, '$&') + .replace(/\$\{\*\}/g, "(?:.+)")) + + if (!message.substring(0, 5).includes("$")) { + if (!this.moveMessagesDict[message.substring(0, 5)]) this.moveMessagesDict[message.substring(0, 5)] = [] + this.moveMessagesDict[message.substring(0, 5)].push(regex) + } else { + this.moveMessagesDict.all.push(regex) + } + this.moveMessagesRexex.push(regex) }) } diff --git a/features/spamHider/metadata.json b/src/features/spamHider/metadata.json index 78031d8..78031d8 100644 --- a/features/spamHider/metadata.json +++ b/src/features/spamHider/metadata.json diff --git a/features/specialMining/index.js b/src/features/specialMining/index.js index 2241bc8..e548b87 100644 --- a/features/specialMining/index.js +++ b/src/features/specialMining/index.js @@ -568,4 +568,4 @@ class PowderAndScatha extends Feature { module.exports = { class: new PowderAndScatha(), -}; +};
\ No newline at end of file diff --git a/features/specialMining/metadata.json b/src/features/specialMining/metadata.json index 0e311c0..0e311c0 100644 --- a/features/specialMining/metadata.json +++ b/src/features/specialMining/metadata.json diff --git a/src/features/statHistoryGui/index.js b/src/features/statHistoryGui/index.js new file mode 100644 index 0000000..0390772 --- /dev/null +++ b/src/features/statHistoryGui/index.js @@ -0,0 +1,189 @@ +/// <reference types="../../../../CTAutocomplete" /> +/// <reference lib="es2015" /> +import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; +import Feature from "../../featureClass/class"; +import GuiPage from "../soopyGui/GuiPage"; +import BoxWithLoading from "../../../guimanager/GuiElement/BoxWithLoading"; +import BoxWithTextAndDescription from "../../../guimanager/GuiElement/BoxWithTextAndDescription"; +import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; +import TextBox from "../../../guimanager/GuiElement/TextBox"; +import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent"; +import { firstLetterWordCapital } from "../../utils/stringUtils"; +import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; +import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; +import { fetch } from "../../utils/networkUtils"; +import SoopyImageElement from "../../../guimanager/GuiElement/SoopyImageElement"; +import renderLibs from "../../../guimanager/renderLibs"; +import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; +import Dropdown from "../../../guimanager/GuiElement/Dropdown"; +import SoopyContentChangeEvent from "../../../guimanager/EventListener/SoopyContentChangeEvent"; + +class StatHistoryGUI extends Feature { + constructor() { + super() + } + + onEnable() { + this.initVariables() + + this.GuiPage = new StatGraphPage() + + } + + initVariables() { + this.GuiPage = undefined + } + + onDisable() { + this.initVariables() + } +} + + +class StatGraphPage extends GuiPage { + constructor() { + super(7) + + this.name = "Stat Graphs" + + this.pages = [this.newPage()] + + this.pages[0].addChild(new SoopyTextElement().setText("§0Stat Graphs").setMaxTextScale(3).setLocation(0.1, 0.05, 0.6, 0.1)) + let button = new ButtonWithArrow().setText("§0Open in browser").setLocation(0.7, 0.05, 0.2, 0.1) + this.pages[0].addChild(button) + + button.addEvent(new SoopyMouseClickEvent().setHandler(() => { + java.awt.Desktop.getDesktop().browse( + new java.net.URI("https://soopy.dev/stathistory") + ); + })) + + this.nameInput = new TextBox().setPlaceholder("Click to search").setLocation(0.1, 0.225, 0.8, 0.1) + this.pages[0].addChild(this.nameInput) + + this.nameInput.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { + if (this.nameInput.text.selected && keyId === 28) { + this.playerLoad = this.nameInput.text.text + this.nameInput.setText("") + this.updateData(this.playerLoad) + } + })) + + this.statArea = new SoopyGuiElement().setLocation(0.05, 0.325, 0.9, 0.675).setScrollable(true) + this.pages[0].addChild(this.statArea) + + this.loadingElm = new BoxWithLoading().setLocation(0.35, 0.4, 0.3, 0.2) + this.errorElm = new BoxWithTextAndDescription().setLocation(0.2, 0.3, 0.6, 0.4).setText("Error!").setDesc("An error occured while loading the data!") + this.statArea.addChild(this.loadingElm) + + this.playerLoad = undefined + + this.finaliseLoading() + } + + async updateData(player, profIn) { + this.closeSidebarPage() + + this.playerLoad = player + + this.statArea._scrollAmount = 0 + this.statArea.location.scroll.y.set(0, 100) + + this.statArea.clearChildren() + this.statArea.addChild(this.loadingElm) + + let playerData = await fetch("http://soopy.dev/api/v2/player/" + player).json() + + if (player !== this.playerLoad) return + + if (!playerData.success) { + this.statArea.clearChildren() + this.statArea.addChild(this.errorElm) + this.errorElm.setText("§0" + playerData.error.name) + this.errorElm.setDesc("§0" + playerData.error.description) + return + } + this.statArea.clearChildren() + let nameElm = new SoopyTextElement().setText(playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")).setMaxTextScale(2).setLocation(0.1, 0.05, 0.5, 0.1) + this.statArea.addChild(nameElm) + this.statArea.addChild(this.loadingElm) + + let skyblockData = await fetch("http://soopy.dev/api/v2/player_skyblock/" + playerData.data.uuid).json() + if (player !== this.playerLoad) return + + if (!skyblockData.success) { + this.statArea.clearChildren() + this.statArea.addChild(this.errorElm) + this.errorElm.setText("§0" + skyblockData.error.name) + this.errorElm.setDesc("§0" + skyblockData.error.description) + return + } + + let selectedProf = profIn || skyblockData.data.stats.bestProfileId + let profOptions = {} + Object.keys(skyblockData.data.profiles).forEach(p => { + profOptions[p] = skyblockData.data.profiles[p].stats.cute_name + }) + + let profileSelect = new Dropdown().setOptions(profOptions).setSelectedOption(selectedProf).setLocation(0.6, 0.05, 0.3, 0.1).addEvent(new SoopyContentChangeEvent().setHandler(newval => { + this.updateData(player, newval) + })) + this.statArea.addChild(profileSelect) + + fetch("http://soopy.dev/statgraphgenerations/" + playerData.data.uuid + "/" + selectedProf).json().then(graphData => { + if (player !== this.playerLoad) return + + new Thread(() => { + let y = 0.2 + Object.keys(graphData).forEach(type => { + let typeElm = new SoopyTextElement().setText("§0" + firstLetterWordCapital(type.replace("total", ""))).setMaxTextScale(2).setLocation(0.1, y, 0.8, 0.1) + this.statArea.addChild(typeElm) + y += 0.15 + let graph = Object.keys(graphData[type])[0] + renderLibs.getImage(graphData[type][graph], true) //load image synchronously into cache so it knows the height + let graphElm = new SoopyImageElement() + this.statArea.addChild(graphElm) + graphElm.setImage(graphData[type][graph]) + + graphElm.setLocation(0.1, y, 0.8, 0.25) + graphElm.loadHeightFromImage() + y += graphElm.location.size.y.get() + 0.05 + + if (Object.keys(graphData[type]).length > 1) { + graphElm.setLore(["Click to show more graphs"]) + graphElm.addEvent(new SoopyMouseClickEvent().setHandler(() => { + let sideBarElm = new SoopyGuiElement().setLocation(0, 0, 1, 1) + sideBarElm.scrollable = true + this.openSidebarPage(sideBarElm) + let y2 = 0.05 + new Thread(() => { + Object.keys(graphData[type]).forEach((graph, i) => { + if (i === 0) return + renderLibs.getImage(graphData[type][graph], true) //load image synchronously into cache so it knows the height + let graphElm = new SoopyImageElement() + sideBarElm.addChild(graphElm) + graphElm.setImage(graphData[type][graph]) + + graphElm.setLocation(0.1, y2, 0.8, 0.25) + graphElm.loadHeightFromImage() + y2 += graphElm.location.size.y.get() + 0.05 + }) + }).start() + + })) + } + + }) + }).start() + }) + } + + onOpen() { + this.playerLoad = Player.getName() + this.updateData(Player.getName()) + } +} + +module.exports = { + class: new StatHistoryGUI() +}
\ No newline at end of file diff --git a/features/statHistoryGui/metadata.json b/src/features/statHistoryGui/metadata.json index 9345e0e..9345e0e 100644 --- a/features/statHistoryGui/metadata.json +++ b/src/features/statHistoryGui/metadata.json diff --git a/features/stat_next_to_name/index.js b/src/features/stat_next_to_name/index.js index 0c5cbcf..063a67b 100644 --- a/features/stat_next_to_name/index.js +++ b/src/features/stat_next_to_name/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; import soopyV2Server from "../../socketConnection"; @@ -45,13 +45,12 @@ class StatNextToName extends Feature { soopyV2Server.onPlayerStatsLoaded = (stats) => { this.playerStatsLoaded.call(this, stats) } - soopyV2Server.apithingo = (uuid, packetId) => { + soopyV2Server.apithingo = async (uuid, packetId) => { let key = this.FeatureManager.features["globalSettings"].class.apiKeySetting.getValue() if (!key) return - fetch(`https://api.hypixel.net/skyblock/profiles?key=${key}&uuid=${uuid}`).text(t => { - soopyV2Server.respondQueue(packetId, t) - }) + let t = await fetch(`https://api.hypixel.net/skyblock/profiles?key=${key}&uuid=${uuid}`).text() + soopyV2Server.respondQueue(packetId, t) } this.registerStep(false, 1, this.loadPlayerStatsTick) @@ -76,7 +75,7 @@ class StatNextToName extends Feature { let keyValid = false let key = this.FeatureManager.features["globalSettings"].class.apiKeySetting.getValue() - fetch("https://api.hypixel.net/key?key=" + key).json(d => { + fetch("https://api.hypixel.net/key?key=" + key).json().then(d => { if (d.success) { keyValid = true } diff --git a/features/stat_next_to_name/metadata.json b/src/features/stat_next_to_name/metadata.json index cd2f79c..cd2f79c 100644 --- a/features/stat_next_to_name/metadata.json +++ b/src/features/stat_next_to_name/metadata.json diff --git a/features/streamsGUI/index.js b/src/features/streamsGUI/index.js index 9b8e1d7..e47bbc3 100644 --- a/features/streamsGUI/index.js +++ b/src/features/streamsGUI/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; import Feature from "../../featureClass/class"; @@ -63,27 +63,26 @@ class StreamPage extends GuiPage { this.finaliseLoading() } - updateStreams() { - fetch("http://soopy.dev/api/skyblockstreams").json(streams => { - this.streamsBox.clearChildren() - - let y = 0 - - Object.keys(streams.twitch).forEach((channel, i) => { - let stream = streams.twitch[channel] - - if (i % 2 === 0) { - let element = new StreamElement().setLocation(0, y, 0.45, 0.4).setStreamPage(this) - this.streamsBox.addChild(element) - element.setStream(stream, true) - } - if (i % 2 === 1) { - let element = new StreamElement().setLocation(0.55, y, 0.45, 0.4).setStreamPage(this) - this.streamsBox.addChild(element) - element.setStream(stream, true) - y += 0.45 - } - }) + async updateStreams() { + let streams = await fetch("http://soopy.dev/api/skyblockstreams").json() + this.streamsBox.clearChildren() + + let y = 0 + + Object.keys(streams.twitch).forEach((channel, i) => { + let stream = streams.twitch[channel] + + if (i % 2 === 0) { + let element = new StreamElement().setLocation(0, y, 0.45, 0.4).setStreamPage(this) + this.streamsBox.addChild(element) + element.setStream(stream, true) + } + if (i % 2 === 1) { + let element = new StreamElement().setLocation(0.55, y, 0.45, 0.4).setStreamPage(this) + this.streamsBox.addChild(element) + element.setStream(stream, true) + y += 0.45 + } }) } diff --git a/features/streamsGUI/metadata.json b/src/features/streamsGUI/metadata.json index 3123559..3123559 100644 --- a/features/streamsGUI/metadata.json +++ b/src/features/streamsGUI/metadata.json diff --git a/src/features/suggestionsGui/index.js b/src/features/suggestionsGui/index.js new file mode 100644 index 0000000..4a31b11 --- /dev/null +++ b/src/features/suggestionsGui/index.js @@ -0,0 +1,217 @@ +/// <reference types="../../../../CTAutocomplete" /> +/// <reference lib="es2015" /> +import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"; +import Feature from "../../featureClass/class"; +import GuiPage from "../soopyGui/GuiPage"; +import BoxWithLoading from "../../../guimanager/GuiElement/BoxWithLoading"; +import BoxWithTextAndDescription from "../../../guimanager/GuiElement/BoxWithTextAndDescription"; +import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"; +import PasswordInput from "../../../guimanager/GuiElement/PasswordInput"; +import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent"; +import { numberWithCommas } from "../../utils/numberUtils"; +import { firstLetterWordCapital } from "../../utils/stringUtils"; +import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"; +import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"; +import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent"; +import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"; +import Dropdown from "../../../guimanager/GuiElement/Dropdown"; +import SoopyContentChangeEvent from "../../../guimanager/EventListener/SoopyContentChangeEvent"; +import { fetch } from "../../utils/networkUtils"; + +let allowed = new Set(["dc8c39647b294e03ae9ed13ebd65dd29", "83c5626ede2d4754b86064d558809615"]) + +class SuggestionGui extends Feature { + constructor() { + super() + } + + onEnable() { + this.initVariables() + + this.GuiPage = new SuggestionPage() + + } + + initVariables() { + this.GuiPage = undefined + } + + onDisable() { + this.initVariables() + } +} + + +class SuggestionPage extends GuiPage { + constructor() { + super(7) + + this.name = "Suggestions" + + this.pages = [this.newPage()] + + this.password = "" + + if (allowed.has(Player.getUUID().toString().replace(/-/g, ""))) { + let elm = new PasswordInput().setPlaceholder("Suggestions").setLocation(0.125, 0.05, 0.3, 0.1) + this.pages[0].addChild(elm) + + elm.addEvent(new SoopyKeyPressEvent().setHandler((key, keyId) => { + if (elm.text.selected && keyId === 28) { + this.password = elm.text.text + elm.setText("") + elm.text.selected = false + } + })) + } else { + this.pages[0].addChild(new SoopyTextElement().setText("§0Suggestions").setMaxTextScale(3).setLocation(0.125, 0.05, 0.3, 0.1)) + } + + let button = new ButtonWithArrow().setText("§0Suggest feature (Opens in browser)").setLocation(0.45, 0.05, 0.5, 0.1) + this.pages[0].addChild(button) + + button.addEvent(new SoopyMouseClickEvent().setHandler(() => { + java.awt.Desktop.getDesktop().browse( + new java.net.URI("https://soopy.dev/soopyv2suggestion?uuid=" + Player.getUUID().toString().replace(/-/g, "")) + ); + })) + + this.suggestionElements = {} + + this.suggestionsArea = new SoopyGuiElement().setLocation(0.05, 0.2, 0.9, 0.8).setScrollable(true) + this.pages[0].addChild(this.suggestionsArea) + + + fetch("http://soopy.dev/api/soopyv2/suggestionTags.json").json().then(data => { + this.tags = data + }) + + this.finaliseLoading() + } + + async loadSuggestionPage() { + let data = await fetch("http://soopy.dev/api/soopyv2/suggestion/new").json() + + this.suggestionElements = {} + this.suggestionsArea.clearChildren() + + let i = 0 + + data.suggestions.forEach((suggestion) => { + + if (suggestion.status === "pending_review" || suggestion.status === "closed") { + if (suggestion.uuid !== Player.getUUID().toString().replace(/-/g, "") && !allowed.has(Player.getUUID().toString().replace(/-/g, ""))) return + } + + let box = new SoopyBoxElement().setLocation(0, 0.175 * i, 1, 0.15).setLore(["Click for more information + vote buttons"]) + this.suggestionsArea.addChild(box) + + let title = new SoopyTextElement().setText("§0" + suggestion.title + " §7(" + this.tags.suggestionTags[suggestion.tag] + ")").setMaxTextScale(2).setLocation(0, 0, 0.8, 1) + box.addChild(title) + + let popularity = new SoopyTextElement().setText("§0Opinion: " + numberWithCommas(suggestion.likes - suggestion.dislikes)).setMaxTextScale(2).setLocation(0.85, 0, 0.1, 1) + box.addChild(popularity) + + this.suggestionElements[suggestion._id] = { + title: title, + popularity: popularity + } + + box.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.loadSuggestion(suggestion._id) + })) + + i++ + }) + } + + async loadSuggestion(id) { + let data = await fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/user/" + Player.getUUID().toString().replace(/-/g, "")).json() + let sideBarElm = new SoopyGuiElement().setLocation(0, 0, 1, 1).setScrollable(true) + if (!data.success) { + sideBarElm.addChild(new SoopyTextElement().setText("§cError loading suggestion").setMaxTextScale(3).setLocation(0.5, 0.5, 0.5, 0.5)) + this.openSidebarPage(sideBarElm) + return + } + + this.suggestionElements[id].title.setText("§0" + data.suggestion.title + " §7(" + this.tags.suggestionTags[data.suggestion.tag] + ")") + this.suggestionElements[id].popularity.setText("§0Opinion: " + numberWithCommas(data.suggestion.likes - data.suggestion.dislikes)) + + + let title = new SoopyTextElement().setText("§0" + data.suggestion.title + " §7(" + this.tags.suggestionTags[data.suggestion.tag] + ")").setMaxTextScale(2).setLocation(0.05, 0.05, 0.9, 0.1) + sideBarElm.addChild(title) + + if (!allowed.has(Player.getUUID().toString().replace(/-/g, ""))) { + let suggestor = new SoopyTextElement().setText("§7Suggested by " + data.suggestion.username + " | Status: " + this.tags.statusTags[data.suggestion.status]).setMaxTextScale(1).setLocation(0.05, 0.15, 0.9, 0.05) + sideBarElm.addChild(suggestor) + } else { + let suggestor = new SoopyTextElement().setText("§7Suggested by " + data.suggestion.username + " | Status: ").setMaxTextScale(1).setLocation(0.05, 0.15, 0.6, 0.05) + sideBarElm.addChild(suggestor) + + let drop = new Dropdown().setLocation(0.65, 0.13, 0.3, 0.09).setOptions({ ...this.tags.statusTags, "delete": "Delete" }).setSelectedOption(data.suggestion.status) + sideBarElm.addChild(drop) + + drop.addEvent(new SoopyContentChangeEvent().setHandler((newVal) => { + if (newVal === "delete") { + fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/delete/" + this.password).load() + + this.loadSuggestionPage() + this.closeSidebarPage() + return + } + fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/status/" + newVal + "/" + this.password).load() + + this.loadSuggestion(id) + })) + } + + let likesText = new SoopyTextElement().setText("§0Dislikes: " + numberWithCommas(data.suggestion.dislikes) + " Likes: " + numberWithCommas(data.suggestion.likes)).setMaxTextScale(1).setLocation(0.35, 0.225, 0.3, 0.1) + sideBarElm.addChild(likesText) + if (!data.suggestion.hasDisliked) { + let dislikeButton = new ButtonWithArrow().setDirectionRight(false).setText("§cDislike").setLocation(0.05, 0.225, 0.275, 0.1) + sideBarElm.addChild(dislikeButton) + dislikeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.voteSuggestion(id, "dislike") + })) + } else { + let dislikeButton = new ButtonWithArrow().setDirectionRight(false).setText("§cUndislike").setLocation(0.05, 0.225, 0.275, 0.1) + sideBarElm.addChild(dislikeButton) + dislikeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.voteSuggestion(id, "clear") + })) + } + if (!data.suggestion.hasLiked) { + let likeButton = new ButtonWithArrow().setText("§aLike").setLocation(0.675, 0.225, 0.275, 0.1) + sideBarElm.addChild(likeButton) + likeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.voteSuggestion(id, "like") + })) + } else { + let likeButton = new ButtonWithArrow().setText("§aUnlike").setLocation(0.675, 0.225, 0.275, 0.1) + sideBarElm.addChild(likeButton) + likeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.voteSuggestion(id, "clear") + })) + } + + + let description = new SoopyMarkdownElement().setText(data.suggestion.description).setLocation(0.05, 0.325, 0.9, 0.6) + sideBarElm.addChild(description) + + this.openSidebarPage(sideBarElm) + } + + voteSuggestion(id, type) { + fetch("http://soopy.dev/api/soopyv2/suggestion/" + id + "/vote/" + (type) + "/" + Player.getUUID().toString().replace(/-/g, "")).load() + + this.loadSuggestion(id) + } + + onOpen() { + this.loadSuggestionPage() + } +} + +module.exports = { + class: new SuggestionGui() +}
\ No newline at end of file diff --git a/features/suggestionsGui/metadata.json b/src/features/suggestionsGui/metadata.json index 818b1c8..818b1c8 100644 --- a/features/suggestionsGui/metadata.json +++ b/src/features/suggestionsGui/metadata.json diff --git a/features/waypoints/index.js b/src/features/waypoints/index.js index 043b6b8..66bf0f5 100644 --- a/features/waypoints/index.js +++ b/src/features/waypoints/index.js @@ -1,4 +1,4 @@ -/// <reference types="../../../CTAutocomplete" /> +/// <reference types="../../../../CTAutocomplete" /> /// <reference lib="es2015" /> import { m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; diff --git a/features/waypoints/metadata.json b/src/features/waypoints/metadata.json index c162b72..c162b72 100644 --- a/features/waypoints/metadata.json +++ b/src/features/waypoints/metadata.json diff --git a/features/waypoints/minewaypoints_socket.js b/src/features/waypoints/minewaypoints_socket.js index 0cc31e5..0cc31e5 100644 --- a/features/waypoints/minewaypoints_socket.js +++ b/src/features/waypoints/minewaypoints_socket.js diff --git a/features/waypoints/pathfind.js b/src/features/waypoints/pathfind.js index 42135d8..42135d8 100644 --- a/features/waypoints/pathfind.js +++ b/src/features/waypoints/pathfind.js @@ -1,8 +1,10 @@ -/// <reference types="../CTAutocomplete" /> +/// <reference types="../../CTAutocomplete" /> + +import NonPooledThread from "./utils/nonPooledThread.js" /// <reference lib="es2015" /> if (net.minecraftforge.fml.common.Loader.isModLoaded("soopyv2forge")) { - new Thread(() => { + new NonPooledThread(() => { while (!Java.type("me.soopyboo32.soopyv2forge.SoopyV2Forge").INSTANCE) { Thread.sleep(1000) } diff --git a/logger.js b/src/logger.js index 0a8f7c8..d27b102 100644 --- a/logger.js +++ b/src/logger.js @@ -1,4 +1,4 @@ -/// <reference types="../CTAutocomplete" /> +/// <reference types="../../CTAutocomplete" /> /// <reference lib="es2015" /> class Logger { diff --git a/metadata.js b/src/metadata.js index 7aa6ac9..7aa6ac9 100644 --- a/metadata.js +++ b/src/metadata.js diff --git a/metadata.json b/src/metadata.json index d965cdf..34c1e92 100644 --- a/metadata.json +++ b/src/metadata.json @@ -13,6 +13,7 @@ "guimanager", "mappings", "BeaconBeam", - "RenderLib2D" + "RenderLib2D", + "PromiseV2" ] }
\ No newline at end of file diff --git a/socketConnection.js b/src/socketConnection.js index fbf6910..fbf6910 100644 --- a/socketConnection.js +++ b/src/socketConnection.js diff --git a/utils/delayUtils.js b/src/utils/delayUtils.js index 3ec6d95..3ec6d95 100644 --- a/utils/delayUtils.js +++ b/src/utils/delayUtils.js diff --git a/utils/networkUtils.js b/src/utils/networkUtils.js index 0d2d05c..ca3270a 100644 --- a/utils/networkUtils.js +++ b/src/utils/networkUtils.js @@ -1,4 +1,4 @@ -if (!global.networkUtilsThingSoopy) { +if (!global.networkUtilsThingSoopyPromise) { let jURL = Java.type("java.net.URL") let jStandardCharsets = Java.type("java.nio.charset.StandardCharsets") @@ -67,10 +67,9 @@ if (!global.networkUtilsThingSoopy) { let loadedConnection = undefined let loadedString = undefined let loadedJSON = undefined - let errorData = undefined let ret = { - sync() { + loadSync() { if (loadedString === undefined) { options.includeConnection = true @@ -86,95 +85,56 @@ if (!global.networkUtilsThingSoopy) { return ret }, - async(callback, _ifError = false) { - if (!callback) { - callback = () => { } - } - + async load(_ifError = false) { if (loadedString === undefined) { options.includeConnection = true - pendingRequests.push({ - callback: (data) => { - loadedString = data.stringData - loadedConnection = data.connection - callback() - }, - errcallback: (e) => { - loadedString = null - errorData = e - if (_ifError) { - callback() - } - }, - url: url, - options: options + await new Promise((res, rej) => { + pendingRequests.push({ + callback: (data) => { + loadedString = data.stringData + loadedConnection = data.connection + res() + }, + errcallback: (e) => { + rej(e) + }, + url: url, + options: options + }) }) - } else { - callback() } - - return ret }, - text: (callback) => { - if (!callback) { - ret.sync() - - return loadedString - } - - ret.async(() => { - callback(loadedString) - }) + textSync() { + ret.loadSync() - return ret + return loadedString }, - json: (callback) => { - if (!callback) { - if (loadedJSON === undefined) { - try { - loadedJSON = JSON.parse(ret.text()) - } catch (e) { } - } - - return loadedJSON - } - - ret.text(data => { - try { - callback(JSON.parse(data)) - } catch (e) { } - }) + async text() { + await ret.load() - return ret + return loadedString }, - responseCode: (callback) => { - if (!callback) { - ret.sync() + jsonSync() { + if (loadedJSON === undefined) { + let str = ret.textSync() - return loadedConnection?.getResponseCode() || -1 + loadedJSON = JSON.parse(str) } - ret.async(data => { - callback(loadedConnection?.getResponseCode() || -1) - }) - - return ret + return loadedJSON }, - error: (callback) => { - if (!callback) { - ret.sync() + async json() { + if (loadedJSON === undefined) { + let str = await ret.text() - return errorData + loadedJSON = JSON.parse(str) } - ret.async(data => { - if (errorData) { - callback(errorData) - } - }, true) - - return ret + return loadedJSON + }, + responseCode() { + return loadedConnection?.getResponseCode() || -1 } } return ret @@ -216,10 +176,10 @@ if (!global.networkUtilsThingSoopy) { } }) - global.networkUtilsThingSoopy = { + global.networkUtilsThingSoopyPromise = { getUrlContent: getUrlContent, fetch: fetch } } -module.exports = global.networkUtilsThingSoopy +module.exports = global.networkUtilsThingSoopyPromise diff --git a/utils/nonPooledThread.js b/src/utils/nonPooledThread.js index 4720700..4720700 100644 --- a/utils/nonPooledThread.js +++ b/src/utils/nonPooledThread.js diff --git a/utils/numberUtils.js b/src/utils/numberUtils.js index 8d5e7c3..8d5e7c3 100644 --- a/utils/numberUtils.js +++ b/src/utils/numberUtils.js diff --git a/utils/renderJavaUtils.js b/src/utils/renderJavaUtils.js index 6a16cda..6a16cda 100644 --- a/utils/renderJavaUtils.js +++ b/src/utils/renderJavaUtils.js diff --git a/utils/renderLib2d.js b/src/utils/renderLib2d.js index 30ac28f..30ac28f 100644 --- a/utils/renderLib2d.js +++ b/src/utils/renderLib2d.js diff --git a/utils/renderUtils.js b/src/utils/renderUtils.js index 321e821..321e821 100644 --- a/utils/renderUtils.js +++ b/src/utils/renderUtils.js diff --git a/utils/statUtils.js b/src/utils/statUtils.js index 89b467d..89b467d 100644 --- a/utils/statUtils.js +++ b/src/utils/statUtils.js diff --git a/utils/stringUtils.js b/src/utils/stringUtils.js index f28841c..f28841c 100644 --- a/utils/stringUtils.js +++ b/src/utils/stringUtils.js diff --git a/utils/utils.js b/src/utils/utils.js index 1f6cd6e..1f6cd6e 100644 --- a/utils/utils.js +++ b/src/utils/utils.js |