TMT-Demo/js/app.33420421.js.map

1 line
No EOL
821 KiB
Text

{"version":3,"file":"js/app.33420421.js","mappings":"qFAiCA,MAAMA,EAAsB,CACxBC,UAAW,CACP,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,UACxB,uBAAwB,sBACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,gBAAiB,OACjB,WAAY,UACZ,WAAY,mBACZ,SAAU,UACV,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UAEb,kBAAmB,OACnB,iBAAkB,yBAClB,mBAAoB,OAExBC,cAAc,EACdC,eAAe,EACfC,SAAS,GAGb,IAAYC,GAAZ,SAAYA,GACR,uBACA,mBACA,qBACA,kBAJJ,CAAYA,IAAAA,EAAM,KAOlB,QACIC,QAASN,EACTO,MAAO,IACAP,EACHC,UAAW,IACJD,EAAaC,UAChB,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,YAAa,UACb,kBAAmB,MACnB,iBAAkB,GAClB,mBAAoB,OAExBC,cAAc,GAGlBM,OAAQ,IACDR,EACHC,UAAW,IACJD,EAAaC,UAChB,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,OACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,gBAAiB,UACjB,WAAY,UACZ,WAAY,UACZ,SAAU,UACV,YAAa,UACb,YAAa,UACb,YAAa,UACb,YAAa,UACb,kBAAmB,MACnB,iBAAkB,oBAClB,mBAAoB,OAExBC,cAAc,GAElBO,KAAM,IACCT,EACHC,UAAW,IACJD,EAAaC,UAChB,eAAgB,UAChB,eAAgB,UAChB,uBAAwB,wBACxB,sBAAuB,UACvB,WAAY,UACZ,WAAY,UACZ,YAAa,c,6QChHlB,MAAMS,EAAYC,OAAO,aAKnBC,EAAcD,OAAO,eAgClC,IAAIE,EAAK,EAOH,SAAUC,EAAYC,EAAS,YACjC,oBAAOA,GAAP,OAAOA,GAAAA,EAAP,iBAAOA,EAAP,iBAA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/data/themes.ts","webpack://profectus/./src/features/feature.ts","webpack://profectus/./src/game/events.ts","webpack://profectus/./src/game/persistence.ts","webpack://profectus/./src/game/player.ts","webpack://profectus/./src/game/settings.ts","webpack://profectus/./src/game/state.ts","webpack://profectus/./src/components/Layer.vue?d518","webpack://profectus/./src/components/Layer.vue?ea1e","webpack://profectus/./src/components/Layer.vue","webpack://profectus/./src/data/Changelog.vue?6b26","webpack://profectus/./src/data/Changelog.vue","webpack://profectus/./src/components/Info.vue?962a","webpack://profectus/./src/components/Info.vue","webpack://profectus/./src/components/Options.vue?ba84","webpack://profectus/./src/components/Options.vue","webpack://profectus/./src/components/fields/DangerButton.vue?bf6c","webpack://profectus/./src/components/fields/DangerButton.vue","webpack://profectus/./src/components/fields/FeedbackButton.vue?2dba","webpack://profectus/./src/components/fields/FeedbackButton.vue","webpack://profectus/./src/components/Save.vue?548a","webpack://profectus/./src/components/Save.vue","webpack://profectus/./src/components/SavesManager.vue?f8a3","webpack://profectus/./src/components/SavesManager.vue","webpack://profectus/./src/components/Nav.vue?b4a5","webpack://profectus/./src/components/Nav.vue","webpack://profectus/./src/components/Game.vue?fa24","webpack://profectus/./src/components/Game.vue","webpack://profectus/./src/components/GameOverScreen.vue?ee8d","webpack://profectus/./src/components/GameOverScreen.vue","webpack://profectus/./src/components/NaNScreen.vue?4f64","webpack://profectus/./src/components/NaNScreen.vue","webpack://profectus/./src/components/TPS.vue?e36e","webpack://profectus/./src/components/TPS.vue","webpack://profectus/./src/App.vue?94f9","webpack://profectus/./src/App.vue","webpack://profectus/./src/main.ts","webpack://profectus/./src/lib/break_eternity.ts","webpack://profectus/./src/util/break_eternity.ts","webpack://profectus/./src/util/bignum.ts","webpack://profectus/./src/util/common.ts","webpack://profectus/./src/util/computed.ts","webpack://profectus/./src/util/proxies.ts","webpack://profectus/./src/util/save.ts","webpack://profectus/./src/components/Profectus.vue","webpack://profectus/./src/components/Profectus.vue?94a9","webpack://profectus/./src/components/layout/Spacer.vue?e0bd","webpack://profectus/./src/components/layout/Spacer.vue","webpack://profectus/./src/features/resources/resource.ts","webpack://profectus/./src/features/trees/Tree.vue?d078","webpack://profectus/./src/features/links/Link.vue?f30b","webpack://profectus/./src/features/links/Link.vue","webpack://profectus/./src/features/links/Links.vue?7529","webpack://profectus/./src/features/links/Links.vue","webpack://profectus/./src/features/trees/Tree.vue?698b","webpack://profectus/./src/features/trees/Tree.vue","webpack://profectus/./src/features/trees/TreeNode.vue?da84","webpack://profectus/./src/components/Node.vue?6bf5","webpack://profectus/./src/components/Node.vue","webpack://profectus/./src/components/MarkNode.vue?acb3","webpack://profectus/./src/components/MarkNode.vue","webpack://profectus/./src/features/trees/TreeNode.vue?9a03","webpack://profectus/./src/features/trees/TreeNode.vue","webpack://profectus/./src/features/trees/tree.ts","webpack://profectus/./src/features/achievements/Achievement.vue?3070","webpack://profectus/./src/features/achievements/Achievement.vue?dcde","webpack://profectus/./src/features/achievements/Achievement.vue","webpack://profectus/./src/game/notifications.ts","webpack://profectus/./src/features/achievements/achievement.tsx","webpack://profectus/./src/features/grids/Grid.vue?6522","webpack://profectus/./src/features/grids/GridCell.vue?ffc5","webpack://profectus/./src/features/grids/GridCell.vue?58b8","webpack://profectus/./src/features/grids/GridCell.vue","webpack://profectus/./src/features/grids/Grid.vue?3299","webpack://profectus/./src/features/grids/Grid.vue","webpack://profectus/./src/features/grids/grid.ts","webpack://profectus/./src/features/clickables/Clickable.vue?4539","webpack://profectus/./src/features/clickables/Clickable.vue?22aa","webpack://profectus/./src/features/clickables/Clickable.vue","webpack://profectus/./src/features/clickables/clickable.ts","webpack://profectus/./src/data/common.tsx","webpack://profectus/./src/features/conversion.ts","webpack://profectus/./src/features/infoboxes/Infobox.vue?b869","webpack://profectus/./src/features/infoboxes/Infobox.vue?c704","webpack://profectus/./src/features/infoboxes/Infobox.vue","webpack://profectus/./src/features/infoboxes/infobox.ts","webpack://profectus/./src/features/particles/Particles.vue?0a16","webpack://profectus/./src/features/particles/Particles.vue?11ca","webpack://profectus/./src/features/particles/Particles.vue","webpack://profectus/./src/features/particles/particles.tsx","webpack://profectus/./src/features/reset.ts","webpack://profectus/./src/features/resources/Resource.vue?0822","webpack://profectus/./src/features/resources/Resource.vue","webpack://profectus/./src/features/resources/MainDisplay.vue?8bde","webpack://profectus/./src/features/resources/MainDisplay.vue","webpack://profectus/./src/features/tooltips/tooltip.ts","webpack://profectus/./src/game/modifiers.tsx","webpack://profectus/./src/components/fields/Slider.vue?f27e","webpack://profectus/./src/components/fields/Slider.vue","webpack://profectus/./src/components/layout/Sticky.vue?32f6","webpack://profectus/./src/components/layout/Sticky.vue","webpack://profectus/./src/components/layout/VerticalRule.vue?aaf3","webpack://profectus/./src/components/layout/VerticalRule.vue","webpack://profectus/./src/features/bars/Bar.vue?6954","webpack://profectus/./src/features/bars/Bar.vue?da91","webpack://profectus/./src/features/bars/Bar.vue","webpack://profectus/./src/features/bars/bar.ts","webpack://profectus/./src/features/buyable.tsx","webpack://profectus/./src/features/challenges/Challenge.vue?43ae","webpack://profectus/./src/features/challenges/Challenge.vue?5ee1","webpack://profectus/./src/features/challenges/Challenge.vue","webpack://profectus/./src/features/challenges/challenge.tsx","webpack://profectus/./src/features/hotkey.tsx","webpack://profectus/./src/features/links/links.ts","webpack://profectus/./src/features/milestones/Milestone.vue?08ca","webpack://profectus/./src/features/milestones/Milestone.vue?d607","webpack://profectus/./src/features/milestones/Milestone.vue","webpack://profectus/./src/features/milestones/milestone.tsx","webpack://profectus/./src/features/tabs/Tab.vue?50ee","webpack://profectus/./src/features/tabs/Tab.vue","webpack://profectus/./src/features/tabs/tab.ts","webpack://profectus/./src/features/tabs/TabButton.vue?7f39","webpack://profectus/./src/features/tabs/TabButton.vue?a3c5","webpack://profectus/./src/features/tabs/TabButton.vue","webpack://profectus/./src/features/tabs/TabFamily.vue?3794","webpack://profectus/./src/features/tabs/TabFamily.vue?2385","webpack://profectus/./src/features/tabs/TabFamily.vue","webpack://profectus/./src/features/tabs/tabFamily.ts","webpack://profectus/./src/features/upgrades/Upgrade.vue?4ec3","webpack://profectus/./src/features/upgrades/Upgrade.vue?4a14","webpack://profectus/./src/features/upgrades/Upgrade.vue","webpack://profectus/./src/features/upgrades/upgrade.ts","webpack://profectus/./src/data/layers/aca/c.tsx","webpack://profectus/./src/data/layers/aca/f.tsx","webpack://profectus/./src/data/layers/aca/a.tsx","webpack://profectus/./src/data/projEntry.tsx","webpack://profectus/./src/game/layers.tsx","webpack://profectus/./src/util/vue.tsx","webpack://profectus/./src/components/Context.vue?2f6e","webpack://profectus/./src/components/Context.vue","webpack://profectus/./src/components/Modal.vue?1099","webpack://profectus/./src/components/Modal.vue","webpack://profectus/./src/components/fields/Select.vue?c5ab","webpack://profectus/./src/components/fields/Select.vue","webpack://profectus/./src/components/fields/Text.vue?ba89","webpack://profectus/./src/components/fields/Text.vue","webpack://profectus/./src/components/fields/Toggle.vue?20df","webpack://profectus/./src/components/fields/Toggle.vue","webpack://profectus/./src/components/layout/Column.vue?cbbe","webpack://profectus/./src/components/layout/Column.vue","webpack://profectus/./src/components/layout/Row.vue?506d","webpack://profectus/./src/components/layout/Row.vue","webpack://profectus/./src/features/tooltips/Tooltip.vue?1902","webpack://profectus/./src/features/tooltips/Tooltip.vue?9cc7","webpack://profectus/./src/features/tooltips/Tooltip.vue","webpack://profectus/|/\\.txt$/","webpack://profectus/webpack/bootstrap","webpack://profectus/webpack/runtime/chunk loaded","webpack://profectus/webpack/runtime/compat get default export","webpack://profectus/webpack/runtime/define property getters","webpack://profectus/webpack/runtime/global","webpack://profectus/webpack/runtime/hasOwnProperty shorthand","webpack://profectus/webpack/runtime/make namespace object","webpack://profectus/webpack/runtime/node module decorator","webpack://profectus/webpack/runtime/jsonp chunk loading","webpack://profectus/webpack/startup"],"sourcesContent":["export interface ThemeVars {\n \"--foreground\": string;\n \"--background\": string;\n \"--feature-foreground\": string;\n \"--tooltip-background\": string;\n \"--raised-background\": string;\n \"--points\": string;\n \"--locked\": string;\n \"--highlighted\": string;\n \"--bought\": string;\n \"--danger\": string;\n \"--link\": string;\n \"--outline\": string;\n \"--accent1\": string;\n \"--accent2\": string;\n \"--accent3\": string;\n \"--border-radius\": string;\n \"--modal-border\": string;\n \"--feature-margin\": string;\n}\n\nexport interface Theme {\n variables: ThemeVars;\n floatingTabs: boolean;\n mergeAdjacent: boolean;\n showPin: boolean;\n}\n\ndeclare module \"@vue/runtime-dom\" {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface CSSProperties extends Partial<ThemeVars> {}\n}\n\nconst defaultTheme: Theme = {\n variables: {\n \"--foreground\": \"#dfdfdf\",\n \"--background\": \"#0f0f0f\",\n \"--feature-foreground\": \"#0f0f0f\",\n \"--tooltip-background\": \"rgba(0, 0, 0, 0.75)\",\n \"--raised-background\": \"#0f0f0f\",\n \"--points\": \"#ffffff\",\n \"--locked\": \"#bf8f8f\",\n \"--highlighted\": \"#333\",\n \"--bought\": \"#77bf5f\",\n \"--danger\": \"rgb(220, 53, 69)\",\n \"--link\": \"#02f2f2\",\n \"--outline\": \"#dfdfdf\",\n \"--accent1\": \"#627a82\",\n \"--accent2\": \"#658262\",\n \"--accent3\": \"#7c6282\",\n\n \"--border-radius\": \"15px\",\n \"--modal-border\": \"solid 2px var(--color)\",\n \"--feature-margin\": \"0px\"\n },\n floatingTabs: true,\n mergeAdjacent: true,\n showPin: true\n};\n\nexport enum Themes {\n Classic = \"classic\",\n Paper = \"paper\",\n Nordic = \"nordic\",\n Aqua = \"aqua\"\n}\n\nexport default {\n classic: defaultTheme,\n paper: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--background\": \"#2a323d\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#333c4a\",\n \"--locked\": \"#3a3e45\",\n \"--bought\": \"#5C8A58\",\n \"--outline\": \"#333c4a\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n // Based on https://www.nordtheme.com\n nordic: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#D8DEE9\",\n \"--background\": \"#2E3440\",\n \"--feature-foreground\": \"#000\",\n \"--raised-background\": \"#3B4252\",\n \"--points\": \"#E5E9F0\",\n \"--locked\": \"#4c566a\",\n \"--highlighted\": \"#434c5e\",\n \"--bought\": \"#8FBCBB\",\n \"--danger\": \"#D08770\",\n \"--link\": \"#88C0D0\",\n \"--outline\": \"#3B4252\",\n \"--accent1\": \"#B48EAD\",\n \"--accent2\": \"#A3BE8C\",\n \"--accent3\": \"#EBCB8B\",\n \"--border-radius\": \"4px\",\n \"--modal-border\": \"solid 2px #3B4252\",\n \"--feature-margin\": \"5px\"\n },\n floatingTabs: false\n } as Theme,\n aqua: {\n ...defaultTheme,\n variables: {\n ...defaultTheme.variables,\n \"--foreground\": \"#bfdfff\",\n \"--background\": \"#001f3f\",\n \"--tooltip-background\": \"rgba(0, 15, 31, 0.75)\",\n \"--raised-background\": \"#001f3f\",\n \"--points\": \"#dfefff\",\n \"--locked\": \"#c4a7b3\",\n \"--outline\": \"#bfdfff\"\n }\n } as Theme\n} as Record<Themes, Theme>;\n","import Decimal from \"util/bignum\";\nimport { DoNotCache } from \"util/computed\";\nimport { CSSProperties, DefineComponent, isRef } from \"vue\";\n\n/**\n * A symbol to use as a key for a vue component a feature can be rendered with\n * @see {@link VueFeature}\n */\nexport const Component = Symbol(\"Component\");\n/**\n * A symbol to use as a key for a prop gathering function that a feature can use to send to its component\n * @see {@link VueFeature}\n */\nexport const GatherProps = Symbol(\"GatherProps\");\n\n/**\n * A type referring to a function that returns JSX and is marked that it shouldn't be wrapped in a ComputedRef\n * @see {@link jsx}\n */\nexport type JSXFunction = (() => JSX.Element) & { [DoNotCache]: true };\n/**\n * Any value that can be coerced into (or is) a vue component\n */\nexport type CoercableComponent = string | DefineComponent | JSXFunction;\n/**\n * Any value that can be passed into an HTML element's style attribute.\n * Note that Profectus uses its own StyleValue and CSSProperties that are extended,\n * in order to have additional properties added to them, such as variable CSS variables.\n */\nexport type StyleValue = string | CSSProperties | Array<string | CSSProperties>;\n\n/** A type that refers to any vue component */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type GenericComponent = DefineComponent<any, any, any>;\n\n/** Utility type that is S, with any properties from T that aren't already present in S */\nexport type Replace<T, S> = S & Omit<T, keyof S>;\n\n/**\n * Utility function for a function that returns an object of a given type,\n * with \"this\" bound to what the type will eventually be processed into.\n * Intended for making lazily evaluated objects.\n */\nexport type OptionsFunc<T, S = T, R = Record<string, unknown>> = () => T & ThisType<S> & Partial<R>;\n\nlet id = 0;\n/**\n * Gets a unique ID to give to each feature, used for any sort of system that needs to identify\n * elements in the DOM rather than references to the feature itself. (For example, branches)\n * IDs are guaranteed unique, but _NOT_ persistent - they likely will change between updates.\n * @param prefix A string to prepend to the id to make it more readable in the inspector tools\n */\nexport function getUniqueID(prefix = \"feature-\"): string {\n return prefix + id++;\n}\n\n/** Enum for what the visibility of a feature or component should be */\nexport enum Visibility {\n /** The feature or component should be visible */\n Visible,\n /** The feature or component should not appear but still take up space */\n Hidden,\n /** The feature or component should not appear not take up space */\n None\n}\n\n/**\n * Takes a function and marks it as JSX so it won't get auto-wrapped into a ComputedRef.\n * The function may also return empty string as empty JSX tags cause issues.\n */\nexport function jsx(func: () => JSX.Element | \"\"): JSXFunction {\n (func as Partial<JSXFunction>)[DoNotCache] = true;\n return func as JSXFunction;\n}\n\n/** Utility function to convert a boolean value into a Visbility value */\nexport function showIf(condition: boolean, otherwise = Visibility.None): Visibility {\n return condition ? Visibility.Visible : otherwise;\n}\n\n/** Utility function to set a property on an object if and only if it doesn't already exist */\nexport function setDefault<T, K extends keyof T>(\n object: T,\n key: K,\n value: T[K]\n): asserts object is Exclude<T, K> & Required<Pick<T, K>> {\n if (object[key] === undefined && value != undefined) {\n object[key] = value;\n }\n}\n\n/**\n * Traverses an object and returns all features of the given type(s)\n * @param obj The object to traverse\n * @param types The feature types that will be searched for\n */\nexport function findFeatures(obj: Record<string, unknown>, ...types: symbol[]): unknown[] {\n const objects: unknown[] = [];\n const handleObject = (obj: Record<string, unknown>) => {\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (types.includes((value as Record<string, any>).type)) {\n objects.push(value);\n } else if (!(value instanceof Decimal) && !isRef(value)) {\n handleObject(value as Record<string, unknown>);\n }\n }\n });\n };\n handleObject(obj);\n return objects;\n}\n\n/**\n * Traverses an object and returns all features that are _not_ any of the given types.\n * Features are any object with a \"type\" property that has a symbol value.\n * @param obj The object to traverse\n * @param types The feature types that will be skipped over\n */\nexport function excludeFeatures(obj: Record<string, unknown>, ...types: symbol[]): unknown[] {\n const objects: unknown[] = [];\n const handleObject = (obj: Record<string, unknown>) => {\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value as Record<string, any>).type == \"symbol\" &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !types.includes((value as Record<string, any>).type)\n ) {\n objects.push(value);\n } else if (!(value instanceof Decimal) && !isRef(value)) {\n handleObject(value as Record<string, unknown>);\n }\n }\n });\n };\n handleObject(obj);\n return objects;\n}\n","import projInfo from \"data/projInfo.json\";\nimport Decimal from \"util/bignum\";\nimport { createNanoEvents } from \"nanoevents\";\nimport { App, Ref, watch } from \"vue\";\nimport { GenericLayer } from \"./layers\";\nimport player from \"./player\";\nimport settings, { Settings } from \"./settings\";\nimport state from \"./state\";\n\nexport interface GlobalEvents {\n addLayer: (layer: GenericLayer, saveData: Record<string, unknown>) => void;\n removeLayer: (layer: GenericLayer) => void;\n update: (diff: number, trueDiff: number) => void;\n loadSettings: (settings: Partial<Settings>) => void;\n gameWon: VoidFunction;\n setupVue: (vue: App) => void;\n}\n\nexport const globalBus = createNanoEvents<GlobalEvents>();\n\nlet intervalID: number | null = null;\n\n// Not imported immediately due to dependency cycles\n// This gets set during startGameLoop(), and will only be used in the update function\nlet hasWon: null | Ref<boolean> = null;\n\nfunction update() {\n const now = Date.now();\n let diff = (now - player.time) / 1e3;\n player.time = now;\n const trueDiff = diff;\n\n state.lastTenTicks.push(trueDiff);\n if (state.lastTenTicks.length > 10) {\n state.lastTenTicks = state.lastTenTicks.slice(1);\n }\n\n // Stop here if the game is paused on the win screen\n if (hasWon?.value && !player.keepGoing) {\n return;\n }\n // Stop here if the player had a NaN value\n if (state.hasNaN) {\n return;\n }\n\n diff = Math.max(diff, 0);\n\n if (player.devSpeed === 0) {\n return;\n }\n\n // Add offline time if any\n if (player.offlineTime != undefined) {\n if (Decimal.gt(player.offlineTime, projInfo.offlineLimit * 3600)) {\n player.offlineTime = projInfo.offlineLimit * 3600;\n }\n if (Decimal.gt(player.offlineTime, 0) && player.devSpeed !== 0) {\n const offlineDiff = Math.max(player.offlineTime / 10, diff);\n player.offlineTime = player.offlineTime - offlineDiff;\n diff += offlineDiff;\n } else if (player.devSpeed === 0) {\n player.offlineTime += diff;\n }\n if (!player.offlineProd || Decimal.lt(player.offlineTime, 0)) {\n player.offlineTime = null;\n }\n }\n\n // Cap at max tick length\n diff = Math.min(diff, projInfo.maxTickLength);\n\n // Apply dev speed\n if (player.devSpeed != undefined) {\n diff *= player.devSpeed;\n }\n\n if (!Number.isFinite(diff)) {\n diff = 1e308;\n }\n\n // Update\n if (Decimal.eq(diff, 0)) {\n return;\n }\n\n player.timePlayed += diff;\n if (!Number.isFinite(player.timePlayed)) {\n player.timePlayed = 1e308;\n }\n globalBus.emit(\"update\", diff, trueDiff);\n\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n if (intervalID != null) {\n clearInterval(intervalID);\n intervalID = null;\n }\n } else if (intervalID == null) {\n intervalID = setInterval(update, 50);\n }\n}\n\nexport async function startGameLoop() {\n hasWon = (await import(\"data/projEntry\")).hasWon;\n watch(hasWon, hasWon => {\n if (hasWon) {\n globalBus.emit(\"gameWon\");\n }\n });\n if (settings.unthrottled) {\n requestAnimationFrame(update);\n } else {\n intervalID = setInterval(update, 50);\n }\n}\n","import { globalBus } from \"game/events\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { ProxyState } from \"util/proxies\";\nimport { isArray } from \"@vue/shared\";\nimport { isReactive, isRef, Ref, ref } from \"vue\";\nimport { addingLayers, GenericLayer, persistentRefs } from \"./layers\";\n\nexport const PersistentState = Symbol(\"PersistentState\");\nexport const DefaultValue = Symbol(\"DefaultValue\");\nexport const StackTrace = Symbol(\"StackTrace\");\nexport const Deleted = Symbol(\"Deleted\");\n\n// Note: This is a union of things that should be safely stringifiable without needing\n// special processes for knowing what to load them in as\n// - Decimals aren't allowed because we'd need to know to parse them back.\n// - DecimalSources are allowed because the string is a valid value for them\nexport type State =\n | string\n | number\n | boolean\n | DecimalSource\n | { [key: string]: State }\n | { [key: number]: State };\n\nexport type Persistent<T extends State = State> = Ref<T> & {\n [PersistentState]: Ref<T>;\n [DefaultValue]: T;\n [StackTrace]: string;\n [Deleted]: boolean;\n};\n\nfunction getStackTrace() {\n return (\n new Error().stack\n ?.split(\"\\n\")\n .slice(3, 5)\n .map(line => line.trim())\n .join(\"\\n\") || \"\"\n );\n}\n\nexport function persistent<T extends State>(defaultValue: T | Ref<T>): Persistent<T> {\n const persistent = (\n isRef(defaultValue) ? defaultValue : (ref<T>(defaultValue) as unknown)\n ) as Persistent<T>;\n\n persistent[PersistentState] = persistent;\n persistent[DefaultValue] = isRef(defaultValue) ? defaultValue.value : defaultValue;\n persistent[StackTrace] = getStackTrace();\n persistent[Deleted] = false;\n\n if (addingLayers.length === 0) {\n console.warn(\n \"Creating a persistent ref outside of a layer. This is not officially supported\",\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].add(persistent);\n }\n\n return persistent as Persistent<T>;\n}\n\nexport function deletePersistent(persistent: Persistent) {\n if (addingLayers.length === 0) {\n console.warn(\"Deleting a persistent ref outside of a layer. Ignoring...\", persistent);\n } else {\n persistentRefs[addingLayers[addingLayers.length - 1]].delete(persistent);\n }\n persistent[Deleted] = true;\n}\n\nglobalBus.on(\"addLayer\", (layer: GenericLayer, saveData: Record<string, unknown>) => {\n const features: { type: typeof Symbol }[] = [];\n const handleObject = (obj: Record<string, unknown>, path: string[] = []): boolean => {\n let foundPersistent = false;\n Object.keys(obj).forEach(key => {\n const value = obj[key];\n if (value && typeof value === \"object\") {\n if (PersistentState in value) {\n foundPersistent = true;\n if ((value as Persistent)[Deleted]) {\n console.warn(\n \"Deleted persistent ref present in returned object. Ignoring...\",\n value,\n \"\\nCreated at:\\n\" + (value as Persistent)[StackTrace]\n );\n return;\n }\n persistentRefs[layer.id].delete(\n ProxyState in value\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((value as any)[ProxyState] as Persistent)\n : (value as Persistent)\n );\n\n // Construct save path if it doesn't exist\n const persistentState = path.reduce<Record<string, unknown>>((acc, curr) => {\n if (!(curr in acc)) {\n acc[curr] = {};\n }\n return acc[curr] as Record<string, unknown>;\n }, saveData);\n\n // Cache currently saved value\n const savedValue = persistentState[key];\n // Add ref to save data\n persistentState[key] = (value as Persistent)[PersistentState];\n // Load previously saved value\n if (isReactive(persistentState)) {\n if (savedValue != null) {\n persistentState[key] = savedValue;\n } else {\n persistentState[key] = (value as Persistent)[DefaultValue];\n }\n } else {\n if (savedValue != null) {\n (persistentState[key] as Ref<unknown>).value = savedValue;\n } else {\n (persistentState[key] as Ref<unknown>).value = (value as Persistent)[\n DefaultValue\n ];\n }\n }\n } else if (\n !(value instanceof Decimal) &&\n !isRef(value) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !features.includes(value as { type: typeof Symbol })\n ) {\n if (typeof (value as { type: typeof Symbol }).type === \"symbol\") {\n features.push(value as { type: typeof Symbol });\n }\n\n // Continue traversing\n const foundPersistentInChild = handleObject(value as Record<string, unknown>, [\n ...path,\n key\n ]);\n\n // Show warning for persistent values inside arrays\n // TODO handle arrays better\n if (foundPersistentInChild) {\n if (isArray(value) && !isArray(obj)) {\n console.warn(\n \"Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.\",\n ProxyState in obj\n ? (obj as Record<PropertyKey, unknown>)[ProxyState]\n : obj,\n key\n );\n } else {\n foundPersistent = true;\n }\n }\n }\n }\n });\n return foundPersistent;\n };\n handleObject(layer);\n persistentRefs[layer.id].forEach(persistent => {\n console.error(\n `Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,\n persistent,\n \"\\nCreated at:\\n\" + persistent[StackTrace]\n );\n });\n persistentRefs[layer.id].clear();\n});\n","import Decimal from \"util/bignum\";\nimport { isPlainObject } from \"util/common\";\nimport { ProxiedWithState, ProxyPath, ProxyState } from \"util/proxies\";\nimport { reactive, unref } from \"vue\";\nimport transientState from \"./state\";\n\nexport interface PlayerData {\n id: string;\n devSpeed: number | null;\n name: string;\n tabs: Array<string>;\n time: number;\n autosave: boolean;\n offlineProd: boolean;\n offlineTime: number | null;\n timePlayed: number;\n keepGoing: boolean;\n modID: string;\n modVersion: string;\n layers: Record<string, Record<string, unknown>>;\n}\n\nexport type Player = ProxiedWithState<PlayerData>;\n\nconst state = reactive<PlayerData>({\n id: \"\",\n devSpeed: null,\n name: \"\",\n tabs: [],\n time: -1,\n autosave: true,\n offlineProd: true,\n offlineTime: null,\n timePlayed: 0,\n keepGoing: false,\n modID: \"\",\n modVersion: \"\",\n layers: {}\n});\n\nexport function stringifySave(player: PlayerData): string {\n return JSON.stringify(player, (key, value) => unref(value));\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst playerHandler: ProxyHandler<Record<PropertyKey, any>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Record<PropertyKey, any>, key: PropertyKey): any {\n if (key === ProxyState || key === ProxyPath) {\n return target[key];\n }\n\n const value = target[ProxyState][key];\n if (\n key !== \"value\" &&\n (isPlainObject(value) || Array.isArray(value)) &&\n !(value instanceof Decimal)\n ) {\n if (value !== target[key]?.[ProxyState]) {\n const path = [...target[ProxyPath], key];\n target[key] = new Proxy({ [ProxyState]: value, [ProxyPath]: path }, playerHandler);\n }\n return target[key];\n }\n\n return value;\n },\n set(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target: Record<PropertyKey, any>,\n property: PropertyKey,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any,\n receiver: ProxyConstructor\n ): boolean {\n if (\n !transientState.hasNaN &&\n ((typeof value === \"number\" && isNaN(value)) ||\n (value instanceof Decimal &&\n (isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag))))\n ) {\n const currentValue = target[ProxyState][property];\n if (\n !(\n (typeof currentValue === \"number\" && isNaN(currentValue)) ||\n (currentValue instanceof Decimal &&\n (isNaN(currentValue.sign) ||\n isNaN(currentValue.layer) ||\n isNaN(currentValue.mag)))\n )\n ) {\n state.autosave = false;\n transientState.hasNaN = true;\n transientState.NaNPath = [...target[ProxyPath], property];\n transientState.NaNReceiver = receiver as unknown as Record<string, unknown>;\n console.error(\n `Attempted to set NaN value`,\n [...target[ProxyPath], property],\n target[ProxyState]\n );\n throw \"Attempted to set NaN value. See above for details\";\n }\n }\n target[ProxyState][property] = value;\n return true;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ownKeys(target: Record<PropertyKey, any>) {\n return Reflect.ownKeys(target[ProxyState]);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n has(target: Record<PropertyKey, any>, key: string) {\n return Reflect.has(target[ProxyState], key);\n },\n getOwnPropertyDescriptor(target, key) {\n return Object.getOwnPropertyDescriptor(target[ProxyState], key);\n }\n};\nexport default window.player = new Proxy(\n { [ProxyState]: state, [ProxyPath]: [\"player\"] },\n playerHandler\n) as Player;\n","import projInfo from \"data/projInfo.json\";\nimport { Themes } from \"data/themes\";\nimport { CoercableComponent } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport LZString from \"lz-string\";\nimport { hardReset } from \"util/save\";\nimport { reactive, watch } from \"vue\";\n\nexport interface Settings {\n active: string;\n saves: string[];\n showTPS: boolean;\n theme: Themes;\n unthrottled: boolean;\n}\n\nconst state = reactive<Partial<Settings>>({\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic,\n unthrottled: false\n});\n\nwatch(\n state,\n state => {\n const stringifiedSettings = LZString.compressToUTF16(JSON.stringify(state));\n localStorage.setItem(projInfo.id, stringifiedSettings);\n },\n { deep: true }\n);\nexport default window.settings = state as Settings;\n\nexport function loadSettings(): void {\n try {\n let item: string | null = localStorage.getItem(projInfo.id);\n if (item != null && item !== \"\") {\n if (item[0] === \"{\") {\n // plaintext. No processing needed\n } else if (item[0] === \"e\") {\n // Assumed to be base64, which starts with e\n item = decodeURIComponent(escape(atob(item)));\n } else if (item[0] === \"ᯡ\") {\n // Assumed to be lz, which starts with ᯡ\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n item = LZString.decompressFromUTF16(item)!;\n } else {\n console.warn(\"Unable to determine settings encoding\", item);\n return;\n }\n const settings = JSON.parse(item);\n if (typeof settings === \"object\") {\n Object.assign(state, settings);\n }\n }\n globalBus.emit(\"loadSettings\", state);\n // eslint-disable-next-line no-empty\n } catch {}\n}\n\nexport const hardResetSettings = (window.hardResetSettings = () => {\n const settings = {\n active: \"\",\n saves: [],\n showTPS: true,\n theme: Themes.Nordic\n };\n globalBus.emit(\"loadSettings\", settings);\n Object.assign(state, settings);\n hardReset();\n});\n\nexport const settingFields: CoercableComponent[] = reactive([]);\nexport function registerSettingField(component: CoercableComponent) {\n settingFields.push(component);\n}\n\nexport const infoComponents: CoercableComponent[] = reactive([]);\nexport function registerInfoComponent(component: CoercableComponent) {\n infoComponents.push(component);\n}\n\nexport const gameComponents: CoercableComponent[] = reactive([]);\nexport function registerGameComponent(component: CoercableComponent) {\n gameComponents.push(component);\n}\n","import { shallowReactive } from \"vue\";\n\nexport interface Transient {\n lastTenTicks: number[];\n hasNaN: boolean;\n NaNPath?: string[];\n NaNReceiver?: Record<string, unknown>;\n}\n\nexport default window.state = shallowReactive<Transient>({\n lastTenTicks: [],\n hasNaN: false,\n NaNPath: []\n});\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Context = _resolveComponent(\"Context\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"layer-container\",\n style: _normalizeStyle({ '--layer-color': _ctx.unref(_ctx.color) })\n }, [\n (_ctx.showGoBack)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"goBack\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.goBack && _ctx.goBack(...args)))\n }, \"←\"))\n : _createCommentVNode(\"\", true),\n (_ctx.minimized.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"layer-tab minimized\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.minimized.value = false))\n }, [\n _createElementVNode(\"div\", null, _toDisplayString(_ctx.unref(_ctx.name)), 1)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", {\n key: 2,\n class: _normalizeClass([\"layer-tab\", { showGoBack: _ctx.showGoBack }])\n }, [\n _createVNode(_component_Context, { onUpdateNodes: _ctx.updateNodes }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ]),\n _: 1\n }, 8, [\"onUpdateNodes\"])\n ], 2)),\n (_ctx.unref(_ctx.minimizable))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 3,\n class: \"minimize\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.minimized.value = true))\n }, \" ▼ \"))\n : _createCommentVNode(\"\", true)\n ], 4))\n}","\nimport projInfo from \"data/projInfo.json\";\nimport { CoercableComponent } from \"features/feature\";\nimport { FeatureNode } from \"game/layers\";\nimport { Persistent } from \"game/persistence\";\nimport player from \"game/player\";\nimport { computeComponent, processedPropType, wrapRef } from \"util/vue\";\nimport { computed, defineComponent, nextTick, PropType, Ref, toRefs, unref, watch } from \"vue\";\nimport Context from \"./Context.vue\";\n\nexport default defineComponent({\n components: { Context },\n props: {\n index: {\n type: Number,\n required: true\n },\n tab: {\n type: Function as PropType<() => HTMLElement | undefined>,\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n minimized: {\n type: Object as PropType<Persistent<boolean>>,\n required: true\n },\n minWidth: {\n type: processedPropType<number | string>(Number, String),\n required: true\n },\n name: {\n type: processedPropType<string>(String),\n required: true\n },\n color: processedPropType<string>(String),\n minimizable: processedPropType<boolean>(Boolean),\n nodes: {\n type: Object as PropType<Ref<Record<string, FeatureNode | undefined>>>,\n required: true\n }\n },\n setup(props) {\n const { display, index, minimized, minWidth, tab } = toRefs(props);\n\n const component = computeComponent(display);\n const showGoBack = computed(\n () => projInfo.allowGoBack && index.value > 0 && !minimized.value\n );\n\n function goBack() {\n player.tabs.splice(unref(props.index), Infinity);\n }\n\n nextTick(() => updateTab(minimized.value, unref(minWidth.value)));\n watch([minimized, wrapRef(minWidth)], ([minimized, minWidth]) =>\n updateTab(minimized, minWidth)\n );\n\n function updateNodes(nodes: Record<string, FeatureNode | undefined>) {\n props.nodes.value = nodes;\n }\n\n function updateTab(minimized: boolean, minWidth: number | string) {\n const width =\n typeof minWidth === \"number\" || Number.isNaN(parseInt(minWidth))\n ? minWidth + \"px\"\n : minWidth;\n const tabValue = tab.value();\n if (tabValue != undefined) {\n if (minimized) {\n tabValue.style.flexGrow = \"0\";\n tabValue.style.flexShrink = \"0\";\n tabValue.style.width = \"60px\";\n tabValue.style.minWidth = tabValue.style.flexBasis = \"\";\n tabValue.style.margin = \"0\";\n } else {\n tabValue.style.flexGrow = \"\";\n tabValue.style.flexShrink = \"\";\n tabValue.style.width = \"\";\n tabValue.style.minWidth = tabValue.style.flexBasis = width;\n tabValue.style.margin = \"\";\n }\n }\n }\n\n return {\n component,\n showGoBack,\n updateNodes,\n unref,\n goBack\n };\n }\n});\n","import { render } from \"./Layer.vue?vue&type=template&id=e18f60b6&scoped=true&ts=true\"\nimport script from \"./Layer.vue?vue&type=script&lang=ts\"\nexport * from \"./Layer.vue?vue&type=script&lang=ts\"\n\nimport \"./Layer.vue?vue&type=style&index=0&id=e18f60b6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e18f60b6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5f8298e6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Changelog\", -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"details\", { open: \"\" }, [\n /*#__PURE__*/_createElementVNode(\"summary\", null, [\n /*#__PURE__*/_createTextVNode(\"v0.0 Initial Commit - \"),\n /*#__PURE__*/_createElementVNode(\"time\", null, \"2021-09-04\")\n ]),\n /*#__PURE__*/_createTextVNode(\" This is the first release :D \"),\n /*#__PURE__*/_createElementVNode(\"ul\", null, [\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"feature\" }, \"Did everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"fix\" }, \"Had some fun\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"breaking\" }, \"Removed everything\"),\n /*#__PURE__*/_createElementVNode(\"li\", { class: \"balancing\" }, \"Created some bugs to fix later\")\n ])\n], -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _hoisted_2\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Changelog.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Changelog.vue?vue&type=style&index=0&id=5f8298e6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5f8298e6\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3eb46986\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"info-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"info-modal-title\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_10 = [\"href\"]\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Paper Pilot Community \")\n ])\n], -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n class: \"info-modal-discord-link\"\n }, [\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons info-modal-discord\" }, \"discord\"),\n /*#__PURE__*/_createTextVNode(\" The Modding Tree \")\n ])\n], -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport type Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport { infoComponents } from \"game/settings\";\nimport { formatTime } from \"util/bignum\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs, unref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n changelog: null\n },\n setup(__props: any, { expose }) {\n\nconst _props = __props as { changelog: typeof Changelog | null }\n\nconst { title, logo, author, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\n\nconst props = toRefs(_props);\n\nconst isOpen = ref(false);\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\n\nconst infoComponent = computed(() => {\n return coerceComponent(jsx(() => <>{infoComponents.map(render)}</>));\n});\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nfunction openChangelog() {\n unref(props.changelog)?.open();\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"info-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"h2\", null, _toDisplayString(_unref(title)), 1),\n _createElementVNode(\"h4\", null, [\n _createTextVNode(\" v\" + _toDisplayString(_unref(versionNumber)), 1),\n (_unref(versionTitle))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \": \" + _toDisplayString(_unref(versionTitle)), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n (_unref(author))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, \"By \" + _toDisplayString(_unref(author)), 1))\n : _createCommentVNode(\"\", true),\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", {\n class: \"link\",\n onClick: openChangelog\n }, \"Changelog\"),\n _hoisted_9,\n _createElementVNode(\"div\", null, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n href: _unref(discordLink),\n class: \"info-modal-discord-link\"\n }, [\n _hoisted_11,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_10))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_12,\n _hoisted_13,\n _hoisted_14,\n _createElementVNode(\"div\", null, \"Time Played: \" + _toDisplayString(_unref(timePlayed)), 1),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(infoComponent))))\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Info.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Info.vue?vue&type=style&index=0&id=3eb46986&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-3eb46986\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, isRef as _isRef, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-85d7ae40\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"Options\")\n], -1))\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", null, null, -1))\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport rawThemes from \"data/themes\";\nimport { jsx } from \"features/feature\";\nimport player from \"game/player\";\nimport settings, { settingFields } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst themes = Object.keys(rawThemes).map(theme => ({\n label: camelToTitle(theme),\n value: theme\n}));\n\nconst settingFieldsComponent = computed(() => {\n return coerceComponent(jsx(() => <>{settingFields.map(render)}</>));\n});\n\nconst { showTPS, theme, unthrottled } = toRefs(settings);\nconst { autosave, offlineProd } = toRefs(player);\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? 0 : null;\n }\n});\n\nconst offlineProdTitle = jsx(() => (\n <span>\n Offline Production<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst autosaveTitle = jsx(() => (\n <span>\n Autosave<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\nconst isPausedTitle = jsx(() => (\n <span>\n Pause game<Tooltip display=\"Save-specific\">*</Tooltip>\n </span>\n));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((isOpen).value = $event))\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createVNode(Select, {\n title: \"Theme\",\n options: _unref(themes),\n modelValue: _unref(theme),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(theme) ? (theme).value = $event : null))\n }, null, 8, [\"options\", \"modelValue\"]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(settingFieldsComponent)))),\n _createVNode(Toggle, {\n title: \"Show TPS\",\n modelValue: _unref(showTPS),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(showTPS) ? (showTPS).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _hoisted_2,\n _createVNode(Toggle, {\n title: \"Unthrottled\",\n modelValue: _unref(unthrottled),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(unthrottled) ? (unthrottled).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(offlineProdTitle),\n modelValue: _unref(offlineProd),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (_isRef(offlineProd) ? (offlineProd).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n _createVNode(Toggle, {\n title: _unref(autosaveTitle),\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: _unref(isPausedTitle),\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"title\", \"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./Options.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./Options.vue?vue&type=style&index=0&id=85d7ae40&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-85d7ae40\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, withModifiers as _withModifiers, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bf59fca4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = [\"onClick\", \"disabled\"]\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"onClick\"]\n\nimport { ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n disabled: { type: Boolean },\n skipConfirm: { type: Boolean }\n },\n emits: [\"click\", \"confirmingChanged\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n (e: \"confirmingChanged\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n disabled?: boolean;\n skipConfirm?: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isConfirming = ref(false);\n\nwatch(isConfirming, isConfirming => {\n emit(\"confirmingChanged\", isConfirming);\n});\n\nfunction click() {\n if (unref(props.skipConfirm)) {\n emit(\"click\");\n return;\n }\n if (isConfirming.value) {\n emit(\"click\");\n }\n isConfirming.value = !isConfirming.value;\n}\n\nfunction cancel() {\n isConfirming.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"container\", { confirming: isConfirming.value }])\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"Are you sure?\"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: \"button danger\",\n disabled: __props.disabled\n }, [\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Yes\"))\n : _renderSlot(_ctx.$slots, \"default\", { key: 1 })\n ], 8, _hoisted_2),\n (isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"button\",\n onClick: _withModifiers(cancel, [\"stop\"])\n }, \"No\", 8, _hoisted_4))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})","import script from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./DangerButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./DangerButton.vue?vue&type=style&index=0&id=bf59fca4&scoped=true&lang=css\"\nimport \"./DangerButton.vue?vue&type=style&index=1&id=bf59fca4&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-bf59fca4\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, withModifiers as _withModifiers, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5bbcedd3\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onClick\"]\n\nimport { nextTick, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n left: { type: Boolean }\n },\n emits: [\"click\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"click\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\n\n\n\nconst activated = ref(false);\nconst activatedTimeout = ref<number | null>(null);\n\nfunction click() {\n emit(\"click\");\n\n // Give feedback to user\n if (activatedTimeout.value) {\n clearTimeout(activatedTimeout.value);\n }\n activated.value = false;\n nextTick(() => {\n activated.value = true;\n activatedTimeout.value = setTimeout(() => (activated.value = false), 500);\n });\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n onClick: _withModifiers(click, [\"stop\"]),\n class: _normalizeClass([\"feedback\", { activated: activated.value, left: __props.left }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 10, _hoisted_1))\n}\n}\n\n})","import script from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./FeedbackButton.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./FeedbackButton.vue?vue&type=style&index=0&id=5bbcedd3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5bbcedd3\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-335ce270\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"handle material-icons\" }, \"drag_handle\", -1))\nconst _hoisted_2 = {\n key: 0,\n class: \"actions\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_paste\", -1))\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"content_copy\", -1))\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"edit\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", {\n class: \"material-icons\",\n style: {\"margin\":\"-2px\"}\n}, \"delete\", -1))\nconst _hoisted_7 = {\n key: 1,\n class: \"actions\"\n}\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"check\", -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"close\", -1))\nconst _hoisted_10 = {\n key: 2,\n class: \"details\"\n}\nconst _hoisted_11 = { class: \"save-version\" }\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_13 = { key: 0 }\nconst _hoisted_14 = {\n key: 3,\n class: \"details\"\n}\nconst _hoisted_15 = {\n key: 4,\n class: \"details error\"\n}\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\n\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport player from \"game/player\";\nimport { Direction } from \"util/common\";\nimport { computed, ref, toRefs, watch } from \"vue\";\nimport DangerButton from \"./fields/DangerButton.vue\";\nimport FeedbackButton from \"./fields/FeedbackButton.vue\";\nimport Text from \"./fields/Text.vue\";\nimport { LoadablePlayerData } from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n save: null\n },\n emits: [\"export\", \"open\", \"duplicate\", \"delete\", \"editName\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"export\"): void;\n (e: \"open\"): void;\n (e: \"duplicate\"): void;\n (e: \"delete\"): void;\n (e: \"editName\", name: string): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n save: LoadablePlayerData;\n}\n\n\nconst { save } = toRefs(_props);\n\n\nconst dateFormat = new Intl.DateTimeFormat(\"en-US\", {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n});\n\nconst isEditing = ref(false);\nconst isConfirming = ref(false);\nconst newName = ref(\"\");\n\nwatch(isEditing, () => (newName.value = save.value.name || \"\"));\n\nconst isActive = computed(() => save.value && save.value.id === player.id);\nconst currentTime = computed(() =>\n isActive.value ? player.time : (save.value && save.value.time) || 0\n);\n\nfunction changeName() {\n emit(\"editName\", newName.value);\n isEditing.value = false;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"save\", { active: _unref(isActive) }])\n }, [\n _hoisted_1,\n (!isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createBlock(FeedbackButton, {\n key: 0,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('export'))),\n class: \"button\",\n left: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(Tooltip, {\n display: \"Export\",\n direction: _unref(Direction).Left,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('duplicate'))),\n class: \"button\"\n }, [\n _createVNode(Tooltip, {\n display: \"Duplicate\",\n direction: _unref(Direction).Left,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_4\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(save).error == undefined && !isConfirming.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 2,\n onClick: _cache[2] || (_cache[2] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, [\n _createVNode(Tooltip, {\n display: \"Edit Name\",\n direction: _unref(Direction).Left,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_5\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(DangerButton, {\n disabled: _unref(isActive),\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('delete'))),\n onConfirmingChanged: _cache[4] || (_cache[4] = value => (isConfirming.value = value))\n }, {\n default: _withCtx(() => [\n _createVNode(Tooltip, {\n display: \"Delete\",\n direction: _unref(Direction).Left,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_6\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _: 1\n }, 8, [\"disabled\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n onClick: changeName,\n class: \"button\"\n }, [\n _createVNode(Tooltip, {\n display: \"Save\",\n direction: _unref(Direction).Left,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_8\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"button\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (isEditing.value = !isEditing.value)),\n class: \"button\"\n }, [\n _createVNode(Tooltip, {\n display: \"Cancel\",\n direction: _unref(Direction).Left,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_9\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ])),\n (_unref(save).error == undefined && !isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n _createElementVNode(\"button\", {\n class: \"button open\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (emit('open')))\n }, [\n _createElementVNode(\"h3\", null, _toDisplayString(_unref(save).name), 1)\n ]),\n _createElementVNode(\"span\", _hoisted_11, \"v\" + _toDisplayString(_unref(save).modVersion), 1),\n _hoisted_12,\n (_unref(currentTime))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, \"Last played \" + _toDisplayString(_unref(dateFormat).format(_unref(currentTime))), 1))\n : _createCommentVNode(\"\", true)\n ]))\n : (_unref(save).error == undefined && isEditing.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createVNode(Text, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((newName).value = $event)),\n class: \"editname\",\n onSubmit: changeName\n }, null, 8, [\"modelValue\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n _createTextVNode(\" Error: Failed to load save with id \" + _toDisplayString(_unref(save).id), 1),\n _hoisted_16,\n _createTextVNode(_toDisplayString(_unref(save).error), 1)\n ]))\n ], 2))\n}\n}\n\n})","import script from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Save.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Save.vue?vue&type=style&index=0&id=335ce270&scoped=true&lang=css\"\nimport \"./Save.vue?vue&type=style&index=1&id=335ce270&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-335ce270\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-2bfdf896\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Saves Manager\", -1))\nconst _hoisted_2 = { class: \"modal-footer\" }\nconst _hoisted_3 = { class: \"field\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"field-title\" }, \"Create Save\", -1))\nconst _hoisted_5 = { class: \"field-buttons\" }\nconst _hoisted_6 = { class: \"footer\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\"} }, null, -1))\n\nimport projInfo from \"data/projInfo.json\";\nimport Modal from \"components/Modal.vue\";\nimport player, { PlayerData, stringifySave } from \"game/player\";\nimport settings from \"game/settings\";\nimport { getUniqueID, loadSave, save, newSave } from \"util/save\";\nimport { ComponentPublicInstance, computed, nextTick, ref, shallowReactive, watch } from \"vue\";\nimport Select from \"./fields/Select.vue\";\nimport Text from \"./fields/Text.vue\";\nimport Save from \"./Save.vue\";\nimport Draggable from \"vuedraggable\";\nimport LZString from \"lz-string\";\nimport { ProxyState } from \"util/proxies\";\n\nexport type LoadablePlayerData = Omit<Partial<PlayerData>, \"id\"> & { id: string; error?: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props, { expose }) {\n\nconst isOpen = ref(false);\nconst modal = ref<ComponentPublicInstance<typeof Modal> | null>(null);\n\nexpose({\n open() {\n isOpen.value = true;\n }\n});\n\nconst importingFailed = ref(false);\nconst saveToImport = ref(\"\");\nconst selectedPreset = ref<string | null>(null);\n\nwatch(saveToImport, importedSave => {\n if (importedSave) {\n nextTick(() => {\n try {\n if (importedSave[0] === \"{\") {\n // plaintext. No processing needed\n } else if (importedSave[0] === \"e\") {\n // Assumed to be base64, which starts with e\n importedSave = decodeURIComponent(escape(atob(importedSave)));\n } else if (importedSave[0] === \"ᯡ\") {\n // Assumed to be lz, which starts with ᯡ\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n importedSave = LZString.decompressFromUTF16(importedSave)!;\n } else {\n console.warn(\"Unable to determine preset encoding\", importedSave);\n importingFailed.value = true;\n return;\n }\n const playerData = JSON.parse(importedSave);\n if (typeof playerData !== \"object\") {\n importingFailed.value = true;\n return;\n }\n const id = getUniqueID();\n playerData.id = id;\n save(playerData);\n saveToImport.value = \"\";\n importingFailed.value = false;\n\n settings.saves.push(id);\n } catch (e) {\n importingFailed.value = true;\n }\n });\n } else {\n importingFailed.value = false;\n }\n});\n\nlet bankContext = require.context(\"raw-loader!../../saves\", true, /\\.txt$/);\nlet bank = ref(\n bankContext.keys().reduce((acc: Array<{ label: string; value: string }>, curr) => {\n // .slice(2, -4) strips the leading ./ and the trailing .txt\n acc.push({\n label: curr.slice(2, -4),\n value: bankContext(curr).default\n });\n return acc;\n }, [])\n);\n\nconst cachedSaves = shallowReactive<Record<string, LoadablePlayerData | undefined>>({});\nfunction getCachedSave(id: string) {\n if (cachedSaves[id] == null) {\n let save = localStorage.getItem(id);\n if (save == null) {\n cachedSaves[id] = { error: `Save doesn't exist in localStorage`, id };\n } else if (save === \"dW5kZWZpbmVk\") {\n cachedSaves[id] = { error: `Save is undefined`, id };\n } else {\n try {\n if (save[0] === \"{\") {\n // plaintext. No processing needed\n } else if (save[0] === \"e\") {\n // Assumed to be base64, which starts with e\n save = decodeURIComponent(escape(atob(save)));\n } else if (save[0] === \"ᯡ\") {\n // Assumed to be lz, which starts with ᯡ\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n save = LZString.decompressFromUTF16(save)!;\n } else {\n console.warn(\"Unable to determine preset encoding\", save);\n importingFailed.value = true;\n cachedSaves[id] = { error: \"Unable to determine preset encoding\", id };\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return cachedSaves[id]!;\n }\n cachedSaves[id] = { ...JSON.parse(save), id };\n } catch (error) {\n cachedSaves[id] = { error, id };\n console.warn(\n `SavesManager: Failed to load info about save with id ${id}:\\n${error}\\n${save}`\n );\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return cachedSaves[id]!;\n}\n// Wipe cache whenever the modal is opened\nwatch(isOpen, isOpen => {\n if (isOpen) {\n Object.keys(cachedSaves).forEach(key => delete cachedSaves[key]);\n }\n});\n\nconst saves = computed(() =>\n settings.saves.reduce((acc: Record<string, LoadablePlayerData>, curr: string) => {\n acc[curr] = getCachedSave(curr);\n return acc;\n }, {})\n);\n\nfunction exportSave(id: string) {\n let saveToExport;\n if (player.id === id) {\n saveToExport = stringifySave(player[ProxyState]);\n } else {\n saveToExport = JSON.stringify(saves.value[id]);\n }\n switch (projInfo.exportEncoding) {\n default:\n console.warn(`Unknown save encoding: ${projInfo.exportEncoding}. Defaulting to lz`);\n case \"lz\":\n saveToExport = LZString.compressToUTF16(saveToExport);\n break;\n case \"base64\":\n saveToExport = btoa(unescape(encodeURIComponent(saveToExport)));\n break;\n case \"plain\":\n break;\n }\n\n // Put on clipboard. Using the clipboard API asks for permissions and stuff\n const el = document.createElement(\"textarea\");\n el.value = saveToExport;\n document.body.appendChild(el);\n el.select();\n el.setSelectionRange(0, 99999);\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n}\n\nfunction duplicateSave(id: string) {\n if (player.id === id) {\n save();\n }\n\n const playerData = { ...saves.value[id], id: getUniqueID() };\n save(playerData as PlayerData);\n\n settings.saves.push(playerData.id);\n}\n\nfunction deleteSave(id: string) {\n settings.saves = settings.saves.filter((save: string) => save !== id);\n localStorage.removeItem(id);\n cachedSaves[id] = undefined;\n}\n\nfunction openSave(id: string) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n saves.value[player.id]!.time = player.time;\n save();\n cachedSaves[player.id] = undefined;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n loadSave(saves.value[id]!);\n // Delete cached version in case of opening it again\n cachedSaves[id] = undefined;\n}\n\nfunction newFromPreset(preset: string) {\n // Reset preset dropdown\n selectedPreset.value = preset;\n nextTick(() => {\n selectedPreset.value = null;\n });\n\n if (preset[0] === \"{\") {\n // plaintext. No processing needed\n } else if (preset[0] === \"e\") {\n // Assumed to be base64, which starts with e\n preset = decodeURIComponent(escape(atob(preset)));\n } else if (preset[0] === \"ᯡ\") {\n // Assumed to be lz, which starts with ᯡ\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n preset = LZString.decompressFromUTF16(preset)!;\n } else {\n console.warn(\"Unable to determine preset encoding\", preset);\n return;\n }\n const playerData = JSON.parse(preset);\n playerData.id = getUniqueID();\n save(playerData as PlayerData);\n\n settings.saves.push(playerData.id);\n\n openSave(playerData.id);\n}\n\nfunction editSave(id: string, newName: string) {\n const currSave = saves.value[id];\n if (currSave) {\n currSave.name = newName;\n if (player.id === id) {\n player.name = newName;\n save();\n } else {\n save(currSave as PlayerData);\n cachedSaves[id] = undefined;\n }\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, {\n modelValue: isOpen.value,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((isOpen).value = $event)),\n ref_key: \"modal\",\n ref: modal\n }, {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createBlock(_unref(Draggable), {\n key: 0,\n list: _unref(settings).saves,\n handle: \".handle\",\n itemKey: (save) => save\n }, {\n item: _withCtx(({ element }) => [\n _createVNode(Save, {\n save: _unref(saves)[element],\n onOpen: ($event: any) => (openSave(element)),\n onExport: ($event: any) => (exportSave(element)),\n onEditName: name => editSave(element, name),\n onDuplicate: ($event: any) => (duplicateSave(element)),\n onDelete: ($event: any) => (deleteSave(element))\n }, null, 8, [\"save\", \"onOpen\", \"onExport\", \"onEditName\", \"onDuplicate\", \"onDelete\"])\n ]),\n _: 1\n }, 8, [\"list\", \"itemKey\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(Text, {\n modelValue: saveToImport.value,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((saveToImport).value = $event)),\n title: \"Import Save\",\n placeholder: \"Paste your save here!\",\n class: _normalizeClass({ importingFailed: importingFailed.value })\n }, null, 8, [\"modelValue\", \"class\"]),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"button\", {\n class: \"button\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (openSave(_unref(newSave)().id)))\n }, \"New Game\"),\n (Object.keys(_unref(bank)).length > 0)\n ? (_openBlock(), _createBlock(Select, {\n key: 0,\n options: _unref(bank),\n modelValue: selectedPreset.value,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = preset => newFromPreset(preset as string)),\n closeOnSelect: \"\",\n placeholder: \"Select preset\",\n class: \"presets\"\n }, null, 8, [\"options\", \"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (isOpen.value = false))\n }, \" Close \")\n ])\n ])\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n}\n}\n\n})","import script from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SavesManager.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SavesManager.vue?vue&type=style&index=0&id=2bfdf896&scoped=true&lang=css\"\nimport \"./SavesManager.vue?vue&type=style&index=1&id=2bfdf896&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2bfdf896\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, mergeProps as _mergeProps, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53a1a91d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\", \"alt\"]\nconst _hoisted_2 = {\n key: 1,\n class: \"title\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { style: {\"flex-grow\":\"1\",\"cursor\":\"unset\"} }, null, -1))\nconst _hoisted_4 = { class: \"discord\" }\nconst _hoisted_5 = { class: \"discord-links\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = [\"href\"]\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\nconst _hoisted_10 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_11 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"library_books\", -1))\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"settings\", -1))\nconst _hoisted_17 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"info\", -1))\nconst _hoisted_18 = {\n href: \"https://forums.moddingtree.com/\",\n target: \"_blank\"\n}\nconst _hoisted_19 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons\" }, \"forum\", -1))\nconst _hoisted_20 = { class: \"discord\" }\nconst _hoisted_21 = { class: \"discord-links\" }\nconst _hoisted_22 = { key: 0 }\nconst _hoisted_23 = [\"href\"]\nconst _hoisted_24 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/WzejVAx\",\n target: \"_blank\"\n }, \"The Paper Pilot Community\")\n], -1))\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"li\", null, [\n /*#__PURE__*/_createElementVNode(\"a\", {\n href: \"https://discord.gg/F3xveHV\",\n target: \"_blank\"\n }, \"The Modding Tree\")\n], -1))\n\nimport Changelog from \"data/Changelog.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport { ComponentPublicInstance, ref } from \"vue\";\nimport Info from \"./Info.vue\";\nimport Options from \"./Options.vue\";\nimport SavesManager from \"./SavesManager.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { Direction } from \"util/common\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst info = ref<ComponentPublicInstance<typeof Info> | null>(null);\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\nconst options = ref<ComponentPublicInstance<typeof Options> | null>(null);\n// For some reason Info won't accept the changelog unless I do this:\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst changelog = ref<ComponentPublicInstance<any> | null>(null);\n\nconst { useHeader, banner, title, discordName, discordLink, versionNumber } = projInfo;\n\nfunction openDiscord() {\n window.open(discordLink, \"mywindow\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(useHeader))\n ? (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 0,\n class: \"nav\"\n }, _ctx.$attrs), [\n (_unref(banner))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: _unref(banner),\n class: \"banner\",\n alt: _unref(title)\n }, null, 8, _hoisted_1))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _toDisplayString(_unref(title)), 1)),\n _createElementVNode(\"div\", {\n onClick: _cache[0] || (_cache[0] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(Direction).Down,\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_5, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_6, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_7)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_8,\n _hoisted_9\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_10, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(Direction).Down,\n yoffset: \"5px\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[1] || (_cache[1] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(Direction).Down,\n class: \"info\"\n }, {\n default: _withCtx(() => [\n _hoisted_12\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(Direction).Down,\n xoffset: \"-20px\"\n }, {\n default: _withCtx(() => [\n _hoisted_13\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(Direction).Down,\n xoffset: \"-66px\"\n }, {\n default: _withCtx(() => [\n _hoisted_14\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ], 16))\n : (_openBlock(), _createElementBlock(\"div\", _mergeProps({\n key: 1,\n class: \"overlay-nav\"\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (changelog.value?.open())),\n class: \"version-container\"\n }, [\n _createVNode(Tooltip, {\n display: \"Changelog\",\n direction: _unref(Direction).Right,\n xoffset: \"25%\",\n class: \"version\"\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, \"v\" + _toDisplayString(_unref(versionNumber)), 1)\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[5] || (_cache[5] = ($event: any) => (savesManager.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Saves\",\n direction: _unref(Direction).Right\n }, {\n default: _withCtx(() => [\n _hoisted_15\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[6] || (_cache[6] = ($event: any) => (options.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Options\",\n direction: _unref(Direction).Right\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", {\n onClick: _cache[7] || (_cache[7] = ($event: any) => (info.value?.open()))\n }, [\n _createVNode(Tooltip, {\n display: \"Info\",\n direction: _unref(Direction).Right\n }, {\n default: _withCtx(() => [\n _hoisted_17\n ]),\n _: 1\n }, 8, [\"direction\"])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", _hoisted_18, [\n _createVNode(Tooltip, {\n display: \"Forums\",\n direction: _unref(Direction).Right,\n xoffset: \"7px\"\n }, {\n default: _withCtx(() => [\n _hoisted_19\n ]),\n _: 1\n }, 8, [\"direction\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"span\", {\n onClick: openDiscord,\n class: \"material-icons\"\n }, \"discord\"),\n _createElementVNode(\"ul\", _hoisted_21, [\n (_unref(discordLink) !== 'https://discord.gg/WzejVAx')\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_22, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n target: \"_blank\"\n }, _toDisplayString(_unref(discordName)), 9, _hoisted_23)\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_24,\n _hoisted_25\n ])\n ])\n ], 16)),\n _createVNode(Info, {\n ref_key: \"info\",\n ref: info,\n changelog: changelog.value\n }, null, 8, [\"changelog\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512),\n _createVNode(Options, {\n ref_key: \"options\",\n ref: options\n }, null, 512),\n _createVNode(Changelog, {\n ref_key: \"changelog\",\n ref: changelog\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Nav.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Nav.vue?vue&type=style&index=0&id=53a1a91d&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53a1a91d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-7e494d3c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"inner-tab\" }\n\nimport projInfo from \"data/projInfo.json\";\nimport { GenericLayer, layers } from \"game/layers\";\nimport player from \"game/player\";\nimport { computed, toRef, unref } from \"vue\";\nimport Layer from \"./Layer.vue\";\nimport Nav from \"./Nav.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tabs = toRef(player, \"tabs\");\nconst layerKeys = computed(() => Object.keys(layers));\nconst useHeader = projInfo.useHeader;\n\nfunction gatherLayerProps(layer: GenericLayer) {\n const { display, minimized, minWidth, name, color, minimizable, nodes } = layer;\n return { display, minimized, minWidth, name, color, minimizable, nodes };\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tabs-container\", { useHeader: _unref(useHeader) }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(tabs), (tab, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: index,\n class: _normalizeClass([\"tab\", unref(_unref(layers)[tab]?.classes)]),\n ref_for: true,\n ref: `tab-${index}`,\n style: _normalizeStyle(unref(_unref(layers)[tab]?.style))\n }, [\n (index === 0 && !_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(layerKeys).includes(tab))\n ? (_openBlock(), _createBlock(Layer, _mergeProps({ key: 0 }, gatherLayerProps(_unref(layers)[tab]!), {\n index: index,\n tab: () => ((_ctx.$refs[`tab-${index}`] as HTMLElement[] | undefined)?.[0])\n }), null, 16, [\"index\", \"tab\"]))\n : (_openBlock(), _createBlock(_resolveDynamicComponent(tab), {\n key: 1,\n index: index\n }, null, 8, [\"index\"]))\n ])\n ], 6))\n }), 128))\n ], 2))\n}\n}\n\n})","import script from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Game.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Game.vue?vue&type=style&index=0&id=7e494d3c&scoped=true&lang=css\"\nimport \"./Game.vue?vue&type=style&index=1&id=7e494d3c&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7e494d3c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-06188cc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"game-over-modal-header\" }\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { class: \"game-over-modal-title\" }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"Congratulations!\", -1))\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", null, \" Please check the Discord to discuss the game or to check for new content updates! \", -1))\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_9 = [\"href\"]\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons game-over-modal-discord\" }, \"discord\", -1))\n\nimport Modal from \"components/Modal.vue\";\nimport { hasWon } from \"data/projEntry\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport { formatTime } from \"util/bignum\";\nimport { loadSave, newSave } from \"util/save\";\nimport { computed, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { title, logo, discordName, discordLink, versionNumber, versionTitle } = projInfo;\n\nconst timePlayed = computed(() => formatTime(player.timePlayed));\nconst isOpen = computed(() => hasWon.value && !player.keepGoing);\nconst autosave = toRef(player, \"autosave\");\n\nfunction keepGoing() {\n player.keepGoing = true;\n}\n\nfunction playAgain() {\n loadSave(newSave());\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(Modal, { \"model-value\": _unref(isOpen) }, {\n header: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n (_unref(logo))\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n class: \"game-over-modal-logo\",\n src: _unref(logo),\n alt: _unref(title)\n }, null, 8, _hoisted_2))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createElementVNode(\"h4\", null, \"You've beaten \" + _toDisplayString(_unref(title)) + \" v\" + _toDisplayString(_unref(versionNumber)) + \": \" + _toDisplayString(_unref(versionTitle)), 1)\n ])\n ])\n ]),\n body: _withCtx(({ shown }) => [\n shown\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", null, \"It took you \" + _toDisplayString(_unref(timePlayed)) + \" to beat the game.\", 1),\n _hoisted_6,\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"game-over-modal-discord-link\"\n }, [\n _hoisted_10,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_9)\n ]),\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", { class: \"game-over-footer\" }, [\n _createElementVNode(\"button\", {\n onClick: keepGoing,\n class: \"button\"\n }, \"Keep Going\"),\n _createElementVNode(\"button\", {\n onClick: playAgain,\n class: \"button danger\"\n }, \"Play Again\")\n ])\n ]),\n _: 1\n }, 8, [\"model-value\"]))\n}\n}\n\n})","import script from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GameOverScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GameOverScreen.vue?vue&type=style&index=0&id=06188cc8&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-06188cc8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, isRef as _isRef, createVNode as _createVNode, createBlock as _createBlock, mergeProps as _mergeProps, withCtx as _withCtx, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5935214c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"nan-modal-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", null, \"NaN value detected!\")\n], -1))\nconst _hoisted_2 = { key: 0 }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_4 = [\"href\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"material-icons nan-modal-discord\" }, \"discord\", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_7 = { class: \"nan-footer\" }\n\nimport Modal from \"components/Modal.vue\";\nimport projInfo from \"data/projInfo.json\";\nimport player from \"game/player\";\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { ComponentPublicInstance, computed, ref, toRef } from \"vue\";\nimport Toggle from \"./fields/Toggle.vue\";\nimport SavesManager from \"./SavesManager.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst { discordName, discordLink } = projInfo;\nconst autosave = toRef(player, \"autosave\");\nconst hasNaN = toRef(state, \"hasNaN\");\nconst savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);\n\nconst path = computed(() => state.NaNPath?.join(\".\"));\nconst property = computed(() => state.NaNPath?.slice(-1)[0]);\nconst previous = computed<DecimalSource | null>(() => {\n if (state.NaNReceiver && property.value) {\n return state.NaNReceiver[property.value] as DecimalSource;\n }\n return null;\n});\nconst isPaused = computed({\n get() {\n return player.devSpeed === 0;\n },\n set(value: boolean) {\n player.devSpeed = value ? null : 0;\n }\n});\n\nfunction setZero() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(0);\n state.hasNaN = false;\n }\n}\n\nfunction setOne() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(1);\n state.hasNaN = false;\n }\n}\n\nfunction ignore() {\n if (state.NaNReceiver && property.value) {\n state.NaNReceiver[property.value] = new Decimal(NaN);\n state.hasNaN = false;\n }\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(Modal, _mergeProps({\n modelValue: _unref(hasNaN),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(hasNaN) ? (hasNaN).value = $event : null))\n }, _ctx.$attrs), {\n header: _withCtx(() => [\n _hoisted_1\n ]),\n body: _withCtx(() => [\n _createElementVNode(\"div\", null, [\n _createTextVNode(\" Attempted to assign \\\"\" + _toDisplayString(_unref(path)) + \"\\\" to NaN\", 1),\n (_unref(previous))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(\" \") + \"(previously \" + _toDisplayString(_unref(format)(_unref(previous))) + \")\", 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\". Auto-saving has been \" + _toDisplayString(_unref(autosave) ? \"enabled\" : \"disabled\") + \". Check the console for more details, and consider sharing it with the developers on discord. \", 1)\n ]),\n _hoisted_3,\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"a\", {\n href: _unref(discordLink),\n class: \"nan-modal-discord-link\"\n }, [\n _hoisted_5,\n _createTextVNode(\" \" + _toDisplayString(_unref(discordName)), 1)\n ], 8, _hoisted_4)\n ]),\n _hoisted_6,\n _createVNode(Toggle, {\n title: \"Autosave\",\n modelValue: _unref(autosave),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(autosave) ? (autosave).value = $event : null))\n }, null, 8, [\"modelValue\"]),\n (_unref(projInfo).enablePausing)\n ? (_openBlock(), _createBlock(Toggle, {\n key: 0,\n title: \"Pause game\",\n modelValue: _unref(isPaused),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(isPaused) ? (isPaused).value = $event : null))\n }, null, 8, [\"modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]),\n footer: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n onClick: _cache[2] || (_cache[2] = ($event: any) => (savesManager.value?.open())),\n class: \"button\"\n }, \"Open Saves Manager\"),\n _createElementVNode(\"button\", {\n onClick: setZero,\n class: \"button\"\n }, \"Set to 0\"),\n _createElementVNode(\"button\", {\n onClick: setOne,\n class: \"button\"\n }, \"Set to 1\"),\n (_unref(previous) && _unref(Decimal).neq(_unref(previous), 0) && _unref(Decimal).neq(_unref(previous), 1))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (hasNaN.value = false)),\n class: \"button\"\n }, \" Set to previous \"))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"button\", {\n onClick: ignore,\n class: \"button danger\"\n }, \"Ignore\")\n ])\n ]),\n _: 1\n }, 16, [\"modelValue\"]),\n _createVNode(SavesManager, {\n ref_key: \"savesManager\",\n ref: savesManager\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./NaNScreen.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./NaNScreen.vue?vue&type=style&index=0&id=5935214c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5935214c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c0663118\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"tpsDisplay\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"low\"\n}\n\nimport state from \"game/state\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { computed, ref, watchEffect } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst tps = computed(() =>\n Decimal.div(\n state.lastTenTicks.length,\n state.lastTenTicks.reduce((acc, curr) => acc + curr, 0)\n )\n);\n\nconst lastTenFPS = ref<number[]>([]);\nwatchEffect(() => {\n lastTenFPS.value.push(Math.round(tps.value.toNumber()));\n if (lastTenFPS.value.length > 10) {\n lastTenFPS.value = lastTenFPS.value.slice(1);\n }\n});\n\nconst low = computed(() =>\n lastTenFPS.value.reduce<DecimalSource>((acc, curr) => Decimal.max(acc, curr), 0)\n);\n\nconst showLow = computed(() => Decimal.sub(tps.value, low.value).gt(1));\n\nreturn (_ctx: any,_cache: any) => {\n return (!_unref(tps).isNan())\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createTextVNode(\" TPS: \" + _toDisplayString(_unref(formatWhole)(_unref(tps))) + \" \", 1),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_unref(showLow))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(_unref(formatWhole)(_unref(low))), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./TPS.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./TPS.vue?vue&type=style&index=0&id=c0663118&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c0663118\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { jsx } from \"features/feature\";\nimport { coerceComponent, render } from \"util/vue\";\nimport { computed, toRef, unref } from \"vue\";\nimport Game from \"./components/Game.vue\";\nimport GameOverScreen from \"./components/GameOverScreen.vue\";\nimport NaNScreen from \"./components/NaNScreen.vue\";\nimport Nav from \"./components/Nav.vue\";\nimport TPS from \"./components/TPS.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport themes from \"./data/themes\";\nimport settings, { gameComponents } from \"./game/settings\";\nimport \"./main.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst useHeader = projInfo.useHeader;\nconst theme = computed(() => themes[settings.theme].variables);\nconst showTPS = toRef(settings, \"showTPS\");\n\nconst gameComponent = computed(() => {\n return coerceComponent(jsx(() => <>{gameComponents.map(render)}</>));\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", {\n id: \"modal-root\",\n style: _normalizeStyle(_unref(theme))\n }, null, 4),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"app\", { useHeader: _unref(useHeader) }]),\n style: _normalizeStyle(_unref(theme))\n }, [\n (_unref(useHeader))\n ? (_openBlock(), _createBlock(Nav, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(Game),\n (unref(_unref(showTPS)))\n ? (_openBlock(), _createBlock(TPS, { key: 1 }))\n : _createCommentVNode(\"\", true),\n _createVNode(GameOverScreen),\n _createVNode(NaNScreen),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(gameComponent))))\n ], 6)\n ], 64))\n}\n}\n\n})","import script from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\nexport * from \"./App.vue?vue&type=script&setup=true&lang=tsx\"\n\nimport \"./App.vue?vue&type=style&index=0&id=f13f28b6&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-f13f28b6\"]])\n\nexport default __exports__","import { App as VueApp, createApp } from \"vue\";\nimport App from \"./App.vue\";\nimport projInfo from \"./data/projInfo.json\";\nimport { GenericLayer } from \"./game/layers\";\nimport { PlayerData } from \"./game/player\";\nimport { Settings } from \"./game/settings\";\nimport { Transient } from \"./game/state\";\nimport Decimal, { DecimalSource } from \"./util/bignum\";\nimport { load } from \"./util/save\";\n\ndocument.title = projInfo.title;\nif (projInfo.id === \"\") {\n throw \"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json\";\n}\n\ndeclare global {\n interface Window {\n vue: VueApp;\n save: VoidFunction;\n hardReset: VoidFunction;\n hardResetSettings: VoidFunction;\n layers: Record<string, Readonly<GenericLayer> | undefined>;\n player: PlayerData;\n state: Transient;\n settings: Settings;\n Decimal: typeof Decimal;\n exponentialFormat: (num: DecimalSource, precision: number, mantissa: boolean) => string;\n commaFormat: (num: DecimalSource, precision: number) => string;\n regularFormat: (num: DecimalSource, precision: number) => string;\n format: (num: DecimalSource, precision?: number, small?: boolean) => string;\n formatWhole: (num: DecimalSource) => string;\n formatTime: (s: number) => string;\n toPlaces: (x: DecimalSource, precision: number, maxAccepted: DecimalSource) => string;\n formatSmall: (x: DecimalSource, precision?: number) => string;\n invertOOM: (x: DecimalSource) => Decimal;\n projInfo: typeof projInfo;\n }\n}\n\nrequestAnimationFrame(async () => {\n console.log(\n \"%cMade in Profectus%c\\nLearn more at www.moddingtree.com\",\n \"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;\",\n \"padding: 4px;\"\n );\n await load();\n const { globalBus, startGameLoop } = await require(\"./game/events\");\n\n // Create Vue\n const vue = (window.vue = createApp(App));\n globalBus.emit(\"setupVue\", vue);\n vue.mount(\"#app\");\n\n startGameLoop();\n});\n\nwindow.projInfo = projInfo;\n","/* eslint-disable @typescript-eslint/no-this-alias */\nexport type CompareResult = -1 | 0 | 1;\n\nconst MAX_SIGNIFICANT_DIGITS = 17; //Maximum number of digits of precision to assume in Number\n\nconst EXP_LIMIT = 9e15; //If we're ABOVE this value, increase a layer. (9e15 is close to the largest integer that can fit in a Number.)\n\nconst LAYER_DOWN: number = Math.log10(9e15);\n\nconst FIRST_NEG_LAYER = 1 / 9e15; //At layer 0, smaller non-zero numbers than this become layer 1 numbers with negative mag. After that the pattern continues as normal.\n\nconst NUMBER_EXP_MAX = 308; //The largest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst NUMBER_EXP_MIN = -324; //The smallest exponent that can appear in a Number, though not all mantissas are valid here.\n\nconst MAX_ES_IN_A_ROW = 5; //For default toString behaviour, when to swap from eee... to (e^n) syntax.\n\nconst IGNORE_COMMAS = true;\nconst COMMAS_ARE_DECIMAL_POINTS = false;\n\nconst powerOf10 = (function() {\n // We need this lookup table because Math.pow(10, exponent)\n // when exponent's absolute value is large is slightly inaccurate.\n // You can fix it with the power of math... or just make a lookup table.\n // Faster AND simpler\n const powersOf10: number[] = [];\n\n for (let i = NUMBER_EXP_MIN + 1; i <= NUMBER_EXP_MAX; i++) {\n powersOf10.push(Number(\"1e\" + i));\n }\n\n const indexOf0InPowersOf10 = 323;\n return function(power: number) {\n return powersOf10[power + indexOf0InPowersOf10];\n };\n})();\n\n//tetration/slog to real height stuff\n//background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\nconst critical_headers = [2, Math.E, 3, 4, 5, 6, 7, 8, 9, 10];\nconst critical_tetr_values = [\n [\n // Base 2\n 1,\n 1.0891168053867777,\n 1.1789745164521264,\n 1.2701428397304229,\n 1.3632066654400328,\n 1.4587804913784246,\n 1.557523817412741,\n 1.660158301473385,\n 1.767487542936873,\n 1.8804205225512542,\n 2\n ],\n [\n // Base E\n 1, //0.0\n 1.1121114330934, //0.1\n 1.23103892493161, //0.2\n 1.35838369631113, //0.3\n 1.49605193039935, //0.4\n 1.64635423375119, //0.5\n 1.81213853570186, //0.6\n 1.99697132461829, //0.7\n 2.20538955455724, //0.8\n 2.44325744833852, //0.9\n Math.E //1.0\n ],\n [\n // Base 3\n 1,\n 1.1187738849693603,\n 1.2464963939368214,\n 1.38527004705667,\n 1.5376664685821402,\n 1.7068895236551784,\n 1.897001227148399,\n 2.1132403089001035,\n 2.362480153784171,\n 2.6539010333870774,\n 3\n ],\n [\n // Base 4\n 1,\n 1.1367350847096405,\n 1.2889510672956703,\n 1.4606478703324786,\n 1.6570295196661111,\n 1.8850062585672889,\n 2.1539465047453485,\n 2.476829779693097,\n 2.872061932789197,\n 3.3664204535587183,\n 4\n ],\n [\n // Base 5\n 1,\n 1.1494592900767588,\n 1.319708228183931,\n 1.5166291280087583,\n 1.748171114438024,\n 2.0253263297298045,\n 2.3636668498288547,\n 2.7858359149579424,\n 3.3257226212448145,\n 4.035730287722532,\n 5\n ],\n [\n // Base 6\n 1,\n 1.159225940787673,\n 1.343712473580932,\n 1.5611293155111927,\n 1.8221199554561318,\n 2.14183924486326,\n 2.542468319282638,\n 3.0574682501653316,\n 3.7390572020926873,\n 4.6719550537360774,\n 6\n ],\n [\n // Base 7\n 1,\n 1.1670905356972596,\n 1.3632807444991446,\n 1.5979222279405536,\n 1.8842640123816674,\n 2.2416069644878687,\n 2.69893426559423,\n 3.3012632110403577,\n 4.121250340630164,\n 5.281493033448316,\n 7\n ],\n [\n // Base 8\n 1,\n 1.1736630594087796,\n 1.379783782386201,\n 1.6292821855668218,\n 1.9378971836180754,\n 2.3289975651071977,\n 2.8384347394720835,\n 3.5232708454565906,\n 4.478242031114584,\n 5.868592169644505,\n 8\n ],\n [\n // Base 9\n 1,\n 1.1793017514670474,\n 1.394054150657457,\n 1.65664127441059,\n 1.985170999970283,\n 2.4069682290577457,\n 2.9647310119960752,\n 3.7278665320924946,\n 4.814462547283592,\n 6.436522247411611,\n 9\n ],\n [\n // Base 10\n 1,\n 1.18422737399915,\n 1.4066113788546144,\n 1.680911177655277,\n 2.027492094355525,\n 2.4775152854601967,\n 3.080455730250329,\n 3.918234505962507,\n 5.1332705696484595,\n 6.9878696918072905,\n 10\n ]\n];\nconst critical_slog_values = [\n [\n // Base 2\n -1,\n -0.9194161097107025,\n -0.8335625019330468,\n -0.7425599821143978,\n -0.6466611521029437,\n -0.5462617907227869,\n -0.4419033816638769,\n -0.3342645487554494,\n -0.224140440909962,\n -0.11241087890006762,\n 0\n ],\n [\n // Base E\n -1, //0.0\n -0.90603157029014, //0.1\n -0.80786507256596, //0.2\n -0.7064666939634, //0.3\n -0.60294836853664, //0.4\n -0.49849837513117, //0.5\n -0.39430303318768, //0.6\n -0.29147201034755, //0.7\n -0.19097820800866, //0.8\n -0.09361896280296, //0.9\n 0 //1.0\n ],\n [\n // Base 3\n -1,\n -0.9021579584316141,\n -0.8005762598234203,\n -0.6964780623319391,\n -0.5911906810998454,\n -0.486050182576545,\n -0.3823089430815083,\n -0.28106046722897615,\n -0.1831906535795894,\n -0.08935809204418144,\n 0\n ],\n [\n // Base 4\n -1,\n -0.8917227442365535,\n -0.781258746326964,\n -0.6705130326902455,\n -0.5612813129406509,\n -0.4551067709033134,\n -0.35319256652135966,\n -0.2563741554088552,\n -0.1651412821106526,\n -0.0796919581982668,\n 0\n ],\n [\n // Base 5\n -1,\n -0.8843387974366064,\n -0.7678744063886243,\n -0.6529563724510552,\n -0.5415870994657841,\n -0.4352842206588936,\n -0.33504449124791424,\n -0.24138853420685147,\n -0.15445285440944467,\n -0.07409659641336663,\n 0\n ],\n [\n // Base 6\n -1,\n -0.8786709358426346,\n -0.7577735191184886,\n -0.6399546189952064,\n -0.527284921869926,\n -0.4211627631006314,\n -0.3223479611761232,\n -0.23107655627789858,\n -0.1472057700818259,\n -0.07035171210706326,\n 0\n ],\n [\n // Base 7\n -1,\n -0.8740862815291583,\n -0.7497032990976209,\n -0.6297119746181752,\n -0.5161838335958787,\n -0.41036238255751956,\n -0.31277212146489963,\n -0.2233976621705518,\n -0.1418697367979619,\n -0.06762117662323441,\n 0\n ],\n [\n // Base 8\n -1,\n -0.8702632331800649,\n -0.7430366914122081,\n -0.6213373075161548,\n -0.5072025698095242,\n -0.40171437727184167,\n -0.30517930701410456,\n -0.21736343968190863,\n -0.137710238299109,\n -0.06550774483471955,\n 0\n ],\n [\n // Base 9\n -1,\n -0.8670016295947213,\n -0.7373984232432306,\n -0.6143173985094293,\n -0.49973884395492807,\n -0.394584953527678,\n -0.2989649949848695,\n -0.21245647317021688,\n -0.13434688362382652,\n -0.0638072667348083,\n 0\n ],\n [\n // Base 10\n -1,\n -0.8641642839543857,\n -0.732534623168535,\n -0.6083127477059322,\n -0.4934049257184696,\n -0.3885773075899922,\n -0.29376029055315767,\n -0.2083678561173622,\n -0.13155653399373268,\n -0.062401588652553186,\n 0\n ]\n];\n\nconst D = function D(value: DecimalSource): Decimal {\n return Decimal.fromValue_noAlloc(value);\n};\n\nconst FC = function(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents(sign, layer, mag);\n};\n\nconst FC_NN = function FC_NN(sign: number, layer: number, mag: number) {\n return Decimal.fromComponents_noNormalize(sign, layer, mag);\n};\n\nconst ME = function ME(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent(mantissa, exponent);\n};\n\nconst ME_NN = function ME_NN(mantissa: number, exponent: number) {\n return Decimal.fromMantissaExponent_noNormalize(mantissa, exponent);\n};\n\nconst decimalPlaces = function decimalPlaces(value: number, places: number): number {\n const len = places + 1;\n const numDigits = Math.ceil(Math.log10(Math.abs(value)));\n const rounded =\n Math.round(value * Math.pow(10, len - numDigits)) * Math.pow(10, numDigits - len);\n return parseFloat(rounded.toFixed(Math.max(len - numDigits, 0)));\n};\n\nconst f_maglog10 = function(n: number) {\n return Math.sign(n) * Math.log10(Math.abs(n));\n};\n\n//from HyperCalc source code\nconst f_gamma = function(n: number) {\n if (!isFinite(n)) {\n return n;\n }\n if (n < -50) {\n if (n === Math.trunc(n)) {\n return Number.NEGATIVE_INFINITY;\n }\n return 0;\n }\n\n let scal1 = 1;\n while (n < 10) {\n scal1 = scal1 * n;\n ++n;\n }\n\n n -= 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (n + 0.5) * Math.log(n);\n l = l - n;\n const n2 = n * n;\n let np = n;\n l = l + 1 / (12 * np);\n np = np * n2;\n l = l + 1 / (360 * np);\n np = np * n2;\n l = l + 1 / (1260 * np);\n np = np * n2;\n l = l + 1 / (1680 * np);\n np = np * n2;\n l = l + 1 / (1188 * np);\n np = np * n2;\n l = l + 691 / (360360 * np);\n np = np * n2;\n l = l + 7 / (1092 * np);\n np = np * n2;\n l = l + 3617 / (122400 * np);\n\n return Math.exp(l) / scal1;\n};\n\nconst _twopi = 6.2831853071795864769252842; // 2*pi\nconst _EXPN1 = 0.36787944117144232159553; // exp(-1)\nconst OMEGA = 0.56714329040978387299997; // W(1, 0)\n//from https://math.stackexchange.com/a/465183\n// The evaluation can become inaccurate very close to the branch point\nconst f_lambertw = function(z: number, tol = 1e-10): number {\n let w;\n let wn;\n\n if (!Number.isFinite(z)) {\n return z;\n }\n if (z === 0) {\n return z;\n }\n if (z === 1) {\n return OMEGA;\n }\n\n if (z < 10) {\n w = 0;\n } else {\n w = Math.log(z) - Math.log(Math.log(z));\n }\n\n for (let i = 0; i < 100; ++i) {\n wn = (z * Math.exp(-w) + w * w) / (w + 1);\n if (Math.abs(wn - w) < tol * Math.abs(wn)) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Number.NaN;\n};\n\n//from https://github.com/scipy/scipy/blob/8dba340293fe20e62e173bdf2c10ae208286692f/scipy/special/lambertw.pxd\n// The evaluation can become inaccurate very close to the branch point\n// at ``-1/e``. In some corner cases, `lambertw` might currently\n// fail to converge, or can end up on the wrong branch.\nfunction d_lambertw(z: Decimal, tol = 1e-10): Decimal {\n let w;\n let ew, wew, wewz, wn;\n\n if (!Number.isFinite(z.mag)) {\n return z;\n }\n if (z === Decimal.dZero) {\n return z;\n }\n if (z === Decimal.dOne) {\n //Split out this case because the asymptotic series blows up\n return D(OMEGA);\n }\n\n const absz = Decimal.abs(z);\n //Get an initial guess for Halley's method\n w = Decimal.ln(z);\n\n //Halley's method; see 5.9 in [1]\n\n for (let i = 0; i < 100; ++i) {\n ew = Decimal.exp(-w);\n wewz = w.sub(z.mul(ew));\n wn = w.sub(\n wewz.div(\n w.add(1).sub(\n w\n .add(2)\n .mul(wewz)\n .div(Decimal.mul(2, w).add(2))\n )\n )\n );\n if (Decimal.abs(wn.sub(w)).lt(Decimal.abs(wn).mul(tol))) {\n return wn;\n } else {\n w = wn;\n }\n }\n\n throw Error(`Iteration failed to converge: ${z.toString()}`);\n //return Decimal.dNaN;\n}\n\nexport type DecimalSource = Decimal | number | string;\n\n/**\n * The Decimal's value is simply mantissa * 10^exponent.\n */\nexport default class Decimal {\n public static readonly dZero = FC_NN(0, 0, 0);\n public static readonly dOne = FC_NN(1, 0, 1);\n public static readonly dNegOne = FC_NN(-1, 0, 1);\n public static readonly dTwo = FC_NN(1, 0, 2);\n public static readonly dTen = FC_NN(1, 0, 10);\n public static readonly dNaN = FC_NN(Number.NaN, Number.NaN, Number.NaN);\n public static readonly dInf = FC_NN(1, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);\n public static readonly dNegInf = FC_NN(-1, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);\n public static readonly dNumberMax = FC(1, 0, Number.MAX_VALUE);\n public static readonly dNumberMin = FC(1, 0, Number.MIN_VALUE);\n\n public sign: number = Number.NaN;\n public mag: number = Number.NaN;\n public layer: number = Number.NaN;\n\n constructor(value?: DecimalSource) {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n this.fromDecimal(value);\n } else if (typeof value === \"number\") {\n this.fromNumber(value);\n } else if (typeof value === \"string\") {\n this.fromString(value);\n } else {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n }\n }\n\n get m(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n const exp = Math.floor(Math.log10(this.mag));\n //handle special case 5e-324\n let man;\n if (this.mag === 5e-324) {\n man = 5;\n } else {\n man = this.mag / powerOf10(exp);\n }\n return this.sign * man;\n } else if (this.layer === 1) {\n const residue = this.mag - Math.floor(this.mag);\n return this.sign * Math.pow(10, residue);\n } else {\n //mantissa stops being relevant past 1e9e15 / ee15.954\n return this.sign;\n }\n }\n\n set m(value: number) {\n if (this.layer <= 2) {\n this.fromMantissaExponent(value, this.e);\n } else {\n //don't even pretend mantissa is meaningful\n this.sign = Math.sign(value);\n if (this.sign === 0) {\n this.layer === 0;\n this.exponent === 0;\n }\n }\n }\n\n get e(): number {\n if (this.sign === 0) {\n return 0;\n } else if (this.layer === 0) {\n return Math.floor(Math.log10(this.mag));\n } else if (this.layer === 1) {\n return Math.floor(this.mag);\n } else if (this.layer === 2) {\n return Math.floor(Math.sign(this.mag) * Math.pow(10, Math.abs(this.mag)));\n } else {\n return this.mag * Number.POSITIVE_INFINITY;\n }\n }\n set e(value: number) {\n this.fromMantissaExponent(this.m, value);\n }\n\n get s(): number {\n return this.sign;\n }\n set s(value: number) {\n if (value === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n } else {\n this.sign = value;\n }\n }\n\n // Object.defineProperty(Decimal.prototype, \"mantissa\", {\n get mantissa(): number {\n return this.m;\n }\n\n set mantissa(value: number) {\n this.m = value;\n }\n\n get exponent(): number {\n return this.e;\n }\n set exponent(value: number) {\n this.e = value;\n }\n\n public static fromComponents(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents(sign, layer, mag);\n }\n\n public static fromComponents_noNormalize(sign: number, layer: number, mag: number): Decimal {\n return new Decimal().fromComponents_noNormalize(sign, layer, mag);\n }\n\n public static fromMantissaExponent(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent(mantissa, exponent);\n }\n\n public static fromMantissaExponent_noNormalize(mantissa: number, exponent: number): Decimal {\n return new Decimal().fromMantissaExponent_noNormalize(mantissa, exponent);\n }\n\n public static fromDecimal(value: Decimal): Decimal {\n return new Decimal().fromDecimal(value);\n }\n\n public static fromNumber(value: number): Decimal {\n return new Decimal().fromNumber(value);\n }\n\n public static fromString(value: string): Decimal {\n return new Decimal().fromString(value);\n }\n\n public static fromValue(value: DecimalSource): Decimal {\n return new Decimal().fromValue(value);\n }\n\n public static fromValue_noAlloc(value: DecimalSource): Decimal {\n return value instanceof Decimal ? value : new Decimal(value);\n }\n\n public static abs(value: DecimalSource): Decimal {\n return D(value).abs();\n }\n\n public static neg(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negate(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static negated(value: DecimalSource): Decimal {\n return D(value).neg();\n }\n\n public static sign(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static sgn(value: DecimalSource): number {\n return D(value).sign;\n }\n\n public static round(value: DecimalSource): Decimal {\n return D(value).round();\n }\n\n public static floor(value: DecimalSource): Decimal {\n return D(value).floor();\n }\n\n public static ceil(value: DecimalSource): Decimal {\n return D(value).ceil();\n }\n\n public static trunc(value: DecimalSource): Decimal {\n return D(value).trunc();\n }\n\n public static add(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static plus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).add(other);\n }\n\n public static sub(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static subtract(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static minus(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).sub(other);\n }\n\n public static mul(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static multiply(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static times(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).mul(other);\n }\n\n public static div(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static divide(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).div(other);\n }\n\n public static recip(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocal(value: DecimalSource): Decimal {\n return D(value).recip();\n }\n\n public static reciprocate(value: DecimalSource): Decimal {\n return D(value).reciprocate();\n }\n\n public static cmp(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static cmpabs(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmpabs(other);\n }\n\n public static compare(value: DecimalSource, other: DecimalSource): CompareResult {\n return D(value).cmp(other);\n }\n\n public static isNaN(value: DecimalSource): boolean {\n value = D(value);\n return isNaN(value.sign) || isNaN(value.layer) || isNaN(value.mag);\n }\n\n public static isFinite(value: DecimalSource): boolean {\n value = D(value);\n return isFinite(value.sign) && isFinite(value.layer) && isFinite(value.mag);\n }\n\n public static eq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static equals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).eq(other);\n }\n\n public static neq(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).neq(other);\n }\n\n public static notEquals(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).notEquals(other);\n }\n\n public static lt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lt(other);\n }\n\n public static lte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).lte(other);\n }\n\n public static gt(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gt(other);\n }\n\n public static gte(value: DecimalSource, other: DecimalSource): boolean {\n return D(value).gte(other);\n }\n\n public static max(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).max(other);\n }\n\n public static min(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).min(other);\n }\n\n public static minabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).minabs(other);\n }\n\n public static maxabs(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).maxabs(other);\n }\n\n public static clamp(value: DecimalSource, min: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clamp(min, max);\n }\n\n public static clampMin(value: DecimalSource, min: DecimalSource): Decimal {\n return D(value).clampMin(min);\n }\n\n public static clampMax(value: DecimalSource, max: DecimalSource): Decimal {\n return D(value).clampMax(max);\n }\n\n public static cmp_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static compare_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): CompareResult {\n return D(value).cmp_tolerance(other, tolerance);\n }\n\n public static eq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static equals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).eq_tolerance(other, tolerance);\n }\n\n public static neq_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).neq_tolerance(other, tolerance);\n }\n\n public static notEquals_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).notEquals_tolerance(other, tolerance);\n }\n\n public static lt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lt_tolerance(other, tolerance);\n }\n\n public static lte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).lte_tolerance(other, tolerance);\n }\n\n public static gt_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gt_tolerance(other, tolerance);\n }\n\n public static gte_tolerance(\n value: DecimalSource,\n other: DecimalSource,\n tolerance: number\n ): boolean {\n return D(value).gte_tolerance(other, tolerance);\n }\n\n public static pLog10(value: DecimalSource): Decimal {\n return D(value).pLog10();\n }\n\n public static absLog10(value: DecimalSource): Decimal {\n return D(value).absLog10();\n }\n\n public static log10(value: DecimalSource): Decimal {\n return D(value).log10();\n }\n\n public static log(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).log(base);\n }\n\n public static log2(value: DecimalSource): Decimal {\n return D(value).log2();\n }\n\n public static ln(value: DecimalSource): Decimal {\n return D(value).ln();\n }\n\n public static logarithm(value: DecimalSource, base: DecimalSource): Decimal {\n return D(value).logarithm(base);\n }\n\n public static pow(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).pow(other);\n }\n\n public static pow10(value: DecimalSource): Decimal {\n return D(value).pow10();\n }\n\n public static root(value: DecimalSource, other: DecimalSource): Decimal {\n return D(value).root(other);\n }\n\n public static factorial(value: DecimalSource, _other?: never): Decimal {\n return D(value).factorial();\n }\n\n public static gamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).gamma();\n }\n\n public static lngamma(value: DecimalSource, _other?: never): Decimal {\n return D(value).lngamma();\n }\n\n public static exp(value: DecimalSource): Decimal {\n return D(value).exp();\n }\n\n public static sqr(value: DecimalSource): Decimal {\n return D(value).sqr();\n }\n\n public static sqrt(value: DecimalSource): Decimal {\n return D(value).sqrt();\n }\n\n public static cube(value: DecimalSource): Decimal {\n return D(value).cube();\n }\n\n public static cbrt(value: DecimalSource): Decimal {\n return D(value).cbrt();\n }\n\n public static tetrate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).tetrate(height, payload);\n }\n\n public static iteratedexp(value: DecimalSource, height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return D(value).iteratedexp(height, payload);\n }\n\n public static iteratedlog(value: DecimalSource, base: DecimalSource = 10, times = 1): Decimal {\n return D(value).iteratedlog(base, times);\n }\n\n public static layeradd10(value: DecimalSource, diff: DecimalSource): Decimal {\n return D(value).layeradd10(diff);\n }\n\n public static layeradd(value: DecimalSource, diff: number, base = 10): Decimal {\n return D(value).layeradd(diff, base);\n }\n\n public static slog(value: DecimalSource, base = 10): Decimal {\n return D(value).slog(base);\n }\n\n public static lambertw(value: DecimalSource): Decimal {\n return D(value).lambertw();\n }\n\n public static ssqrt(value: DecimalSource): Decimal {\n return D(value).ssqrt();\n }\n\n public static pentate(\n value: DecimalSource,\n height = 2,\n payload: DecimalSource = FC_NN(1, 0, 1)\n ): Decimal {\n return D(value).pentate(height, payload);\n }\n\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something\n * with exponentially increasing cost each purchase (start at priceStart,\n * multiply by priceRatio, already own currentOwned), how much of it can you buy?\n * Adapted from Trimps source code.\n */\n\n public static affordGeometricSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordGeometricSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceRatio),\n currentOwned\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it multiplies by priceRatio each purchase?\n */\n\n public static sumGeometricSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceRatio: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumGeometricSeries_core(numItems, D(priceStart), D(priceRatio), currentOwned);\n }\n /**\n * If you're willing to spend 'resourcesAvailable' and want to buy something with additively\n * increasing cost each purchase (start at priceStart, add by priceAdd, already own currentOwned),\n * how much of it can you buy?\n */\n\n public static affordArithmeticSeries(\n resourcesAvailable: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.affordArithmeticSeries_core(\n D(resourcesAvailable),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * How much resource would it cost to buy (numItems) items if you already have currentOwned,\n * the initial price is priceStart and it adds priceAdd each purchase?\n * Adapted from http://www.mathwords.com/a/arithmetic_series.htm\n */\n\n public static sumArithmeticSeries(\n numItems: DecimalSource,\n priceStart: DecimalSource,\n priceAdd: DecimalSource,\n currentOwned: DecimalSource\n ): Decimal {\n return this.sumArithmeticSeries_core(\n D(numItems),\n D(priceStart),\n D(priceAdd),\n D(currentOwned)\n );\n }\n /**\n * When comparing two purchases that cost (resource) and increase your resource/sec by (deltaRpS),\n * the lowest efficiency score is the better one to purchase.\n * From Frozen Cookies:\n * http://cookieclicker.wikia.com/wiki/Frozen_Cookies_(JavaScript_Add-on)#Efficiency.3F_What.27s_that.3F\n */\n\n public static efficiencyOfPurchase(\n cost: DecimalSource,\n currentRpS: DecimalSource,\n deltaRpS: DecimalSource\n ): Decimal {\n return this.efficiencyOfPurchase_core(D(cost), D(currentRpS), D(deltaRpS));\n }\n\n public static randomDecimalForTesting(maxLayers: number): Decimal {\n // NOTE: This doesn't follow any kind of sane random distribution, so use this for testing purposes only.\n //5% of the time, return 0\n if (Math.random() * 20 < 1) {\n return FC_NN(0, 0, 0);\n }\n\n const randomsign = Math.random() > 0.5 ? 1 : -1;\n\n //5% of the time, return 1 or -1\n if (Math.random() * 20 < 1) {\n return FC_NN(randomsign, 0, 1);\n }\n\n //pick a random layer\n const layer = Math.floor(Math.random() * (maxLayers + 1));\n\n let randomexp = layer === 0 ? Math.random() * 616 - 308 : Math.random() * 16;\n //10% of the time, make it a simple power of 10\n if (Math.random() > 0.9) {\n randomexp = Math.trunc(randomexp);\n }\n let randommag = Math.pow(10, randomexp);\n //10% of the time, trunc mag\n if (Math.random() > 0.9) {\n randommag = Math.trunc(randommag);\n }\n return FC(randomsign, layer, randommag);\n }\n\n public static affordGeometricSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n const actualStart = priceStart.mul(priceRatio.pow(currentOwned));\n return Decimal.floor(\n resourcesAvailable\n .div(actualStart)\n .mul(priceRatio.sub(1))\n .add(1)\n .log10()\n .div(priceRatio.log10())\n );\n }\n\n public static sumGeometricSeries_core(\n numItems: DecimalSource,\n priceStart: Decimal,\n priceRatio: Decimal,\n currentOwned: DecimalSource\n ): Decimal {\n return priceStart\n .mul(priceRatio.pow(currentOwned))\n .mul(Decimal.sub(1, priceRatio.pow(numItems)))\n .div(Decimal.sub(1, priceRatio));\n }\n\n public static affordArithmeticSeries_core(\n resourcesAvailable: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n // n = (-(a-d/2) + sqrt((a-d/2)^2+2dS))/d\n // where a is actualStart, d is priceAdd and S is resourcesAvailable\n // then floor it and you're done!\n const actualStart = priceStart.add(currentOwned.mul(priceAdd));\n const b = actualStart.sub(priceAdd.div(2));\n const b2 = b.pow(2);\n return b\n .neg()\n .add(b2.add(priceAdd.mul(resourcesAvailable).mul(2)).sqrt())\n .div(priceAdd)\n .floor();\n }\n\n public static sumArithmeticSeries_core(\n numItems: Decimal,\n priceStart: Decimal,\n priceAdd: Decimal,\n currentOwned: Decimal\n ): Decimal {\n const actualStart = priceStart.add(currentOwned.mul(priceAdd)); // (n/2)*(2*a+(n-1)*d)\n\n return numItems.div(2).mul(actualStart.mul(2).plus(numItems.sub(1).mul(priceAdd)));\n }\n\n public static efficiencyOfPurchase_core(\n cost: Decimal,\n currentRpS: Decimal,\n deltaRpS: Decimal\n ): Decimal {\n return cost.div(currentRpS).add(cost.div(deltaRpS));\n }\n\n public [Symbol.for(\"+\")](other: DecimalSource): DecimalSource {\n return this.add(other);\n }\n\n public [Symbol.for(\"-\")](other: DecimalSource): DecimalSource {\n return this.sub(other);\n }\n\n public [Symbol.for(\"*\")](other: DecimalSource): DecimalSource {\n return this.times(other);\n }\n\n public [Symbol.for(\"/\")](other: DecimalSource): DecimalSource {\n return this.div(other);\n }\n\n public [Symbol.for(\"minus\")](): DecimalSource {\n return this.neg();\n }\n\n public [Symbol.for(\"==\")](other: DecimalSource): boolean {\n return this.eq(other);\n }\n\n public [Symbol.for(\">\")](other: DecimalSource): boolean {\n return this.gt(other);\n }\n\n public [Symbol.for(\"<\")](other: DecimalSource): boolean {\n return this.lt(other);\n }\n\n public [Symbol.for(\">=\")](other: DecimalSource): boolean {\n return this.gte(other);\n }\n\n public [Symbol.for(\"<=\")](other: DecimalSource): boolean {\n return this.lte(other);\n }\n\n public [Symbol.for(\"!=\")](other: DecimalSource): boolean {\n return this.neq(other);\n }\n\n public normalize(): this {\n /*\n PSEUDOCODE:\n Whenever we are partially 0 (sign is 0 or mag and layer is 0), make it fully 0.\n Whenever we are at or hit layer 0, extract sign from negative mag.\n If layer === 0 and mag < FIRST_NEG_LAYER (1/9e15), shift to 'first negative layer' (add layer, log10 mag).\n While abs(mag) > EXP_LIMIT (9e15), layer += 1, mag = maglog10(mag).\n While abs(mag) < LAYER_DOWN (15.954) and layer > 0, layer -= 1, mag = pow(10, mag).\n\n When we're done, all of the following should be true OR one of the numbers is not IsFinite OR layer is not IsInteger (error state):\n Any 0 is totally zero (0, 0, 0).\n Anything layer 0 has mag 0 OR mag > 1/9e15 and < 9e15.\n Anything layer 1 or higher has abs(mag) >= 15.954 and < 9e15.\n We will assume in calculations that all Decimals are either erroneous or satisfy these criteria. (Otherwise: Garbage in, garbage out.)\n */\n if (this.sign === 0 || (this.mag === 0 && this.layer === 0)) {\n this.sign = 0;\n this.mag = 0;\n this.layer = 0;\n return this;\n }\n\n if (this.layer === 0 && this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n }\n\n //Handle shifting from layer 0 to negative layers.\n if (this.layer === 0 && this.mag < FIRST_NEG_LAYER) {\n this.layer += 1;\n this.mag = Math.log10(this.mag);\n return this;\n }\n\n let absmag = Math.abs(this.mag);\n let signmag = Math.sign(this.mag);\n\n if (absmag >= EXP_LIMIT) {\n this.layer += 1;\n this.mag = signmag * Math.log10(absmag);\n return this;\n } else {\n while (absmag < LAYER_DOWN && this.layer > 0) {\n this.layer -= 1;\n if (this.layer === 0) {\n this.mag = Math.pow(10, this.mag);\n } else {\n this.mag = signmag * Math.pow(10, absmag);\n absmag = Math.abs(this.mag);\n signmag = Math.sign(this.mag);\n }\n }\n if (this.layer === 0) {\n if (this.mag < 0) {\n //extract sign from negative mag at layer 0\n this.mag = -this.mag;\n this.sign = -this.sign;\n } else if (this.mag === 0) {\n //excessive rounding can give us all zeroes\n this.sign = 0;\n }\n }\n }\n\n return this;\n }\n\n public fromComponents(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n\n this.normalize();\n return this;\n }\n\n public fromComponents_noNormalize(sign: number, layer: number, mag: number): this {\n this.sign = sign;\n this.layer = layer;\n this.mag = mag;\n return this;\n }\n\n public fromMantissaExponent(mantissa: number, exponent: number): this {\n this.layer = 1;\n this.sign = Math.sign(mantissa);\n mantissa = Math.abs(mantissa);\n this.mag = exponent + Math.log10(mantissa);\n\n this.normalize();\n return this;\n }\n\n public fromMantissaExponent_noNormalize(mantissa: number, exponent: number): this {\n //The idea of 'normalizing' a break_infinity.js style Decimal doesn't really apply. So just do the same thing.\n this.fromMantissaExponent(mantissa, exponent);\n return this;\n }\n\n public fromDecimal(value: Decimal): this {\n this.sign = value.sign;\n this.layer = value.layer;\n this.mag = value.mag;\n return this;\n }\n\n public fromNumber(value: number): this {\n this.mag = Math.abs(value);\n this.sign = Math.sign(value);\n this.layer = 0;\n this.normalize();\n return this;\n }\n\n public fromString(value: string): Decimal {\n if (IGNORE_COMMAS) {\n value = value.replace(\",\", \"\");\n } else if (COMMAS_ARE_DECIMAL_POINTS) {\n value = value.replace(\",\", \".\");\n }\n\n //Handle x^^^y format.\n const pentationparts = value.split(\"^^^\");\n if (pentationparts.length === 2) {\n const base = parseFloat(pentationparts[0]);\n const height = parseFloat(pentationparts[1]);\n const heightparts = pentationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.pentate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^^y format.\n const tetrationparts = value.split(\"^^\");\n if (tetrationparts.length === 2) {\n const base = parseFloat(tetrationparts[0]);\n const height = parseFloat(tetrationparts[1]);\n const heightparts = tetrationparts[1].split(\";\");\n let payload = 1;\n if (heightparts.length === 2) {\n payload = parseFloat(heightparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle x^y format.\n const powparts = value.split(\"^\");\n if (powparts.length === 2) {\n const base = parseFloat(powparts[0]);\n const exponent = parseFloat(powparts[1]);\n if (isFinite(base) && isFinite(exponent)) {\n const result = Decimal.pow(base, exponent);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //Handle various cases involving it being a Big Number.\n value = value.trim().toLowerCase();\n\n //handle X PT Y format.\n let base;\n let height;\n let ptparts = value.split(\"pt\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n //handle XpY format (it's the same thing just with p).\n ptparts = value.split(\"p\");\n if (ptparts.length === 2) {\n base = 10;\n height = parseFloat(ptparts[0]);\n ptparts[1] = ptparts[1].replace(\"(\", \"\");\n ptparts[1] = ptparts[1].replace(\")\", \"\");\n let payload = parseFloat(ptparts[1]);\n if (!isFinite(payload)) {\n payload = 1;\n }\n if (isFinite(base) && isFinite(height)) {\n const result = Decimal.tetrate(base, height, payload);\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n }\n }\n\n const parts = value.split(\"e\");\n const ecount = parts.length - 1;\n\n //Handle numbers that are exactly floats (0 or 1 es).\n if (ecount === 0) {\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt)) {\n return this.fromNumber(numberAttempt);\n }\n } else if (ecount === 1) {\n //Very small numbers (\"2e-3000\" and so on) may look like valid floats but round to 0.\n const numberAttempt = parseFloat(value);\n if (isFinite(numberAttempt) && numberAttempt !== 0) {\n return this.fromNumber(numberAttempt);\n }\n }\n\n //Handle new (e^N)X format.\n const newparts = value.split(\"e^\");\n if (newparts.length === 2) {\n this.sign = 1;\n if (newparts[0].charAt(0) == \"-\") {\n this.sign = -1;\n }\n let layerstring = \"\";\n for (let i = 0; i < newparts[1].length; ++i) {\n const chrcode = newparts[1].charCodeAt(i);\n if ((chrcode >= 43 && chrcode <= 57) || chrcode === 101) {\n //is \"0\" to \"9\" or \"+\" or \"-\" or \".\" or \"e\" (or \",\" or \"/\")\n layerstring += newparts[1].charAt(i);\n } //we found the end of the layer count\n else {\n this.layer = parseFloat(layerstring);\n this.mag = parseFloat(newparts[1].substr(i + 1));\n this.normalize();\n return this;\n }\n }\n }\n\n if (ecount < 1) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n const mantissa = parseFloat(parts[0]);\n if (mantissa === 0) {\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n let exponent = parseFloat(parts[parts.length - 1]);\n //handle numbers like AeBeC and AeeeeBeC\n if (ecount >= 2) {\n const me = parseFloat(parts[parts.length - 2]);\n if (isFinite(me)) {\n exponent *= Math.sign(me);\n exponent += f_maglog10(me);\n }\n }\n\n //Handle numbers written like eee... (N es) X\n if (!isFinite(mantissa)) {\n this.sign = parts[0] === \"-\" ? -1 : 1;\n this.layer = ecount;\n this.mag = exponent;\n }\n //Handle numbers written like XeY\n else if (ecount === 1) {\n this.sign = Math.sign(mantissa);\n this.layer = 1;\n //Example: 2e10 is equal to 10^log10(2e10) which is equal to 10^(10+log10(2))\n this.mag = exponent + Math.log10(Math.abs(mantissa));\n }\n //Handle numbers written like Xeee... (N es) Y\n else {\n this.sign = Math.sign(mantissa);\n this.layer = ecount;\n if (ecount === 2) {\n const result = Decimal.mul(FC(1, 2, exponent), D(mantissa));\n this.sign = result.sign;\n this.layer = result.layer;\n this.mag = result.mag;\n return this;\n } else {\n //at eee and above, mantissa is too small to be recognizable!\n this.mag = exponent;\n }\n }\n\n this.normalize();\n return this;\n }\n\n public fromValue(value: DecimalSource): Decimal {\n if (value instanceof Decimal || (value != null && typeof value === \"object\" && \"sign\" in value && \"mag\" in value && \"layer\" in value)) {\n return this.fromDecimal(value);\n }\n\n if (typeof value === \"number\") {\n return this.fromNumber(value);\n }\n\n if (typeof value === \"string\") {\n return this.fromString(value);\n }\n\n this.sign = 0;\n this.layer = 0;\n this.mag = 0;\n return this;\n }\n\n public toNumber(): number {\n if (!Number.isFinite(this.layer)) {\n return Number.NaN;\n }\n if (this.layer === 0) {\n return this.sign * this.mag;\n } else if (this.layer === 1) {\n return this.sign * Math.pow(10, this.mag);\n } //overflow for any normalized Decimal\n else {\n return this.mag > 0\n ? this.sign > 0\n ? Number.POSITIVE_INFINITY\n : Number.NEGATIVE_INFINITY\n : 0;\n }\n }\n\n public mantissaWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.m)) {\n return Number.NaN;\n }\n\n if (this.m === 0) {\n return 0;\n }\n\n return decimalPlaces(this.m, places);\n }\n\n public magnitudeWithDecimalPlaces(places: number): number {\n // https://stackoverflow.com/a/37425022\n if (isNaN(this.mag)) {\n return Number.NaN;\n }\n\n if (this.mag === 0) {\n return 0;\n }\n\n return decimalPlaces(this.mag, places);\n }\n\n public toString(): string {\n if (isNaN(this.layer) || isNaN(this.sign) || isNaN(this.mag)) {\n return \"NaN\";\n }\n if (this.mag === Number.POSITIVE_INFINITY || this.layer === Number.POSITIVE_INFINITY) {\n return this.sign === 1 ? \"Infinity\" : \"-Infinity\";\n }\n\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toString();\n }\n return this.m + \"e\" + this.e;\n } else if (this.layer === 1) {\n return this.m + \"e\" + this.e;\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (this.sign === -1 ? \"-\" : \"\") + \"e\".repeat(this.layer) + this.mag;\n } else {\n return (this.sign === -1 ? \"-\" : \"\") + \"(e^\" + this.layer + \")\" + this.mag;\n }\n }\n }\n\n public toExponential(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toExponential(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toFixed(places: number): string {\n if (this.layer === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return this.toStringWithDecimalPlaces(places);\n }\n\n public toPrecision(places: number): string {\n if (this.e <= -7) {\n return this.toExponential(places - 1);\n }\n\n if (places > this.e) {\n return this.toFixed(places - this.exponent - 1);\n }\n\n return this.toExponential(places - 1);\n }\n\n public valueOf(): string {\n return this.toString();\n }\n\n public toJSON(): string {\n return this.toString();\n }\n\n public toStringWithDecimalPlaces(places: number): string {\n if (this.layer === 0) {\n if ((this.mag < 1e21 && this.mag > 1e-7) || this.mag === 0) {\n return (this.sign * this.mag).toFixed(places);\n }\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else if (this.layer === 1) {\n return decimalPlaces(this.m, places) + \"e\" + decimalPlaces(this.e, places);\n } else {\n //layer 2+\n if (this.layer <= MAX_ES_IN_A_ROW) {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"e\".repeat(this.layer) +\n decimalPlaces(this.mag, places)\n );\n } else {\n return (\n (this.sign === -1 ? \"-\" : \"\") +\n \"(e^\" +\n this.layer +\n \")\" +\n decimalPlaces(this.mag, places)\n );\n }\n }\n }\n\n public abs(): Decimal {\n return FC_NN(this.sign === 0 ? 0 : 1, this.layer, this.mag);\n }\n\n public neg(): Decimal {\n return FC_NN(-this.sign, this.layer, this.mag);\n }\n\n public negate(): Decimal {\n return this.neg();\n }\n\n public negated(): Decimal {\n return this.neg();\n }\n\n // public sign () {\n // return this.sign;\n // }\n\n public sgn(): number {\n return this.sign;\n }\n\n public round(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.round(this.mag));\n }\n return this;\n }\n\n public floor(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.floor(this.mag));\n }\n return this;\n }\n\n public ceil(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.ceil(this.mag));\n }\n return this;\n }\n\n public trunc(): this | Decimal {\n if (this.mag < 0) {\n return Decimal.dZero;\n }\n if (this.layer === 0) {\n return FC(this.sign, 0, Math.trunc(this.mag));\n }\n return this;\n }\n\n public add(value: DecimalSource): this | Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return the other number.\n if (this.sign === 0) {\n return decimal;\n }\n if (decimal.sign === 0) {\n return this;\n }\n\n //Special case - Adding a number to its negation produces 0, no matter how large.\n if (\n this.sign === -decimal.sign &&\n this.layer === decimal.layer &&\n this.mag === decimal.mag\n ) {\n return FC_NN(0, 0, 0);\n }\n\n let a;\n let b;\n\n //Special case: If one of the numbers is layer 2 or higher, just take the bigger number.\n if (this.layer >= 2 || decimal.layer >= 2) {\n return this.maxabs(decimal);\n }\n\n if (Decimal.cmpabs(this, decimal) > 0) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * a.mag + b.sign * b.mag);\n }\n\n const layera = a.layer * Math.sign(a.mag);\n const layerb = b.layer * Math.sign(b.mag);\n\n //If one of the numbers is 2+ layers higher than the other, just take the bigger number.\n if (layera - layerb >= 2) {\n return a;\n }\n\n if (layera === 0 && layerb === -1) {\n if (Math.abs(b.mag - Math.log10(a.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, Math.log10(a.mag) - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n }\n\n if (layera === 1 && layerb === 0) {\n if (Math.abs(a.mag - Math.log10(b.mag)) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - Math.log10(b.mag));\n const mantissa = b.sign + a.sign * magdiff;\n return FC(\n Math.sign(mantissa),\n 1,\n Math.log10(b.mag) + Math.log10(Math.abs(mantissa))\n );\n }\n }\n\n if (Math.abs(a.mag - b.mag) > MAX_SIGNIFICANT_DIGITS) {\n return a;\n } else {\n const magdiff = Math.pow(10, a.mag - b.mag);\n const mantissa = b.sign + a.sign * magdiff;\n return FC(Math.sign(mantissa), 1, b.mag + Math.log10(Math.abs(mantissa)));\n }\n\n throw Error(\"Bad arguments to add: \" + this + \", \" + value);\n }\n\n public plus(value: DecimalSource): Decimal {\n return this.add(value);\n }\n\n public sub(value: DecimalSource): Decimal {\n return this.add(D(value).neg());\n }\n\n public subtract(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public minus(value: DecimalSource): Decimal {\n return this.sub(value);\n }\n\n public mul(value: DecimalSource): Decimal {\n const decimal = D(value);\n\n //inf/nan check\n if (!Number.isFinite(this.layer)) {\n return this;\n }\n if (!Number.isFinite(decimal.layer)) {\n return decimal;\n }\n\n //Special case - if one of the numbers is 0, return 0.\n if (this.sign === 0 || decimal.sign === 0) {\n return FC_NN(0, 0, 0);\n }\n\n //Special case - Multiplying a number by its own reciprocal yields +/- 1, no matter how large.\n if (this.layer === decimal.layer && this.mag === -decimal.mag) {\n return FC_NN(this.sign * decimal.sign, 0, 1);\n }\n\n let a;\n let b;\n\n //Which number is bigger in terms of its multiplicative distance from 1?\n if (\n this.layer > decimal.layer ||\n (this.layer == decimal.layer && Math.abs(this.mag) > Math.abs(decimal.mag))\n ) {\n a = this;\n b = decimal;\n } else {\n a = decimal;\n b = this;\n }\n\n if (a.layer === 0 && b.layer === 0) {\n return D(a.sign * b.sign * a.mag * b.mag);\n }\n\n //Special case: If one of the numbers is layer 3 or higher or one of the numbers is 2+ layers bigger than the other, just take the bigger number.\n if (a.layer >= 3 || a.layer - b.layer >= 2) {\n return FC(a.sign * b.sign, a.layer, a.mag);\n }\n\n if (a.layer === 1 && b.layer === 0) {\n return FC(a.sign * b.sign, 1, a.mag + Math.log10(b.mag));\n }\n\n if (a.layer === 1 && b.layer === 1) {\n return FC(a.sign * b.sign, 1, a.mag + b.mag);\n }\n\n if (a.layer === 2 && b.layer === 1) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n if (a.layer === 2 && b.layer === 2) {\n const newmag = FC(Math.sign(a.mag), a.layer - 1, Math.abs(a.mag)).add(\n FC(Math.sign(b.mag), b.layer - 1, Math.abs(b.mag))\n );\n return FC(a.sign * b.sign, newmag.layer + 1, newmag.sign * newmag.mag);\n }\n\n throw Error(\"Bad arguments to mul: \" + this + \", \" + value);\n }\n\n public multiply(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public times(value: DecimalSource): Decimal {\n return this.mul(value);\n }\n\n public div(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.mul(decimal.recip());\n }\n\n public divide(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public divideBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public dividedBy(value: DecimalSource): Decimal {\n return this.div(value);\n }\n\n public recip(): Decimal {\n if (this.mag === 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, 1 / this.mag);\n } else {\n return FC(this.sign, this.layer, -this.mag);\n }\n }\n\n public reciprocal(): Decimal {\n return this.recip();\n }\n\n public reciprocate(): Decimal {\n return this.recip();\n }\n\n /**\n * -1 for less than value, 0 for equals value, 1 for greater than value\n */\n public cmp(value: DecimalSource): CompareResult {\n const decimal = D(value);\n if (this.sign > decimal.sign) {\n return 1;\n }\n if (this.sign < decimal.sign) {\n return -1;\n }\n return (this.sign * this.cmpabs(value)) as CompareResult;\n }\n\n public cmpabs(value: DecimalSource): CompareResult {\n const decimal = D(value);\n const layera = this.mag > 0 ? this.layer : -this.layer;\n const layerb = decimal.mag > 0 ? decimal.layer : -decimal.layer;\n if (layera > layerb) {\n return 1;\n }\n if (layera < layerb) {\n return -1;\n }\n if (this.mag > decimal.mag) {\n return 1;\n }\n if (this.mag < decimal.mag) {\n return -1;\n }\n return 0;\n }\n\n public compare(value: DecimalSource): CompareResult {\n return this.cmp(value);\n }\n\n public isNan(): boolean {\n return isNaN(this.sign) || isNaN(this.layer) || isNaN(this.mag);\n }\n\n public isFinite(): boolean {\n return isFinite(this.sign) && isFinite(this.layer) && isFinite(this.mag);\n }\n\n public eq(value: DecimalSource): boolean {\n const decimal = D(value);\n return (\n this.sign === decimal.sign && this.layer === decimal.layer && this.mag === decimal.mag\n );\n }\n\n public equals(value: DecimalSource): boolean {\n return this.eq(value);\n }\n\n public neq(value: DecimalSource): boolean {\n return !this.eq(value);\n }\n\n public notEquals(value: DecimalSource): boolean {\n return this.neq(value);\n }\n\n public lt(value: DecimalSource): boolean {\n return this.cmp(value) === -1;\n }\n\n public lte(value: DecimalSource): boolean {\n return !this.gt(value);\n }\n\n public gt(value: DecimalSource): boolean {\n return this.cmp(value) === 1;\n }\n\n public gte(value: DecimalSource): boolean {\n return !this.lt(value);\n }\n\n public max(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.lt(decimal) ? decimal : this;\n }\n\n public min(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.gt(decimal) ? decimal : this;\n }\n\n public maxabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) < 0 ? decimal : this;\n }\n\n public minabs(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.cmpabs(decimal) > 0 ? decimal : this;\n }\n\n public clamp(min: DecimalSource, max: DecimalSource): Decimal {\n return this.max(min).min(max);\n }\n\n public clampMin(min: DecimalSource): Decimal {\n return this.max(min);\n }\n\n public clampMax(max: DecimalSource): Decimal {\n return this.min(max);\n }\n\n public cmp_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) ? 0 : this.cmp(decimal);\n }\n\n public compare_tolerance(value: DecimalSource, tolerance: number): CompareResult {\n return this.cmp_tolerance(value, tolerance);\n }\n\n /**\n * Tolerance is a relative tolerance, multiplied by the greater of the magnitudes of the two arguments.\n * For example, if you put in 1e-9, then any number closer to the\n * larger number than (larger number)*1e-9 will be considered equal.\n */\n public eq_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value); // https://stackoverflow.com/a/33024979\n if (tolerance == null) {\n tolerance = 1e-7;\n }\n //Numbers that are too far away are never close.\n if (this.sign !== decimal.sign) {\n return false;\n }\n if (Math.abs(this.layer - decimal.layer) > 1) {\n return false;\n }\n // return abs(a-b) <= tolerance * max(abs(a), abs(b))\n let magA = this.mag;\n let magB = decimal.mag;\n if (this.layer > decimal.layer) {\n magB = f_maglog10(magB);\n }\n if (this.layer < decimal.layer) {\n magA = f_maglog10(magA);\n }\n return Math.abs(magA - magB) <= tolerance * Math.max(Math.abs(magA), Math.abs(magB));\n }\n\n public equals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.eq_tolerance(value, tolerance);\n }\n\n public neq_tolerance(value: DecimalSource, tolerance: number): boolean {\n return !this.eq_tolerance(value, tolerance);\n }\n\n public notEquals_tolerance(value: DecimalSource, tolerance: number): boolean {\n return this.neq_tolerance(value, tolerance);\n }\n\n public lt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.lt(decimal);\n }\n\n public lte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.lt(decimal);\n }\n\n public gt_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return !this.eq_tolerance(decimal, tolerance) && this.gt(decimal);\n }\n\n public gte_tolerance(value: DecimalSource, tolerance: number): boolean {\n const decimal = D(value);\n return this.eq_tolerance(decimal, tolerance) || this.gt(decimal);\n }\n\n public pLog10(): Decimal {\n if (this.lt(Decimal.dZero)) {\n return Decimal.dZero;\n }\n return this.log10();\n }\n\n public absLog10(): Decimal {\n if (this.sign === 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(1, 0, Math.log10(this.mag));\n }\n }\n\n public log10(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer > 0) {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n } else {\n return FC(this.sign, 0, Math.log10(this.mag));\n }\n }\n\n public log(base: DecimalSource): Decimal {\n base = D(base);\n if (this.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign <= 0) {\n return Decimal.dNaN;\n }\n if (base.sign === 1 && base.layer === 0 && base.mag === 1) {\n return Decimal.dNaN;\n } else if (this.layer === 0 && base.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag) / Math.log(base.mag));\n }\n\n return Decimal.div(this.log10(), base.log10());\n }\n\n public log2(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log2(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 3.321928094887362); //log2(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.5213902276543247); //-log10(log10(2))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public ln(): Decimal {\n if (this.sign <= 0) {\n return Decimal.dNaN;\n } else if (this.layer === 0) {\n return FC(this.sign, 0, Math.log(this.mag));\n } else if (this.layer === 1) {\n return FC(Math.sign(this.mag), 0, Math.abs(this.mag) * 2.302585092994046); //ln(10)\n } else if (this.layer === 2) {\n return FC(Math.sign(this.mag), 1, Math.abs(this.mag) + 0.36221568869946325); //log10(log10(e))\n } else {\n return FC(Math.sign(this.mag), this.layer - 1, Math.abs(this.mag));\n }\n }\n\n public logarithm(base: DecimalSource): Decimal {\n return this.log(base);\n }\n\n public pow(value: DecimalSource): Decimal {\n const decimal = D(value);\n const a = this;\n const b = decimal;\n\n //special case: if a is 0, then return 0 (UNLESS b is 0, then return 1)\n if (a.sign === 0) {\n return b.eq(0) ? FC_NN(1, 0, 1) : a;\n }\n //special case: if a is 1, then return 1\n if (a.sign === 1 && a.layer === 0 && a.mag === 1) {\n return a;\n }\n //special case: if b is 0, then return 1\n if (b.sign === 0) {\n return FC_NN(1, 0, 1);\n }\n //special case: if b is 1, then return a\n if (b.sign === 1 && b.layer === 0 && b.mag === 1) {\n return a;\n }\n\n const result = a\n .absLog10()\n .mul(b)\n .pow10();\n\n if (this.sign === -1) {\n if (Math.abs(b.toNumber() % 2) % 2 === 1) {\n return result.neg();\n } else if (Math.abs(b.toNumber() % 2) % 2 === 0) {\n return result;\n }\n return Decimal.dNaN;\n }\n\n return result;\n }\n\n public pow10(): Decimal {\n /*\n There are four cases we need to consider:\n 1) positive sign, positive mag (e15, ee15): +1 layer (e.g. 10^15 becomes e15, 10^e15 becomes ee15)\n 2) negative sign, positive mag (-e15, -ee15): +1 layer but sign and mag sign are flipped (e.g. 10^-15 becomes e-15, 10^-e15 becomes ee-15)\n 3) positive sign, negative mag (e-15, ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n 4) negative sign, negative mag (-e-15, -ee-15): layer 0 case would have been handled in the Math.pow check, so just return 1\n */\n\n if (!Number.isFinite(this.layer) || !Number.isFinite(this.mag)) {\n return Decimal.dNaN;\n }\n\n let a = this;\n\n //handle layer 0 case - if no precision is lost just use Math.pow, else promote one layer\n if (a.layer === 0) {\n const newmag = Math.pow(10, a.sign * a.mag);\n if (Number.isFinite(newmag) && Math.abs(newmag) >= 0.1) {\n return FC(1, 0, newmag);\n } else {\n if (a.sign === 0) {\n return Decimal.dOne;\n } else {\n a = FC_NN(a.sign, a.layer + 1, Math.log10(a.mag)) as this;\n }\n }\n }\n\n //handle all 4 layer 1+ cases individually\n if (a.sign > 0 && a.mag >= 0) {\n return FC(a.sign, a.layer + 1, a.mag);\n }\n if (a.sign < 0 && a.mag >= 0) {\n return FC(-a.sign, a.layer + 1, -a.mag);\n }\n //both the negative mag cases are identical: one +/- rounding error\n return Decimal.dOne;\n }\n\n public pow_base(value: DecimalSource): Decimal {\n return D(value).pow(this);\n }\n\n public root(value: DecimalSource): Decimal {\n const decimal = D(value);\n return this.pow(decimal.recip());\n }\n\n public factorial(): Decimal {\n if (this.mag < 0) {\n return this.add(1).gamma();\n } else if (this.layer === 0) {\n return this.add(1).gamma();\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n //from HyperCalc source code\n public gamma(): Decimal {\n if (this.mag < 0) {\n return this.recip();\n } else if (this.layer === 0) {\n if (this.lt(FC_NN(1, 0, 24))) {\n return D(f_gamma(this.sign * this.mag));\n }\n\n const t = this.mag - 1;\n let l = 0.9189385332046727; //0.5*Math.log(2*Math.PI)\n l = l + (t + 0.5) * Math.log(t);\n l = l - t;\n const n2 = t * t;\n let np = t;\n let lm = 12 * np;\n let adj = 1 / lm;\n let l2 = l + adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 360 * np;\n adj = 1 / lm;\n l2 = l - adj;\n if (l2 === l) {\n return Decimal.exp(l);\n }\n\n l = l2;\n np = np * n2;\n lm = 1260 * np;\n let lt = 1 / lm;\n l = l + lt;\n np = np * n2;\n lm = 1680 * np;\n lt = 1 / lm;\n l = l - lt;\n return Decimal.exp(l);\n } else if (this.layer === 1) {\n return Decimal.exp(Decimal.mul(this, Decimal.ln(this).sub(1)));\n } else {\n return Decimal.exp(this);\n }\n }\n\n public lngamma(): Decimal {\n return this.gamma().ln();\n }\n\n public exp(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0 && this.mag <= 709.7) {\n return D(Math.exp(this.sign * this.mag));\n } else if (this.layer === 0) {\n return FC(1, 1, this.sign * Math.log10(Math.E) * this.mag);\n } else if (this.layer === 1) {\n return FC(1, 2, this.sign * (Math.log10(0.4342944819032518) + this.mag));\n } else {\n return FC(1, this.layer + 1, this.sign * this.mag);\n }\n }\n\n public sqr(): Decimal {\n return this.pow(2);\n }\n\n public sqrt(): Decimal {\n if (this.layer === 0) {\n return D(Math.sqrt(this.sign * this.mag));\n } else if (this.layer === 1) {\n return FC(1, 2, Math.log10(this.mag) - 0.3010299956639812);\n } else {\n const result = Decimal.div(FC_NN(this.sign, this.layer - 1, this.mag), FC_NN(1, 0, 2));\n result.layer += 1;\n result.normalize();\n return result;\n }\n }\n\n public cube(): Decimal {\n return this.pow(3);\n }\n\n public cbrt(): Decimal {\n return this.pow(1 / 3);\n }\n\n //Tetration/tetrate: The result of exponentiating 'this' to 'this' 'height' times in a row. https://en.wikipedia.org/wiki/Tetration\n //If payload != 1, then this is 'iterated exponentiation', the result of exping (payload) to base (this) (height) times. https://andydude.github.io/tetration/archives/tetration2/ident.html\n //Works with negative and positive real heights.\n public tetrate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n //x^^1 == x\n if (height === 1) {\n return Decimal.pow(this, payload);\n }\n //x^^0 == 1\n if (height === 0) {\n return new Decimal(payload);\n }\n //1^^x == 1\n if (this.eq(Decimal.dOne)) {\n return Decimal.dOne;\n }\n //-1^^x == -1\n if (this.eq(-1)) {\n return Decimal.pow(this, payload);\n }\n\n if (height === Number.POSITIVE_INFINITY) {\n const this_num = this.toNumber();\n //within the convergence range?\n if (this_num <= 1.44466786100976613366 && this_num >= 0.06598803584531253708) {\n //hotfix for the very edge of the number range not being handled properly\n if (this_num > 1.444667861009099) {\n return new Decimal(Math.E);\n }\n //Formula for infinite height power tower.\n const negln = Decimal.ln(this).neg();\n return negln.lambertw().div(negln);\n } else if (this_num > 1.44466786100976613366) {\n //explodes to infinity\n return new Decimal(Number.POSITIVE_INFINITY);\n } else {\n //0.06598803584531253708 > this_num >= 0: never converges\n //this_num < 0: quickly becomes a complex number\n return Decimal.dNaN;\n }\n }\n\n //0^^x oscillates if we define 0^0 == 1 (which in javascript land we do), since then 0^^1 is 0, 0^^2 is 1, 0^^3 is 0, etc. payload is ignored\n //using the linear approximation for height (TODO: don't know a better way to calculate it ATM, but it wouldn't surprise me if it's just NaN)\n if (this.eq(Decimal.dZero)) {\n let result = Math.abs((height + 1) % 2);\n if (result > 1) {\n result = 2 - result;\n }\n return new Decimal(result);\n }\n\n if (height < 0) {\n return Decimal.iteratedlog(payload, this, -height);\n }\n\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n if (this.gt(Decimal.dZero) && this.lte(1.44466786100976613366)) {\n //similar to 0^^n, flip-flops between two values, converging slowly (or if it's below 0.06598803584531253708, never. so once again, the fractional part at the end will be a linear approximation (TODO: again pending knowledge of how to approximate better, although tbh I think it should in reality just be NaN)\n height = Math.min(10000, height);\n for (let i = 0; i < height; ++i) {\n const old_payload: Decimal = payload;\n payload = this.pow(payload);\n //stop early if we converge\n if (old_payload.eq(payload)) {\n return payload;\n }\n }\n if (fracheight != 0) {\n const next_payload = this.pow(payload);\n return payload.mul(1 - fracheight).add(next_payload.mul(fracheight));\n }\n return payload;\n }\n //TODO: base < 0, but it's hard for me to reason about (probably all non-integer heights are NaN automatically?)\n\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (this.gt(10)) {\n payload = this.pow(fracheight);\n } else {\n payload = D(Decimal.tetrate_critical(this.toNumber(), fracheight));\n //TODO: until the critical section grid can handle numbers below 2, scale them to the base\n //TODO: maybe once the critical section grid has very large bases, this math can be appropriate for them too? I'll think about it\n if (this.lt(2)) {\n payload = payload\n .sub(1)\n .mul(this.minus(1))\n .plus(1);\n }\n }\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.pow(payload);\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //shortcut\n if (payload.layer - this.layer > 3) {\n return FC_NN(payload.sign, payload.layer + (height - i - 1), payload.mag);\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return payload;\n }\n }\n return payload;\n }\n\n //iteratedexp/iterated exponentiation: - all cases handled in tetrate, so just call it\n public iteratedexp(height = 2, payload = FC_NN(1, 0, 1)): Decimal {\n return this.tetrate(height, payload);\n }\n\n //iterated log/repeated log: The result of applying log(base) 'times' times in a row. Approximately equal to subtracting (times) from the number's slog representation. Equivalent to tetrating to a negative height.\n //Works with negative and positive real heights.\n public iteratedlog(base: DecimalSource = 10, times = 1): Decimal {\n if (times < 0) {\n return Decimal.tetrate(base, -times, this);\n }\n\n base = D(base);\n let result = D(this);\n const fulltimes = times;\n times = Math.trunc(times);\n const fraction = fulltimes - times;\n if (result.layer - base.layer > 3) {\n const layerloss = Math.min(times, result.layer - base.layer - 3);\n times -= layerloss;\n result.layer -= layerloss;\n }\n\n for (let i = 0; i < times; ++i) {\n result = result.log(base);\n //bail if we're NaN\n if (!isFinite(result.layer) || !isFinite(result.mag)) {\n return result.normalize();\n }\n //give up after 10000 iterations if nothing is happening\n if (i > 10000) {\n return result;\n }\n }\n\n //handle fractional part\n if (fraction > 0 && fraction < 1) {\n if (base.eq(10)) {\n result = result.layeradd10(-fraction);\n } else {\n result = result.layeradd(-fraction, base);\n }\n }\n\n return result;\n }\n\n //Super-logarithm, one of tetration's inverses, tells you what size power tower you'd have to tetrate base to to get number. By definition, will never be higher than 1.8e308 in break_eternity.js, since a power tower 1.8e308 numbers tall is the largest representable number.\n // https://en.wikipedia.org/wiki/Super-logarithm\n public slog(base: DecimalSource = 10): Decimal {\n base = D(base);\n\n //special cases:\n //slog base 0 or lower is NaN\n if (base.lte(Decimal.dZero)) {\n return Decimal.dNaN;\n }\n //slog base 1 is NaN\n if (base.eq(Decimal.dOne)) {\n return Decimal.dNaN;\n }\n //need to handle these small, wobbling bases specially\n if (base.lt(Decimal.dOne)) {\n if (this.eq(Decimal.dOne)) {\n return Decimal.dZero;\n }\n if (this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n //0 < this < 1: ambiguous (happens multiple times)\n //this < 0: impossible (as far as I can tell)\n //this > 1: partially complex (http://myweb.astate.edu/wpaulsen/tetcalc/tetcalc.html base 0.25 for proof)\n return Decimal.dNaN;\n }\n //slog_n(0) is -1\n if (this.mag < 0 || this.eq(Decimal.dZero)) {\n return Decimal.dNegOne;\n }\n\n let result = 0;\n let copy = D(this);\n if (copy.layer - base.layer > 3) {\n const layerloss = copy.layer - base.layer - 3;\n result += layerloss;\n copy.layer -= layerloss;\n }\n\n for (let i = 0; i < 100; ++i) {\n if (copy.lt(Decimal.dZero)) {\n copy = Decimal.pow(base, copy);\n result -= 1;\n } else if (copy.lte(Decimal.dOne)) {\n return D(result + Decimal.slog_critical(base.toNumber(), copy.toNumber()));\n } else {\n result += 1;\n copy = Decimal.log(copy, base);\n }\n }\n return D(result);\n }\n\n //background info and tables of values for critical functions taken here: https://github.com/Patashu/break_eternity.js/issues/22\n public static slog_critical(base: number, height: number): number {\n //TODO: for bases above 10, revert to old linear approximation until I can think of something better\n if (base > 10) {\n return height - 1;\n }\n return Decimal.critical_section(base, height, critical_slog_values);\n }\n\n public static tetrate_critical(base: number, height: number): number {\n return Decimal.critical_section(base, height, critical_tetr_values);\n }\n\n public static critical_section(base: number, height: number, grid: number[][]): number {\n //this part is simple at least, since it's just 0.1 to 0.9\n height *= 10;\n if (height < 0) {\n height = 0;\n }\n if (height > 10) {\n height = 10;\n }\n //have to do this complicated song and dance since one of the critical_headers is Math.E, and in the future I'd like 1.5 as well\n if (base < 2) {\n base = 2;\n }\n if (base > 10) {\n base = 10;\n }\n let lower = 0;\n let upper = 0;\n //basically, if we're between bases, we interpolate each bases' relevant values together\n //then we interpolate based on what the fractional height is.\n //accuracy could be improved by doing a non-linear interpolation (maybe), by adding more bases and heights (definitely) but this is AFAIK the best you can get without running some pari.gp or mathematica program to calculate exact values\n for (let i = 0; i < critical_headers.length; ++i) {\n if (critical_headers[i] == base) {\n // exact match\n lower = grid[i][Math.floor(height)];\n upper = grid[i][Math.ceil(height)];\n break;\n } else if (critical_headers[i] < base && critical_headers[i + 1] > base) {\n // interpolate between this and the next\n const basefrac =\n (base - critical_headers[i]) / (critical_headers[i + 1] - critical_headers[i]);\n lower =\n grid[i][Math.floor(height)] * (1 - basefrac) +\n grid[i + 1][Math.floor(height)] * basefrac;\n upper =\n grid[i][Math.ceil(height)] * (1 - basefrac) +\n grid[i + 1][Math.ceil(height)] * basefrac;\n break;\n }\n }\n const frac = height - Math.floor(height);\n const result = lower * (1 - frac) + upper * frac;\n return result;\n }\n\n //Function for adding/removing layers from a Decimal, even fractional layers (e.g. its slog10 representation).\n //Moved this over to use the same critical section as tetrate/slog.\n public layeradd10(diff: DecimalSource): Decimal {\n diff = Decimal.fromValue_noAlloc(diff).toNumber();\n const result = D(this);\n if (diff >= 1) {\n //bug fix: if result is very smol (mag < 0, layer > 0) turn it into 0 first\n if (result.mag < 0 && result.layer > 0) {\n result.sign = 0;\n result.mag = 0;\n result.layer = 0;\n } else if (result.sign === -1 && result.layer == 0) {\n //bug fix - for stuff like -3.layeradd10(1) we need to move the sign to the mag\n result.sign = 1;\n result.mag = -result.mag;\n }\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n }\n if (diff <= -1) {\n const layeradd = Math.trunc(diff);\n diff -= layeradd;\n result.layer += layeradd;\n if (result.layer < 0) {\n for (let i = 0; i < 100; ++i) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n if (!isFinite(result.mag)) {\n //another bugfix: if we hit -Infinity mag, then we should return negative infinity, not 0. 0.layeradd10(-1) h its this\n if (result.sign === 0) {\n result.sign = 1;\n }\n //also this, for 0.layeradd10(-2)\n if (result.layer < 0) {\n result.layer = 0;\n }\n return result.normalize();\n }\n if (result.layer >= 0) {\n break;\n }\n }\n }\n }\n\n while (result.layer < 0) {\n result.layer++;\n result.mag = Math.log10(result.mag);\n }\n //bugfix: before we normalize: if we started with 0, we now need to manually fix a layer ourselves!\n if (result.sign === 0) {\n result.sign = 1;\n if (result.mag === 0 && result.layer >= 1) {\n result.layer -= 1;\n result.mag = 1;\n }\n }\n result.normalize();\n\n //layeradd10: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 10 and iterated log base 10. Also equivalent to adding a fractional amount to the number's layer in its break_eternity.js representation.\n if (diff !== 0) {\n return result.layeradd(diff, 10); //safe, only calls positive height 1 payload tetration, slog and log\n }\n\n return result;\n }\n\n //layeradd: like adding 'diff' to the number's slog(base) representation. Very similar to tetrate base 'base' and iterated log base 'base'.\n public layeradd(diff: number, base: DecimalSource): Decimal {\n const slogthis = this.slog(base).toNumber();\n const slogdest = slogthis + diff;\n if (slogdest >= 0) {\n return Decimal.tetrate(base, slogdest);\n } else if (!Number.isFinite(slogdest)) {\n return Decimal.dNaN;\n } else if (slogdest >= -1) {\n return Decimal.log(Decimal.tetrate(base, slogdest + 1), base);\n } else {\n return Decimal.log(Decimal.log(Decimal.tetrate(base, slogdest + 2), base), base);\n }\n }\n\n //The Lambert W function, also called the omega function or product logarithm, is the solution W(x) === x*e^x.\n // https://en.wikipedia.org/wiki/Lambert_W_function\n //Some special values, for testing: https://en.wikipedia.org/wiki/Lambert_W_function#Special_values\n public lambertw(): Decimal {\n if (this.lt(-0.3678794411710499)) {\n throw Error(\"lambertw is unimplemented for results less than -1, sorry!\");\n } else if (this.mag < 0) {\n return D(f_lambertw(this.toNumber()));\n } else if (this.layer === 0) {\n return D(f_lambertw(this.sign * this.mag));\n } else if (this.layer === 1) {\n return d_lambertw(this);\n } else if (this.layer === 2) {\n return d_lambertw(this);\n }\n if (this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n\n throw \"Unhandled behavior in lambertw()\";\n }\n\n //The super square-root function - what number, tetrated to height 2, equals this?\n //Other sroots are possible to calculate probably through guess and check methods, this one is easy though.\n // https://en.wikipedia.org/wiki/Tetration#Super-root\n public ssqrt(): Decimal {\n if (this.sign == 1 && this.layer >= 3) {\n return FC_NN(this.sign, this.layer - 1, this.mag);\n }\n const lnx = this.ln();\n return lnx.div(lnx.lambertw());\n }\n /*\n\nUnit tests for tetrate/iteratedexp/iteratedlog/layeradd10/layeradd/slog:\n(note: these won't be exactly precise with the new slog implementation, but that's okay)\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var expected = first+both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(10).layeradd10(first).layeradd10(-both).slog();\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n var expected = first+both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var first = Math.random()*100;\n var both = Math.random()*100;\n var base = Math.random()*8+2;\n first += both;\n var expected = first-both+1;\n var result = new Decimal(base).layeradd(first, base).layeradd(-both, base).slog(base);\n if (Number.isFinite(result.mag) && !Decimal.eq_tolerance(expected, result))\n {\n console.log(first + \", \" + both);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar tetrateonly = Decimal.tetrate(10, first);\nvar tetrateandlog = Decimal.tetrate(10, first+both).iteratedlog(10, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first);\nvar tetrateandlog = Decimal.tetrate(base, first+both).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\nvar first = Math.round((Math.random()*30))/10;\nvar both = Math.round((Math.random()*30))/10;\nvar base = Math.random()*8+2;\nvar tetrateonly = Decimal.tetrate(base, first, base);\nvar tetrateandlog = Decimal.tetrate(base, first+both, base).iteratedlog(base, both);\nif (!Decimal.eq_tolerance(tetrateonly, tetrateandlog))\n{\n console.log(first + \", \" + both);\n}\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.random()*100);\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var xex = new Decimal(-0.3678794411710499+Math.exp(Math.random()*100));\n var x = Decimal.lambertw(xex);\n if (!Decimal.eq_tolerance(xex, x.mul(Decimal.exp(x))))\n {\n console.log(xex);\n }\n}\n\nfor (var i = 0; i < 1000; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n var b = Decimal.randomDecimalForTesting(Math.random() > 0.5 ? 0 : 1);\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.add(b).toNumber();\n if (Number.isFinite(c) && !Decimal.eq_tolerance(c, a.toNumber()+b.toNumber()))\n {\n console.log(a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 100; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5) { a = a.recip(); }\n if (Math.random() > 0.5) { b = b.recip(); }\n var c = a.mul(b).toNumber();\n if (Number.isFinite(c) && Number.isFinite(a.toNumber()) && Number.isFinite(b.toNumber()) && a.toNumber() != 0 && b.toNumber() != 0 && c != 0 && !Decimal.eq_tolerance(c, a.toNumber()*b.toNumber()))\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n else if (!Decimal.mul(a.recip(), b.recip()).eq_tolerance(Decimal.mul(a, b).recip()))\n {\n console.log(\"Test 3: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n var b = Decimal.randomDecimalForTesting(Math.round(Math.random()*4));\n if (Math.random() > 0.5 && a.sign !== 0) { a = a.recip(); }\n if (Math.random() > 0.5 && b.sign !== 0) { b = b.recip(); }\n var c = a.pow(b);\n var d = a.root(b.recip());\n var e = a.pow(b.recip());\n var f = a.root(b);\n\n if (!c.eq_tolerance(d) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 1: \" + a + \", \" + b);\n }\n if (!e.eq_tolerance(f) && a.sign !== 0 && b.sign !== 0)\n {\n console.log(\"Test 2: \" + a + \", \" + b);\n }\n}\n\nfor (var i = 0; i < 10; ++i)\n{\n var a = Math.round(Math.random()*18-9);\n var b = Math.round(Math.random()*100-50);\n var c = Math.round(Math.random()*18-9);\n var d = Math.round(Math.random()*100-50);\n console.log(\"Decimal.pow(Decimal.fromMantissaExponent(\" + a + \", \" + b + \"), Decimal.fromMantissaExponent(\" + c + \", \" + d + \")).toString()\");\n}\n\n*/\n\n //Pentation/pentate: The result of tetrating 'height' times in a row. An absurdly strong operator - Decimal.pentate(2, 4.28) and Decimal.pentate(10, 2.37) are already too huge for break_eternity.js!\n // https://en.wikipedia.org/wiki/Pentation\n public pentate(height = 2, payload: DecimalSource = FC_NN(1, 0, 1)): Decimal {\n payload = D(payload);\n const oldheight = height;\n height = Math.trunc(height);\n const fracheight = oldheight - height;\n\n //I have no idea if this is a meaningful approximation for pentation to continuous heights, but it is monotonic and continuous.\n if (fracheight !== 0) {\n if (payload.eq(Decimal.dOne)) {\n ++height;\n payload = new Decimal(fracheight);\n } else {\n if (this.eq(10)) {\n payload = payload.layeradd10(fracheight);\n } else {\n payload = payload.layeradd(fracheight, this);\n }\n }\n }\n\n for (let i = 0; i < height; ++i) {\n payload = this.tetrate(payload.toNumber());\n //bail if we're NaN\n if (!isFinite(payload.layer) || !isFinite(payload.mag)) {\n return payload.normalize();\n }\n //give up after 10 iterations if nothing is happening\n if (i > 10) {\n return payload;\n }\n }\n\n return payload;\n }\n\n // trig functions!\n public sin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.sin(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public cos(): Decimal {\n if (this.mag < 0) {\n return Decimal.dOne;\n }\n if (this.layer === 0) {\n return D(Math.cos(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public tan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.tan(this.sign * this.mag));\n }\n return FC_NN(0, 0, 0);\n }\n\n public asin(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.asin(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public acos(): Decimal {\n if (this.mag < 0) {\n return D(Math.acos(this.toNumber()));\n }\n if (this.layer === 0) {\n return D(Math.acos(this.sign * this.mag));\n }\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n public atan(): this | Decimal {\n if (this.mag < 0) {\n return this;\n }\n if (this.layer === 0) {\n return D(Math.atan(this.sign * this.mag));\n }\n return D(Math.atan(this.sign * 1.8e308));\n }\n\n public sinh(): Decimal {\n return this.exp()\n .sub(this.negate().exp())\n .div(2);\n }\n\n public cosh(): Decimal {\n return this.exp()\n .add(this.negate().exp())\n .div(2);\n }\n\n public tanh(): Decimal {\n return this.sinh().div(this.cosh());\n }\n\n public asinh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .add(1)\n .sqrt()\n )\n );\n }\n\n public acosh(): Decimal {\n return Decimal.ln(\n this.add(\n this.sqr()\n .sub(1)\n .sqrt()\n )\n );\n }\n\n public atanh(): Decimal {\n if (this.abs().gte(1)) {\n return FC_NN(Number.NaN, Number.NaN, Number.NaN);\n }\n\n return Decimal.ln(this.add(1).div(D(1).sub(this))).div(2);\n }\n\n /**\n * Joke function from Realm Grinder\n */\n public ascensionPenalty(ascensions: DecimalSource): Decimal {\n if (ascensions === 0) {\n return this;\n }\n\n return this.root(Decimal.pow(10, ascensions));\n }\n\n /**\n * Joke function from Cookie Clicker. It's 'egg'\n */\n public egg(): Decimal {\n return this.add(9);\n }\n\n public lessThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) < 1;\n }\n\n public lessThan(other: DecimalSource): boolean {\n return this.cmp(other) < 0;\n }\n\n public greaterThanOrEqualTo(other: DecimalSource): boolean {\n return this.cmp(other) > -1;\n }\n\n public greaterThan(other: DecimalSource): boolean {\n return this.cmp(other) > 0;\n }\n\n // return Decimal;\n}\n\n// return Decimal;\n","import Decimal, { DecimalSource } from \"lib/break_eternity\";\nimport projInfo from \"data/projInfo.json\";\n\nexport default Decimal;\n\nconst decimalOne = new Decimal(1);\n\nexport function exponentialFormat(num: DecimalSource, precision: number, mantissa = true): string {\n let e = Decimal.log10(num).floor();\n let m = Decimal.div(num, Decimal.pow(10, e));\n if (m.toStringWithDecimalPlaces(precision) === \"10\") {\n m = decimalOne;\n e = e.add(1);\n }\n const eString = e.gte(1e9)\n ? format(e, Math.max(Math.max(precision, 3), projInfo.defaultDecimalsShown))\n : e.gte(10000)\n ? commaFormat(e, 0)\n : e.toStringWithDecimalPlaces(0);\n if (mantissa) {\n return m.toStringWithDecimalPlaces(precision) + \"e\" + eString;\n } else {\n return \"e\" + eString;\n }\n}\n\nexport function commaFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.001) {\n return (0).toFixed(precision);\n }\n const init = num.toStringWithDecimalPlaces(precision);\n const portions = init.split(\".\");\n portions[0] = portions[0].replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1,\");\n if (portions.length == 1) return portions[0];\n return portions[0] + \".\" + portions[1];\n}\n\nexport function regularFormat(num: DecimalSource, precision: number): string {\n if (num === null || num === undefined) {\n return \"NaN\";\n }\n num = new Decimal(num);\n if (num.mag < 0.0001) {\n return (0).toFixed(precision);\n }\n if (num.mag < 0.1 && precision !== 0) {\n precision = Math.max(\n Math.max(precision, num.log10().negate().ceil().toNumber()),\n projInfo.defaultDecimalsShown\n );\n }\n return num.toStringWithDecimalPlaces(precision);\n}\n\nconst eeee1000 = new Decimal(\"eeee1000\");\nconst e100000 = new Decimal(\"e100000\");\nconst e1000 = new Decimal(\"e1000\");\nconst e9 = new Decimal(1e9);\nconst e6 = new Decimal(1e6);\nconst e3 = new Decimal(1e3);\nconst nearOne = new Decimal(0.98);\nconst thousandth = new Decimal(0.001);\nconst zero = new Decimal(0);\nexport function format(num: DecimalSource, precision?: number, small?: boolean): string {\n if (precision == null) precision = projInfo.defaultDecimalsShown;\n small = small ?? projInfo.defaultShowSmall;\n num = new Decimal(num);\n if (isNaN(num.sign) || isNaN(num.layer) || isNaN(num.mag)) {\n return \"NaN\";\n }\n if (num.sign < 0) {\n return \"-\" + format(num.neg(), precision);\n }\n if (num.mag === Number.POSITIVE_INFINITY) {\n return \"Infinity\";\n }\n if (num.gte(eeee1000)) {\n const slog = num.slog();\n if (slog.gte(e6)) {\n return \"F\" + format(slog.floor());\n } else {\n return (\n Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) +\n \"F\" +\n commaFormat(slog.floor(), 0)\n );\n }\n } else if (num.gte(e100000)) {\n return exponentialFormat(num, 0, false);\n } else if (num.gte(e1000)) {\n return exponentialFormat(num, 0);\n } else if (num.gte(e9)) {\n return exponentialFormat(num, precision);\n } else if (num.gte(e3)) {\n return commaFormat(num, 0);\n } else if (num.gte(thousandth) || !small) {\n return regularFormat(num, precision);\n } else if (num.eq(zero)) {\n return (0).toFixed(precision);\n }\n\n num = invertOOM(num);\n if (num.lt(e1000)) {\n const val = exponentialFormat(num, precision);\n return val.replace(/([^(?:e|F)]*)$/, \"-$1\");\n } else {\n return format(num, precision) + \"⁻¹\";\n }\n}\n\nexport function formatWhole(num: DecimalSource): string {\n num = new Decimal(num);\n if (num.sign < 0) {\n return \"-\" + formatWhole(num.neg());\n }\n if (num.gte(e9)) {\n return format(num);\n }\n if (num.lte(nearOne) && !num.eq(zero)) {\n return format(num);\n }\n return format(num, 0);\n}\n\nexport function formatTime(seconds: DecimalSource): string {\n if (Decimal.lt(seconds, 0)) {\n return \"-\" + formatTime(Decimal.neg(seconds));\n }\n if (Decimal.gt(seconds, 2 ** 51)) {\n // integer precision limit\n return format(Decimal.div(seconds, 31536000)) + \"y\";\n }\n seconds = new Decimal(seconds).toNumber();\n if (seconds < 60) {\n return format(seconds) + \"s\";\n } else if (seconds < 3600) {\n return formatWhole(Math.floor(seconds / 60)) + \"m \" + format(seconds % 60) + \"s\";\n } else if (seconds < 86400) {\n return (\n formatWhole(Math.floor(seconds / 3600)) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m \" +\n formatWhole(seconds % 60) +\n \"s\"\n );\n } else if (seconds < 31536000) {\n return (\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h \" +\n formatWhole(Math.floor(seconds / 60) % 60) +\n \"m\"\n );\n } else {\n return (\n formatWhole(Math.floor(seconds / 31536000)) +\n \"y \" +\n formatWhole(Math.floor(seconds / 84600) % 365) +\n \"d \" +\n formatWhole(Math.floor(seconds / 3600) % 24) +\n \"h\"\n );\n }\n}\n\nexport function toPlaces(x: DecimalSource, precision: number, maxAccepted: DecimalSource): string {\n x = new Decimal(x);\n let result = x.toStringWithDecimalPlaces(precision);\n if (new Decimal(result).gte(maxAccepted)) {\n result = Decimal.sub(maxAccepted, Math.pow(0.1, precision)).toStringWithDecimalPlaces(\n precision\n );\n }\n return result;\n}\n\n// Will also display very small numbers\nexport function formatSmall(x: DecimalSource, precision?: number): string {\n return format(x, precision, true);\n}\n\nexport function invertOOM(x: DecimalSource): Decimal {\n let e = Decimal.log10(x).ceil();\n const m = Decimal.div(x, Decimal.pow(10, e));\n e = e.neg();\n x = new Decimal(10).pow(e).times(m);\n\n return x;\n}\n","// Import Decimal and numberUtils from a different file to globally change which big num library gets used\n// This way switching out big number libraries just needs to happen here, not every file that needs big numbers\nimport { DecimalSource as RawDecimalSource } from \"lib/break_eternity\";\nimport Decimal, * as numberUtils from \"util/break_eternity\";\n\nexport const {\n exponentialFormat,\n commaFormat,\n regularFormat,\n format,\n formatWhole,\n formatTime,\n toPlaces,\n formatSmall,\n invertOOM\n} = numberUtils;\n\nexport type DecimalSource = RawDecimalSource;\n\nwindow.Decimal = Decimal;\nwindow.exponentialFormat = exponentialFormat;\nwindow.commaFormat = commaFormat;\nwindow.regularFormat = regularFormat;\nwindow.format = format;\nwindow.formatWhole = formatWhole;\nwindow.formatTime = formatTime;\nwindow.toPlaces = toPlaces;\nwindow.formatSmall = formatSmall;\nwindow.invertOOM = invertOOM;\n\nexport default Decimal;\n","export type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n\n// Reference:\n// https://stackoverflow.com/questions/7225407/convert-camelcasetext-to-sentence-case-text\nexport function camelToTitle(camel: string): string {\n let title = camel.replace(/([A-Z])/g, \" $1\");\n title = title.charAt(0).toUpperCase() + title.slice(1);\n return title;\n}\n\nexport function isPlainObject(object: unknown): boolean {\n return Object.prototype.toString.call(object) === \"[object Object]\";\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction(func: unknown): func is Function {\n return typeof func === \"function\";\n}\n\nexport enum Direction {\n Up = \"Up\",\n Down = \"Down\",\n Left = \"Left\",\n Right = \"Right\",\n Default = \"Up\"\n}\n","import { computed, Ref } from \"vue\";\nimport { isFunction } from \"./common\";\n\nexport const DoNotCache = Symbol(\"DoNotCache\");\n\nexport type Computable<T> = T | Ref<T> | (() => T);\nexport type ProcessedComputable<T> = T | Ref<T>;\nexport type GetComputableType<T> = T extends { [DoNotCache]: true }\n ? T\n : T extends () => infer S\n ? Ref<S>\n : undefined extends T\n ? undefined\n : T;\nexport type GetComputableTypeWithDefault<T, S> = undefined extends T\n ? S\n : GetComputableType<NonNullable<T>>;\nexport type UnwrapComputableType<T> = T extends Ref<infer S> ? S : T extends () => infer S ? S : T;\n\nexport type ComputableKeysOf<T> = Pick<\n T,\n {\n [K in keyof T]: T[K] extends Computable<unknown> ? K : never;\n }[keyof T]\n>;\n\n// TODO fix the typing of this function, such that casting isn't necessary and can be used to\n// detect if a createX function is validly written\nexport function processComputable<T, S extends keyof ComputableKeysOf<T>>(\n obj: T,\n key: S\n): asserts obj is T & { [K in S]: ProcessedComputable<UnwrapComputableType<T[S]>> } {\n const computable = obj[key];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(computable) && computable.length === 0 && !(computable as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj[key] = computed(computable.bind(obj));\n }\n}\n\nexport function convertComputable<T>(obj: Computable<T>): ProcessedComputable<T> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isFunction(obj) && !(obj as any)[DoNotCache]) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n obj = computed(obj);\n }\n return obj as ProcessedComputable<T>;\n}\n","import Decimal from \"./bignum\";\n\nexport const ProxyState = Symbol(\"ProxyState\");\nexport const ProxyPath = Symbol(\"ProxyPath\");\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ProxiedWithState<T> = NonNullable<T> extends Record<PropertyKey, any>\n ? NonNullable<T> extends Decimal\n ? T\n : {\n [K in keyof T]: ProxiedWithState<T[K]>;\n } & {\n [ProxyState]: T;\n [ProxyPath]: string[];\n }\n : T;\n\n// Takes a function that returns an object and pretends to be that object\n// Note that the object is lazily calculated\nexport function createLazyProxy<T extends object, S>(\n objectFunc: (baseObject: S) => T & S,\n baseObject: S = {} as S\n): T {\n const obj: S & Partial<T> = baseObject;\n let calculated = false;\n function calculateObj(): T {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return obj as S & T;\n }\n\n return new Proxy(obj, {\n get(target, key) {\n if (key === ProxyState) {\n return calculateObj();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (calculateObj() as any)[key];\n },\n set(target, key, value) {\n // TODO give warning about this? It should only be done with caution\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (calculateObj() as any)[key] = value;\n return true;\n },\n has(target, key) {\n if (key === ProxyState) {\n return true;\n }\n return Reflect.has(calculateObj(), key);\n },\n ownKeys() {\n return Reflect.ownKeys(calculateObj());\n },\n getOwnPropertyDescriptor(target, key) {\n if (!calculated) {\n Object.assign(obj, objectFunc(obj));\n calculated = true;\n }\n return Object.getOwnPropertyDescriptor(target, key);\n }\n }) as S & T;\n}\n","import projInfo from \"data/projInfo.json\";\nimport player, { Player, PlayerData, stringifySave } from \"game/player\";\nimport settings, { loadSettings } from \"game/settings\";\nimport { ProxyState } from \"./proxies\";\nimport LZString from \"lz-string\";\n\nexport function setupInitialStore(player: Partial<PlayerData> = {}): Player {\n return Object.assign(\n {\n id: `${projInfo.id}-0`,\n name: \"Default Save\",\n tabs: projInfo.initialTabs.slice(),\n time: Date.now(),\n autosave: true,\n offlineProd: true,\n offlineTime: 0,\n timePlayed: 0,\n keepGoing: false,\n modID: projInfo.id,\n modVersion: projInfo.versionNumber,\n layers: {}\n },\n player\n ) as Player;\n}\n\nexport function save(playerData?: PlayerData): string {\n const stringifiedSave = LZString.compressToUTF16(\n stringifySave(playerData ?? player[ProxyState])\n );\n localStorage.setItem((playerData ?? player[ProxyState]).id, stringifiedSave);\n return stringifiedSave;\n}\n\nexport async function load(): Promise<void> {\n // Load global settings\n loadSettings();\n\n try {\n let save = localStorage.getItem(settings.active);\n if (save == null) {\n await loadSave(newSave());\n return;\n }\n if (save[0] === \"{\") {\n // plaintext. No processing needed\n } else if (save[0] === \"e\") {\n // Assumed to be base64, which starts with e\n save = decodeURIComponent(escape(atob(save)));\n } else if (save[0] === \"ᯡ\") {\n // Assumed to be lz, which starts with ᯡ\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n save = LZString.decompressFromUTF16(save)!;\n } else {\n throw `Unable to determine save encoding`;\n }\n const player = JSON.parse(save);\n if (player.modID !== projInfo.id) {\n await loadSave(newSave());\n return;\n }\n player.id = settings.active;\n await loadSave(player);\n } catch (e) {\n console.error(\"Failed to load save. Falling back to new save.\\n\", e);\n await loadSave(newSave());\n }\n}\n\nexport function newSave(): PlayerData {\n const id = getUniqueID();\n const player = setupInitialStore({ id });\n save(player);\n\n settings.saves.push(id);\n\n return player;\n}\n\nexport function getUniqueID(): string {\n let id,\n i = 0;\n do {\n id = `${projInfo.id}-${i++}`;\n } while (localStorage.getItem(id));\n return id;\n}\n\nexport async function loadSave(playerObj: Partial<PlayerData>): Promise<void> {\n console.info(\"Loading save\", playerObj);\n const { layers, removeLayer, addLayer } = await import(\"game/layers\");\n const { fixOldSave, getInitialLayers } = await import(\"data/projEntry\");\n\n for (const layer in layers) {\n const l = layers[layer];\n if (l) {\n removeLayer(l);\n }\n }\n getInitialLayers(playerObj).forEach(layer => addLayer(layer, playerObj));\n\n playerObj = setupInitialStore(playerObj);\n if (playerObj.offlineProd && playerObj.time) {\n if (playerObj.offlineTime == undefined) playerObj.offlineTime = 0;\n playerObj.offlineTime += (Date.now() - playerObj.time) / 1000;\n }\n playerObj.time = Date.now();\n if (playerObj.modVersion !== projInfo.versionNumber) {\n fixOldSave(playerObj.modVersion, playerObj);\n }\n\n Object.assign(player, playerObj);\n settings.active = player.id;\n}\n\nsetInterval(() => {\n if (player.autosave) {\n save();\n }\n}, 1000);\nwindow.onbeforeunload = () => {\n if (player.autosave) {\n save();\n }\n};\nwindow.save = save;\nexport const hardReset = (window.hardReset = async () => {\n await loadSave(newSave());\n});\n","<template>\n <transition appear>\n <svg\n id=\"eaRe02fYmMp1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 228 521\"\n shape-rendering=\"geometricPrecision\"\n text-rendering=\"geometricPrecision\"\n >\n <g id=\"P\">\n <path\n d=\"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 10;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"trunk\"\n class=\"svg-elem-1\"\n ></path>\n <path\n d=\"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine2\"\n class=\"svg-elem-2\"\n ></path>\n <path\n d=\"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine4\"\n class=\"svg-elem-3\"\n ></path>\n <path\n d=\"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine3\"\n class=\"svg-elem-4\"\n ></path>\n <path\n d=\"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"vine1\"\n class=\"svg-elem-5\"\n ></path>\n <path\n d=\"M 21,47.8775 38.674,131\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine2\"\n class=\"svg-elem-6\"\n ></path>\n <path\n d=\"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81\"\n style=\"\n display: inline;\n fill: none;\n stroke: rgb(163, 190, 140);\n stroke-width: 5;\n stroke-linecap: round;\n stroke-miterlimit: 16;\n \"\n id=\"short_vine1\"\n class=\"svg-elem-7\"\n ></path>\n </g>\n </svg>\n </transition>\n</template>\n\n<style scoped>\nsvg {\n background: #2e3440;\n}\n\n/***************************************************\n * Generated by SVG Artista on 1/7/2022, 4:39:47 PM\n * MIT license (https://opensource.org/licenses/MIT)\n * W. https://svgartista.net\n **************************************************/\n\nsvg .svg-elem-1 {\n stroke-dashoffset: 2648.758056640625px;\n stroke-dasharray: 1324.3790283203125px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0s;\n}\n\nsvg.v-enter-from .svg-elem-1,\nsvg.v-leave-to .svg-elem-1 {\n stroke-dashoffset: 1324.3790283203125px;\n}\n\nsvg .svg-elem-2 {\n stroke-dashoffset: 680.4000854492188px;\n stroke-dasharray: 340.2000427246094px;\n transition: stroke-dashoffset 1s ease-out 0.4s;\n}\n\nsvg.v-enter-from .svg-elem-2,\nsvg.v-leave-to .svg-elem-2 {\n stroke-dashoffset: 340.2000427246094px;\n}\n\nsvg .svg-elem-3 {\n stroke-dashoffset: 76.21031951904297px;\n stroke-dasharray: 38.105159759521484px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-3,\nsvg.v-leave-to .svg-elem-3 {\n stroke-dashoffset: 38.105159759521484px;\n}\n\nsvg .svg-elem-4 {\n stroke-dashoffset: 175.18072509765625px;\n stroke-dasharray: 87.59036254882812px;\n transition: stroke-dashoffset 1s cubic-bezier(0.47, 0, 0.745, 0.715) 0.36s;\n}\n\nsvg.v-enter-from .svg-elem-4,\nsvg.v-leave-to .svg-elem-4 {\n stroke-dashoffset: 87.59036254882812px;\n}\n\nsvg .svg-elem-5 {\n stroke-dashoffset: 671.9447021484375px;\n stroke-dasharray: 335.97235107421875px;\n transition: stroke-dashoffset 1s ease-out 0.8s;\n}\n\nsvg.v-enter-from .svg-elem-5,\nsvg.v-leave-to .svg-elem-5 {\n stroke-dashoffset: 335.97235107421875px;\n}\n\nsvg .svg-elem-6 {\n stroke-dashoffset: 173.96141052246094px;\n stroke-dasharray: 86.98070526123047px;\n transition: stroke-dashoffset 1s ease-out 1s;\n}\n\nsvg.v-enter-from .svg-elem-6,\nsvg.v-leave-to .svg-elem-6 {\n stroke-dashoffset: 86.98070526123047px;\n}\n\nsvg .svg-elem-7 {\n stroke-dashoffset: 172.99151611328125px;\n stroke-dasharray: 86.49575805664062px;\n transition: stroke-dashoffset 1s ease-out 0.85s;\n}\n\nsvg.v-enter-from .svg-elem-7,\nsvg.v-leave-to .svg-elem-7 {\n stroke-dashoffset: 86.49575805664062px;\n}\n</style>\n","import { render } from \"./Profectus.vue?vue&type=template&id=07150322&scoped=true\"\nconst script = {}\n\nimport \"./Profectus.vue?vue&type=style&index=0&id=07150322&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-07150322\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n width: { default: \"8px\" },\n height: { default: \"17px\" }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n style: _normalizeStyle({ width: __props.width, height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Spacer.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport { computed, ComputedRef, isRef, ref, Ref, watch } from \"vue\";\nimport { globalBus } from \"game/events\";\nimport { State, persistent } from \"game/persistence\";\n\nexport interface Resource<T = DecimalSource> extends Ref<T> {\n displayName: string;\n precision: number;\n small?: boolean;\n}\n\nexport function createResource<T extends State>(\n defaultValue: T | Ref<T>,\n displayName = \"points\",\n precision = 0,\n small = undefined\n): Resource<T> {\n const resource: Partial<Resource<T>> = isRef(defaultValue)\n ? defaultValue\n : persistent(defaultValue);\n resource.displayName = displayName;\n resource.precision = precision;\n resource.small = small;\n return resource as Resource<T>;\n}\n\nexport function trackBest(resource: Resource): Ref<DecimalSource> {\n const best = persistent(resource.value);\n watch(resource, amount => {\n if (Decimal.gt(amount, best.value)) {\n best.value = amount;\n }\n });\n return best;\n}\n\nexport function trackTotal(resource: Resource): Ref<DecimalSource> {\n const total = persistent(resource.value);\n watch(resource, (amount, prevAmount) => {\n if (Decimal.gt(amount, prevAmount)) {\n total.value = Decimal.add(total.value, Decimal.sub(amount, prevAmount));\n }\n });\n return total;\n}\n\nconst tetra8 = new Decimal(\"10^^8\");\nconst e100 = new Decimal(\"1e100\");\nexport function trackOOMPS(\n resource: Resource,\n pointGain?: ComputedRef<DecimalSource>\n): Ref<string> {\n const oomps = ref<DecimalSource>(0);\n const oompsMag = ref(0);\n const lastPoints = ref<DecimalSource>(0);\n\n globalBus.on(\"update\", diff => {\n oompsMag.value = 0;\n if (Decimal.lte(resource.value, e100)) {\n lastPoints.value = resource.value;\n return;\n }\n\n let curr = resource.value;\n let prev = lastPoints.value;\n lastPoints.value = curr;\n if (Decimal.gt(curr, prev)) {\n if (Decimal.gte(curr, tetra8)) {\n curr = Decimal.slog(curr, 1e10);\n prev = Decimal.slog(prev, 1e10);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value = -1;\n } else {\n while (\n Decimal.div(curr, prev).log(10).div(diff).gte(\"100\") &&\n oompsMag.value <= 5 &&\n Decimal.gt(prev, 0)\n ) {\n curr = Decimal.log10(curr);\n prev = Decimal.log10(prev);\n oomps.value = curr.sub(prev).div(diff);\n oompsMag.value++;\n }\n }\n }\n });\n\n const oompsString = computed(() => {\n if (oompsMag.value === 0) {\n return pointGain\n ? format(pointGain.value, resource.precision, resource.small) +\n \" \" +\n resource.displayName +\n \"/s\"\n : \"\";\n }\n return (\n format(oomps.value) +\n \" OOM\" +\n (oompsMag.value < 0 ? \"^OOM\" : \"^\" + oompsMag.value) +\n \"s/sec\"\n );\n });\n return oompsString;\n}\n\nexport function displayResource(resource: Resource, overrideAmount?: DecimalSource): string {\n const amount = overrideAmount ?? resource.value;\n if (Decimal.eq(resource.precision, 0)) {\n return formatWhole(amount);\n }\n return format(amount, resource.precision, resource.small);\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Links = _resolveComponent(\"Links\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.nodesComp))),\n (_ctx.leftNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.leftNodesComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n (_ctx.rightNodesComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.rightNodesComp), { key: 1 }))\n : _createCommentVNode(\"\", true),\n (_ctx.branches)\n ? (_openBlock(), _createBlock(_component_Links, {\n key: 2,\n links: _ctx.unref(_ctx.branches)\n }, null, 8, [\"links\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"x1\", \"y1\", \"x2\", \"y2\"]\n\nimport { Link } from \"features/links/links\";\nimport { FeatureNode } from \"game/layers\";\nimport { computed, toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n link: null,\n startNode: null,\n endNode: null,\n boundingRect: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n link: Link;\n startNode: FeatureNode;\n endNode: FeatureNode;\n boundingRect: DOMRect | undefined;\n}\n\n\nconst props = toRefs(_props);\n\nconst startPosition = computed(() => {\n const rect = props.startNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetStart) {\n position.x += props.link.value.offsetStart.x;\n position.y += props.link.value.offsetStart.y;\n }\n return position;\n});\n\nconst endPosition = computed(() => {\n const rect = props.endNode.value.rect;\n const boundingRect = props.boundingRect.value;\n const position = boundingRect\n ? {\n x: rect.x + rect.width / 2 - boundingRect.x,\n y: rect.y + rect.height / 2 - boundingRect.y\n }\n : { x: 0, y: 0 };\n if (props.link.value.offsetEnd) {\n position.x += props.link.value.offsetEnd.x;\n position.y += props.link.value.offsetEnd.y;\n }\n return position;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"line\", _mergeProps({\n \"stroke-width\": \"15px\",\n stroke: \"white\"\n }, __props.link, {\n x1: _unref(startPosition).x,\n y1: _unref(startPosition).y,\n x2: _unref(endPosition).x,\n y2: _unref(endPosition).y\n }), null, 16, _hoisted_1))\n}\n}\n\n})","import script from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Link.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nimport { Link } from \"features/links/links\";\nimport { BoundsInjectionKey, NodesInjectionKey } from \"game/layers\";\nimport { computed, inject, ref, toRef, watch } from \"vue\";\nimport LinkVue from \"./Link.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n links: null\n },\n setup(__props: any) {\n\nconst _props = __props as { links?: Link[] }\n\n\nconst links = toRef(_props, \"links\");\n\nconst resizeListener = ref<Element | null>(null);\n\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nconst nodes = inject(NodesInjectionKey)!;\n// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\nconst outerBoundingRect = inject(BoundsInjectionKey)!;\nconst boundingRect = ref<DOMRect | undefined>(undefined);\nwatch(\n [outerBoundingRect],\n () => (boundingRect.value = resizeListener.value?.getBoundingClientRect())\n);\n\nconst validLinks = computed(() => {\n const n = nodes.value;\n return (\n links.value?.filter(link => n[link.startNode.id]?.rect && n[link.startNode.id]?.rect) ?? []\n );\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (_unref(validLinks))\n ? (_openBlock(), _createElementBlock(\"svg\", _normalizeProps(_mergeProps({ key: 0 }, _ctx.$attrs)), [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(validLinks), (link, index) => {\n return (_openBlock(), _createBlock(LinkVue, {\n key: index,\n link: link,\n boundingRect: boundingRect.value,\n startNode: _unref(nodes)[link.startNode.id]!,\n endNode: _unref(nodes)[link.endNode.id]!\n }, null, 8, [\"link\", \"boundingRect\", \"startNode\", \"endNode\"]))\n }), 128))\n ], 16))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n ref_key: \"resizeListener\",\n ref: resizeListener,\n class: \"resize-listener\"\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Links.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Links.vue?vue&type=style&index=0&id=2bbc19c2&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2bbc19c2\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport { GenericTreeNode, TreeBranch } from \"features/trees/tree\";\nimport { coerceComponent, processedPropType, renderJSX, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, watchEffect } from \"vue\";\nimport Links from \"features/links/Links.vue\";\nimport { jsx } from \"features/feature\";\n\nexport default defineComponent({\n props: {\n nodes: {\n type: processedPropType<GenericTreeNode[][]>(Array),\n required: true\n },\n leftSideNodes: processedPropType<GenericTreeNode[]>(Array),\n rightSideNodes: processedPropType<GenericTreeNode[]>(Array),\n branches: processedPropType<TreeBranch[]>(Array)\n },\n components: { Links },\n setup(props) {\n const { nodes, leftSideNodes, rightSideNodes } = toRefs(props);\n\n const nodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(nodes);\n nodesComp.value = coerceComponent(\n jsx(() => (\n <>\n {currNodes.map(row => (\n <span class=\"row tree-row\" style=\"margin: 50px auto;\">\n {row.map(renderJSX)}\n </span>\n ))}\n </>\n ))\n );\n });\n\n const leftNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(leftSideNodes);\n leftNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => (\n <span class=\"left-side-nodes small\">{currNodes.map(renderJSX)}</span>\n ))\n )\n : \"\";\n });\n\n const rightNodesComp = shallowRef<Component | \"\">();\n watchEffect(() => {\n const currNodes = unwrapRef(rightSideNodes);\n rightNodesComp.value = currNodes\n ? coerceComponent(\n jsx(() => <span class=\"side-nodes small\">{currNodes.map(renderJSX)}</span>)\n )\n : \"\";\n });\n\n return {\n unref,\n nodesComp,\n leftNodesComp,\n rightNodesComp\n };\n }\n});\n","import { render } from \"./Tree.vue?vue&type=template&id=aa87859c&scoped=true&ts=true\"\nimport script from \"./Tree.vue?vue&type=script&lang=tsx\"\nexport * from \"./Tree.vue?vue&type=script&lang=tsx\"\n\nimport \"./Tree.vue?vue&type=style&index=0&id=aa87859c&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-aa87859c\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({ visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined }),\n class: _normalizeClass({\n treeNode: true,\n can: _ctx.unref(_ctx.canClick),\n ..._ctx.unref(_ctx.classes)\n }),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstartPassive: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchendPassive: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancelPassive: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args)))\n }, [\n _createElementVNode(\"div\", {\n style: _normalizeStyle([\n {\n backgroundColor: _ctx.unref(_ctx.color),\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${_ctx.unref(\n _ctx.glowColor\n )}`\n },\n _ctx.unref(_ctx.style) ?? []\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp))))\n ], 4),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { RegisterNodeInjectionKey, UnregisterNodeInjectionKey } from \"game/layers\";\nimport { computed, inject, onUnmounted, ref, toRefs, unref, watch } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n id: null\n },\n setup(__props: any) {\n\nconst _props = __props as { id: string }\n\n\nconst props = toRefs(_props);\n\nconst register = inject(RegisterNodeInjectionKey);\nconst unregister = inject(UnregisterNodeInjectionKey);\n\nconst node = ref<HTMLElement | null>(null);\nconst parentNode = computed(() => node.value && node.value.parentElement);\n\nif (register && unregister) {\n watch([parentNode, props.id], ([newNode, newID], [prevNode, prevID]) => {\n if (prevNode) {\n unregister(unref(prevID));\n }\n if (newNode) {\n register(newID, newNode);\n }\n });\n\n onUnmounted(() => unregister(unref(props.id)));\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"node\",\n ref_key: \"node\",\n ref: node\n }, null, 512))\n}\n}\n\n})","import script from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Node.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Node.vue?vue&type=style&index=0&id=63ded336&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-63ded336\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c476c56a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = {\n key: 0,\n class: \"mark star\"\n}\nconst _hoisted_3 = [\"src\"]\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n mark: { type: [Boolean, String] }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (__props.mark)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.mark === true)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"img\", {\n key: 1,\n class: \"mark\",\n src: __props.mark\n }, null, 8, _hoisted_3))\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MarkNode.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./MarkNode.vue?vue&type=style&index=0&id=c476c56a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-c476c56a\"]])\n\nexport default __exports__","\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeOptionalComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n color: processedPropType<string>(String),\n glowColor: processedPropType<string>(String),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { onClick, onHold, display } = toRefs(props);\n\n const comp = computeOptionalComponent(display);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n unref,\n Visibility,\n isCoercableComponent\n };\n }\n});\n","import { render } from \"./TreeNode.vue?vue&type=template&id=094cdcfe&scoped=true&ts=true\"\nimport script from \"./TreeNode.vue?vue&type=script&lang=ts\"\nexport * from \"./TreeNode.vue?vue&type=script&lang=ts\"\n\nimport \"./TreeNode.vue?vue&type=style&index=0&id=094cdcfe&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-094cdcfe\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Link } from \"features/links/links\";\nimport { GenericReset } from \"features/reset\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport TreeComponent from \"features/trees/Tree.vue\";\nimport TreeNodeComponent from \"features/trees/TreeNode.vue\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n convertComputable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, ref, Ref, shallowRef, unref } from \"vue\";\n\nexport const TreeNodeType = Symbol(\"TreeNode\");\nexport const TreeType = Symbol(\"Tree\");\n\nexport interface TreeNodeOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n color?: Computable<string>;\n display?: Computable<CoercableComponent>;\n glowColor?: Computable<string>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n reset?: GenericReset;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseTreeNode {\n id: string;\n type: typeof TreeNodeType;\n [Component]: typeof TreeNodeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TreeNode<T extends TreeNodeOptions> = Replace<\n T & BaseTreeNode,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericTreeNode = Replace<\n TreeNode<TreeNodeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createTreeNode<T extends TreeNodeOptions>(\n optionsFunc?: OptionsFunc<T, TreeNode<T>, BaseTreeNode>\n): TreeNode<T> {\n return createLazyProxy(() => {\n const treeNode = optionsFunc?.() ?? ({} as ReturnType<NonNullable<typeof optionsFunc>>);\n treeNode.id = getUniqueID(\"treeNode-\");\n treeNode.type = TreeNodeType;\n treeNode[Component] = TreeNodeComponent;\n\n processComputable(treeNode as T, \"visibility\");\n setDefault(treeNode, \"visibility\", Visibility.Visible);\n processComputable(treeNode as T, \"canClick\");\n setDefault(treeNode, \"canClick\", true);\n processComputable(treeNode as T, \"color\");\n processComputable(treeNode as T, \"display\");\n processComputable(treeNode as T, \"glowColor\");\n processComputable(treeNode as T, \"classes\");\n processComputable(treeNode as T, \"style\");\n processComputable(treeNode as T, \"mark\");\n\n if (treeNode.onClick) {\n const onClick = treeNode.onClick.bind(treeNode);\n treeNode.onClick = function () {\n if (unref(treeNode.canClick)) {\n onClick();\n }\n };\n }\n if (treeNode.onHold) {\n const onHold = treeNode.onHold.bind(treeNode);\n treeNode.onHold = function () {\n if (unref(treeNode.canClick)) {\n onHold();\n }\n };\n }\n\n treeNode[GatherProps] = function (this: GenericTreeNode) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n color,\n glowColor,\n canClick,\n mark,\n id\n };\n };\n\n return treeNode as unknown as TreeNode<T>;\n });\n}\n\nexport interface TreeBranch extends Omit<Link, \"startNode\" | \"endNode\"> {\n startNode: GenericTreeNode;\n endNode: GenericTreeNode;\n}\n\nexport interface TreeOptions {\n visibility?: Computable<Visibility>;\n nodes: Computable<GenericTreeNode[][]>;\n leftSideNodes?: Computable<GenericTreeNode[]>;\n rightSideNodes?: Computable<GenericTreeNode[]>;\n branches?: Computable<TreeBranch[]>;\n resetPropagation?: ResetPropagation;\n onReset?: (node: GenericTreeNode) => void;\n}\n\nexport interface BaseTree {\n id: string;\n links: Ref<Link[]>;\n reset: (node: GenericTreeNode) => void;\n isResetting: Ref<boolean>;\n resettingNode: Ref<GenericTreeNode | null>;\n type: typeof TreeType;\n [Component]: typeof TreeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tree<T extends TreeOptions> = Replace<\n T & BaseTree,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n nodes: GetComputableType<T[\"nodes\"]>;\n leftSideNodes: GetComputableType<T[\"leftSideNodes\"]>;\n rightSideNodes: GetComputableType<T[\"rightSideNodes\"]>;\n branches: GetComputableType<T[\"branches\"]>;\n }\n>;\n\nexport type GenericTree = Replace<\n Tree<TreeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTree<T extends TreeOptions>(\n optionsFunc: OptionsFunc<T, Tree<T>, BaseTree>\n): Tree<T> {\n return createLazyProxy(() => {\n const tree = optionsFunc();\n tree.id = getUniqueID(\"tree-\");\n tree.type = TreeType;\n tree[Component] = TreeComponent;\n\n tree.isResetting = ref(false);\n tree.resettingNode = shallowRef(null);\n\n tree.reset = function (node) {\n const genericTree = tree as GenericTree;\n genericTree.isResetting.value = true;\n genericTree.resettingNode.value = node;\n genericTree.resetPropagation?.(genericTree, node);\n genericTree.onReset?.(node);\n genericTree.isResetting.value = false;\n genericTree.resettingNode.value = null;\n };\n tree.links = computed(() => {\n const genericTree = tree as GenericTree;\n return unref(genericTree.branches) ?? [];\n });\n\n processComputable(tree as T, \"visibility\");\n setDefault(tree, \"visibility\", Visibility.Visible);\n processComputable(tree as T, \"nodes\");\n processComputable(tree as T, \"leftSideNodes\");\n processComputable(tree as T, \"rightSideNodes\");\n processComputable(tree as T, \"branches\");\n\n tree[GatherProps] = function (this: GenericTree) {\n const { nodes, leftSideNodes, rightSideNodes, branches } = this;\n return { nodes, leftSideNodes, rightSideNodes, branches };\n };\n\n return tree as unknown as Tree<T>;\n });\n}\n\nexport type ResetPropagation = {\n (tree: GenericTree, resettingNode: GenericTreeNode): void;\n};\n\nexport const defaultResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) - 1;\n for (let x = row; x >= 0; x--) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const invertedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const nodes = unref(tree.nodes);\n const row = nodes.findIndex(nodes => nodes.includes(resettingNode)) + 1;\n for (let x = row; x < nodes.length; x++) {\n nodes[x].forEach(node => node.reset?.reset());\n }\n};\n\nexport const branchedResetPropagation = function (\n tree: GenericTree,\n resettingNode: GenericTreeNode\n): void {\n const visitedNodes = [resettingNode];\n let currentNodes = [resettingNode];\n if (tree.branches != null) {\n const branches = unref(tree.branches);\n while (currentNodes.length > 0) {\n const nextNodes: GenericTreeNode[] = [];\n currentNodes.forEach(node => {\n branches\n .filter(branch => branch.startNode === node || branch.endNode === node)\n .map(branch => {\n if (branch.startNode === node) {\n return branch.endNode;\n }\n return branch.startNode;\n })\n .filter(node => !visitedNodes.includes(node))\n .forEach(node => {\n // Check here instead of in the filter because this check's results may\n // change as we go through each node\n if (!nextNodes.includes(node)) {\n nextNodes.push(node);\n node.reset?.reset();\n }\n });\n });\n currentNodes = nextNodes;\n visitedNodes.push(...currentNodes);\n }\n }\n};\n\nexport function createResourceTooltip(\n resource: Resource,\n requiredResource: Resource | null = null,\n requirement: Computable<DecimalSource> = 0\n): Ref<string> {\n const req = convertComputable(requirement);\n return computed(() => {\n if (requiredResource == null || Decimal.gte(resource.value, unref(req))) {\n return displayResource(resource) + \" \" + resource.displayName;\n }\n return `Reach ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(unref(req))\n : format(unref(req), requiredResource.precision)\n } ${requiredResource.displayName} to unlock (You have ${\n Decimal.eq(requiredResource.precision, 0)\n ? formatWhole(requiredResource.value)\n : format(requiredResource.value, requiredResource.precision)\n })`;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined,\n backgroundImage: (_ctx.earned && _ctx.image && `url(${_ctx.image})`) || ''\n },\n _ctx.unref(_ctx.style) ?? []\n ]),\n class: _normalizeClass({\n feature: true,\n achievement: true,\n locked: !_ctx.unref(_ctx.earned),\n bought: _ctx.unref(_ctx.earned),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport { computeOptionalComponent, processedPropType } from \"util/vue\";\nimport { defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport \"components/common/features.css\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n image: processedPropType<string>(String),\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display } = toRefs(props);\n\n return {\n component: computeOptionalComponent(display),\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Achievement.vue?vue&type=template&id=e3f32402&scoped=true&ts=true\"\nimport script from \"./Achievement.vue?vue&type=script&lang=ts\"\nexport * from \"./Achievement.vue?vue&type=script&lang=ts\"\n\nimport \"./Achievement.vue?vue&type=style&index=0&id=e3f32402&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e3f32402\"]])\n\nexport default __exports__","import { globalBus } from \"game/events\";\nimport Toast from \"vue-toastification\";\nimport \"vue-toastification/dist/index.css\";\n\nglobalBus.on(\"setupVue\", vue => vue.use(Toast));\n\nexport function getNotifyStyle(color = \"white\", strength = \"8px\") {\n return {\n transform: \"scale(1.05, 1.05)\",\n borderColor: \"rgba(0, 0, 0, 0.125)\",\n boxShadow: `-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${strength} ${color}`,\n zIndex: 1\n };\n}\n\nexport function getHighNotifyStyle() {\n return getNotifyStyle(\"red\", \"20px\");\n}\n","import AchievementComponent from \"features/achievements/Achievement.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport \"game/notifications\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent } from \"util/vue\";\nimport { unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const AchievementType = Symbol(\"Achievement\");\n\nexport interface AchievementOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n image?: Computable<string>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseAchievement {\n id: string;\n earned: Persistent<boolean>;\n complete: VoidFunction;\n type: typeof AchievementType;\n [Component]: typeof AchievementComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Achievement<T extends AchievementOptions> = Replace<\n T & BaseAchievement,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n image: GetComputableType<T[\"image\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n }\n>;\n\nexport type GenericAchievement = Replace<\n Achievement<AchievementOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createAchievement<T extends AchievementOptions>(\n optionsFunc?: OptionsFunc<T, Achievement<T>, BaseAchievement>\n): Achievement<T> {\n const earned = persistent<boolean>(false);\n return createLazyProxy(() => {\n const achievement = optionsFunc?.() ?? ({} as ReturnType<NonNullable<typeof optionsFunc>>);\n achievement.id = getUniqueID(\"achievement-\");\n achievement.type = AchievementType;\n achievement[Component] = AchievementComponent;\n\n achievement.earned = earned;\n achievement.complete = function () {\n earned.value = true;\n };\n\n processComputable(achievement as T, \"visibility\");\n setDefault(achievement, \"visibility\", Visibility.Visible);\n processComputable(achievement as T, \"display\");\n processComputable(achievement as T, \"mark\");\n processComputable(achievement as T, \"image\");\n processComputable(achievement as T, \"style\");\n processComputable(achievement as T, \"classes\");\n\n achievement[GatherProps] = function (this: GenericAchievement) {\n const { visibility, display, earned, image, style, classes, mark, id } = this;\n return { visibility, display, earned, image, style: unref(style), classes, mark, id };\n };\n\n if (achievement.shouldEarn) {\n const genericAchievement = achievement as GenericAchievement;\n watchEffect(() => {\n if (\n !genericAchievement.earned.value &&\n unref(genericAchievement.visibility) === Visibility.Visible &&\n genericAchievement.shouldEarn?.()\n ) {\n genericAchievement.earned.value = true;\n genericAchievement.onComplete?.();\n if (genericAchievement.display) {\n const Display = coerceComponent(unref(genericAchievement.display));\n toast.info(\n <div>\n <h3>Achievement earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </div>\n );\n }\n }\n });\n }\n\n return achievement as unknown as Achievement<T>;\n });\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_GridCell = _resolveComponent(\"GridCell\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle({\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n }),\n class: \"table\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.rows), (row) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _ctx.mergeAdjacent }]),\n key: row\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.cols), (col) => {\n return (_openBlock(), _createBlock(_component_GridCell, _mergeProps({ key: col }, _ctx.gatherCellProps(_ctx.unref(_ctx.cells)[row * 100 + col])), null, 16))\n }), 128))\n ], 2))\n }), 128))\n ], 4))\n : _createCommentVNode(\"\", true)\n}","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-b27416ec\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: _normalizeClass({ feature: true, tile: true, can: _ctx.unref(_ctx.canClick), locked: !_ctx.unref(_ctx.canClick) }),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstartPassive: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchendPassive: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancelPassive: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args)))\n }, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), { style: {\"white-space\":\"pre-line\"} })),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport {\n computeComponent,\n computeOptionalComponent,\n processedPropType,\n setupHoldToClick\n} from \"util/vue\";\nimport { defineComponent, PropType, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: processedPropType<CoercableComponent>(Object, String, Function),\n style: processedPropType<StyleValue>(String, Object, Array),\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { onClick, onHold, title, display } = toRefs(props);\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n const titleComponent = computeOptionalComponent(title);\n const component = computeComponent(display);\n\n return {\n start,\n stop,\n titleComponent,\n component,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./GridCell.vue?vue&type=template&id=b27416ec&scoped=true&ts=true\"\nimport script from \"./GridCell.vue?vue&type=script&lang=ts\"\nexport * from \"./GridCell.vue?vue&type=script&lang=ts\"\n\nimport \"./GridCell.vue?vue&type=style&index=0&id=b27416ec&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b27416ec\"]])\n\nexport default __exports__","\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport { Visibility } from \"features/feature\";\nimport { GridCell } from \"features/grids/grid\";\nimport settings from \"game/settings\";\nimport { processedPropType } from \"util/vue\";\nimport { computed, defineComponent, unref } from \"vue\";\nimport GridCellVue from \"./GridCell.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n rows: {\n type: processedPropType<number>(Number),\n required: true\n },\n cols: {\n type: processedPropType<number>(Number),\n required: true\n },\n cells: {\n type: processedPropType<Record<string, GridCell>>(Object),\n required: true\n }\n },\n components: { GridCell: GridCellVue },\n setup() {\n const mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\n function gatherCellProps(cell: GridCell) {\n const { visibility, onClick, onHold, display, title, style, canClick, id } = cell;\n return { visibility, onClick, onHold, display, title, style, canClick, id };\n }\n\n return { unref, gatherCellProps, Visibility, mergeAdjacent };\n }\n});\n","import { render } from \"./Grid.vue?vue&type=template&id=4f6b6717&ts=true\"\nimport script from \"./Grid.vue?vue&type=script&lang=ts\"\nexport * from \"./Grid.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import GridComponent from \"features/grids/Grid.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { State, Persistent, persistent } from \"game/persistence\";\n\nexport const GridType = Symbol(\"Grid\");\n\nexport type CellComputable<T> = Computable<T> | ((id: string | number, state: State) => T);\n\nfunction createGridProxy(grid: GenericGrid): Record<string | number, GridCell> {\n return new Proxy({}, getGridHandler(grid)) as Record<string | number, GridCell>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getGridHandler(grid: GenericGrid): ProxyHandler<Record<string | number, GridCell>> {\n const keys = computed(() => {\n const keys = [];\n for (let row = 1; row <= unref(grid.rows); row++) {\n for (let col = 1; col <= unref(grid.cols); col++) {\n keys.push((row * 100 + col).toString());\n }\n }\n return keys;\n });\n return {\n get(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (key === \"isProxy\") {\n return true;\n }\n\n if (typeof key === \"symbol\") {\n return (grid as never)[key];\n }\n\n if (!keys.value.includes(key.toString())) {\n return undefined;\n }\n\n if (target[key] == null) {\n target[key] = new Proxy(\n grid,\n getCellHandler(key.toString())\n ) as unknown as GridCell;\n }\n\n return target[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string | number, GridCell>, key: PropertyKey, value: any) {\n console.warn(\"Cannot set grid cells\", target, key, value);\n return false;\n },\n ownKeys() {\n return keys.value;\n },\n has(target: Record<string | number, GridCell>, key: PropertyKey) {\n return keys.value.includes(key.toString());\n },\n getOwnPropertyDescriptor(target: Record<string | number, GridCell>, key: PropertyKey) {\n if (keys.value.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nfunction getCellHandler(id: string): ProxyHandler<GenericGrid> {\n const keys = [\n \"id\",\n \"visibility\",\n \"canClick\",\n \"startState\",\n \"state\",\n \"style\",\n \"classes\",\n \"title\",\n \"display\",\n \"onClick\",\n \"onHold\"\n ];\n const cache: Record<string, Ref<unknown>> = {};\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target, key, receiver): any {\n if (key === \"isProxy\") {\n return true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let prop = (target as any)[key];\n\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n }\n if (prop != undefined || typeof key === \"symbol\") {\n return prop;\n }\n\n key = key.slice(0, 1).toUpperCase() + key.slice(1);\n\n if (key === \"startState\") {\n return prop.call(receiver, id);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`get${key}`];\n if (isFunction(prop)) {\n if (!(key in cache)) {\n cache[key] = computed(() => prop.call(receiver, id, target.getState(id)));\n }\n return cache[key].value;\n } else if (prop != undefined) {\n return unref(prop);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prop = (target as any)[`on${key}`];\n if (isFunction(prop)) {\n return () => prop.call(receiver, id, target.getState(id));\n } else if (prop != undefined) {\n return prop;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(target: Record<string, any>, key: string, value: any, receiver: typeof Proxy): boolean {\n key = `set${key.slice(0, 1).toUpperCase() + key.slice(1)}`;\n if (key in target && isFunction(target[key]) && target[key].length < 3) {\n target[key].call(receiver, id, value);\n return true;\n } else {\n console.warn(`No setter for \"${key}\".`, target);\n return false;\n }\n },\n ownKeys() {\n return keys;\n },\n has(target, key) {\n return keys.includes(key.toString());\n },\n getOwnPropertyDescriptor(target, key) {\n if (keys.includes(key.toString())) {\n return {\n configurable: true,\n enumerable: true,\n writable: false\n };\n }\n }\n };\n}\n\nexport interface GridCell {\n id: string;\n visibility: Visibility;\n canClick: boolean;\n startState: State;\n state: State;\n style?: StyleValue;\n classes?: Record<string, boolean>;\n title?: CoercableComponent;\n display: CoercableComponent;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface GridOptions {\n visibility?: Computable<Visibility>;\n rows: Computable<number>;\n cols: Computable<number>;\n getVisibility?: CellComputable<Visibility>;\n getCanClick?: CellComputable<boolean>;\n getStartState: Computable<State> | ((id: string | number) => State);\n getStyle?: CellComputable<StyleValue>;\n getClasses?: CellComputable<Record<string, boolean>>;\n getTitle?: CellComputable<CoercableComponent>;\n getDisplay: CellComputable<CoercableComponent>;\n onClick?: (id: string | number, state: State, e?: MouseEvent | TouchEvent) => void;\n onHold?: (id: string | number, state: State) => void;\n}\n\nexport interface BaseGrid {\n id: string;\n getID: (id: string | number, state: State) => string;\n getState: (id: string | number) => State;\n setState: (id: string | number, state: State) => void;\n cells: Record<string | number, GridCell>;\n cellState: Persistent<Record<string | number, State>>;\n type: typeof GridType;\n [Component]: typeof GridComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Grid<T extends GridOptions> = Replace<\n T & BaseGrid,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n rows: GetComputableType<T[\"rows\"]>;\n cols: GetComputableType<T[\"cols\"]>;\n getVisibility: GetComputableTypeWithDefault<T[\"getVisibility\"], Visibility.Visible>;\n getCanClick: GetComputableTypeWithDefault<T[\"getCanClick\"], true>;\n getStartState: GetComputableType<T[\"getStartState\"]>;\n getStyle: GetComputableType<T[\"getStyle\"]>;\n getClasses: GetComputableType<T[\"getClasses\"]>;\n getTitle: GetComputableType<T[\"getTitle\"]>;\n getDisplay: GetComputableType<T[\"getDisplay\"]>;\n }\n>;\n\nexport type GenericGrid = Replace<\n Grid<GridOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n getVisibility: ProcessedComputable<Visibility>;\n getCanClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createGrid<T extends GridOptions>(\n optionsFunc: OptionsFunc<T, Grid<T>, BaseGrid>\n): Grid<T> {\n const cellState = persistent<Record<string | number, State>>({});\n return createLazyProxy(() => {\n const grid = optionsFunc();\n grid.id = getUniqueID(\"grid-\");\n grid[Component] = GridComponent;\n\n grid.cellState = cellState;\n\n grid.getID = function (this: GenericGrid, cell: string | number) {\n return grid.id + \"-\" + cell;\n };\n grid.getState = function (this: GenericGrid, cell: string | number) {\n if (this.cellState.value[cell] != undefined) {\n return cellState.value[cell];\n }\n return this.cells[cell].startState;\n };\n grid.setState = function (this: GenericGrid, cell: string | number, state: State) {\n cellState.value[cell] = state;\n };\n\n grid.cells = createGridProxy(grid as GenericGrid);\n\n processComputable(grid as T, \"visibility\");\n setDefault(grid, \"visibility\", Visibility.Visible);\n processComputable(grid as T, \"rows\");\n processComputable(grid as T, \"cols\");\n processComputable(grid as T, \"getVisibility\");\n setDefault(grid, \"getVisibility\", Visibility.Visible);\n processComputable(grid as T, \"getCanClick\");\n setDefault(grid, \"getCanClick\", true);\n processComputable(grid as T, \"getStartState\");\n processComputable(grid as T, \"getStyle\");\n processComputable(grid as T, \"getClasses\");\n processComputable(grid as T, \"getTitle\");\n processComputable(grid as T, \"getDisplay\");\n\n if (grid.onClick) {\n const onClick = grid.onClick.bind(grid);\n grid.onClick = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onClick(id, state);\n }\n };\n }\n if (grid.onHold) {\n const onHold = grid.onHold.bind(grid);\n grid.onHold = function (id, state) {\n if (unref((grid as GenericGrid).cells[id].canClick)) {\n onHold(id, state);\n }\n };\n }\n\n grid[GatherProps] = function (this: GenericGrid) {\n const { visibility, rows, cols, cells, id } = this;\n return { visibility, rows, cols, cells, id };\n };\n\n return grid as unknown as Grid<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n { visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined },\n _ctx.unref(_ctx.style) ?? []\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.onClick && _ctx.onClick(...args))),\n onMousedown: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onMouseleave: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onMouseup: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchstartPassive: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.start && _ctx.start(...args))),\n onTouchendPassive: _cache[5] || (_cache[5] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n onTouchcancelPassive: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.stop && _ctx.stop(...args))),\n class: _normalizeClass({\n feature: true,\n clickable: true,\n can: _ctx.unref(_ctx.canClick),\n locked: !_ctx.unref(_ctx.canClick),\n small: _ctx.small,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 38))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { GenericClickable } from \"features/clickables/clickable\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport {\n coerceComponent,\n isCoercableComponent,\n processedPropType,\n setupHoldToClick,\n unwrapRef\n} from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericClickable[\"display\"]>>(\n Object,\n String,\n Function\n ),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onClick: Function as PropType<(e?: MouseEvent | TouchEvent) => void>,\n onHold: Function as PropType<VoidFunction>,\n canClick: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n small: Boolean,\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, onClick, onHold } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n </span>\n ))\n );\n });\n\n const { start, stop } = setupHoldToClick(onClick, onHold);\n\n return {\n start,\n stop,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Clickable.vue?vue&type=template&id=e4e6b79a&scoped=true&ts=true\"\nimport script from \"./Clickable.vue?vue&type=script&lang=tsx\"\nexport * from \"./Clickable.vue?vue&type=script&lang=tsx\"\n\nimport \"./Clickable.vue?vue&type=style&index=0&id=e4e6b79a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e4e6b79a\"]])\n\nexport default __exports__","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericLayer } from \"game/layers\";\nimport { Unsubscribe } from \"nanoevents\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, unref } from \"vue\";\n\nexport const ClickableType = Symbol(\"Clickable\");\n\nexport interface ClickableOptions {\n visibility?: Computable<Visibility>;\n canClick?: Computable<boolean>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n }\n >;\n small?: boolean;\n onClick?: (e?: MouseEvent | TouchEvent) => void;\n onHold?: VoidFunction;\n}\n\nexport interface BaseClickable {\n id: string;\n type: typeof ClickableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Clickable<T extends ClickableOptions> = Replace<\n T & BaseClickable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], true>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericClickable = Replace<\n Clickable<ClickableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canClick: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createClickable<T extends ClickableOptions>(\n optionsFunc?: OptionsFunc<T, Clickable<T>, BaseClickable>\n): Clickable<T> {\n return createLazyProxy(() => {\n const clickable = optionsFunc?.() ?? ({} as ReturnType<NonNullable<typeof optionsFunc>>);\n clickable.id = getUniqueID(\"clickable-\");\n clickable.type = ClickableType;\n clickable[Component] = ClickableComponent;\n\n processComputable(clickable as T, \"visibility\");\n setDefault(clickable, \"visibility\", Visibility.Visible);\n processComputable(clickable as T, \"canClick\");\n setDefault(clickable, \"canClick\", true);\n processComputable(clickable as T, \"classes\");\n processComputable(clickable as T, \"style\");\n processComputable(clickable as T, \"mark\");\n processComputable(clickable as T, \"display\");\n\n if (clickable.onClick) {\n const onClick = clickable.onClick.bind(clickable);\n clickable.onClick = function (e) {\n if (unref(clickable.canClick)) {\n onClick(e);\n }\n };\n }\n if (clickable.onHold) {\n const onHold = clickable.onHold.bind(clickable);\n clickable.onHold = function () {\n if (unref(clickable.canClick)) {\n onHold();\n }\n };\n }\n\n clickable[GatherProps] = function (this: GenericClickable) {\n const {\n display,\n visibility,\n style,\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n onHold,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return clickable as unknown as Clickable<T>;\n });\n}\n\nexport function setupAutoClick(\n layer: GenericLayer,\n clickable: GenericClickable,\n autoActive: Computable<boolean> = true\n): Unsubscribe {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return layer.on(\"update\", () => {\n if (unref(isActive) && unref(clickable.canClick)) {\n clickable.onClick?.();\n }\n });\n}\n","import {\n Clickable,\n ClickableOptions,\n createClickable,\n GenericClickable\n} from \"features/clickables/clickable\";\nimport { GenericConversion } from \"features/conversion\";\nimport {\n CoercableComponent,\n jsx,\n JSXFunction,\n OptionsFunc,\n Replace,\n setDefault\n} from \"features/feature\";\nimport { displayResource } from \"features/resources/resource\";\nimport {\n createTreeNode,\n GenericTree,\n GenericTreeNode,\n TreeNode,\n TreeNodeOptions\n} from \"features/trees/tree\";\nimport { Modifier } from \"game/modifiers\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport player from \"game/player\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { WithRequired } from \"util/common\";\nimport {\n Computable,\n convertComputable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { renderJSX } from \"util/vue\";\nimport { computed, Ref, unref } from \"vue\";\nimport \"./common.css\";\n\nexport interface ResetButtonOptions extends ClickableOptions {\n conversion: GenericConversion;\n tree: GenericTree;\n treeNode: GenericTreeNode;\n resetDescription?: Computable<string>;\n showNextAt?: Computable<boolean>;\n display?: Computable<CoercableComponent>;\n canClick?: Computable<boolean>;\n minimumGain?: Computable<DecimalSource>;\n}\n\nexport type ResetButton<T extends ResetButtonOptions> = Replace<\n Clickable<T>,\n {\n resetDescription: GetComputableTypeWithDefault<T[\"resetDescription\"], Ref<string>>;\n showNextAt: GetComputableTypeWithDefault<T[\"showNextAt\"], true>;\n display: GetComputableTypeWithDefault<T[\"display\"], Ref<JSX.Element>>;\n canClick: GetComputableTypeWithDefault<T[\"canClick\"], Ref<boolean>>;\n minimumGain: GetComputableTypeWithDefault<T[\"minimumGain\"], 1>;\n onClick: VoidFunction;\n }\n>;\n\nexport type GenericResetButton = Replace<\n GenericClickable & ResetButton<ResetButtonOptions>,\n {\n resetDescription: ProcessedComputable<string>;\n showNextAt: ProcessedComputable<boolean>;\n display: ProcessedComputable<CoercableComponent>;\n canClick: ProcessedComputable<boolean>;\n minimumGain: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createResetButton<T extends ClickableOptions & ResetButtonOptions>(\n optionsFunc: OptionsFunc<T>\n): ResetButton<T> {\n return createClickable(() => {\n const resetButton = optionsFunc();\n\n processComputable(resetButton as T, \"showNextAt\");\n setDefault(resetButton, \"showNextAt\", true);\n setDefault(resetButton, \"minimumGain\", 1);\n\n if (resetButton.resetDescription == null) {\n resetButton.resetDescription = computed(() =>\n Decimal.lt(resetButton.conversion.gainResource.value, 1e3) ? \"Reset for \" : \"\"\n );\n } else {\n processComputable(resetButton as T, \"resetDescription\");\n }\n\n if (resetButton.display == null) {\n resetButton.display = jsx(() => (\n <span>\n {unref(resetButton.resetDescription as ProcessedComputable<string>)}\n <b>\n {displayResource(\n resetButton.conversion.gainResource,\n Decimal.max(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n )}\n </b>{\" \"}\n {resetButton.conversion.gainResource.displayName}\n <div v-show={unref(resetButton.showNextAt)}>\n <br />\n {unref(resetButton.conversion.buyMax) ? \"Next:\" : \"Req:\"}{\" \"}\n {displayResource(\n resetButton.conversion.baseResource,\n unref(resetButton.conversion.buyMax) ||\n Decimal.floor(unref(resetButton.conversion.actualGain)).neq(1)\n ? unref(resetButton.conversion.nextAt)\n : unref(resetButton.conversion.currentAt)\n )}{\" \"}\n {resetButton.conversion.baseResource.displayName}\n </div>\n </span>\n ));\n }\n\n if (resetButton.canClick == null) {\n resetButton.canClick = computed(() =>\n Decimal.gte(\n unref(resetButton.conversion.actualGain),\n unref(resetButton.minimumGain as ProcessedComputable<DecimalSource>)\n )\n );\n }\n\n const onClick = resetButton.onClick;\n resetButton.onClick = function () {\n if (!unref(resetButton.canClick)) {\n return;\n }\n resetButton.conversion.convert();\n resetButton.tree.reset(resetButton.treeNode);\n onClick?.();\n };\n\n return resetButton;\n }) as unknown as ResetButton<T>;\n}\n\nexport interface LayerTreeNodeOptions extends TreeNodeOptions {\n layerID: string;\n color: Computable<string>; // marking as required\n display?: Computable<CoercableComponent>;\n append?: Computable<boolean>;\n}\nexport type LayerTreeNode<T extends LayerTreeNodeOptions> = Replace<\n TreeNode<T>,\n {\n display: GetComputableTypeWithDefault<T[\"display\"], T[\"layerID\"]>;\n append: GetComputableType<T[\"append\"]>;\n }\n>;\nexport type GenericLayerTreeNode = Replace<\n LayerTreeNode<LayerTreeNodeOptions>,\n {\n display: ProcessedComputable<CoercableComponent>;\n append?: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createLayerTreeNode<T extends LayerTreeNodeOptions>(\n optionsFunc: OptionsFunc<T>\n): LayerTreeNode<T> {\n return createTreeNode(() => {\n const options = optionsFunc();\n processComputable(options as T, \"display\");\n setDefault(options, \"display\", options.layerID);\n processComputable(options as T, \"append\");\n return {\n ...options,\n display: options.display,\n onClick: unref((options as unknown as GenericLayerTreeNode).append)\n ? function () {\n if (player.tabs.includes(options.layerID)) {\n const index = player.tabs.lastIndexOf(options.layerID);\n player.tabs.splice(index, 1);\n } else {\n player.tabs.push(options.layerID);\n }\n }\n : function () {\n player.tabs.splice(1, 1, options.layerID);\n }\n };\n }) as unknown as LayerTreeNode<T>;\n}\n\nexport function createCollapsibleModifierSections(\n sections: {\n title: string;\n subtitle?: string;\n modifier: WithRequired<Modifier, \"description\">;\n base?: Computable<DecimalSource>;\n unit?: string;\n baseText?: Computable<CoercableComponent>;\n visible?: Computable<boolean>;\n }[]\n): [JSXFunction, Persistent<boolean>[]] {\n const processedBase = sections.map(s => convertComputable(s.base));\n const processedBaseText = sections.map(s => convertComputable(s.baseText));\n const processedVisible = sections.map(s => convertComputable(s.visible));\n const collapsed = sections.map(() => persistent<boolean>(false));\n const jsxFunc = jsx(() => {\n const sectionJSX = sections.map((s, i) => {\n if (unref(processedVisible[i]) === false) return null;\n const header = (\n <h3\n onClick={() => (collapsed[i].value = !collapsed[i].value)}\n style=\"cursor: pointer\"\n >\n <span class={\"modifier-toggle\" + (unref(collapsed[i]) ? \" collapsed\" : \"\")}>\n ▼\n </span>\n {s.title}\n {s.subtitle ? <span class=\"subtitle\"> ({s.subtitle})</span> : null}\n </h3>\n );\n\n const modifiers = unref(collapsed[i]) ? null : (\n <>\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">\n {format(unref(processedBase[i]) ?? 1)}\n {s.unit}\n </span>\n <span class=\"modifier-description\">\n {renderJSX(unref(processedBaseText[i]) ?? \"Base\")}\n </span>\n </div>\n {renderJSX(unref(s.modifier.description))}\n </>\n );\n\n return (\n <>\n {i === 0 ? null : <br />}\n <div>\n {header}\n <br />\n {modifiers}\n <hr />\n Total: {format(s.modifier.apply(unref(processedBase[i]) ?? 1))}\n {s.unit}\n </div>\n </>\n );\n });\n return <>{sectionJSX}</>;\n });\n return [jsxFunc, collapsed];\n}\n","import { GenericLayer } from \"game/layers\";\nimport { Modifier } from \"game/modifiers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { WithRequired } from \"util/common\";\nimport {\n Computable,\n convertComputable,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { OptionsFunc, Replace, setDefault } from \"./feature\";\nimport { Resource } from \"./resources/resource\";\n\n/**\n * An object that configures a {@link conversion}.\n */\nexport interface ConversionOptions {\n /**\n * The scaling function that is used to determine the rate of conversion from one {@link resource} to the other.\n */\n scaling: ScalingFunction;\n /**\n * How much of the output resource the conversion can currently convert for.\n * Typically this will be set for you in a conversion constructor.\n */\n currentGain?: Computable<DecimalSource>;\n /**\n * The absolute amount the output resource will be changed by.\n * Typically this will be set for you in a conversion constructor.\n * This will differ from {@link currentGain} in the cases where the conversion isn't just adding the converted amount to the output resource.\n */\n actualGain?: Computable<DecimalSource>;\n /**\n * The amount of the input resource currently being required in order to produce the {@link currentGain}.\n * That is, if it went below this value then {@link currentGain} would decrease.\n * Typically this will be set for you in a conversion constructor.\n */\n currentAt?: Computable<DecimalSource>;\n /**\n * The amount of the input resource required to make {@link currentGain} increase.\n * Typically this will be set for you in a conversion constructor.\n */\n nextAt?: Computable<DecimalSource>;\n /**\n * The input {@link resource} for this conversion.\n */\n baseResource: Resource;\n /**\n * The output {@link resource} for this conversion. i.e. the resource being generated.\n */\n gainResource: Resource;\n /**\n * Whether or not to cap the amount of the output resource gained by converting at 1.\n */\n buyMax?: Computable<boolean>;\n /**\n * Whether or not to round up the cost to generate a given amount of the output resource.\n */\n roundUpCost?: Computable<boolean>;\n /**\n * The function that performs the actual conversion from {@link baseResource} to {@link gainResource}.\n * Typically this will be set for you in a conversion constructor.\n */\n convert?: VoidFunction;\n /**\n * An addition modifier that will be applied to the gain amounts.\n * Must be reversible in order to correctly calculate {@link nextAt}.\n * @see {@link createSequentialModifier} if you want to apply multiple modifiers.\n */\n gainModifier?: WithRequired<Modifier, \"revert\">;\n}\n\n/**\n * The properties that are added onto a processed {@link ConversionOptions} to create a {@link Conversion}.\n */\nexport interface BaseConversion {\n /**\n * The function that performs the actual conversion.\n */\n convert: VoidFunction;\n}\n\n/**\n * An object that converts one {@link resource} into another at a given rate.\n */\nexport type Conversion<T extends ConversionOptions> = Replace<\n T & BaseConversion,\n {\n currentGain: GetComputableTypeWithDefault<T[\"currentGain\"], Ref<DecimalSource>>;\n actualGain: GetComputableTypeWithDefault<T[\"actualGain\"], Ref<DecimalSource>>;\n currentAt: GetComputableTypeWithDefault<T[\"currentAt\"], Ref<DecimalSource>>;\n nextAt: GetComputableTypeWithDefault<T[\"nextAt\"], Ref<DecimalSource>>;\n buyMax: GetComputableTypeWithDefault<T[\"buyMax\"], true>;\n roundUpCost: GetComputableTypeWithDefault<T[\"roundUpCost\"], true>;\n }\n>;\n\n/**\n * A type that matches any {@link conversion} object.\n */\nexport type GenericConversion = Replace<\n Conversion<ConversionOptions>,\n {\n currentGain: ProcessedComputable<DecimalSource>;\n actualGain: ProcessedComputable<DecimalSource>;\n currentAt: ProcessedComputable<DecimalSource>;\n nextAt: ProcessedComputable<DecimalSource>;\n buyMax: ProcessedComputable<boolean>;\n roundUpCost: ProcessedComputable<boolean>;\n }\n>;\n\n/**\n * Lazily creates a conversion with the given options.\n * You typically shouldn't use this function directly. Instead use one of the other conversion constructors, which will then call this.\n * @param optionsFunc Conversion options.\n * @see {@link createCumulativeConversion}.\n * @see {@link createIndependentConversion}.\n */\nexport function createConversion<T extends ConversionOptions>(\n optionsFunc: OptionsFunc<T, Conversion<T>, BaseConversion>\n): Conversion<T> {\n return createLazyProxy(() => {\n const conversion = optionsFunc();\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = conversion.currentGain;\n }\n if (conversion.currentAt == null) {\n conversion.currentAt = computed(() => {\n let current = conversion.scaling.currentAt(conversion as GenericConversion);\n if (conversion.roundUpCost) current = Decimal.ceil(current);\n return current;\n });\n }\n if (conversion.nextAt == null) {\n conversion.nextAt = computed(() => {\n let next = conversion.scaling.nextAt(conversion as GenericConversion);\n if (conversion.roundUpCost) next = Decimal.ceil(next);\n return next;\n });\n }\n\n if (conversion.convert == null) {\n conversion.convert = function () {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n unref((conversion as GenericConversion).currentGain)\n );\n // TODO just subtract cost?\n conversion.baseResource.value = 0;\n };\n }\n\n processComputable(conversion as T, \"currentGain\");\n processComputable(conversion as T, \"actualGain\");\n processComputable(conversion as T, \"currentAt\");\n processComputable(conversion as T, \"nextAt\");\n processComputable(conversion as T, \"buyMax\");\n setDefault(conversion, \"buyMax\", true);\n processComputable(conversion as T, \"roundUpCost\");\n setDefault(conversion, \"roundUpCost\", true);\n\n return conversion as unknown as Conversion<T>;\n });\n}\n\n/**\n * A collection of functions that allow a conversion to scale the amount of resources gained based on the input resource.\n * This typically shouldn't be created directly. Instead use one of the scaling function constructors.\n * @see {@link createLinearScaling}.\n * @see {@link createPolynomialScaling}.\n */\nexport interface ScalingFunction {\n /**\n * Calculates the amount of the output resource a conversion should be able to currently produce.\n * This should be based off of `conversion.baseResource.value`.\n * The conversion is responsible for applying the gainModifier, so this function should be un-modified.\n * It does not need to be clamped or rounded.\n */\n currentGain: (conversion: GenericConversion) => DecimalSource;\n /**\n * Calculates the amount of the input resource that is required for the current value of `conversion.currentGain`.\n * Note that `conversion.currentGain` has been modified by `conversion.gainModifier`, so you will need to revert that as appropriate.\n * The conversion is responsible for rounding up the amount as appropriate.\n * The returned value should not be below 0.\n */\n currentAt: (conversion: GenericConversion) => DecimalSource;\n /**\n * Calculates the amount of the input resource that would be required for the current value of `conversion.currentGain` to increase.\n * Note that `conversion.currentGain` has been modified by `conversion.gainModifier`, so you will need to revert that as appropriate.\n * The conversion is responsible for rounding up the amount as appropriate.\n * The returned value should not be below 0.\n */\n nextAt: (conversion: GenericConversion) => DecimalSource;\n}\n\n/**\n * Creates a scaling function based off the formula `(baseResource - base) * coefficient`.\n * If the baseResource value is less than base then the currentGain will be 0.\n * @param base The base variable in the scaling formula.\n * @param coefficient The coefficient variable in the scaling formula.\n * @example\n * A scaling function created via `createLinearScaling(10, 0.5)` would produce the following values:\n * | Base Resource | Current Gain |\n * | ------------- | ------------ |\n * | 10 | 1 |\n * | 12 | 2 |\n * | 20 | 6 |\n */\nexport function createLinearScaling(\n base: Computable<DecimalSource>,\n coefficient: Computable<DecimalSource>\n): ScalingFunction {\n const processedBase = convertComputable(base);\n const processedCoefficient = convertComputable(coefficient);\n return {\n currentGain(conversion) {\n if (Decimal.lt(conversion.baseResource.value, unref(processedBase))) {\n return 0;\n }\n\n return Decimal.sub(conversion.baseResource.value, unref(processedBase))\n .sub(1)\n .times(unref(processedCoefficient))\n .add(1);\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.sub(current, 1)\n .div(unref(processedCoefficient))\n .add(unref(processedBase));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.sub(next, 1)\n .div(unref(processedCoefficient))\n .add(unref(processedBase))\n .max(unref(processedBase));\n }\n };\n}\n\n/**\n * Creates a scaling function based off the formula `(baseResource / base) ^ exponent`.\n * If the baseResource value is less than base then the currentGain will be 0.\n * @param base The base variable in the scaling formula.\n * @param exponent The exponent variable in the scaling formula.\n * @example\n * A scaling function created via `createLinearScaling(10, 0.5)` would produce the following values:\n * | Base Resource | Current Gain |\n * | ------------- | ------------ |\n * | 10 | 1 |\n * | 40 | 2 |\n * | 250 | 5 |\n */\nexport function createPolynomialScaling(\n base: Computable<DecimalSource>,\n exponent: Computable<DecimalSource>\n): ScalingFunction {\n const processedBase = convertComputable(base);\n const processedExponent = convertComputable(exponent);\n return {\n currentGain(conversion) {\n if (Decimal.lt(conversion.baseResource.value, unref(processedBase))) {\n return 0;\n }\n\n const gain = Decimal.div(conversion.baseResource.value, unref(processedBase)).pow(\n unref(processedExponent)\n );\n\n if (gain.isNan()) {\n return new Decimal(0);\n }\n return gain;\n },\n currentAt(conversion) {\n let current: DecimalSource = unref(conversion.currentGain);\n if (conversion.gainModifier) {\n current = conversion.gainModifier.revert(current);\n }\n current = Decimal.max(0, current);\n return Decimal.root(current, unref(processedExponent)).times(unref(processedBase));\n },\n nextAt(conversion) {\n let next: DecimalSource = Decimal.add(unref(conversion.currentGain), 1);\n if (conversion.gainModifier) {\n next = conversion.gainModifier.revert(next);\n }\n next = Decimal.max(0, next);\n return Decimal.root(next, unref(processedExponent))\n .times(unref(processedBase))\n .max(unref(processedBase));\n }\n };\n}\n\n/**\n * Creates a conversion that simply adds to the gainResource amount upon converting.\n * This is similar to the behavior of \"normal\" layers in The Modding Tree.\n * This is equivalent to just calling createConversion directly.\n * @param optionsFunc Conversion options.\n */\nexport function createCumulativeConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(optionsFunc);\n}\n\n/**\n * Creates a conversion that will replace the gainResource amount with the new amount upon converting.\n * This is similar to the behavior of \"static\" layers in The Modding Tree.\n * @param optionsFunc Converison options.\n */\nexport function createIndependentConversion<S extends ConversionOptions>(\n optionsFunc: OptionsFunc<S, Conversion<S>>\n): Conversion<S> {\n return createConversion(() => {\n const conversion: S = optionsFunc();\n\n setDefault(conversion, \"buyMax\", false);\n\n if (conversion.currentGain == null) {\n conversion.currentGain = computed(() => {\n let gain = conversion.gainModifier\n ? conversion.gainModifier.apply(\n conversion.scaling.currentGain(conversion as GenericConversion)\n )\n : conversion.scaling.currentGain(conversion as GenericConversion);\n gain = Decimal.floor(gain).max(conversion.gainResource.value);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(Decimal.add(conversion.gainResource.value, 1));\n }\n return gain;\n });\n }\n if (conversion.actualGain == null) {\n conversion.actualGain = computed(() => {\n let gain = Decimal.sub(\n conversion.scaling.currentGain(conversion as GenericConversion),\n conversion.gainResource.value\n ).max(0);\n\n if (!unref(conversion.buyMax)) {\n gain = gain.min(1);\n }\n return gain;\n });\n }\n setDefault(conversion, \"convert\", function () {\n conversion.gainResource.value = conversion.gainModifier\n ? conversion.gainModifier.apply(\n unref((conversion as GenericConversion).currentGain)\n )\n : unref((conversion as GenericConversion).currentGain);\n // TODO just subtract cost?\n // Maybe by adding a cost function to scaling and nextAt just calls the cost function\n // with 1 + currentGain\n conversion.baseResource.value = 0;\n });\n\n return conversion;\n });\n}\n\n/**\n * This will automatically increase the value of conversion.gainResource without lowering the value of the input resource.\n * It will by default perform 100% of a conversion's currentGain per second.\n * If you use a ref for the rate you can set it's value to 0 when passive generation should be disabled.\n * @param layer The layer this passive generation will be associated with.\n * @param conversion The conversion that will determine how much generation there is.\n * @param rate A multiplier to multiply against the conversion's currentGain.\n */\nexport function setupPassiveGeneration(\n layer: GenericLayer,\n conversion: GenericConversion,\n rate: Computable<DecimalSource> = 1\n): void {\n const processedRate = convertComputable(rate);\n layer.on(\"preUpdate\", diff => {\n const currRate = unref(processedRate);\n if (Decimal.neq(currRate, 0)) {\n conversion.gainResource.value = Decimal.add(\n conversion.gainResource.value,\n Decimal.times(currRate, diff).times(unref(conversion.currentGain))\n );\n }\n });\n}\n\n/**\n * Given a value, this function finds the amount above a certain value and raises it to a power.\n * If the power is <1, this will effectively make the value scale slower after the cap.\n * @param value The raw value.\n * @param cap The value after which the softcap should be applied.\n * @param power The power to raise value above the cap to.\n * @example\n * A softcap added via `addSoftcap(scaling, 100, 0.5)` would produce the following values:\n * | Raw Value | Softcapped Value |\n * | --------- | ---------------- |\n * | 1 | 1 |\n * | 100 | 100 |\n * | 125 | 105 |\n * | 200 | 110 |\n */\nexport function softcap(\n value: DecimalSource,\n cap: DecimalSource,\n power: DecimalSource = 0.5\n): DecimalSource {\n if (Decimal.lte(value, cap)) {\n return value;\n } else {\n return Decimal.pow(value, power).times(Decimal.pow(cap, Decimal.sub(1, power)));\n }\n}\n\n/**\n * Creates a scaling function based off an existing scaling function, with a softcap applied to it.\n * The softcap will take any value above a certain value and raise it to a power.\n * If the power is <1, this will effectively make the value scale slower after the cap.\n * @param scaling The raw scaling function.\n * @param cap The value after which the softcap should be applied.\n * @param power The power to raise value about the cap to.\n * @see {@link softcap}.\n */\nexport function addSoftcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>,\n power: ProcessedComputable<DecimalSource> = 0.5\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion =>\n softcap(scaling.currentGain(conversion), unref(cap), unref(power))\n };\n}\n\n/**\n * Creates a scaling function off an existing function, with a hardcap applied to it.\n * The harcap will ensure that the currentGain will stop at a given cap.\n * @param scaling The raw scaling function.\n * @param cap The maximum value the scaling function can output.\n */\nexport function addHardcap(\n scaling: ScalingFunction,\n cap: ProcessedComputable<DecimalSource>\n): ScalingFunction {\n return {\n ...scaling,\n currentGain: conversion => Decimal.min(scaling.currentGain(conversion), unref(cap))\n };\n}\n","import { createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6447a93e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"toggle\" }, \"▼\", -1))\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_CollapseTransition = _resolveComponent(\"CollapseTransition\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"infobox\", { collapsed: _ctx.unref(_ctx.collapsed), stacked: _ctx.stacked, ..._ctx.unref(_ctx.classes) }]),\n style: _normalizeStyle([\n {\n borderColor: _ctx.unref(_ctx.color),\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n _createElementVNode(\"button\", {\n class: \"title\",\n style: _normalizeStyle([{ backgroundColor: _ctx.unref(_ctx.color) }, _ctx.unref(_ctx.titleStyle) || []]),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.collapsed.value = !_ctx.unref(_ctx.collapsed)))\n }, [\n _hoisted_1,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.titleComponent)))\n ], 4),\n _createVNode(_component_CollapseTransition, null, {\n default: _withCtx(() => [\n (!_ctx.unref(_ctx.collapsed))\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"body\",\n style: _normalizeStyle({ backgroundColor: _ctx.unref(_ctx.color) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.bodyComponent), {\n style: _normalizeStyle(_ctx.unref(_ctx.bodyStyle))\n }, null, 8, [\"style\"]))\n ], 4))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Node from \"components/Node.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport settings from \"game/settings\";\nimport { computeComponent, processedPropType } from \"util/vue\";\nimport CollapseTransition from \"@ivanv/vue-collapse-transition/src/CollapseTransition.vue\";\nimport { computed, defineComponent, PropType, Ref, StyleValue, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n title: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n color: processedPropType<string>(String),\n collapsed: {\n type: Object as PropType<Ref<boolean>>,\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n titleStyle: processedPropType<StyleValue>(Object, String, Array),\n bodyStyle: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node,\n CollapseTransition\n },\n setup(props) {\n const { title, display } = toRefs(props);\n\n const titleComponent = computeComponent(title);\n const bodyComponent = computeComponent(display);\n const stacked = computed(() => themes[settings.theme].mergeAdjacent);\n\n return {\n titleComponent,\n bodyComponent,\n stacked,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Infobox.vue?vue&type=template&id=6447a93e&scoped=true&ts=true\"\nimport script from \"./Infobox.vue?vue&type=script&lang=ts\"\nexport * from \"./Infobox.vue?vue&type=script&lang=ts\"\n\nimport \"./Infobox.vue?vue&type=style&index=0&id=6447a93e&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6447a93e\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n GatherProps,\n getUniqueID,\n OptionsFunc,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport InfoboxComponent from \"features/infoboxes/Infobox.vue\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { unref } from \"vue\";\n\nexport const InfoboxType = Symbol(\"Infobox\");\n\nexport interface InfoboxOptions {\n visibility?: Computable<Visibility>;\n color?: Computable<string>;\n style?: Computable<StyleValue>;\n titleStyle?: Computable<StyleValue>;\n bodyStyle?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n title: Computable<CoercableComponent>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseInfobox {\n id: string;\n collapsed: Persistent<boolean>;\n type: typeof InfoboxType;\n [Component]: typeof InfoboxComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Infobox<T extends InfoboxOptions> = Replace<\n T & BaseInfobox,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n color: GetComputableType<T[\"color\"]>;\n style: GetComputableType<T[\"style\"]>;\n titleStyle: GetComputableType<T[\"titleStyle\"]>;\n bodyStyle: GetComputableType<T[\"bodyStyle\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n title: GetComputableType<T[\"title\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericInfobox = Replace<\n Infobox<InfoboxOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createInfobox<T extends InfoboxOptions>(\n optionsFunc: OptionsFunc<T, Infobox<T>, BaseInfobox>\n): Infobox<T> {\n const collapsed = persistent<boolean>(false);\n return createLazyProxy(() => {\n const infobox = optionsFunc();\n infobox.id = getUniqueID(\"infobox-\");\n infobox.type = InfoboxType;\n infobox[Component] = InfoboxComponent;\n\n infobox.collapsed = collapsed;\n\n processComputable(infobox as T, \"visibility\");\n setDefault(infobox, \"visibility\", Visibility.Visible);\n processComputable(infobox as T, \"color\");\n processComputable(infobox as T, \"style\");\n processComputable(infobox as T, \"titleStyle\");\n processComputable(infobox as T, \"bodyStyle\");\n processComputable(infobox as T, \"classes\");\n processComputable(infobox as T, \"title\");\n processComputable(infobox as T, \"display\");\n\n infobox[GatherProps] = function (this: GenericInfobox) {\n const {\n visibility,\n display,\n title,\n color,\n collapsed,\n style,\n titleStyle,\n bodyStyle,\n classes,\n id\n } = this;\n return {\n visibility,\n display,\n title,\n color,\n collapsed,\n style: unref(style),\n titleStyle,\n bodyStyle,\n classes,\n id\n };\n };\n\n return infobox as unknown as Infobox<T>;\n });\n}\n","import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n ref: \"resizeListener\",\n class: _normalizeClass([\"resize-listener\", _ctx.unref(_ctx.classes)]),\n style: _normalizeStyle(_ctx.unref(_ctx.style))\n }, null, 6))\n}","\nimport { StyleValue } from \"features/feature\";\nimport { Application } from \"pixi.js\";\nimport { processedPropType } from \"util/vue\";\nimport { defineComponent, nextTick, onBeforeUnmount, onMounted, PropType, ref, unref } from \"vue\";\n\n// TODO get typing support on the Particles component\nexport default defineComponent({\n props: {\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n onInit: {\n type: Function as PropType<(app: Application) => void>,\n required: true\n },\n id: {\n type: String,\n required: true\n },\n onContainerResized: Function as PropType<(rect: DOMRect) => void>,\n onHotReload: Function as PropType<VoidFunction>\n },\n setup(props) {\n const app = ref<null | Application>(null);\n\n const resizeObserver = new ResizeObserver(updateBounds);\n const resizeListener = ref<HTMLElement | null>(null);\n\n onMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n app.value = new Application({\n resizeTo: resListener,\n backgroundAlpha: 0\n });\n resizeListener.value?.appendChild(app.value.view);\n props.onInit(app.value as Application);\n }\n updateBounds();\n if (props.onHotReload) {\n nextTick(props.onHotReload);\n }\n });\n onBeforeUnmount(() => {\n app.value?.destroy();\n });\n\n let isDirty = true;\n function updateBounds() {\n if (isDirty) {\n isDirty = false;\n nextTick(() => {\n if (resizeListener.value != null && props.onContainerResized) {\n props.onContainerResized(resizeListener.value.getBoundingClientRect());\n app.value?.resize();\n }\n isDirty = true;\n });\n }\n }\n document.fonts.ready.then(updateBounds);\n\n return {\n unref,\n resizeListener\n };\n }\n});\n","import { render } from \"./Particles.vue?vue&type=template&id=08c4e343&scoped=true&ts=true\"\nimport script from \"./Particles.vue?vue&type=script&lang=tsx\"\nexport * from \"./Particles.vue?vue&type=script&lang=tsx\"\n\nimport \"./Particles.vue?vue&type=style&index=0&id=08c4e343&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-08c4e343\"]])\n\nexport default __exports__","import ParticlesComponent from \"features/particles/Particles.vue\";\nimport { Ref, shallowRef, unref } from \"vue\";\nimport {\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Application } from \"pixi.js\";\nimport { Emitter, EmitterConfigV3, upgradeConfig } from \"@pixi/particle-emitter\";\nimport { Computable, GetComputableType } from \"util/computed\";\n\nexport const ParticlesType = Symbol(\"Particles\");\n\nexport interface ParticlesOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n onContainerResized?: (boundingRect: DOMRect) => void;\n onHotReload?: VoidFunction;\n}\n\nexport interface BaseParticles {\n id: string;\n app: Ref<null | Application>;\n addEmitter: (config: EmitterConfigV3) => Promise<Emitter>;\n type: typeof ParticlesType;\n [Component]: typeof ParticlesComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Particles<T extends ParticlesOptions> = Replace<\n T & BaseParticles,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n }\n>;\n\nexport type GenericParticles = Particles<ParticlesOptions>;\n\nexport function createParticles<T extends ParticlesOptions>(\n optionsFunc?: OptionsFunc<T, Particles<T>, BaseParticles>\n): Particles<T> {\n return createLazyProxy(() => {\n const particles = optionsFunc?.() ?? ({} as ReturnType<NonNullable<typeof optionsFunc>>);\n particles.id = getUniqueID(\"particles-\");\n particles.type = ParticlesType;\n particles[Component] = ParticlesComponent;\n\n particles.app = shallowRef(null);\n particles.addEmitter = (config: EmitterConfigV3): Promise<Emitter> => {\n const genericParticles = particles as GenericParticles;\n if (genericParticles.app.value) {\n return Promise.resolve(new Emitter(genericParticles.app.value.stage, config));\n }\n return new Promise<Emitter>(resolve => {\n emittersToAdd.push({ resolve, config });\n });\n };\n\n let emittersToAdd: {\n resolve: (value: Emitter | PromiseLike<Emitter>) => void;\n config: EmitterConfigV3;\n }[] = [];\n\n function onInit(app: Application) {\n (particles as GenericParticles).app.value = app;\n emittersToAdd.forEach(({ resolve, config }) => resolve(new Emitter(app.stage, config)));\n emittersToAdd = [];\n }\n\n particles.onContainerResized = particles.onContainerResized?.bind(particles);\n\n particles[GatherProps] = function (this: GenericParticles) {\n const { id, style, classes, onContainerResized, onHotReload } = this;\n return {\n id,\n style: unref(style),\n classes,\n onContainerResized,\n onHotReload,\n onInit\n };\n };\n\n return particles as unknown as Particles<T>;\n });\n}\n\ndeclare global {\n interface Window {\n upgradeConfig: typeof upgradeConfig;\n }\n}\nwindow.upgradeConfig = upgradeConfig;\n","import { OptionsFunc, getUniqueID, Replace } from \"features/feature\";\nimport { globalBus } from \"game/events\";\nimport { GenericLayer } from \"game/layers\";\nimport { DefaultValue, Persistent, persistent, PersistentState } from \"game/persistence\";\nimport Decimal from \"util/bignum\";\nimport { Computable, GetComputableType, processComputable } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { Unsubscribe } from \"nanoevents\";\nimport { isRef, unref } from \"vue\";\n\nexport const ResetType = Symbol(\"Reset\");\n\nexport interface ResetOptions {\n thingsToReset: Computable<Record<string, unknown>[]>;\n onReset?: VoidFunction;\n}\n\nexport interface BaseReset {\n id: string;\n reset: VoidFunction;\n type: typeof ResetType;\n}\n\nexport type Reset<T extends ResetOptions> = Replace<\n T & BaseReset,\n {\n thingsToReset: GetComputableType<T[\"thingsToReset\"]>;\n }\n>;\n\nexport type GenericReset = Reset<ResetOptions>;\n\nexport function createReset<T extends ResetOptions>(\n optionsFunc: OptionsFunc<T, Reset<T>, BaseReset>\n): Reset<T> {\n return createLazyProxy(() => {\n const reset = optionsFunc();\n reset.id = getUniqueID(\"reset-\");\n reset.type = ResetType;\n\n reset.reset = function () {\n const handleObject = (obj: unknown) => {\n if (obj && typeof obj === \"object\") {\n if (PersistentState in obj) {\n (obj as Persistent)[PersistentState].value = (obj as Persistent)[\n DefaultValue\n ];\n } else if (!(obj instanceof Decimal) && !isRef(obj)) {\n Object.values(obj).forEach(obj =>\n handleObject(obj as Record<string, unknown>)\n );\n }\n }\n };\n unref((reset as GenericReset).thingsToReset).forEach(handleObject);\n globalBus.emit(\"reset\", reset as GenericReset);\n reset.onReset?.();\n };\n\n processComputable(reset as T, \"thingsToReset\");\n\n return reset as unknown as Reset<T>;\n });\n}\n\nconst listeners: Record<string, Unsubscribe | undefined> = {};\nexport function trackResetTime(layer: GenericLayer, reset: GenericReset): Persistent<Decimal> {\n const resetTime = persistent<Decimal>(new Decimal(0));\n listeners[layer.id] = layer.on(\"preUpdate\", diff => {\n resetTime.value = Decimal.add(resetTime.value, diff);\n });\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === reset) {\n resetTime.value = new Decimal(0);\n }\n });\n return resetTime;\n}\nglobalBus.on(\"removeLayer\", layer => {\n // unsubscribe from preUpdate\n listeners[layer.id]?.();\n listeners[layer.id] = undefined;\n});\n\ndeclare module \"game/events\" {\n interface GlobalEvents {\n reset: (reset: GenericReset) => void;\n }\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n resource: Resource;\n color: string;\n}\n\n\n\nconst amount = computed(() => displayResource(props.resource));\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"h2\", {\n style: _normalizeStyle({ color: __props.color, 'text-shadow': '0px 0px 10px ' + __props.color })\n }, _toDisplayString(_unref(amount)), 5))\n}\n}\n\n})","import script from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Resource.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = { key: 1 }\nconst _hoisted_3 = /*#__PURE__*/_createTextVNode(\", \")\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\n\nimport { CoercableComponent } from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport Decimal from \"util/bignum\";\nimport { computeOptionalComponent } from \"util/vue\";\nimport { computed, Ref, StyleValue, toRefs } from \"vue\";\nimport ResourceVue from \"features/resources/Resource.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n resource: null,\n color: null,\n classes: null,\n style: null,\n effectDisplay: null\n },\n setup(__props: any) {\n\nconst _props = __props as {\n resource: Resource;\n color?: string;\n classes?: Record<string, boolean>;\n style?: StyleValue;\n effectDisplay?: CoercableComponent;\n}\n\n\nconst props = toRefs(_props);\n\nconst effectComponent = computeOptionalComponent(\n props.effectDisplay as Ref<CoercableComponent | undefined>\n);\n\nconst showPrefix = computed(() => {\n return Decimal.lt(props.resource.value, \"1e1000\");\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n (_unref(showPrefix))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"You have \"))\n : _createCommentVNode(\"\", true),\n _createVNode(ResourceVue, {\n resource: __props.resource,\n color: __props.color || 'white'\n }, null, 8, [\"resource\", \"color\"]),\n _createTextVNode(\" \" + _toDisplayString(__props.resource.displayName), 1),\n (_unref(effectComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _hoisted_3,\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(effectComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_4,\n _hoisted_5\n ]))\n}\n}\n\n})","import script from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./MainDisplay.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import TooltipComponent from \"./Tooltip.vue\";\nimport {\n CoercableComponent,\n Component,\n GatherProps,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { VueFeature } from \"util/vue\";\nimport { nextTick, Ref, unref } from \"vue\";\nimport { persistent } from \"game/persistence\";\nimport { Direction } from \"util/common\";\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--xoffset\"?: string;\n \"--yoffset\"?: string;\n }\n}\n\nexport interface TooltipOptions {\n pinnable?: boolean;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n direction?: Computable<Direction>;\n xoffset?: Computable<string>;\n yoffset?: Computable<string>;\n}\n\nexport interface BaseTooltip {\n pinned?: Ref<boolean>;\n}\n\nexport type Tooltip<T extends TooltipOptions> = Replace<\n T & BaseTooltip,\n {\n pinnable: T[\"pinnable\"] extends undefined ? false : T[\"pinnable\"];\n pinned: T[\"pinnable\"] extends true ? Ref<boolean> : undefined;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n direction: GetComputableTypeWithDefault<T[\"direction\"], Direction.Up>;\n xoffset: GetComputableType<T[\"xoffset\"]>;\n yoffset: GetComputableType<T[\"yoffset\"]>;\n }\n>;\n\nexport type GenericTooltip = Replace<\n Tooltip<TooltipOptions>,\n {\n pinnable: boolean;\n pinned: Ref<boolean> | undefined;\n direction: ProcessedComputable<Direction>;\n }\n>;\n\nexport function addTooltip<T extends TooltipOptions>(\n element: VueFeature,\n options: T & ThisType<Tooltip<T>> & Partial<BaseTooltip>\n): Tooltip<T> {\n processComputable(options as T, \"display\");\n processComputable(options as T, \"classes\");\n processComputable(options as T, \"style\");\n processComputable(options as T, \"direction\");\n setDefault(options, \"direction\", Direction.Up);\n processComputable(options as T, \"xoffset\");\n processComputable(options as T, \"yoffset\");\n\n nextTick(() => {\n if (options.pinnable) {\n if (\"pinned\" in element) {\n console.error(\n \"Cannot add pinnable tooltip to element that already has a property called 'pinned'\"\n );\n options.pinnable = false;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element as any).pinned = options.pinned = persistent<boolean>(false);\n }\n }\n\n const elementComponent = element[Component];\n element[Component] = TooltipComponent;\n const elementGratherProps = element[GatherProps].bind(element);\n element[GatherProps] = function gatherTooltipProps(this: GenericTooltip) {\n const { display, classes, style, direction, xoffset, yoffset, pinned } = this;\n return {\n element: {\n [Component]: elementComponent,\n [GatherProps]: elementGratherProps\n },\n display,\n classes,\n style: unref(style),\n direction,\n xoffset,\n yoffset,\n pinned\n };\n }.bind(options as GenericTooltip);\n });\n\n return options as unknown as Tooltip<T>;\n}\n","import \"components/common/modifiers.css\";\nimport { CoercableComponent, jsx } from \"features/feature\";\nimport Decimal, { DecimalSource, format } from \"util/bignum\";\nimport { WithRequired } from \"util/common\";\nimport { Computable, convertComputable, ProcessedComputable } from \"util/computed\";\nimport { renderJSX } from \"util/vue\";\nimport { computed, unref } from \"vue\";\n\n/**\n * An object that can be used to apply or unapply some modification to a number.\n * Being reversible requires the operation being invertible, but some features may rely on that.\n * Descriptions can be optionally included for displaying them to the player.\n * The built-in modifier creators are designed to display the modifiers using.\n * {@link createModifierSection}.\n */\nexport interface Modifier {\n /** Applies some operation on the input and returns the result. */\n apply: (gain: DecimalSource) => DecimalSource;\n /** Reverses the operation applied by the apply property. Required by some features. */\n revert?: (gain: DecimalSource) => DecimalSource;\n /**\n * Whether or not this modifier should be considered enabled.\n * Typically for use with modifiers passed into {@link createSequentialModifier}.\n */\n enabled?: ProcessedComputable<boolean>;\n /**\n * A description of this modifier.\n * @see {@link createModifierSection}.\n */\n description?: ProcessedComputable<CoercableComponent>;\n}\n\n/**\n * Utility type used to narrow down a modifier type that will have a description and/or enabled property based on optional parameters, T and S (respectively).\n */\nexport type ModifierFromOptionalParams<T, S> = T extends undefined\n ? S extends undefined\n ? Omit<WithRequired<Modifier, \"revert\">, \"description\" | \"enabled\">\n : Omit<WithRequired<Modifier, \"revert\" | \"enabled\">, \"description\">\n : S extends undefined\n ? Omit<WithRequired<Modifier, \"revert\" | \"description\">, \"enabled\">\n : WithRequired<Modifier, \"revert\" | \"enabled\" | \"description\">;\n\n/**\n * Create a modifier that adds some value to the input value.\n * @param addend The amount to add to the input value.\n * @param description Description of what this modifier is doing.\n * @param enabled A computable that will be processed and passed directly into the returned modifier.\n */\nexport function createAdditiveModifier<\n T extends Computable<CoercableComponent> | undefined,\n S extends Computable<boolean> | undefined,\n R = ModifierFromOptionalParams<T, S>\n>(addend: Computable<DecimalSource>, description?: T, enabled?: S): R {\n const processedAddend = convertComputable(addend);\n const processedDescription = convertComputable(description);\n const processedEnabled = enabled == null ? undefined : convertComputable(enabled);\n return {\n apply: (gain: DecimalSource) => Decimal.add(gain, unref(processedAddend)),\n revert: (gain: DecimalSource) => Decimal.sub(gain, unref(processedAddend)),\n enabled: processedEnabled,\n description:\n description == null\n ? undefined\n : jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">\n {Decimal.gte(unref(processedAddend), 0) ? \"+\" : \"\"}\n {format(unref(processedAddend))}\n </span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n } as unknown as R;\n}\n\n/**\n * Create a modifier that multiplies the input value by some value.\n * @param multiplier The value to multiply the input value by.\n * @param description Description of what this modifier is doing.\n * @param enabled A computable that will be processed and passed directly into the returned modifier.\n */\nexport function createMultiplicativeModifier<\n T extends Computable<CoercableComponent> | undefined,\n S extends Computable<boolean> | undefined,\n R = ModifierFromOptionalParams<T, S>\n>(multiplier: Computable<DecimalSource>, description?: T, enabled?: S): R {\n const processedMultiplier = convertComputable(multiplier);\n const processedDescription = convertComputable(description);\n const processedEnabled = enabled == null ? undefined : convertComputable(enabled);\n return {\n apply: (gain: DecimalSource) => Decimal.times(gain, unref(processedMultiplier)),\n revert: (gain: DecimalSource) => Decimal.div(gain, unref(processedMultiplier)),\n enabled: processedEnabled,\n description:\n description == null\n ? undefined\n : jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">x{format(unref(processedMultiplier))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n } as unknown as R;\n}\n\n/**\n * Create a modifier that raises the input value to the power of some value.\n * @param exponent The value to raise the input value to the power of.\n * @param description Description of what this modifier is doing.\n * @param enabled A computable that will be processed and passed directly into the returned modifier.\n */\nexport function createExponentialModifier<\n T extends Computable<CoercableComponent> | undefined,\n S extends Computable<boolean> | undefined,\n R = ModifierFromOptionalParams<T, S>\n>(exponent: Computable<DecimalSource>, description?: T, enabled?: S): R {\n const processedExponent = convertComputable(exponent);\n const processedDescription = convertComputable(description);\n const processedEnabled = enabled == null ? undefined : convertComputable(enabled);\n return {\n apply: (gain: DecimalSource) => Decimal.pow(gain, unref(processedExponent)),\n revert: (gain: DecimalSource) => Decimal.root(gain, unref(processedExponent)),\n enabled: processedEnabled,\n description:\n description == null\n ? undefined\n : jsx(() => (\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">^{format(unref(processedExponent))}</span>\n {unref(processedDescription) ? (\n <span class=\"modifier-description\">\n {/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */}\n {renderJSX(unref(processedDescription)!)}\n </span>\n ) : null}\n </div>\n ))\n } as unknown as R;\n}\n\n/**\n * Takes an array of modifiers and applies and reverses them in order.\n * Modifiers that are not enabled will not be applied nor reversed.\n * Also joins their descriptions together.\n * @param modifiers The modifiers to perform sequentially.\n * @see {@link createModifierSection}.\n */\nexport function createSequentialModifier<\n T extends Modifier[],\n S = T extends WithRequired<Modifier, \"revert\">[]\n ? WithRequired<Modifier, \"description\" | \"revert\">\n : Omit<WithRequired<Modifier, \"description\">, \"revert\">\n>(...modifiers: T): S {\n return {\n apply: (gain: DecimalSource) =>\n modifiers\n .filter(m => unref(m.enabled) !== false)\n .reduce((gain, modifier) => modifier.apply(gain), gain),\n revert: modifiers.every(m => m.revert != null)\n ? (gain: DecimalSource) =>\n modifiers\n .filter(m => unref(m.enabled) !== false)\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n .reduceRight((gain, modifier) => modifier.revert!(gain), gain)\n : undefined,\n enabled: computed(() => modifiers.filter(m => unref(m.enabled) !== false).length > 0),\n description: jsx(() => (\n <>\n {(\n modifiers\n .filter(m => unref(m.enabled) !== false)\n .map(m => unref(m.description))\n .filter(d => d) as CoercableComponent[]\n ).map(renderJSX)}\n </>\n ))\n } as unknown as S;\n}\n\n/**\n * Create a JSX element that displays a modifier.\n * Intended to be used with the output from {@link createSequentialModifier}.\n * @param title The header for the section.\n * @param subtitle Smaller text that appears in the header after the title.\n * @param modifier The modifier to render.\n * @param base The base value that'll be passed into the modifier.\n * @param unit The unit of the value being modified, if any.\n * @param baseText The label to use for the base value.\n */\nexport function createModifierSection(\n title: string,\n subtitle: string,\n modifier: WithRequired<Modifier, \"description\">,\n base: DecimalSource = 1,\n unit = \"\",\n baseText: CoercableComponent = \"Base\"\n) {\n return (\n <div>\n <h3>\n {title}\n {subtitle ? <span class=\"subtitle\"> ({subtitle})</span> : null}\n </h3>\n <br />\n <div class=\"modifier-container\">\n <span class=\"modifier-amount\">\n {format(base)}\n {unit}\n </span>\n <span class=\"modifier-description\">{renderJSX(baseText)}</span>\n </div>\n {renderJSX(unref(modifier.description))}\n <hr />\n Total: {format(modifier.apply(base))}\n {unit}\n </div>\n );\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, isRef as _isRef, vModelText as _vModelText, createElementVNode as _createElementVNode, withDirectives as _withDirectives, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-38661d49\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_3 = [\"min\", \"max\"]\n\nimport { computed, toRefs, unref } from \"vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport \"components/common/fields.css\";\nimport { Direction } from \"util/common\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n min: null,\n max: null\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: number): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: string;\n modelValue?: number;\n min?: number;\n max?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst value = computed({\n get() {\n return String(unref(props.modelValue) || 0);\n },\n set(value: string) {\n emit(\"update:modelValue\", Number(value));\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (__props.title)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString(__props.title), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(Tooltip, {\n display: `${_unref(value)}`,\n class: _normalizeClass({ fullWidth: !__props.title }),\n direction: _unref(Direction).Down\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"range\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n min: __props.min,\n max: __props.max\n }, null, 8, _hoisted_3), [\n [_vModelText, _unref(value)]\n ])\n ]),\n _: 1\n }, 8, [\"display\", \"class\", \"direction\"])\n ]))\n}\n}\n\n})","import script from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Slider.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Slider.vue?vue&type=style&index=0&id=38661d49&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-38661d49\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { nextTick, onMounted, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst top = ref(\"0\");\nconst observer = new ResizeObserver(updateTop);\nconst element = ref<HTMLElement | null>(null);\n\nfunction updateTop() {\n let el = element.value;\n if (el == undefined) {\n return;\n }\n\n let newTop = 0;\n while (el.previousSibling) {\n const sibling = el.previousSibling as HTMLElement;\n if (sibling.dataset && \"vSticky\" in sibling.dataset) {\n newTop += sibling.offsetHeight;\n }\n el = sibling;\n }\n top.value = newTop + \"px\";\n}\n\nnextTick(updateTop);\ndocument.fonts.ready.then(updateTop);\n\nonMounted(() => {\n const el = element.value?.parentElement;\n if (el) {\n observer.observe(el);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"sticky\",\n style: _normalizeStyle({ top: top.value }),\n ref_key: \"element\",\n ref: element,\n \"data-v-sticky\": \"\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 4))\n}\n}\n\n})","import script from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Sticky.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Sticky.vue?vue&type=style&index=0&id=77aa21df&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-77aa21df\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n height: null\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"vr\",\n style: _normalizeStyle({ height: __props.height })\n }, null, 4))\n}\n}\n\n})","import script from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./VerticalRule.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./VerticalRule.vue?vue&type=style&index=0&id=15f6e746&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-15f6e746\"]])\n\nexport default __exports__","import { resolveDynamicComponent as _resolveDynamicComponent, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n width: _ctx.unref(_ctx.width) + 'px',\n height: _ctx.unref(_ctx.height) + 'px',\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n bar: true,\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"div\", {\n class: \"overlayTextContainer border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n (_ctx.component)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component), {\n key: 0,\n class: \"overlayText\",\n style: _normalizeStyle(_ctx.unref(_ctx.textStyle))\n }, null, 8, [\"style\"]))\n : _createCommentVNode(\"\", true)\n ], 4),\n _createElementVNode(\"div\", {\n class: \"border\",\n style: _normalizeStyle([\n { width: _ctx.unref(_ctx.width) + 'px', height: _ctx.unref(_ctx.height) + 'px' },\n _ctx.unref(_ctx.style) ?? {},\n _ctx.unref(_ctx.baseStyle) ?? {},\n _ctx.unref(_ctx.borderStyle) ?? {}\n ])\n }, [\n _createElementVNode(\"div\", {\n class: \"fill\",\n style: _normalizeStyle([_ctx.barStyle, _ctx.unref(_ctx.style) ?? {}, _ctx.unref(_ctx.fillStyle) ?? {}])\n }, null, 4)\n ], 4),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, Visibility } from \"features/feature\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { computeOptionalComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, CSSProperties, defineComponent, StyleValue, toRefs, unref } from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { Direction } from \"util/common\";\n\nexport default defineComponent({\n props: {\n progress: {\n type: processedPropType<DecimalSource>(String, Object, Number),\n required: true\n },\n width: {\n type: processedPropType<number>(Number),\n required: true\n },\n height: {\n type: processedPropType<number>(Number),\n required: true\n },\n direction: {\n type: processedPropType<Direction>(String),\n required: true\n },\n display: processedPropType<CoercableComponent>(Object, String, Function),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n borderStyle: processedPropType<StyleValue>(Object, String, Array),\n textStyle: processedPropType<StyleValue>(Object, String, Array),\n baseStyle: processedPropType<StyleValue>(Object, String, Array),\n fillStyle: processedPropType<StyleValue>(Object, String, Array),\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { progress, width, height, direction, display } = toRefs(props);\n\n const normalizedProgress = computed(() => {\n let progressNumber =\n progress.value instanceof Decimal\n ? progress.value.toNumber()\n : Number(progress.value);\n return (1 - Math.min(Math.max(progressNumber, 0), 1)) * 100;\n });\n\n const barStyle = computed(() => {\n const barStyle: Partial<CSSProperties> = {\n width: unwrapRef(width) + 0.5 + \"px\",\n height: unwrapRef(height) + 0.5 + \"px\"\n };\n switch (unref(direction)) {\n case Direction.Up:\n barStyle.clipPath = `inset(${normalizedProgress.value}% 0% 0% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Down:\n barStyle.clipPath = `inset(0% 0% ${normalizedProgress.value}% 0%)`;\n barStyle.width = unwrapRef(width) + 1 + \"px\";\n break;\n case Direction.Right:\n barStyle.clipPath = `inset(0% ${normalizedProgress.value}% 0% 0%)`;\n break;\n case Direction.Left:\n barStyle.clipPath = `inset(0% 0% 0% ${normalizedProgress.value} + '%)`;\n break;\n case Direction.Default:\n barStyle.clipPath = \"inset(0% 50% 0% 0%)\";\n break;\n }\n return barStyle;\n });\n\n const component = computeOptionalComponent(display);\n\n return {\n normalizedProgress,\n barStyle,\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Bar.vue?vue&type=template&id=bfa7e8b2&scoped=true&ts=true\"\nimport script from \"./Bar.vue?vue&type=script&lang=ts\"\nexport * from \"./Bar.vue?vue&type=script&lang=ts\"\n\nimport \"./Bar.vue?vue&type=style&index=0&id=bfa7e8b2&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-bfa7e8b2\"]])\n\nexport default __exports__","import BarComponent from \"features/bars/Bar.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { DecimalSource } from \"util/bignum\";\nimport { Direction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { unref } from \"vue\";\n\nexport const BarType = Symbol(\"Bar\");\n\nexport interface BarOptions {\n visibility?: Computable<Visibility>;\n width: Computable<number>;\n height: Computable<number>;\n direction: Computable<Direction>;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n borderStyle?: Computable<StyleValue>;\n baseStyle?: Computable<StyleValue>;\n textStyle?: Computable<StyleValue>;\n fillStyle?: Computable<StyleValue>;\n progress: Computable<DecimalSource>;\n display?: Computable<CoercableComponent>;\n mark?: Computable<boolean | string>;\n}\n\nexport interface BaseBar {\n id: string;\n type: typeof BarType;\n [Component]: typeof BarComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Bar<T extends BarOptions> = Replace<\n T & BaseBar,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n width: GetComputableType<T[\"width\"]>;\n height: GetComputableType<T[\"height\"]>;\n direction: GetComputableType<T[\"direction\"]>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n borderStyle: GetComputableType<T[\"borderStyle\"]>;\n baseStyle: GetComputableType<T[\"baseStyle\"]>;\n textStyle: GetComputableType<T[\"textStyle\"]>;\n fillStyle: GetComputableType<T[\"fillStyle\"]>;\n progress: GetComputableType<T[\"progress\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n }\n>;\n\nexport type GenericBar = Replace<\n Bar<BarOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createBar<T extends BarOptions>(\n optionsFunc: OptionsFunc<T, Bar<T>, BaseBar>\n): Bar<T> {\n return createLazyProxy(() => {\n const bar = optionsFunc();\n bar.id = getUniqueID(\"bar-\");\n bar.type = BarType;\n bar[Component] = BarComponent;\n\n processComputable(bar as T, \"visibility\");\n setDefault(bar, \"visibility\", Visibility.Visible);\n processComputable(bar as T, \"width\");\n processComputable(bar as T, \"height\");\n processComputable(bar as T, \"direction\");\n processComputable(bar as T, \"style\");\n processComputable(bar as T, \"classes\");\n processComputable(bar as T, \"borderStyle\");\n processComputable(bar as T, \"baseStyle\");\n processComputable(bar as T, \"textStyle\");\n processComputable(bar as T, \"fillStyle\");\n processComputable(bar as T, \"progress\");\n processComputable(bar as T, \"display\");\n processComputable(bar as T, \"mark\");\n\n bar[GatherProps] = function (this: GenericBar) {\n const {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style,\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n } = this;\n return {\n progress,\n width,\n height,\n direction,\n display,\n visibility,\n style: unref(style),\n classes,\n borderStyle,\n textStyle,\n baseStyle,\n fillStyle,\n mark,\n id\n };\n };\n\n return bar as unknown as Bar<T>;\n });\n}\n","import ClickableComponent from \"features/clickables/Clickable.vue\";\nimport { Resource } from \"features/resources/resource\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, format, formatWhole } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, Ref, unref } from \"vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"./feature\";\n\nexport const BuyableType = Symbol(\"Buyable\");\n\nexport type BuyableDisplay =\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n };\n\nexport interface BuyableOptions {\n visibility?: Computable<Visibility>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canPurchase?: Computable<boolean>;\n purchaseLimit?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n mark?: Computable<boolean | string>;\n small?: Computable<boolean>;\n display?: Computable<BuyableDisplay>;\n onPurchase?: (cost: DecimalSource | undefined) => void;\n}\n\nexport interface BaseBuyable {\n id: string;\n amount: Persistent<DecimalSource>;\n maxed: Ref<boolean>;\n canAfford: Ref<boolean>;\n canClick: ProcessedComputable<boolean>;\n onClick: VoidFunction;\n purchase: VoidFunction;\n type: typeof BuyableType;\n [Component]: typeof ClickableComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Buyable<T extends BuyableOptions> = Replace<\n T & BaseBuyable,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n cost: GetComputableType<T[\"cost\"]>;\n resource: GetComputableType<T[\"resource\"]>;\n canPurchase: GetComputableTypeWithDefault<T[\"canPurchase\"], Ref<boolean>>;\n purchaseLimit: GetComputableTypeWithDefault<T[\"purchaseLimit\"], Decimal>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n small: GetComputableType<T[\"small\"]>;\n display: Ref<CoercableComponent>;\n }\n>;\n\nexport type GenericBuyable = Replace<\n Buyable<BuyableOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n purchaseLimit: ProcessedComputable<DecimalSource>;\n }\n>;\n\nexport function createBuyable<T extends BuyableOptions>(\n optionsFunc: OptionsFunc<T, Buyable<T>, BaseBuyable>\n): Buyable<T> {\n const amount = persistent<DecimalSource>(0);\n return createLazyProxy(() => {\n const buyable = optionsFunc();\n\n if (buyable.canPurchase == null && (buyable.resource == null || buyable.cost == null)) {\n console.warn(\n \"Cannot create buyable without a canPurchase property or a resource and cost property\",\n buyable\n );\n throw \"Cannot create buyable without a canPurchase property or a resource and cost property\";\n }\n\n buyable.id = getUniqueID(\"buyable-\");\n buyable.type = BuyableType;\n buyable[Component] = ClickableComponent;\n\n buyable.amount = amount;\n buyable.canAfford = computed(() => {\n const genericBuyable = buyable as GenericBuyable;\n const cost = unref(genericBuyable.cost);\n return (\n genericBuyable.resource != null &&\n cost != null &&\n Decimal.gte(genericBuyable.resource.value, cost)\n );\n });\n if (buyable.canPurchase == null) {\n buyable.canPurchase = computed(\n () =>\n unref((buyable as GenericBuyable).visibility) === Visibility.Visible &&\n unref((buyable as GenericBuyable).canAfford) &&\n Decimal.lt(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n }\n buyable.maxed = computed(() =>\n Decimal.gte(\n (buyable as GenericBuyable).amount.value,\n unref((buyable as GenericBuyable).purchaseLimit)\n )\n );\n processComputable(buyable as T, \"classes\");\n const classes = buyable.classes as ProcessedComputable<Record<string, boolean>> | undefined;\n buyable.classes = computed(() => {\n const currClasses = unref(classes) || {};\n if ((buyable as GenericBuyable).maxed.value) {\n currClasses.bought = true;\n }\n return currClasses;\n });\n processComputable(buyable as T, \"canPurchase\");\n buyable.canClick = buyable.canPurchase as ProcessedComputable<boolean>;\n buyable.onClick = buyable.purchase =\n buyable.onClick ??\n buyable.purchase ??\n function (this: GenericBuyable) {\n const genericBuyable = buyable as GenericBuyable;\n if (!unref(genericBuyable.canPurchase)) {\n return;\n }\n const cost = unref(genericBuyable.cost);\n if (genericBuyable.cost != null && genericBuyable.resource != null) {\n genericBuyable.resource.value = Decimal.sub(\n genericBuyable.resource.value,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n cost!\n );\n genericBuyable.amount.value = Decimal.add(genericBuyable.amount.value, 1);\n }\n genericBuyable.onPurchase?.(cost);\n };\n processComputable(buyable as T, \"display\");\n const display = buyable.display;\n buyable.display = jsx(() => {\n // TODO once processComputable types correctly, remove this \"as X\"\n const currDisplay = unref(display) as BuyableDisplay;\n if (isCoercableComponent(currDisplay)) {\n const CurrDisplay = coerceComponent(currDisplay);\n return <CurrDisplay />;\n }\n if (currDisplay != null && buyable.cost != null && buyable.resource != null) {\n const genericBuyable = buyable as GenericBuyable;\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description);\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n const amountDisplay =\n unref(genericBuyable.purchaseLimit) === Decimal.dInf ? (\n <>Amount: {formatWhole(genericBuyable.amount.value)}</>\n ) : (\n <>\n Amount: {formatWhole(genericBuyable.amount.value)} /{\" \"}\n {formatWhole(unref(genericBuyable.purchaseLimit))}\n </>\n );\n\n return (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n <div>\n <br />\n {amountDisplay}\n </div>\n {currDisplay.effectDisplay ? (\n <div>\n <br />\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {genericBuyable.cost && !genericBuyable.maxed.value ? (\n <div>\n <br />\n Cost: {format(unref(genericBuyable.cost) || 0)}{\" \"}\n {buyable.resource.displayName}\n </div>\n ) : null}\n </span>\n );\n }\n return \"\";\n });\n\n processComputable(buyable as T, \"visibility\");\n setDefault(buyable, \"visibility\", Visibility.Visible);\n processComputable(buyable as T, \"cost\");\n processComputable(buyable as T, \"resource\");\n processComputable(buyable as T, \"purchaseLimit\");\n setDefault(buyable, \"purchaseLimit\", Decimal.dInf);\n processComputable(buyable as T, \"style\");\n processComputable(buyable as T, \"mark\");\n processComputable(buyable as T, \"small\");\n\n buyable[GatherProps] = function (this: GenericBuyable) {\n const { display, visibility, style, classes, onClick, canClick, small, mark, id } =\n this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n onClick,\n canClick,\n small,\n mark,\n id\n };\n };\n\n return buyable as unknown as Buyable<T>;\n });\n}\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5e580749\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.notifyStyle,\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({\n feature: true,\n challenge: true,\n done: _ctx.unref(_ctx.completed),\n canStart: _ctx.unref(_ctx.canStart) && !_ctx.unref(_ctx.maxed),\n maxed: _ctx.unref(_ctx.maxed),\n ..._ctx.unref(_ctx.classes)\n })\n }, [\n _createElementVNode(\"button\", {\n class: \"toggleChallenge\",\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.toggle && _ctx.toggle(...args))),\n disabled: !_ctx.unref(_ctx.canStart) || _ctx.unref(_ctx.maxed)\n }, _toDisplayString(_ctx.buttonText), 9, _hoisted_1),\n (_ctx.unref(_ctx.comp))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { GenericChallenge } from \"features/challenges/challenge\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { getHighNotifyStyle, getNotifyStyle } from \"game/notifications\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\n\nexport default defineComponent({\n props: {\n active: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n maxed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canComplete: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n display: processedPropType<UnwrapRef<GenericChallenge[\"display\"]>>(\n String,\n Object,\n Function\n ),\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n completed: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n canStart: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n toggle: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n MarkNode,\n Node\n },\n setup(props) {\n const { active, maxed, canComplete, display } = toRefs(props);\n\n const buttonText = computed(() => {\n if (active.value) {\n return canComplete.value ? \"Finish\" : \"Exit Early\";\n }\n if (maxed.value) {\n return \"Completed\";\n }\n return \"Start\";\n });\n\n const comp = shallowRef<Component | string>(\"\");\n\n const notifyStyle = computed(() => {\n const currActive = unwrapRef(active);\n const currCanComplete = unwrapRef(canComplete);\n if (currActive) {\n if (currCanComplete) {\n return getHighNotifyStyle();\n }\n return getNotifyStyle();\n }\n return {};\n });\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const Goal = coerceComponent(currDisplay.goal || \"\");\n const Reward = coerceComponent(currDisplay.reward || \"\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.goal ? (\n <div>\n <br />\n Goal: <Goal />\n </div>\n ) : null}\n {currDisplay.reward ? (\n <div>\n <br />\n Reward: <Reward />\n </div>\n ) : null}\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n buttonText,\n notifyStyle,\n comp,\n Visibility,\n unref\n };\n }\n});\n","import { render } from \"./Challenge.vue?vue&type=template&id=5e580749&scoped=true&ts=true\"\nimport script from \"./Challenge.vue?vue&type=script&lang=tsx\"\nexport * from \"./Challenge.vue?vue&type=script&lang=tsx\"\n\nimport \"./Challenge.vue?vue&type=style&index=0&id=5e580749&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5e580749\"]])\n\nexport default __exports__","import { isArray } from \"@vue/shared\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport ChallengeComponent from \"features/challenges/Challenge.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { GenericReset } from \"features/reset\";\nimport { Resource } from \"features/resources/resource\";\nimport { globalBus } from \"game/events\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref, watch, WatchStopHandle } from \"vue\";\n\nexport const ChallengeType = Symbol(\"ChallengeType\");\n\nexport interface ChallengeOptions {\n visibility?: Computable<Visibility>;\n canStart?: Computable<boolean>;\n reset?: GenericReset;\n canComplete?: Computable<boolean | DecimalSource>;\n completionLimit?: Computable<DecimalSource>;\n mark?: Computable<boolean | string>;\n resource?: Resource;\n goal?: Computable<DecimalSource>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n goal?: CoercableComponent;\n reward?: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n onExit?: VoidFunction;\n onEnter?: VoidFunction;\n}\n\nexport interface BaseChallenge {\n id: string;\n completions: Persistent<DecimalSource>;\n completed: Ref<boolean>;\n maxed: Ref<boolean>;\n active: Persistent<boolean>;\n toggle: VoidFunction;\n complete: (remainInChallenge?: boolean) => void;\n type: typeof ChallengeType;\n [Component]: typeof ChallengeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Challenge<T extends ChallengeOptions> = Replace<\n T & BaseChallenge,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n canStart: GetComputableTypeWithDefault<T[\"canStart\"], true>;\n canComplete: GetComputableTypeWithDefault<T[\"canComplete\"], Ref<boolean>>;\n completionLimit: GetComputableTypeWithDefault<T[\"completionLimit\"], 1>;\n mark: GetComputableTypeWithDefault<T[\"mark\"], Ref<boolean>>;\n goal: GetComputableType<T[\"goal\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericChallenge = Replace<\n Challenge<ChallengeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canStart: ProcessedComputable<boolean>;\n canComplete: ProcessedComputable<boolean | DecimalSource>;\n completionLimit: ProcessedComputable<DecimalSource>;\n mark: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createChallenge<T extends ChallengeOptions>(\n optionsFunc: OptionsFunc<T, Challenge<T>, BaseChallenge>\n): Challenge<T> {\n const completions = persistent(0);\n const active = persistent(false);\n return createLazyProxy(() => {\n const challenge = optionsFunc();\n\n if (\n challenge.canComplete == null &&\n (challenge.resource == null || challenge.goal == null)\n ) {\n console.warn(\n \"Cannot create challenge without a canComplete property or a resource and goal property\",\n challenge\n );\n throw \"Cannot create challenge without a canComplete property or a resource and goal property\";\n }\n\n challenge.id = getUniqueID(\"challenge-\");\n challenge.type = ChallengeType;\n challenge[Component] = ChallengeComponent;\n\n challenge.completions = completions;\n challenge.active = active;\n challenge.completed = computed(() =>\n Decimal.gt((challenge as GenericChallenge).completions.value, 0)\n );\n challenge.maxed = computed(() =>\n Decimal.gte(\n (challenge as GenericChallenge).completions.value,\n unref((challenge as GenericChallenge).completionLimit)\n )\n );\n challenge.toggle = function () {\n const genericChallenge = challenge as GenericChallenge;\n if (genericChallenge.active.value) {\n if (unref(genericChallenge.canComplete) && !genericChallenge.maxed.value) {\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n }\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n } else if (\n unref(genericChallenge.canStart) &&\n unref(genericChallenge.visibility) === Visibility.Visible &&\n !genericChallenge.maxed.value\n ) {\n genericChallenge.reset?.reset();\n genericChallenge.active.value = true;\n genericChallenge.onEnter?.();\n }\n };\n challenge.complete = function (remainInChallenge?: boolean) {\n const genericChallenge = challenge as GenericChallenge;\n let completions: boolean | DecimalSource = unref(genericChallenge.canComplete);\n if (\n genericChallenge.active.value &&\n completions !== false &&\n (completions === true || Decimal.neq(0, completions)) &&\n !genericChallenge.maxed.value\n ) {\n if (typeof completions === \"boolean\") {\n completions = 1;\n }\n genericChallenge.completions.value = Decimal.min(\n Decimal.add(genericChallenge.completions.value, completions),\n unref(genericChallenge.completionLimit)\n );\n genericChallenge.onComplete?.();\n if (remainInChallenge !== true) {\n genericChallenge.active.value = false;\n genericChallenge.onExit?.();\n genericChallenge.reset?.reset();\n }\n }\n };\n processComputable(challenge as T, \"visibility\");\n setDefault(challenge, \"visibility\", Visibility.Visible);\n const visibility = challenge.visibility as ProcessedComputable<Visibility>;\n challenge.visibility = computed(() => {\n if (settings.hideChallenges === true && unref(challenge.maxed)) {\n return Visibility.None;\n }\n return unref(visibility);\n });\n if (challenge.canComplete == null) {\n challenge.canComplete = computed(() => {\n const genericChallenge = challenge as GenericChallenge;\n if (\n !genericChallenge.active.value ||\n genericChallenge.resource == null ||\n genericChallenge.goal == null\n ) {\n return false;\n }\n return Decimal.gte(genericChallenge.resource.value, unref(genericChallenge.goal));\n });\n }\n if (challenge.mark == null) {\n challenge.mark = computed(\n () =>\n Decimal.gt(unref((challenge as GenericChallenge).completionLimit), 1) &&\n !!unref(challenge.maxed)\n );\n }\n\n processComputable(challenge as T, \"canStart\");\n setDefault(challenge, \"canStart\", true);\n processComputable(challenge as T, \"canComplete\");\n processComputable(challenge as T, \"completionLimit\");\n setDefault(challenge, \"completionLimit\", 1);\n processComputable(challenge as T, \"mark\");\n processComputable(challenge as T, \"goal\");\n processComputable(challenge as T, \"classes\");\n processComputable(challenge as T, \"style\");\n processComputable(challenge as T, \"display\");\n\n if (challenge.reset != null) {\n globalBus.on(\"reset\", currentReset => {\n if (currentReset === challenge.reset && (challenge.active as Ref<boolean>).value) {\n (challenge.toggle as VoidFunction)();\n }\n });\n }\n\n challenge[GatherProps] = function (this: GenericChallenge) {\n const {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style,\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n } = this;\n return {\n active,\n maxed,\n canComplete,\n display,\n visibility,\n style: unref(style),\n classes,\n completed,\n canStart,\n mark,\n id,\n toggle\n };\n };\n\n return challenge as unknown as Challenge<T>;\n });\n}\n\nexport function setupAutoComplete(\n challenge: GenericChallenge,\n autoActive: Computable<boolean> = true,\n exitOnComplete = true\n): WatchStopHandle {\n const isActive = typeof autoActive === \"function\" ? computed(autoActive) : autoActive;\n return watch([challenge.canComplete, isActive], ([canComplete, isActive]) => {\n if (canComplete && isActive) {\n challenge.complete(!exitOnComplete);\n }\n });\n}\n\nexport function createActiveChallenge(\n challenges: GenericChallenge[]\n): Ref<GenericChallenge | undefined> {\n return computed(() => challenges.find(challenge => challenge.active.value));\n}\n\nexport function isAnyChallengeActive(\n challenges: GenericChallenge[] | Ref<GenericChallenge | undefined>\n): Ref<boolean> {\n if (isArray(challenges)) {\n challenges = createActiveChallenge(challenges);\n }\n return computed(() => (challenges as Ref<GenericChallenge | undefined>).value != null);\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n hideChallenges: boolean;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"hideChallenges\", false);\n});\n\nregisterSettingField(\n jsx(() => (\n <Toggle\n title=\"Hide Maxed Challenges\"\n onUpdate:modelValue={value => (settings.hideChallenges = value)}\n modelValue={settings.hideChallenges}\n />\n ))\n);\n","import { hasWon } from \"data/projEntry\";\nimport { globalBus } from \"game/events\";\nimport player from \"game/player\";\nimport { registerInfoComponent } from \"game/settings\";\nimport {\n Computable,\n GetComputableTypeWithDefault,\n GetComputableType,\n ProcessedComputable,\n processComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { shallowReactive, unref } from \"vue\";\nimport { OptionsFunc, findFeatures, jsx, Replace, setDefault } from \"./feature\";\n\nexport const hotkeys: Record<string, GenericHotkey | undefined> = shallowReactive({});\nexport const HotkeyType = Symbol(\"Hotkey\");\n\nexport interface HotkeyOptions {\n enabled?: Computable<boolean>;\n key: string;\n description: Computable<string>;\n onPress: VoidFunction;\n}\n\nexport interface BaseHotkey {\n type: typeof HotkeyType;\n}\n\nexport type Hotkey<T extends HotkeyOptions> = Replace<\n T & BaseHotkey,\n {\n enabled: GetComputableTypeWithDefault<T[\"enabled\"], true>;\n description: GetComputableType<T[\"description\"]>;\n }\n>;\n\nexport type GenericHotkey = Replace<\n Hotkey<HotkeyOptions>,\n {\n enabled: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createHotkey<T extends HotkeyOptions>(\n optionsFunc: OptionsFunc<T, Hotkey<T>, BaseHotkey>\n): Hotkey<T> {\n return createLazyProxy(() => {\n const hotkey = optionsFunc();\n hotkey.type = HotkeyType;\n\n processComputable(hotkey as T, \"enabled\");\n setDefault(hotkey, \"enabled\", true);\n processComputable(hotkey as T, \"description\");\n\n return hotkey as unknown as Hotkey<T>;\n });\n}\n\nglobalBus.on(\"addLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = hotkey;\n });\n});\n\nglobalBus.on(\"removeLayer\", layer => {\n (findFeatures(layer, HotkeyType) as GenericHotkey[]).forEach(hotkey => {\n hotkeys[hotkey.key] = undefined;\n });\n});\n\ndocument.onkeydown = function (e) {\n if ((e.target as HTMLElement | null)?.tagName === \"INPUT\") {\n return;\n }\n if (hasWon.value && !player.keepGoing) {\n return;\n }\n let key = e.key;\n if (e.shiftKey) {\n key = \"shift+\" + key;\n }\n if (e.ctrlKey) {\n key = \"ctrl+\" + key;\n }\n const hotkey = hotkeys[key];\n if (hotkey && unref(hotkey.enabled)) {\n e.preventDefault();\n hotkey.onPress();\n }\n};\n\nregisterInfoComponent(\n jsx(() => {\n const keys = Object.values(hotkeys).filter(hotkey => unref(hotkey?.enabled));\n if (keys.length === 0) {\n return \"\";\n }\n return (\n <div>\n <br />\n <h4>Hotkeys</h4>\n {keys.map(hotkey => (\n <div>\n {hotkey?.key}: {hotkey?.description}\n </div>\n ))}\n </div>\n );\n })\n);\n","import LinksComponent from \"./Links.vue\";\nimport { Component, OptionsFunc, GatherProps, Replace } from \"features/feature\";\nimport { Position } from \"game/layers\";\nimport {\n Computable,\n GetComputableType,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { SVGAttributes } from \"vue\";\n\nexport const LinksType = Symbol(\"Links\");\n\nexport interface Link extends SVGAttributes {\n startNode: { id: string };\n endNode: { id: string };\n offsetStart?: Position;\n offsetEnd?: Position;\n}\n\nexport interface LinksOptions {\n links: Computable<Link[]>;\n}\n\nexport interface BaseLinks {\n type: typeof LinksType;\n [Component]: typeof LinksComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Links<T extends LinksOptions> = Replace<\n T & BaseLinks,\n {\n links: GetComputableType<T[\"links\"]>;\n }\n>;\n\nexport type GenericLinks = Replace<\n Links<LinksOptions>,\n {\n links: ProcessedComputable<Link[]>;\n }\n>;\n\nexport function createLinks<T extends LinksOptions>(\n optionsFunc: OptionsFunc<T, Links<T>, BaseLinks>\n): Links<T> {\n return createLazyProxy(() => {\n const links = optionsFunc();\n links.type = LinksType;\n links[Component] = LinksComponent;\n\n processComputable(links as T, \"links\");\n\n links[GatherProps] = function (this: GenericLinks) {\n const { links } = this;\n return {\n links\n };\n };\n\n return links as unknown as Links<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n class: _normalizeClass({ feature: true, milestone: true, done: _ctx.unref(_ctx.earned), ..._ctx.unref(_ctx.classes) })\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.comp)))),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { GenericMilestone } from \"features/milestones/milestone\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { Component, defineComponent, shallowRef, toRefs, unref, UnwrapRef, watchEffect } from \"vue\";\nimport Node from \"../../components/Node.vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<UnwrapRef<GenericMilestone[\"display\"]>>(\n String,\n Object,\n Function\n ),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n earned: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n id: {\n type: String,\n required: true\n }\n },\n components: {\n Node\n },\n setup(props) {\n const { display } = toRefs(props);\n\n const comp = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n comp.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n comp.value = coerceComponent(currDisplay);\n return;\n }\n const Requirement = coerceComponent(currDisplay.requirement, \"h3\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\", \"b\");\n const OptionsDisplay = coerceComponent(currDisplay.optionsDisplay || \"\", \"span\");\n comp.value = coerceComponent(\n jsx(() => (\n <span>\n <Requirement />\n {currDisplay.effectDisplay ? (\n <div>\n <EffectDisplay />\n </div>\n ) : null}\n {currDisplay.optionsDisplay ? (\n <div class=\"equal-spaced\">\n <OptionsDisplay />\n </div>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n comp,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Milestone.vue?vue&type=template&id=0b660ac3&scoped=true&ts=true\"\nimport script from \"./Milestone.vue?vue&type=script&lang=tsx\"\nexport * from \"./Milestone.vue?vue&type=script&lang=tsx\"\n\nimport \"./Milestone.vue?vue&type=style&index=0&id=0b660ac3&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0b660ac3\"]])\n\nexport default __exports__","import Select from \"components/fields/Select.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n jsx,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport MilestoneComponent from \"features/milestones/Milestone.vue\";\nimport { globalBus } from \"game/events\";\nimport \"game/notifications\";\nimport { persistent, Persistent } from \"game/persistence\";\nimport settings, { registerSettingField } from \"game/settings\";\nimport { camelToTitle } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { coerceComponent, isCoercableComponent } from \"util/vue\";\nimport { computed, unref, watchEffect } from \"vue\";\nimport { useToast } from \"vue-toastification\";\n\nconst toast = useToast();\n\nexport const MilestoneType = Symbol(\"Milestone\");\n\nexport enum MilestoneDisplay {\n All = \"all\",\n //Last = \"last\",\n Configurable = \"configurable\",\n Incomplete = \"incomplete\",\n None = \"none\"\n}\n\nexport interface MilestoneOptions {\n visibility?: Computable<Visibility>;\n shouldEarn?: () => boolean;\n style?: Computable<StyleValue>;\n classes?: Computable<Record<string, boolean>>;\n display?: Computable<\n | CoercableComponent\n | {\n requirement: CoercableComponent;\n effectDisplay?: CoercableComponent;\n optionsDisplay?: CoercableComponent;\n }\n >;\n onComplete?: VoidFunction;\n}\n\nexport interface BaseMilestone {\n id: string;\n earned: Persistent<boolean>;\n complete: VoidFunction;\n type: typeof MilestoneType;\n [Component]: typeof MilestoneComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Milestone<T extends MilestoneOptions> = Replace<\n T & BaseMilestone,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n style: GetComputableType<T[\"style\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericMilestone = Replace<\n Milestone<MilestoneOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createMilestone<T extends MilestoneOptions>(\n optionsFunc?: OptionsFunc<T, Milestone<T>, BaseMilestone>\n): Milestone<T> {\n const earned = persistent<boolean>(false);\n return createLazyProxy(() => {\n const milestone = optionsFunc?.() ?? ({} as ReturnType<NonNullable<typeof optionsFunc>>);\n milestone.id = getUniqueID(\"milestone-\");\n milestone.type = MilestoneType;\n milestone[Component] = MilestoneComponent;\n\n milestone.earned = earned;\n milestone.complete = function () {\n earned.value = true;\n };\n\n processComputable(milestone as T, \"visibility\");\n setDefault(milestone, \"visibility\", Visibility.Visible);\n const visibility = milestone.visibility as ProcessedComputable<Visibility>;\n milestone.visibility = computed(() => {\n const display = unref((milestone as GenericMilestone).display);\n switch (settings.msDisplay) {\n default:\n case MilestoneDisplay.All:\n return unref(visibility);\n case MilestoneDisplay.Configurable:\n if (\n unref(milestone.earned) &&\n !(\n display != null &&\n typeof display == \"object\" &&\n \"optionsDisplay\" in (display as Record<string, unknown>)\n )\n ) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.Incomplete:\n if (unref(milestone.earned)) {\n return Visibility.None;\n }\n return unref(visibility);\n case MilestoneDisplay.None:\n return Visibility.None;\n }\n });\n\n processComputable(milestone as T, \"style\");\n processComputable(milestone as T, \"classes\");\n processComputable(milestone as T, \"display\");\n\n milestone[GatherProps] = function (this: GenericMilestone) {\n const { visibility, display, style, classes, earned, id } = this;\n return { visibility, display, style: unref(style), classes, earned, id };\n };\n\n if (milestone.shouldEarn) {\n const genericMilestone = milestone as GenericMilestone;\n watchEffect(() => {\n if (\n !genericMilestone.earned.value &&\n unref(genericMilestone.visibility) === Visibility.Visible &&\n genericMilestone.shouldEarn?.()\n ) {\n genericMilestone.earned.value = true;\n genericMilestone.onComplete?.();\n if (genericMilestone.display) {\n const display = unref(genericMilestone.display);\n const Display = coerceComponent(\n isCoercableComponent(display) ? display : display.requirement\n );\n toast(\n <>\n <h3>Milestone earned!</h3>\n <div>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n <Display />\n </div>\n </>\n );\n }\n }\n });\n }\n\n return milestone as unknown as Milestone<T>;\n });\n}\n\ndeclare module \"game/settings\" {\n interface Settings {\n msDisplay: MilestoneDisplay;\n }\n}\n\nglobalBus.on(\"loadSettings\", settings => {\n setDefault(settings, \"msDisplay\", MilestoneDisplay.All);\n});\n\nconst msDisplayOptions = Object.values(MilestoneDisplay).map(option => ({\n label: camelToTitle(option),\n value: option\n}));\n\nregisterSettingField(\n jsx(() => (\n <Select\n title=\"Show Milestones\"\n options={msDisplayOptions}\n onUpdate:modelValue={value => (settings.msDisplay = value as MilestoneDisplay)}\n modelValue={settings.msDisplay}\n />\n ))\n);\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { CoercableComponent } from \"features/feature\";\nimport { computeComponent } from \"util/vue\";\nimport { toRefs } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n display: null\n },\n setup(__props: any) {\n\nconst _props = __props as { display: CoercableComponent }\n\n\nconst { display } = toRefs(_props);\nconst component = computeComponent(display);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n}\n}\n\n})","import script from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Tab.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n StyleValue\n} from \"features/feature\";\nimport TabComponent from \"features/tabs/Tab.vue\";\nimport { Computable, GetComputableType } from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\n\nexport const TabType = Symbol(\"Tab\");\n\nexport interface TabOptions {\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display: Computable<CoercableComponent>;\n}\n\nexport interface BaseTab {\n id: string;\n type: typeof TabType;\n [Component]: typeof TabComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Tab<T extends TabOptions> = Replace<\n T & BaseTab,\n {\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n }\n>;\n\nexport type GenericTab = Tab<TabOptions>;\n\nexport function createTab<T extends TabOptions>(\n optionsFunc: OptionsFunc<T, Tab<T>, BaseTab>\n): Tab<T> {\n return createLazyProxy(() => {\n const tab = optionsFunc();\n tab.id = getUniqueID(\"tab-\");\n tab.type = TabType;\n tab[Component] = TabComponent;\n\n tab[GatherProps] = function (this: GenericTab) {\n const { display } = this;\n return { display };\n };\n\n return tab as unknown as Tab<T>;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.selectTab && _ctx.selectTab(...args))),\n class: _normalizeClass([\"tabButton\", {\n active: _ctx.active,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.glowColorStyle,\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.component)))\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { getNotifyStyle } from \"game/notifications\";\nimport { computeComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport { computed, defineComponent, toRefs, unref } from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n glowColor: processedPropType<string>(String),\n active: Boolean,\n floating: Boolean\n },\n emits: [\"selectTab\"],\n setup(props, { emit }) {\n const { display, glowColor, floating } = toRefs(props);\n\n const component = computeComponent(display);\n\n const glowColorStyle = computed(() => {\n const color = unwrapRef(glowColor);\n if (!color) {\n return {};\n }\n if (unref(floating)) {\n return getNotifyStyle(color);\n }\n return { boxShadow: `0px 9px 5px -6px ${color}` };\n });\n\n function selectTab() {\n emit(\"selectTab\");\n }\n\n return {\n selectTab,\n component,\n glowColorStyle,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./TabButton.vue?vue&type=template&id=3e3f03f9&scoped=true&ts=true\"\nimport script from \"./TabButton.vue?vue&type=script&lang=ts\"\nexport * from \"./TabButton.vue?vue&type=script&lang=ts\"\n\nimport \"./TabButton.vue?vue&type=style&index=0&id=3e3f03f9&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3e3f03f9\"]])\n\nexport default __exports__","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, mergeProps as _mergeProps, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_TabButton = _resolveComponent(\"TabButton\")!\n const _component_Sticky = _resolveComponent(\"Sticky\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tab-family-container\", { ..._ctx.unref(_ctx.classes), ..._ctx.tabClasses }]),\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? [],\n _ctx.tabStyle ?? []\n ])\n }, [\n _createVNode(_component_Sticky, { class: \"tab-buttons-container\" }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"tab-buttons\", { floating: _ctx.floating }])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.unref(_ctx.tabs), (button, id) => {\n return (_openBlock(), _createBlock(_component_TabButton, _mergeProps({\n onSelectTab: ($event: any) => (_ctx.selected.value = id),\n floating: _ctx.floating,\n key: id,\n active: _ctx.unref(button.tab) === _ctx.unref(_ctx.activeTab)\n }, _ctx.gatherButtonProps(button)), null, 16, [\"onSelectTab\", \"floating\", \"active\"]))\n }), 128))\n ], 2)\n ]),\n _: 1\n }),\n (_ctx.unref(_ctx.activeTab))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n}","\nimport Sticky from \"components/layout/Sticky.vue\";\nimport themes from \"data/themes\";\nimport { CoercableComponent, StyleValue, Visibility } from \"features/feature\";\nimport { GenericTab } from \"features/tabs/tab\";\nimport TabButton from \"features/tabs/TabButton.vue\";\nimport { GenericTabButton } from \"features/tabs/tabFamily\";\nimport settings from \"game/settings\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n Ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n activeTab: {\n type: processedPropType<GenericTab | CoercableComponent | null>(Object),\n required: true\n },\n selected: {\n type: Object as PropType<Ref<string>>,\n required: true\n },\n tabs: {\n type: processedPropType<Record<string, GenericTabButton>>(Object),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object)\n },\n components: {\n Sticky,\n TabButton\n },\n setup(props) {\n const { activeTab } = toRefs(props);\n\n const floating = computed(() => {\n return themes[settings.theme].floatingTabs;\n });\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currActiveTab = unwrapRef(activeTab);\n if (currActiveTab == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currActiveTab)) {\n component.value = coerceComponent(currActiveTab);\n return;\n }\n component.value = coerceComponent(unref(currActiveTab.display));\n });\n\n const tabClasses = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n const tabClasses =\n isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.classes);\n return tabClasses;\n });\n\n const tabStyle = computed(() => {\n const currActiveTab = unwrapRef(activeTab);\n return isCoercableComponent(currActiveTab) || !currActiveTab\n ? undefined\n : unref(currActiveTab.style);\n });\n\n function gatherButtonProps(button: GenericTabButton) {\n const { display, style, classes, glowColor, visibility } = button;\n return { display, style: unref(style), classes, glowColor, visibility };\n }\n\n return {\n floating,\n tabClasses,\n tabStyle,\n Visibility,\n component,\n gatherButtonProps,\n unref\n };\n }\n});\n","import { render } from \"./TabFamily.vue?vue&type=template&id=46a6b098&scoped=true&ts=true\"\nimport script from \"./TabFamily.vue?vue&type=script&lang=ts\"\nexport * from \"./TabFamily.vue?vue&type=script&lang=ts\"\n\nimport \"./TabFamily.vue?vue&type=style&index=0&id=46a6b098&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-46a6b098\"]])\n\nexport default __exports__","import {\n CoercableComponent,\n Component,\n OptionsFunc,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport TabButtonComponent from \"features/tabs/TabButton.vue\";\nimport TabFamilyComponent from \"features/tabs/TabFamily.vue\";\nimport { Persistent, persistent } from \"game/persistence\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { GenericTab } from \"./tab\";\n\nexport const TabButtonType = Symbol(\"TabButton\");\nexport const TabFamilyType = Symbol(\"TabFamily\");\n\nexport interface TabButtonOptions {\n visibility?: Computable<Visibility>;\n tab: Computable<GenericTab | CoercableComponent>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n glowColor?: Computable<string>;\n}\n\nexport interface BaseTabButton {\n type: typeof TabButtonType;\n [Component]: typeof TabButtonComponent;\n}\n\nexport type TabButton<T extends TabButtonOptions> = Replace<\n T & BaseTabButton,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tab: GetComputableType<T[\"tab\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n glowColor: GetComputableType<T[\"glowColor\"]>;\n }\n>;\n\nexport type GenericTabButton = Replace<\n TabButton<TabButtonOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport interface TabFamilyOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n}\n\nexport interface BaseTabFamily {\n id: string;\n tabs: Record<string, TabButtonOptions>;\n activeTab: Ref<GenericTab | CoercableComponent | null>;\n selected: Persistent<string>;\n type: typeof TabFamilyType;\n [Component]: typeof TabFamilyComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type TabFamily<T extends TabFamilyOptions> = Replace<\n T & BaseTabFamily,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n tabs: Record<string, GenericTabButton>;\n }\n>;\n\nexport type GenericTabFamily = Replace<\n TabFamily<TabFamilyOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n }\n>;\n\nexport function createTabFamily<T extends TabFamilyOptions>(\n tabs: Record<string, () => TabButtonOptions>,\n optionsFunc?: OptionsFunc<T, TabFamily<T>, BaseTabFamily>\n): TabFamily<T> {\n if (Object.keys(tabs).length === 0) {\n console.warn(\"Cannot create tab family with 0 tabs\");\n throw \"Cannot create tab family with 0 tabs\";\n }\n\n const selected = persistent(Object.keys(tabs)[0]);\n return createLazyProxy(() => {\n const tabFamily = optionsFunc?.() ?? ({} as ReturnType<NonNullable<typeof optionsFunc>>);\n\n tabFamily.id = getUniqueID(\"tabFamily-\");\n tabFamily.type = TabFamilyType;\n tabFamily[Component] = TabFamilyComponent;\n\n tabFamily.tabs = Object.keys(tabs).reduce<Record<string, GenericTabButton>>(\n (parsedTabs, tab) => {\n const tabButton: TabButtonOptions & Partial<BaseTabButton> = tabs[tab]();\n tabButton.type = TabButtonType;\n tabButton[Component] = TabButtonComponent;\n\n processComputable(tabButton as TabButtonOptions, \"visibility\");\n setDefault(tabButton, \"visibility\", Visibility.Visible);\n processComputable(tabButton as TabButtonOptions, \"tab\");\n processComputable(tabButton as TabButtonOptions, \"display\");\n processComputable(tabButton as TabButtonOptions, \"classes\");\n processComputable(tabButton as TabButtonOptions, \"style\");\n processComputable(tabButton as TabButtonOptions, \"glowColor\");\n parsedTabs[tab] = tabButton as GenericTabButton;\n return parsedTabs;\n },\n {}\n );\n tabFamily.selected = selected;\n tabFamily.activeTab = computed(() => {\n const tabs = unref(processedTabFamily.tabs);\n if (\n selected.value in tabs &&\n unref(tabs[selected.value].visibility) === Visibility.Visible\n ) {\n return unref(tabs[selected.value].tab);\n }\n const firstTab = Object.values(tabs).find(\n tab => unref(tab.visibility) === Visibility.Visible\n );\n if (firstTab) {\n return unref(firstTab.tab);\n }\n return null;\n });\n\n processComputable(tabFamily as T, \"visibility\");\n setDefault(tabFamily, \"visibility\", Visibility.Visible);\n processComputable(tabFamily as T, \"classes\");\n processComputable(tabFamily as T, \"style\");\n\n tabFamily[GatherProps] = function (this: GenericTabFamily) {\n const { visibility, activeTab, selected, tabs, style, classes } = this;\n return { visibility, activeTab, selected, tabs, style: unref(style), classes };\n };\n\n // This is necessary because board.types is different from T and TabFamily\n const processedTabFamily = tabFamily as unknown as TabFamily<T>;\n return processedTabFamily;\n });\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6f164fe2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MarkNode = _resolveComponent(\"MarkNode\")!\n const _component_Node = _resolveComponent(\"Node\")!\n\n return (_ctx.unref(_ctx.visibility) !== _ctx.Visibility.None)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n style: _normalizeStyle([\n {\n visibility: _ctx.unref(_ctx.visibility) === _ctx.Visibility.Hidden ? 'hidden' : undefined\n },\n _ctx.unref(_ctx.style) ?? {}\n ]),\n onClick: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.purchase && _ctx.purchase(...args))),\n class: _normalizeClass({\n feature: true,\n upgrade: true,\n can: _ctx.unref(_ctx.canPurchase),\n locked: !_ctx.unref(_ctx.canPurchase),\n bought: _ctx.unref(_ctx.bought),\n ..._ctx.unref(_ctx.classes)\n }),\n disabled: !_ctx.unref(_ctx.canPurchase)\n }, [\n (_ctx.unref(_ctx.component))\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.unref(_ctx.component)), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_MarkNode, {\n mark: _ctx.unref(_ctx.mark)\n }, null, 8, [\"mark\"]),\n _createVNode(_component_Node, { id: _ctx.id }, null, 8, [\"id\"])\n ], 14, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}","\nimport \"components/common/features.css\";\nimport Node from \"components/Node.vue\";\nimport MarkNode from \"components/MarkNode.vue\";\nimport { jsx, StyleValue, Visibility } from \"features/feature\";\nimport { displayResource, Resource } from \"features/resources/resource\";\nimport { GenericUpgrade } from \"features/upgrades/upgrade\";\nimport { DecimalSource } from \"util/bignum\";\nimport { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from \"util/vue\";\nimport {\n Component,\n defineComponent,\n PropType,\n shallowRef,\n toRefs,\n unref,\n UnwrapRef,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n display: {\n type: processedPropType<UnwrapRef<GenericUpgrade[\"display\"]>>(String, Object, Function),\n required: true\n },\n visibility: {\n type: processedPropType<Visibility>(Number),\n required: true\n },\n style: processedPropType<StyleValue>(String, Object, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n resource: Object as PropType<Resource>,\n cost: processedPropType<DecimalSource>(String, Object, Number),\n canPurchase: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n bought: {\n type: processedPropType<boolean>(Boolean),\n required: true\n },\n mark: processedPropType<boolean | string>(Boolean, String),\n id: {\n type: String,\n required: true\n },\n purchase: {\n type: Function as PropType<VoidFunction>,\n required: true\n }\n },\n components: {\n Node,\n MarkNode\n },\n setup(props) {\n const { display, cost } = toRefs(props);\n\n const component = shallowRef<Component | string>(\"\");\n\n watchEffect(() => {\n const currDisplay = unwrapRef(display);\n if (currDisplay == null) {\n component.value = \"\";\n return;\n }\n if (isCoercableComponent(currDisplay)) {\n component.value = coerceComponent(currDisplay);\n return;\n }\n const currCost = unwrapRef(cost);\n const Title = coerceComponent(currDisplay.title || \"\", \"h3\");\n const Description = coerceComponent(currDisplay.description, \"div\");\n const EffectDisplay = coerceComponent(currDisplay.effectDisplay || \"\");\n component.value = coerceComponent(\n jsx(() => (\n <span>\n {currDisplay.title ? (\n <div>\n <Title />\n </div>\n ) : null}\n <Description />\n {currDisplay.effectDisplay ? (\n <div>\n Currently: <EffectDisplay />\n </div>\n ) : null}\n {props.resource != null ? (\n <>\n <br />\n Cost: {props.resource &&\n displayResource(props.resource, currCost)}{\" \"}\n {props.resource?.displayName}\n </>\n ) : null}\n </span>\n ))\n );\n });\n\n return {\n component,\n unref,\n Visibility\n };\n }\n});\n","import { render } from \"./Upgrade.vue?vue&type=template&id=6f164fe2&scoped=true&ts=true\"\nimport script from \"./Upgrade.vue?vue&type=script&lang=tsx\"\nexport * from \"./Upgrade.vue?vue&type=script&lang=tsx\"\n\nimport \"./Upgrade.vue?vue&type=style&index=0&id=6f164fe2&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-6f164fe2\"]])\n\nexport default __exports__","import UpgradeComponent from \"features/upgrades/Upgrade.vue\";\nimport {\n CoercableComponent,\n Component,\n OptionsFunc,\n findFeatures,\n GatherProps,\n getUniqueID,\n Replace,\n setDefault,\n StyleValue,\n Visibility\n} from \"features/feature\";\nimport { Resource } from \"features/resources/resource\";\nimport { GenericLayer } from \"game/layers\";\nimport Decimal, { DecimalSource } from \"util/bignum\";\nimport { isFunction } from \"util/common\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { computed, Ref, unref } from \"vue\";\nimport { persistent, Persistent } from \"game/persistence\";\n\nexport const UpgradeType = Symbol(\"Upgrade\");\n\nexport interface UpgradeOptions {\n visibility?: Computable<Visibility>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n display?: Computable<\n | CoercableComponent\n | {\n title?: CoercableComponent;\n description: CoercableComponent;\n effectDisplay?: CoercableComponent;\n }\n >;\n mark?: Computable<boolean | string>;\n cost?: Computable<DecimalSource>;\n resource?: Resource;\n canAfford?: Computable<boolean>;\n onPurchase?: VoidFunction;\n}\n\nexport interface BaseUpgrade {\n id: string;\n bought: Persistent<boolean>;\n canPurchase: Ref<boolean>;\n purchase: VoidFunction;\n type: typeof UpgradeType;\n [Component]: typeof UpgradeComponent;\n [GatherProps]: () => Record<string, unknown>;\n}\n\nexport type Upgrade<T extends UpgradeOptions> = Replace<\n T & BaseUpgrade,\n {\n visibility: GetComputableTypeWithDefault<T[\"visibility\"], Visibility.Visible>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n display: GetComputableType<T[\"display\"]>;\n mark: GetComputableType<T[\"mark\"]>;\n cost: GetComputableType<T[\"cost\"]>;\n canAfford: GetComputableTypeWithDefault<T[\"canAfford\"], Ref<boolean>>;\n }\n>;\n\nexport type GenericUpgrade = Replace<\n Upgrade<UpgradeOptions>,\n {\n visibility: ProcessedComputable<Visibility>;\n canPurchase: ProcessedComputable<boolean>;\n }\n>;\n\nexport function createUpgrade<T extends UpgradeOptions>(\n optionsFunc: OptionsFunc<T, Upgrade<T>, BaseUpgrade>\n): Upgrade<T> {\n const bought = persistent<boolean>(false);\n return createLazyProxy(() => {\n const upgrade = optionsFunc();\n upgrade.id = getUniqueID(\"upgrade-\");\n upgrade.type = UpgradeType;\n upgrade[Component] = UpgradeComponent;\n\n if (upgrade.canAfford == null && (upgrade.resource == null || upgrade.cost == null)) {\n console.warn(\n \"Error: can't create upgrade without a canAfford property or a resource and cost property\",\n upgrade\n );\n }\n\n upgrade.bought = bought;\n if (upgrade.canAfford == null) {\n upgrade.canAfford = computed(() => {\n const genericUpgrade = upgrade as GenericUpgrade;\n return (\n genericUpgrade.resource != null &&\n genericUpgrade.cost != null &&\n Decimal.gte(genericUpgrade.resource.value, unref(genericUpgrade.cost))\n );\n });\n } else {\n processComputable(upgrade as T, \"canAfford\");\n }\n upgrade.canPurchase = computed(\n () =>\n unref((upgrade as GenericUpgrade).visibility) === Visibility.Visible &&\n unref((upgrade as GenericUpgrade).canAfford) &&\n !unref(upgrade.bought)\n );\n upgrade.purchase = function () {\n const genericUpgrade = upgrade as GenericUpgrade;\n if (!unref(genericUpgrade.canPurchase)) {\n return;\n }\n if (genericUpgrade.resource != null && genericUpgrade.cost != null) {\n genericUpgrade.resource.value = Decimal.sub(\n genericUpgrade.resource.value,\n unref(genericUpgrade.cost)\n );\n }\n bought.value = true;\n genericUpgrade.onPurchase?.();\n };\n\n processComputable(upgrade as T, \"visibility\");\n setDefault(upgrade, \"visibility\", Visibility.Visible);\n processComputable(upgrade as T, \"classes\");\n processComputable(upgrade as T, \"style\");\n processComputable(upgrade as T, \"display\");\n processComputable(upgrade as T, \"mark\");\n processComputable(upgrade as T, \"cost\");\n processComputable(upgrade as T, \"resource\");\n\n upgrade[GatherProps] = function (this: GenericUpgrade) {\n const {\n display,\n visibility,\n style,\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n } = this;\n return {\n display,\n visibility,\n style: unref(style),\n classes,\n resource,\n cost,\n canPurchase,\n bought,\n mark,\n id,\n purchase\n };\n };\n\n return upgrade as unknown as Upgrade<T>;\n });\n}\n\nexport function setupAutoPurchase(\n layer: GenericLayer,\n autoActive: Computable<boolean>,\n upgrades: GenericUpgrade[] = []\n): void {\n upgrades = upgrades || findFeatures(layer, UpgradeType);\n const isAutoActive = isFunction(autoActive) ? computed(autoActive) : autoActive;\n layer.on(\"update\", () => {\n if (unref(isAutoActive)) {\n upgrades.forEach(upgrade => upgrade.purchase());\n }\n });\n}\n","import Slider from \"components/fields/Slider.vue\";\nimport Text from \"components/fields/Text.vue\";\nimport Toggle from \"components/fields/Toggle.vue\";\nimport Column from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport Sticky from \"components/layout/Sticky.vue\";\nimport VerticalRule from \"components/layout/VerticalRule.vue\";\nimport Modal from \"components/Modal.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport themes from \"data/themes\";\nimport { createBar } from \"features/bars/bar\";\nimport { createBuyable } from \"features/buyable\";\nimport { createChallenge } from \"features/challenges/challenge\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport {\n addSoftcap,\n createCumulativeConversion,\n createPolynomialScaling\n} from \"features/conversion\";\nimport { jsx, showIf, Visibility } from \"features/feature\";\nimport { createHotkey } from \"features/hotkey\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createLinks } from \"features/links/links\";\nimport { createMilestone } from \"features/milestones/milestone\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource, trackBest } from \"features/resources/resource\";\nimport Resource from \"features/resources/Resource.vue\";\nimport { createTab } from \"features/tabs/tab\";\nimport { createTabFamily } from \"features/tabs/tabFamily\";\nimport { addTooltip } from \"features/tooltips/tooltip\";\nimport {\n createResourceTooltip,\n createTree,\n createTreeNode,\n GenericTreeNode,\n TreeBranch\n} from \"features/trees/tree\";\nimport { createUpgrade } from \"features/upgrades/upgrade\";\nimport { createLayer } from \"game/layers\";\nimport {\n createAdditiveModifier,\n createExponentialModifier,\n createModifierSection,\n createSequentialModifier\n} from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal, { format, formatWhole } from \"util/bignum\";\nimport { Direction } from \"util/common\";\nimport { render, renderCol, renderRow } from \"util/vue\";\nimport { computed, ComputedRef, ref } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"c\";\nconst layer = createLayer(id, () => {\n const color = \"#4BDC13\";\n const name = \"Candies\";\n const points = createResource<DecimalSource>(0, \"lollipops\");\n const best = trackBest(points);\n const beep = persistent<boolean>(false);\n const thingy = persistent<string>(\"pointy\");\n const otherThingy = persistent<number>(10);\n const spentOnBuyables = persistent(new Decimal(10));\n\n const waffleBoost = computed(() => Decimal.pow(points.value, 0.2));\n const icecreamCap = computed(() => Decimal.times(points.value, 10));\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" },\n color: \"rgb(75, 220, 19)\"\n }));\n\n const lollipopMilestone3 = createMilestone(() => ({\n shouldEarn() {\n return Decimal.gte(best.value, 3);\n },\n display: {\n requirement: \"3 Lollipops\",\n effectDisplay: \"Unlock the next milestone\"\n }\n }));\n const lollipopMilestone4 = createMilestone(() => ({\n visibility() {\n return showIf(lollipopMilestone3.earned.value);\n },\n shouldEarn() {\n return Decimal.gte(best.value, 4);\n },\n display: {\n requirement: \"4 Lollipops\",\n effectDisplay: \"You can toggle beep and boop (which do nothing)\",\n optionsDisplay: jsx(() => (\n <>\n <Toggle\n title=\"beep\"\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Toggle\n title=\"boop\"\n onUpdate:modelValue={value => (f.boop.value = value)}\n modelValue={f.boop.value}\n />\n </>\n ))\n },\n style() {\n if (this.earned) {\n return { backgroundColor: \"#1111DD\" };\n }\n return {};\n }\n }));\n const lollipopMilestones = [lollipopMilestone3, lollipopMilestone4];\n\n const funChallenge = createChallenge(() => ({\n title: \"Fun\",\n completionLimit: 3,\n display() {\n return {\n description: `Makes the game 0% harder<br>${formatWhole(this.completions.value)}/${\n this.completionLimit\n } completions`,\n goal: \"Have 20 points I guess\",\n reward: \"Says hi\",\n effectDisplay: format(funEffect.value) + \"x\"\n };\n },\n visibility() {\n return showIf(Decimal.gt(best.value, 0));\n },\n goal: 20,\n resource: main.points,\n onComplete() {\n console.log(\"hiii\");\n },\n onEnter() {\n main.points.value = 0;\n main.best.value = main.points.value;\n main.total.value = main.points.value;\n console.log(\"So challenging\");\n },\n onExit() {\n console.log(\"Sweet freedom!\");\n },\n style: {\n height: \"200px\"\n }\n }));\n const funEffect = computed(() => Decimal.add(points.value, 1).tetrate(0.02));\n\n const generatorUpgrade = createUpgrade(() => ({\n display: {\n title: \"Generator of Genericness\",\n description: \"Gain 1 point every second\"\n },\n cost: 1,\n resource: points\n }));\n const lollipopMultiplierUpgrade = createUpgrade(() => ({\n display: () => ({\n description: \"Point generation is faster based on your unspent Lollipops\",\n effectDisplay: `${format(lollipopMultiplierEffect.value)}x`\n }),\n cost: 1,\n resource: points,\n visibility: () => showIf(generatorUpgrade.bought.value)\n }));\n const lollipopMultiplierEffect = computed(() => {\n let ret = Decimal.add(points.value, 1).pow(0.5);\n if (ret.gte(\"1e20000000\")) ret = ret.sqrt().times(\"1e10000000\");\n return ret;\n });\n const unlockIlluminatiUpgrade = createUpgrade(() => ({\n visibility() {\n return showIf(lollipopMultiplierUpgrade.bought.value);\n },\n canAfford() {\n return Decimal.lt(main.points.value, 7);\n },\n onPurchase() {\n main.points.value = Decimal.add(main.points.value, 7);\n },\n display:\n \"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.\",\n style() {\n if (this.bought) {\n return { backgroundColor: \"#1111dd\" };\n }\n if (!this.canAfford) {\n return { backgroundColor: \"#dd1111\" };\n }\n return {};\n }\n }));\n const quasiUpgrade = createUpgrade(() => ({\n resource: createResource(exhancers.amount, \"Exhancers\", 0),\n cost: 3,\n display: {\n title: \"This upgrade doesn't exist\",\n description: \"Or does it?\"\n }\n }));\n const upgrades = [generatorUpgrade, lollipopMultiplierUpgrade, unlockIlluminatiUpgrade];\n\n const exhancers = createBuyable(() => ({\n resource: points,\n cost() {\n let x = new Decimal(this.amount.value);\n if (x.gte(25)) {\n x = x.pow(2).div(25);\n }\n const cost = Decimal.pow(2, x.pow(1.5));\n return cost.floor();\n },\n display() {\n return {\n title: \"Exhancers\",\n description: `Adds ${format(\n thingEffect.value\n )} things and multiplies stuff by ${format(stuffEffect.value)}.`\n };\n },\n onPurchase(cost) {\n spentOnBuyables.value = Decimal.add(spentOnBuyables.value, cost ?? 0);\n },\n style: { height: \"222px\" },\n purchaseLimit: 4\n }));\n // The following need redundant ComputedRef<Decimal> type annotations because otherwise the ts\n // interpreter thinks exhancers are cyclically referenced\n const thingEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const stuffEffect: ComputedRef<Decimal> = computed(() => {\n if (Decimal.gte(exhancers.amount.value, 0)) {\n return Decimal.pow(25, Decimal.pow(exhancers.amount.value, 1.1));\n }\n return Decimal.pow(1 / 25, Decimal.times(exhancers.amount.value, -1).pow(1.1));\n });\n const confirmRespec = persistent<boolean>(false);\n const confirming = ref(false);\n const respecBuyables = createClickable(() => ({\n small: true,\n display: \"Respec Thingies\",\n onClick() {\n if (confirmRespec.value && !confirming.value) {\n confirming.value = true;\n return;\n }\n\n points.value = Decimal.add(points.value, spentOnBuyables.value);\n exhancers.amount.value = 0;\n main.tree.reset(treeNode);\n }\n }));\n const sellExhancer = createClickable(() => ({\n small: true,\n display: \"Sell One\",\n onClick() {\n if (Decimal.lte(exhancers.amount.value, 0)) {\n return;\n }\n exhancers.amount.value = Decimal.sub(exhancers.amount.value, 1);\n points.value = Decimal.add(points.value, exhancers.cost.value);\n spentOnBuyables.value = Decimal.sub(spentOnBuyables.value, exhancers.cost.value);\n }\n }));\n const buyablesDisplay = jsx(() => (\n <Column>\n <Row>\n <Toggle\n title=\"Confirm\"\n onUpdate:modelValue={value => (confirmRespec.value = value)}\n modelValue={confirmRespec.value}\n />\n {renderRow(respecBuyables)}\n </Row>\n {renderRow(exhancers)}\n {renderRow(sellExhancer)}\n <Modal\n modelValue={confirming.value}\n onUpdate:modelValue={value => (confirming.value = value)}\n v-slots={{\n header: () => <h2>Confirm Respec</h2>,\n body: () => <>Are you sure? Respeccing these doesn't accomplish much</>,\n footer: () => (\n <div class=\"modal-default-footer\">\n <div class=\"modal-default-flex-grow\"></div>\n <button\n class=\"button modal-default-button\"\n onClick={() => (confirming.value = false)}\n >\n Cancel\n </button>\n <button\n class=\"button modal-default-button danger\"\n onClick={() => {\n respecBuyables.onClick();\n confirming.value = false;\n }}\n >\n Respec\n </button>\n </div>\n )\n }}\n />\n </Column>\n ));\n\n const longBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FFFFFF\" },\n baseStyle: { backgroundColor: \"#696969\" },\n textStyle: { color: \"#04e050\" },\n direction: Direction.Right,\n width: 300,\n height: 30,\n progress() {\n return Decimal.add(main.points.value, 1).log(10).div(10).toNumber();\n },\n display() {\n return format(main.points.value) + \" / 1e10 points\";\n }\n }));\n const tallBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#4BEC13\" },\n baseStyle: { backgroundColor: \"#000000\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n borderStyle: { borderWidth: \"7px\" },\n direction: Direction.Up,\n width: 50,\n height: 200,\n progress() {\n return Decimal.div(main.points.value, 100);\n },\n display() {\n return formatWhole(Decimal.div(main.points.value, 1).min(100)) + \"%\";\n }\n }));\n const flatBoi = createBar(() => ({\n fillStyle: { backgroundColor: \"#FE0102\" },\n baseStyle: { backgroundColor: \"#222222\" },\n textStyle: { textShadow: \"0px 0px 2px #000000\" },\n direction: Direction.Up,\n width: 100,\n height: 30,\n progress() {\n return Decimal.div(points.value, 50);\n }\n }));\n\n const conversion = createCumulativeConversion(() => ({\n scaling: addSoftcap(createPolynomialScaling(10, 0.5), 1e100, 0.5),\n baseResource: main.points,\n gainResource: points,\n roundUpCost: true,\n gainModifier: createSequentialModifier(\n createExponentialModifier(2, \"Because I felt like it\"),\n createAdditiveModifier(1, \"Nice modifier\")\n )\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const hotkeys = [\n createHotkey(() => ({\n key: \"c\",\n description: \"reset for lollipops or whatever\",\n onPress() {\n if (resetButton.canClick.value) {\n resetButton.onClick();\n }\n }\n })),\n createHotkey(() => ({\n key: \"ctrl+c\",\n description: \"respec things\",\n onPress() {\n respecBuyables.onClick();\n }\n }))\n ];\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n mark: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n tooltip() {\n let tooltip = displayResource(points);\n if (Decimal.gt(exhancers.amount.value, 0)) {\n tooltip += `<br><i><br><br><br>${formatWhole(\n exhancers.amount.value\n )} Exhancers</i>`;\n }\n return tooltip;\n },\n style: {\n color: \"#3325CC\",\n textDecoration: \"underline\"\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n style: {\n color: \"#AA66AA\"\n },\n resetDescription: \"Melt your points into \"\n }));\n addTooltip(resetButton, {\n display: jsx(() =>\n createModifierSection(\n \"Modifiers\",\n \"\",\n conversion.gainModifier,\n conversion.scaling.currentGain(conversion)\n )\n ),\n pinnable: true,\n direction: Direction.Down,\n style: \"width: 400px; text-align: left\"\n });\n\n const g = createTreeNode(() => ({\n display: \"TH\",\n color: \"#6d3678\",\n canClick() {\n return Decimal.gte(main.points.value, 10);\n },\n tooltip: \"Thanos your points\",\n onClick() {\n main.points.value = Decimal.div(main.points.value, 2);\n console.log(\"Thanos'd\");\n },\n glowColor() {\n if (Decimal.eq(exhancers.amount.value, 1)) {\n return \"orange\";\n }\n return \"\";\n }\n }));\n const h = createTreeNode(() => ({\n display: \"h\",\n color() {\n return themes[settings.theme].variables[\"--locked\"];\n },\n tooltip: {\n display: computed(() => `Restore your points to ${format(otherThingy.value)}`),\n right: true\n },\n canClick() {\n return Decimal.lt(main.points.value, otherThingy.value);\n },\n onClick() {\n main.points.value = otherThingy.value;\n }\n }));\n const spook = createTreeNode(() => ({\n visibility: Visibility.Hidden\n }));\n const tree = createTree(() => ({\n nodes(): GenericTreeNode[][] {\n return [\n [f.treeNode, treeNode],\n [g, spook, h]\n ];\n },\n branches(): TreeBranch[] {\n return [\n {\n startNode: f.treeNode,\n endNode: treeNode,\n \"stroke-width\": \"25px\",\n stroke: \"green\",\n style: {\n filter: \"blur(5px)\"\n }\n },\n { startNode: treeNode, endNode: g },\n { startNode: g, endNode: h }\n ];\n }\n }));\n\n const links = createLinks(() => ({\n links: [\n {\n startNode: h,\n endNode: flatBoi,\n \"stroke-width\": \"5px\",\n stroke: \"red\",\n offsetEnd: { x: -50 + 100 * flatBoi.progress.value.toNumber(), y: 0 }\n }\n ]\n }));\n\n const illuminatiTabs = createTabFamily(\n {\n first: () => ({\n tab: jsx(() => (\n <>\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n <div>confirmed</div>\n </>\n )),\n display: \"first\"\n }),\n second: () => ({\n tab: f.display,\n display: \"second\"\n })\n },\n () => ({\n style: {\n width: \"660px\",\n backgroundColor: \"brown\",\n \"--background\": \"brown\",\n border: \"solid white\",\n marginLeft: \"auto\",\n marginRight: \"auto\"\n }\n })\n );\n\n const tabs = createTabFamily({\n mainTab: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n <MainDisplay\n resource={points}\n color={color}\n effectDisplay={`which are boosting waffles by ${format(\n waffleBoost.value\n )} and increasing the Ice Cream cap by ${format(icecreamCap.value)}`}\n />\n <Sticky>{render(resetButton)}</Sticky>\n <Resource resource={points} color={color} />\n <Spacer height=\"5px\" />\n <button onClick={() => console.log(\"yeet\")}>'HI'</button>\n <div>Name your points!</div>\n <Text\n modelValue={thingy.value}\n onUpdate:modelValue={value => (thingy.value = value)}\n />\n <Sticky style=\"color: red; font-size: 32px; font-family: Comic Sans MS;\">\n I have {displayResource(main.points)} {thingy.value} points!\n </Sticky>\n <hr />\n {renderCol(...lollipopMilestones)}\n <Spacer />\n {renderRow(...upgrades)}\n {renderRow(quasiUpgrade)}\n {renderRow(funChallenge)}\n </>\n ))\n })),\n display: \"main tab\",\n glowColor() {\n if (\n generatorUpgrade.canPurchase.value ||\n lollipopMultiplierUpgrade.canPurchase.value ||\n unlockIlluminatiUpgrade.canPurchase.value ||\n funChallenge.canComplete.value\n ) {\n return \"blue\";\n }\n return \"\";\n },\n style: { color: \"orange\" }\n }),\n thingies: () => ({\n tab: createTab(() => ({\n style() {\n return { backgroundColor: \"#222222\", \"--background\": \"#222222\" };\n },\n display: jsx(() => (\n <>\n {render(buyablesDisplay)}\n <Spacer />\n <Row style=\"width: 600px; height: 350px; background-color: green; border-style: solid;\">\n <Toggle\n onUpdate:modelValue={value => (beep.value = value)}\n modelValue={beep.value}\n />\n <Spacer width=\"30px\" height=\"10px\" />\n <div>\n <span>Beep</span>\n </div>\n <Spacer />\n <VerticalRule height=\"200px\" />\n </Row>\n <Spacer />\n <img src=\"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\" />\n </>\n ))\n })),\n glowColor: \"white\",\n display: \"thingies\",\n style: { borderColor: \"orange\" }\n }),\n jail: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n <>\n {render(coolInfo)}\n {render(longBoi)}\n <Spacer />\n <Row>\n <Column style=\"background-color: #555555; padding: 15px\">\n <div style=\"color: teal\">Sugar level:</div>\n <Spacer />\n {render(tallBoi)}\n </Column>\n <Spacer />\n <Column>\n <div>idk</div>\n <Spacer width=\"0\" height=\"50px\" />\n {render(flatBoi)}\n </Column>\n </Row>\n <Spacer />\n <div>It's jail because \"bars\"! So funny! Ha ha!</div>\n {render(tree)}\n </>\n ))\n })),\n display: \"jail\"\n }),\n illuminati: () => ({\n tab: createTab(() => ({\n display: jsx(() => (\n // This should really just be <> and </>, however for some reason the\n // typescript interpreter can't figure out this layer and f.tsx otherwise\n <div>\n <h1> C O N F I R M E D </h1>\n <Spacer />\n {render(illuminatiTabs)}\n <div>Adjust how many points H gives you!</div>\n <Slider\n onUpdate:modelValue={value => (otherThingy.value = value)}\n modelValue={otherThingy.value}\n min={1}\n max={30}\n />\n </div>\n )),\n style: {\n backgroundColor: \"#3325CC\"\n }\n })),\n visibility() {\n return showIf(unlockIlluminatiUpgrade.bought.value);\n },\n display: \"illuminati\"\n })\n });\n\n return {\n id,\n color,\n name,\n points,\n best,\n beep,\n thingy,\n otherThingy,\n spentOnBuyables,\n waffleBoost,\n icecreamCap,\n coolInfo,\n lollipopMilestones,\n funChallenge,\n funEffect,\n generatorUpgrade,\n lollipopMultiplierUpgrade,\n lollipopMultiplierEffect,\n unlockIlluminatiUpgrade,\n quasiUpgrade,\n exhancers,\n respecBuyables,\n sellExhancer,\n bars: { tallBoi, longBoi, flatBoi },\n tree,\n g,\n h,\n spook,\n conversion,\n reset,\n hotkeys,\n treeNode,\n resetButton,\n confirmRespec,\n minWidth: 800,\n tabs,\n display: jsx(() => (\n <>\n {render(tabs)}\n {render(links)}\n </>\n ))\n };\n});\n\nexport default layer;\n","import Spacer from \"components/layout/Spacer.vue\";\nimport { createLayerTreeNode, createResetButton } from \"data/common\";\nimport { main } from \"data/projEntry\";\nimport { createClickable } from \"features/clickables/clickable\";\nimport { createPolynomialScaling, createIndependentConversion } from \"features/conversion\";\nimport { jsx } from \"features/feature\";\nimport { createInfobox } from \"features/infoboxes/infobox\";\nimport { createParticles } from \"features/particles/particles\";\nimport { createReset } from \"features/reset\";\nimport MainDisplay from \"features/resources/MainDisplay.vue\";\nimport { createResource, displayResource } from \"features/resources/resource\";\nimport { addTooltip } from \"features/tooltips/tooltip\";\nimport { createResourceTooltip } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { createMultiplicativeModifier } from \"game/modifiers\";\nimport { persistent } from \"game/persistence\";\nimport Decimal, { DecimalSource, formatWhole } from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { ref } from \"vue\";\nimport c from \"./c\";\nimport confetti from \"./confetti.json\";\n\nconst id = \"f\";\nconst layer = createLayer(id, () => {\n const color = \"#FE0102\";\n const name = \"Farms\";\n const points = createResource<DecimalSource>(0, \"farm points\");\n const boop = persistent<boolean>(false);\n\n const coolInfo = createInfobox(() => ({\n title: \"Lore\",\n titleStyle: { color: \"#FE0000\" },\n display: \"DEEP LORE!\",\n bodyStyle: { backgroundColor: \"#0000EE\" }\n }));\n\n const clickableState = persistent<string>(\"Start\");\n const clickable = createClickable(() => ({\n display() {\n return {\n title: \"Clicky clicky!\",\n description: \"Current state:<br>\" + clickableState.value\n };\n },\n initialState: \"Start\",\n canClick() {\n return clickableState.value !== \"Borkened...\";\n },\n onClick(e) {\n switch (clickableState.value) {\n case \"Start\":\n clickableState.value = \"A new state!\";\n break;\n case \"A new state!\":\n clickableState.value = \"Keep going!\";\n break;\n case \"Keep going!\":\n clickableState.value = \"Maybe that's a bit too far...\";\n break;\n case \"Maybe that's a bit too far...\":\n const pos = e == undefined ? undefined : \"touches\" in e ? e.touches[0] : e;\n const confettiParticles = Object.assign({}, confetti, {\n pos: {\n x: (pos?.clientX ?? 0) - (particles.boundingRect?.value?.left ?? 0),\n y: (pos?.clientY ?? 0) - (particles.boundingRect?.value?.top ?? 0)\n }\n });\n particles.addEmitter(confettiParticles).then(e => e.playOnceAndDestroy());\n clickableState.value = \"Borkened...\";\n break;\n default:\n clickableState.value = \"Start\";\n break;\n }\n },\n onHold() {\n console.log(\"Clickkkkk...\");\n },\n style() {\n switch (clickableState.value) {\n case \"Start\":\n return { \"background-color\": \"green\" };\n case \"A new state!\":\n return { \"background-color\": \"yellow\" };\n case \"Keep going!\":\n return { \"background-color\": \"orange\" };\n case \"Maybe that's a bit too far...\":\n return { \"background-color\": \"red\" };\n default:\n return {};\n }\n }\n }));\n\n const resetClickable = createClickable(() => ({\n onClick() {\n if (clickableState.value == \"Borkened...\") {\n clickableState.value = \"Start\";\n }\n },\n display() {\n return clickableState.value == \"Borkened...\" ? \"Fix the clickable!\" : \"Does nothing\";\n },\n small: true\n }));\n\n const reset = createReset(() => ({\n thingsToReset: (): Record<string, unknown>[] => [layer]\n }));\n\n const conversion = createIndependentConversion(() => ({\n scaling: createPolynomialScaling(10, 0.5),\n baseResource: main.points,\n gainResource: points,\n modifyGainAmount: createMultiplicativeModifier(c.otherThingy)\n }));\n\n const treeNode = createLayerTreeNode(() => ({\n layerID: id,\n color,\n reset,\n tooltip() {\n if (treeNode.canClick.value) {\n return `${displayResource(points)} ${points.displayName}`;\n }\n return `This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${displayResource(\n main.points\n )}`;\n },\n canClick() {\n return Decimal.gte(main.points.value, 10);\n }\n }));\n addTooltip(treeNode, {\n display: createResourceTooltip(points),\n pinnable: true\n });\n\n const resetButton = createResetButton(() => ({\n conversion,\n tree: main.tree,\n treeNode,\n display: jsx(() => {\n if (resetButton.conversion.buyMax) {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you{\" \"}\n <b>{formatWhole(resetButton.conversion.currentGain.value)}</b> Farm Points\n in exchange for all of your points and lollipops! (You'll get another one at{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n } else {\n return (\n <span>\n Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange\n for all of your points and lollipops! (At least{\" \"}\n {formatWhole(resetButton.conversion.nextAt.value)} points)\n </span>\n );\n }\n })\n }));\n\n const particles = createParticles(() => ({\n boundingRect: ref<null | DOMRect>(null),\n onContainerResized(boundingRect) {\n this.boundingRect.value = boundingRect;\n },\n style: \"z-index: 2\"\n }));\n\n const tab = jsx(() => (\n <>\n {render(coolInfo)}\n <MainDisplay resource={points} color={color} />\n {render(resetButton)}\n <div>You have {formatWhole(conversion.baseResource.value)} points</div>\n <div>\n <br />\n <img src=\"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390\" />\n <div>Bork Bork!</div>\n </div>\n <Spacer />\n {renderRow(resetClickable)}\n {renderRow(clickable)}\n {render(particles)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n boop,\n coolInfo,\n clickable,\n clickableState,\n reset,\n conversion,\n treeNode,\n resetButton,\n minWidth: 650,\n display: tab\n };\n});\n\nexport default layer;\n","import Row from \"components/layout/Row.vue\";\nimport Tooltip from \"features/tooltips/Tooltip.vue\";\nimport { main } from \"data/projEntry\";\nimport { createAchievement } from \"features/achievements/achievement\";\nimport { jsx } from \"features/feature\";\nimport { createGrid } from \"features/grids/grid\";\nimport { createResource } from \"features/resources/resource\";\nimport { createTreeNode } from \"features/trees/tree\";\nimport { createLayer } from \"game/layers\";\nimport { DecimalSource } from \"lib/break_eternity\";\nimport Decimal from \"util/bignum\";\nimport { render, renderRow } from \"util/vue\";\nimport { computed } from \"vue\";\nimport f from \"./f\";\n\nconst id = \"a\";\nconst layer = createLayer(id, () => {\n const color = \"yellow\";\n const name = \"Achievements\";\n const points = createResource<DecimalSource>(0, \"achievement power\");\n\n const treeNode = createTreeNode(() => ({\n display: \"A\",\n color,\n tooltip: {\n display: \"Achievements\",\n right: true\n },\n onClick() {\n main.showAchievements();\n }\n }));\n\n const ach1 = createAchievement(() => ({\n image: \"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png\",\n display: \"Get me!\",\n tooltip: computed(() => {\n if (ach1.earned.value) {\n return \"You did it!\";\n }\n return \"How did this happen?\";\n }),\n shouldEarn: () => true\n }));\n const ach2 = createAchievement(() => ({\n display: \"Impossible!\",\n tooltip: computed(() => {\n if (ach2.earned.value) {\n return \"HOW????\";\n }\n return \"Mwahahaha!\";\n }),\n style: { color: \"#04e050\" }\n }));\n const ach3 = createAchievement(() => ({\n display: \"EIEIO\",\n tooltip:\n \"Get a farm point.\\n\\nReward: The dinosaur is now your friend (you can max Farm Points).\",\n shouldEarn: function () {\n return Decimal.gte(f.points.value, 1);\n },\n onComplete() {\n console.log(\"Bork bork bork!\");\n }\n }));\n const achievements = [ach1, ach2, ach3];\n\n const grid = createGrid(() => ({\n rows: 2,\n cols: 2,\n getStartState(id) {\n return id;\n },\n getStyle(id, state) {\n return { backgroundColor: `#${(Number(state) * 1234) % 999999}` };\n },\n // TODO display should return an object\n getTitle(id) {\n let direction = \"\";\n if (id === \"101\") {\n direction = \"top\";\n } else if (id === \"102\") {\n direction = \"bottom\";\n } else if (id === \"201\") {\n direction = \"left\";\n } else if (id === \"202\") {\n direction = \"right\";\n }\n return jsx(() => (\n <Tooltip display={JSON.stringify(this.cells[id].style)} {...{ [direction]: true }}>\n <h3>Gridable #{id}</h3>\n </Tooltip>\n ));\n },\n getDisplay(id, state) {\n return String(state);\n },\n getCanClick() {\n return Decimal.eq(main.points.value, 10);\n },\n onClick(id, state) {\n this.cells[id].state = Number(state) + 1;\n }\n }));\n\n const display = jsx(() => (\n <>\n <Row>\n <Tooltip display={ach1.tooltip} bottom>\n {render(ach1)}\n </Tooltip>\n <Tooltip display={ach2.tooltip} bottom>\n {render(ach2)}\n </Tooltip>\n <Tooltip display={ach3.tooltip} bottom>\n {render(ach3)}\n </Tooltip>\n </Row>\n {renderRow(grid)}\n </>\n ));\n\n return {\n id,\n color,\n name,\n points,\n achievements,\n grid,\n treeNode,\n display\n };\n});\n\nexport default layer;\n","import Profectus from \"components/Profectus.vue\";\nimport Spacer from \"components/layout/Spacer.vue\";\nimport { jsx } from \"features/feature\";\nimport { createResource, trackBest, trackOOMPS, trackTotal } from \"features/resources/resource\";\nimport { branchedResetPropagation, createTree, GenericTree } from \"features/trees/tree\";\nimport { globalBus } from \"game/events\";\nimport { createLayer, GenericLayer, setupLayerModal } from \"game/layers\";\nimport player, { PlayerData } from \"game/player\";\nimport Decimal, { DecimalSource, format, formatTime } from \"util/bignum\";\nimport { render } from \"util/vue\";\nimport { computed, toRaw } from \"vue\";\nimport a from \"./layers/aca/a\";\nimport c from \"./layers/aca/c\";\nimport f from \"./layers/aca/f\";\n\n/**\n * @hidden\n */\nexport const main = createLayer(\"main\", () => {\n const points = createResource<DecimalSource>(10);\n const best = trackBest(points);\n const total = trackTotal(points);\n\n const pointGain = computed(() => {\n if (!c.generatorUpgrade.bought.value) return new Decimal(0);\n let gain = new Decimal(3.19);\n if (c.lollipopMultiplierUpgrade.bought.value)\n gain = gain.times(c.lollipopMultiplierEffect.value);\n return gain;\n });\n globalBus.on(\"update\", diff => {\n points.value = Decimal.add(points.value, Decimal.times(pointGain.value, diff));\n });\n const oomps = trackOOMPS(points, pointGain);\n\n const { openModal, modal } = setupLayerModal(a);\n\n // Note: Casting as generic tree to avoid recursive type definitions\n const tree = createTree(() => ({\n nodes: [[c.treeNode], [f.treeNode, c.spook]],\n leftSideNodes: [a.treeNode, c.h],\n branches: [\n {\n startNode: f.treeNode,\n endNode: c.treeNode,\n stroke: \"blue\",\n \"stroke-width\": \"25px\",\n style: {\n filter: \"blur(5px)\"\n }\n }\n ],\n onReset() {\n points.value = toRaw(this.resettingNode.value) === toRaw(c.treeNode) ? 0 : 10;\n best.value = points.value;\n total.value = points.value;\n },\n resetPropagation: branchedResetPropagation\n })) as GenericTree;\n\n // Note: layers don't _need_ a reference to everything,\n // but I'd recommend it over trying to remember what does and doesn't need to be included.\n // Officially all you need are anything with persistency or that you want to access elsewhere\n return {\n name: \"Tree\",\n display: jsx(() => (\n <>\n {player.devSpeed === 0 ? <div>Game Paused</div> : null}\n {player.devSpeed && player.devSpeed !== 1 ? (\n <div>Dev Speed: {format(player.devSpeed)}x</div>\n ) : null}\n {player.offlineTime ? (\n <div>Offline Time: {formatTime(player.offlineTime)}</div>\n ) : null}\n <div>\n {Decimal.lt(points.value, \"1e1000\") ? <span>You have </span> : null}\n <h2>{format(points.value)}</h2>\n {Decimal.lt(points.value, \"1e1e6\") ? <span> points</span> : null}\n </div>\n {Decimal.gt(pointGain.value, 0) ? <div>({oomps.value})</div> : null}\n <Spacer />\n <button onClick={openModal}>open achievements</button>\n {render(modal)}\n {render(tree)}\n <Profectus height=\"200px\" style=\"margin: 10px auto; display: block\" />\n </>\n )),\n points,\n best,\n total,\n oomps,\n tree,\n showAchievements: openModal\n };\n});\n\nexport const getInitialLayers = (\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars */\n player: Partial<PlayerData>\n): Array<GenericLayer> => [main, f, c, a];\n\nexport const hasWon = computed(() => {\n return Decimal.gt(main.points.value, 25);\n});\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport function fixOldSave(\n oldVersion: string | undefined,\n player: Partial<PlayerData>\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n): void {}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n","import Modal from \"components/Modal.vue\";\nimport {\n CoercableComponent,\n OptionsFunc,\n jsx,\n JSXFunction,\n Replace,\n setDefault,\n StyleValue\n} from \"features/feature\";\nimport {\n Computable,\n GetComputableType,\n GetComputableTypeWithDefault,\n processComputable,\n ProcessedComputable\n} from \"util/computed\";\nimport { createLazyProxy } from \"util/proxies\";\nimport { createNanoEvents, Emitter } from \"nanoevents\";\nimport { InjectionKey, Ref, ref, shallowReactive, unref } from \"vue\";\nimport { globalBus } from \"./events\";\nimport { Persistent, persistent } from \"./persistence\";\nimport player from \"./player\";\n\nexport interface FeatureNode {\n rect: DOMRect;\n observer: MutationObserver;\n element: HTMLElement;\n}\n\nexport const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void> =\n Symbol(\"RegisterNode\");\nexport const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void> =\n Symbol(\"UnregisterNode\");\nexport const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>> =\n Symbol(\"Nodes\");\nexport const BoundsInjectionKey: InjectionKey<Ref<DOMRect | undefined>> = Symbol(\"Bounds\");\n\nexport interface LayerEvents {\n // Generation\n preUpdate: (diff: number) => void;\n // Actions (e.g. automation)\n update: (diff: number) => void;\n // Effects (e.g. milestones)\n postUpdate: (diff: number) => void;\n}\n\nexport const layers: Record<string, Readonly<GenericLayer> | undefined> = shallowReactive({});\nwindow.layers = layers;\n\ndeclare module \"@vue/runtime-dom\" {\n interface CSSProperties {\n \"--layer-color\"?: string;\n }\n}\n\nexport interface Position {\n x: number;\n y: number;\n}\n\nexport interface LayerOptions {\n color?: Computable<string>;\n display: Computable<CoercableComponent>;\n classes?: Computable<Record<string, boolean>>;\n style?: Computable<StyleValue>;\n name?: Computable<string>;\n minimizable?: Computable<boolean>;\n forceHideGoBack?: Computable<boolean>;\n minWidth?: Computable<number | string>;\n}\n\nexport interface BaseLayer {\n id: string;\n minimized: Persistent<boolean>;\n emitter: Emitter<LayerEvents>;\n on: OmitThisParameter<Emitter<LayerEvents>[\"on\"]>;\n emit: <K extends keyof LayerEvents>(event: K, ...args: Parameters<LayerEvents[K]>) => void;\n nodes: Ref<Record<string, FeatureNode | undefined>>;\n}\n\nexport type Layer<T extends LayerOptions> = Replace<\n T & BaseLayer,\n {\n color: GetComputableType<T[\"color\"]>;\n display: GetComputableType<T[\"display\"]>;\n classes: GetComputableType<T[\"classes\"]>;\n style: GetComputableType<T[\"style\"]>;\n name: GetComputableTypeWithDefault<T[\"name\"], string>;\n minWidth: GetComputableTypeWithDefault<T[\"minWidth\"], 600>;\n minimizable: GetComputableTypeWithDefault<T[\"minimizable\"], true>;\n forceHideGoBack: GetComputableType<T[\"forceHideGoBack\"]>;\n }\n>;\n\nexport type GenericLayer = Replace<\n Layer<LayerOptions>,\n {\n name: ProcessedComputable<string>;\n minWidth: ProcessedComputable<number>;\n minimizable: ProcessedComputable<boolean>;\n }\n>;\n\nexport const persistentRefs: Record<string, Set<Persistent>> = {};\nexport const addingLayers: string[] = [];\nexport function createLayer<T extends LayerOptions>(\n id: string,\n optionsFunc: OptionsFunc<T, BaseLayer, BaseLayer>\n): Layer<T> {\n return createLazyProxy(() => {\n const layer = {} as T & Partial<BaseLayer>;\n const emitter = (layer.emitter = createNanoEvents<LayerEvents>());\n layer.on = emitter.on.bind(emitter);\n layer.emit = emitter.emit.bind(emitter);\n layer.nodes = ref({});\n layer.id = id;\n\n addingLayers.push(id);\n persistentRefs[id] = new Set();\n layer.minimized = persistent(false);\n Object.assign(layer, optionsFunc.call(layer));\n if (\n addingLayers[addingLayers.length - 1] == null ||\n addingLayers[addingLayers.length - 1] !== id\n ) {\n throw `Adding layers stack in invalid state. This should not happen\\nStack: ${addingLayers}\\nTrying to pop ${layer.id}`;\n }\n addingLayers.pop();\n\n processComputable(layer as T, \"color\");\n processComputable(layer as T, \"display\");\n processComputable(layer as T, \"name\");\n setDefault(layer, \"name\", layer.id);\n processComputable(layer as T, \"minWidth\");\n setDefault(layer, \"minWidth\", 600);\n processComputable(layer as T, \"minimizable\");\n setDefault(layer, \"minimizable\", true);\n\n return layer as unknown as Layer<T>;\n });\n}\n\nexport function addLayer(\n layer: GenericLayer,\n player: { layers?: Record<string, Record<string, unknown>> }\n): void {\n console.info(\"Adding layer\", layer.id);\n if (layers[layer.id]) {\n console.error(\n \"Attempted to add layer with same ID as existing layer\",\n layer.id,\n layers[layer.id]\n );\n return;\n }\n\n setDefault(player, \"layers\", {});\n if (player.layers[layer.id] == null) {\n player.layers[layer.id] = {};\n }\n layers[layer.id] = layer;\n\n globalBus.emit(\"addLayer\", layer, player.layers[layer.id]);\n}\n\nexport function getLayer<T extends GenericLayer>(layerID: string): T {\n return layers[layerID] as T;\n}\n\nexport function removeLayer(layer: GenericLayer): void {\n console.info(\"Removing layer\", layer.id);\n globalBus.emit(\"removeLayer\", layer);\n\n layers[layer.id] = undefined;\n}\n\nexport function reloadLayer(layer: GenericLayer): void {\n removeLayer(layer);\n\n // Re-create layer\n addLayer(layer, player);\n}\n\nexport function setupLayerModal(layer: GenericLayer): {\n openModal: VoidFunction;\n modal: JSXFunction;\n} {\n const showModal = ref(false);\n return {\n openModal: () => (showModal.value = true),\n modal: jsx(() => (\n <Modal\n modelValue={showModal.value}\n onUpdate:modelValue={value => (showModal.value = value)}\n v-slots={{\n header: () => <h2>{unref(layer.name)}</h2>,\n body: unref(layer.display)\n }}\n />\n ))\n };\n}\n\nglobalBus.on(\"update\", function updateLayers(diff) {\n Object.values(layers).forEach(layer => {\n layer?.emit(\"preUpdate\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"update\", diff);\n });\n Object.values(layers).forEach(layer => {\n layer?.emit(\"postUpdate\", diff);\n });\n});\n","import Col from \"components/layout/Column.vue\";\nimport Row from \"components/layout/Row.vue\";\nimport {\n CoercableComponent,\n Component as ComponentKey,\n GatherProps,\n GenericComponent,\n jsx,\n JSXFunction,\n Visibility\n} from \"features/feature\";\nimport {\n Component,\n computed,\n ComputedRef,\n DefineComponent,\n defineComponent,\n isRef,\n onUnmounted,\n PropType,\n ref,\n Ref,\n ShallowRef,\n shallowRef,\n unref,\n watchEffect\n} from \"vue\";\nimport { DoNotCache, ProcessedComputable } from \"./computed\";\n\nexport function coerceComponent(\n component: CoercableComponent,\n defaultWrapper = \"span\"\n): DefineComponent {\n if (typeof component === \"function\") {\n return defineComponent({ render: component });\n }\n if (typeof component === \"string\") {\n if (component.length > 0) {\n component = component.trim();\n if (component.charAt(0) !== \"<\") {\n component = `<${defaultWrapper}>${component}</${defaultWrapper}>`;\n }\n\n return defineComponent({ template: component });\n }\n return defineComponent({ render: () => ({}) });\n }\n return component;\n}\n\nexport type VueFeature = {\n [ComponentKey]: GenericComponent;\n [GatherProps]: () => Record<string, unknown>;\n};\n\nexport function render(object: VueFeature | CoercableComponent): JSX.Element | DefineComponent {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n return coerceComponent(object);\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRow(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(render)}</Row>;\n}\n\nexport function renderCol(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(render)}</Col>;\n}\n\nexport function renderJSX(object: VueFeature | CoercableComponent): JSX.Element {\n if (isCoercableComponent(object)) {\n if (typeof object === \"function\") {\n return (object as JSXFunction)();\n }\n if (typeof object === \"string\") {\n return <>{object}</>;\n }\n // TODO why is object typed as never?\n const Comp = object as DefineComponent;\n return <Comp />;\n }\n const Component = object[ComponentKey];\n return <Component {...object[GatherProps]()} />;\n}\n\nexport function renderRowJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Row>{objects.map(renderJSX)}</Row>;\n}\n\nexport function renderColJSX(...objects: (VueFeature | CoercableComponent)[]): JSX.Element {\n return <Col>{objects.map(renderJSX)}</Col>;\n}\n\nexport function isCoercableComponent(component: unknown): component is CoercableComponent {\n if (typeof component === \"string\") {\n return true;\n } else if (typeof component === \"object\") {\n if (component == null) {\n return false;\n }\n return \"render\" in component || \"component\" in component;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } else if (typeof component === \"function\" && (component as any)[DoNotCache] === true) {\n return true;\n }\n return false;\n}\n\nexport function setupHoldToClick(\n onClick?: Ref<((e?: MouseEvent | TouchEvent) => void) | undefined>,\n onHold?: Ref<VoidFunction | undefined>\n): {\n start: (e: MouseEvent | TouchEvent) => void;\n stop: VoidFunction;\n handleHolding: VoidFunction;\n} {\n const interval = ref<null | number>(null);\n const event = ref<MouseEvent | TouchEvent | undefined>(undefined);\n\n function start(e: MouseEvent | TouchEvent) {\n if (!interval.value) {\n interval.value = setInterval(handleHolding, 250);\n }\n event.value = e;\n }\n function stop() {\n if (interval.value) {\n clearInterval(interval.value);\n interval.value = null;\n }\n }\n function handleHolding() {\n if (onHold && onHold.value) {\n onHold.value();\n } else if (onClick && onClick.value) {\n onClick.value(event.value);\n }\n }\n\n onUnmounted(stop);\n\n return { start, stop, handleHolding };\n}\n\nexport function getFirstFeature<\n T extends VueFeature & { visibility: ProcessedComputable<Visibility> }\n>(\n features: T[],\n filter: (feature: T) => boolean\n): {\n firstFeature: Ref<T | undefined>;\n collapsedContent: JSXFunction;\n hasCollapsedContent: Ref<boolean>;\n} {\n const filteredFeatures = computed(() =>\n features.filter(\n feature => unref(feature.visibility) === Visibility.Visible && filter(feature)\n )\n );\n return {\n firstFeature: computed(() => filteredFeatures.value[0]),\n collapsedContent: jsx(() => renderCol(...filteredFeatures.value.slice(1))),\n hasCollapsedContent: computed(() => filteredFeatures.value.length > 1)\n };\n}\n\nexport function computeComponent(\n component: Ref<ProcessedComputable<CoercableComponent>>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\"> {\n const comp = shallowRef<Component | \"\">();\n watchEffect(() => {\n comp.value = coerceComponent(unwrapRef(component), defaultWrapper);\n });\n return comp as ShallowRef<Component | \"\">;\n}\nexport function computeOptionalComponent(\n component: Ref<ProcessedComputable<CoercableComponent | undefined> | undefined>,\n defaultWrapper = \"div\"\n): ShallowRef<Component | \"\" | null> {\n const comp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(component);\n comp.value = currComponent == null ? null : coerceComponent(currComponent, defaultWrapper);\n });\n return comp;\n}\n\nexport function wrapRef<T>(ref: Ref<ProcessedComputable<T>>): ComputedRef<T> {\n return computed(() => unwrapRef(ref));\n}\n\nexport function unwrapRef<T>(ref: Ref<ProcessedComputable<T>>): T {\n return unref<T>(unref(ref));\n}\n\nexport function setRefValue<T>(ref: Ref<T | Ref<T>>, value: T) {\n if (isRef(ref.value)) {\n ref.value.value = value;\n } else {\n ref.value = value;\n }\n}\n\nexport type PropTypes =\n | typeof Boolean\n | typeof String\n | typeof Number\n | typeof Function\n | typeof Object\n | typeof Array;\n// TODO Unfortunately, the typescript engine gives up on typing completely when you use this method,\n// Even though it has the same typing as when doing it manually\nexport function processedPropType<T>(...types: PropTypes[]): PropType<ProcessedComputable<T>> {\n if (!types.includes(Object)) {\n types.push(Object);\n }\n return types as PropType<ProcessedComputable<T>>;\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport {\n RegisterNodeInjectionKey,\n UnregisterNodeInjectionKey,\n NodesInjectionKey,\n FeatureNode,\n BoundsInjectionKey\n} from \"game/layers\";\nimport { nextTick, onMounted, provide, ref } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n emits: [\"updateNodes\"],\n setup(__props, { emit }: { emit: ({\n (e: \"updateNodes\", nodes: Record<string, FeatureNode | undefined>): void;\n}), expose: any, slots: any, attrs: any }) {\n\n\n\nconst nodes = ref<Record<string, FeatureNode | undefined>>({});\n\nconst resizeObserver = new ResizeObserver(updateBounds);\nconst resizeListener = ref<Element | null>(null);\nonMounted(() => {\n // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element\n const resListener = resizeListener.value;\n if (resListener != null) {\n resizeObserver.observe(resListener);\n }\n});\nlet isDirty = true;\nlet boundingRect = ref(resizeListener.value?.getBoundingClientRect());\nfunction updateBounds() {\n if (resizeListener.value != null && isDirty) {\n isDirty = false;\n nextTick(() => {\n boundingRect.value = resizeListener.value?.getBoundingClientRect();\n (Object.values(nodes.value) as FeatureNode[])\n .filter(n => n) // Sometimes the values become undefined\n .forEach(node => (node.rect = node.element.getBoundingClientRect()));\n emit(\"updateNodes\", nodes.value);\n isDirty = true;\n });\n }\n}\ndocument.fonts.ready.then(updateBounds);\n\nconst observerOptions = {\n attributes: false,\n childList: true,\n subtree: false\n};\n\nprovide(RegisterNodeInjectionKey, (id, element) => {\n const observer = new MutationObserver(() => updateNode(id));\n observer.observe(element, observerOptions);\n nodes.value[id] = { element, observer, rect: element.getBoundingClientRect() };\n emit(\"updateNodes\", nodes.value);\n nextTick(() => updateNode(id));\n});\nprovide(UnregisterNodeInjectionKey, id => {\n nodes.value[id]?.observer.disconnect();\n nodes.value[id] = undefined;\n emit(\"updateNodes\", nodes.value);\n});\nprovide(NodesInjectionKey, nodes);\nprovide(BoundsInjectionKey, boundingRect);\n\nfunction updateNode(id: string) {\n const node = nodes.value[id];\n if (node == null) {\n return;\n }\n node.rect = node.element.getBoundingClientRect();\n emit(\"updateNodes\", nodes.value);\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"div\", {\n ref_key: \"resizeListener\",\n ref: resizeListener,\n class: \"resize-listener\"\n }, null, 512)\n ], 64))\n}\n}\n\n})","import script from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Context.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Context.vue?vue&type=style&index=0&id=131e64e2&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-131e64e2\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withModifiers as _withModifiers, mergeProps as _mergeProps, withDirectives as _withDirectives, Transition as _Transition, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"onPointerdown\"]\nconst _hoisted_2 = { class: \"modal-wrapper\" }\nconst _hoisted_3 = { class: \"modal-container\" }\nconst _hoisted_4 = { class: \"modal-header\" }\nconst _hoisted_5 = /*#__PURE__*/_createTextVNode(\" default header \")\nconst _hoisted_6 = { class: \"modal-body\" }\nconst _hoisted_7 = /*#__PURE__*/_createTextVNode(\" default body \")\nconst _hoisted_8 = { class: \"modal-footer\" }\nconst _hoisted_9 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"modal-default-flex-grow\" }, null, -1)\n\nimport { FeatureNode } from \"game/layers\";\nimport { computed, ref, toRefs } from \"vue\";\nimport Context from \"./Context.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { expose, emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n modelValue: boolean;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst isOpen = computed(() => props.modelValue || isAnimating.value);\nfunction close() {\n emit(\"update:modelValue\", false);\n}\n\nconst isAnimating = ref(false);\n\nconst contextRef = ref<typeof Context | null>(null);\nconst nodes = computed<Record<string, FeatureNode | undefined> | null>(\n () => contextRef.value?.nodes ?? null\n);\n\nexpose({ isOpen, nodes });\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_Teleport, { to: \"#modal-root\" }, [\n _createVNode(_Transition, {\n name: \"modal\",\n onBeforeEnter: _cache[0] || (_cache[0] = ($event: any) => (isAnimating.value = true)),\n onAfterLeave: _cache[1] || (_cache[1] = ($event: any) => (isAnimating.value = false))\n }, {\n default: _withCtx(() => [\n _withDirectives(_createElementVNode(\"div\", _mergeProps({\n class: \"modal-mask\",\n onPointerdown: _withModifiers(close, [\"self\"])\n }, _ctx.$attrs), [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _renderSlot(_ctx.$slots, \"header\", { shown: _unref(isOpen) }, () => [\n _hoisted_5\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createVNode(Context, {\n ref_key: \"contextRef\",\n ref: contextRef\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"body\", { shown: _unref(isOpen) }, () => [\n _hoisted_7\n ])\n ]),\n _: 3\n }, 512)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _renderSlot(_ctx.$slots, \"footer\", { shown: _unref(isOpen) }, () => [\n _createElementVNode(\"div\", { class: \"modal-default-footer\" }, [\n _hoisted_9,\n _createElementVNode(\"button\", {\n class: \"button modal-default-button\",\n onClick: close\n }, \" Close \")\n ])\n ])\n ])\n ])\n ])\n ], 16, _hoisted_1), [\n [_vShow, __props.modelValue]\n ])\n ]),\n _: 3\n })\n ]))\n}\n}\n\n})","import script from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Modal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=d02c1f40&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"field-title\"\n}\n\nimport \"components/common/fields.css\";\nimport { CoercableComponent } from \"features/feature\";\nimport { computeOptionalComponent, unwrapRef } from \"util/vue\";\nimport { ref, toRef, watch } from \"vue\";\nimport VueNextSelect from \"vue-next-select\";\nimport \"vue-next-select/dist/index.css\";\n\nexport type SelectOption = { label: string; value: unknown };\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n options: null,\n placeholder: null,\n closeOnSelect: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: unknown): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: unknown;\n options: SelectOption[];\n placeholder?: string;\n closeOnSelect?: boolean;\n}\n\n\n\n\nconst titleComponent = computeOptionalComponent(toRef(props, \"title\"), \"span\");\n\nconst value = ref<SelectOption | null>(\n props.options.find(option => option.value === props.modelValue) ?? null\n);\nwatch(toRef(props, \"modelValue\"), modelValue => {\n if (unwrapRef(value) !== modelValue) {\n value.value = props.options.find(option => option.value === modelValue) ?? null;\n }\n});\n\nfunction onUpdate(value: SelectOption) {\n emit(\"update:modelValue\", value.value);\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(VueNextSelect), {\n options: __props.options,\n modelValue: value.value,\n \"onUpdate:modelValue\": [\n _cache[0] || (_cache[0] = ($event: any) => ((value).value = $event)),\n onUpdate\n ],\n min: 1,\n \"label-by\": \"label\",\n placeholder: __props.placeholder,\n \"close-on-select\": __props.closeOnSelect\n }, null, 8, [\"options\", \"modelValue\", \"placeholder\", \"close-on-select\"])\n ]))\n}\n}\n\n})","import script from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Select.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Select.vue?vue&type=style&index=0&id=4c379106&lang=css\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, isRef as _isRef, vModelText as _vModelText, normalizeClass as _normalizeClass, withDirectives as _withDirectives, createElementVNode as _createElementVNode, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-8bda704a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"onSubmit\"]\nconst _hoisted_2 = { class: \"field\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"field-title\"\n}\nconst _hoisted_4 = [\"placeholder\"]\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, onMounted, ref, toRefs, unref } from \"vue\";\nimport VueTextareaAutosize from \"vue-textarea-autosize\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: null,\n textArea: { type: Boolean },\n placeholder: null,\n maxHeight: null\n },\n emits: [\"update:modelValue\", \"submit\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: string): void;\n (e: \"submit\"): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst _props = __props as {\n title?: CoercableComponent;\n modelValue?: string;\n textArea?: boolean;\n placeholder?: string;\n maxHeight?: number;\n}\n\n\nconst props = toRefs(_props);\n\n\nconst titleComponent = computed(\n () => props.title?.value && coerceComponent(unref(props.title.value), \"span\")\n);\n\nconst field = ref<HTMLElement | null>(null);\nonMounted(() => {\n field.value?.focus();\n});\n\nconst value = computed({\n get() {\n return unref(props.modelValue) || \"\";\n },\n set(value: string) {\n emit(\"update:modelValue\", value);\n }\n});\n\nfunction submit() {\n emit(\"submit\");\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"form\", {\n onSubmit: _withModifiers(submit, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(titleComponent))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(titleComponent))))\n ]))\n : _createCommentVNode(\"\", true),\n (__props.textArea)\n ? (_openBlock(), _createBlock(_unref(VueTextareaAutosize), {\n key: 1,\n modelValue: _unref(value),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n maxHeight: __props.maxHeight,\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 8, [\"modelValue\", \"placeholder\", \"maxHeight\"]))\n : _withDirectives((_openBlock(), _createElementBlock(\"input\", {\n key: 2,\n type: \"text\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(value) ? (value).value = $event : null)),\n placeholder: __props.placeholder,\n class: _normalizeClass({ fullWidth: !__props.title }),\n onBlur: submit,\n ref_key: \"field\",\n ref: field\n }, null, 42, _hoisted_4)), [\n [_vModelText, _unref(value)]\n ])\n ])\n ], 40, _hoisted_1))\n}\n}\n\n})","import script from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Text.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Text.vue?vue&type=style&index=0&id=8bda704a&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8bda704a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, isRef as _isRef, vModelCheckbox as _vModelCheckbox, createElementVNode as _createElementVNode, withDirectives as _withDirectives, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-43cf95d0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"field\" }\n\nimport { CoercableComponent } from \"features/feature\";\nimport { coerceComponent } from \"util/vue\";\nimport { computed, unref } from \"vue\";\nimport \"components/common/fields.css\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n props: {\n title: null,\n modelValue: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }: { emit: ({\n (e: \"update:modelValue\", value: boolean): void;\n}), expose: any, slots: any, attrs: any }) {\n\nconst props = __props as {\n title?: CoercableComponent;\n modelValue?: boolean;\n}\n\n\n\n\nconst component = computed(() => coerceComponent(unref(props.title) || \"<span></span>\", \"span\"));\n\nconst value = computed({\n get() {\n return !!props.modelValue;\n },\n set(value: boolean) {\n emit(\"update:modelValue\", value);\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"checkbox\",\n class: \"toggle\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(value) ? (value).value = $event : null))\n }, null, 512), [\n [_vModelCheckbox, _unref(value)]\n ]),\n (_openBlock(), _createBlock(_resolveDynamicComponent(_unref(component))))\n ]))\n}\n}\n\n})","import script from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Toggle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Toggle.vue?vue&type=style&index=0&id=43cf95d0&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-43cf95d0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"col\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Column.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"table\" }\n\nimport \"components/common/table.css\";\nimport themes from \"data/themes\";\nimport settings from \"game/settings\";\nimport { computed } from \"vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\nconst mergeAdjacent = computed(() => themes[settings.theme].mergeAdjacent);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"row\", { mergeAdjacent: _unref(mergeAdjacent) }])\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 2)\n ]))\n}\n}\n\n})","import script from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Row.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-e03bc918\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"material-icons pinned\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"tooltip-container\", { shown: _ctx.isShown }]),\n onMouseenter: _cache[0] || (_cache[0] = ($event: any) => (_ctx.isHovered = true)),\n onMouseleave: _cache[1] || (_cache[1] = ($event: any) => (_ctx.isHovered = false)),\n onClickCapture: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.togglePinned && _ctx.togglePinned(...args)))\n }, [\n _renderSlot(_ctx.$slots, \"default\", {}, undefined, true),\n (_ctx.elementComp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.elementComp), { key: 0 }))\n : _createCommentVNode(\"\", true),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (_ctx.isShown)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"tooltip\", {\n top: _ctx.unref(_ctx.direction) === _ctx.Direction.Up,\n left: _ctx.unref(_ctx.direction) === _ctx.Direction.Left,\n right: _ctx.unref(_ctx.direction) === _ctx.Direction.Right,\n bottom: _ctx.unref(_ctx.direction) === _ctx.Direction.Down,\n ..._ctx.unref(_ctx.classes)\n }]),\n style: _normalizeStyle([\n {\n '--xoffset': _ctx.unref(_ctx.xoffset) || '0px',\n '--yoffset': _ctx.unref(_ctx.yoffset) || '0px'\n },\n _ctx.unref(_ctx.style) ?? {}\n ])\n }, [\n (_ctx.showPin)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, \"push_pin\"))\n : _createCommentVNode(\"\", true),\n (_ctx.comp)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.comp), { key: 1 }))\n : _createCommentVNode(\"\", true)\n ], 6))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ], 34))\n}","\nimport themes from \"data/themes\";\nimport { CoercableComponent, jsx, StyleValue } from \"features/feature\";\nimport { Persistent } from \"game/persistence\";\nimport settings from \"game/settings\";\nimport { Direction } from \"util/common\";\nimport {\n coerceComponent,\n computeOptionalComponent,\n processedPropType,\n render,\n unwrapRef,\n VueFeature\n} from \"util/vue\";\nimport {\n Component,\n computed,\n defineComponent,\n PropType,\n ref,\n shallowRef,\n toRefs,\n unref,\n watchEffect\n} from \"vue\";\n\nexport default defineComponent({\n props: {\n element: processedPropType<VueFeature>(Object),\n display: {\n type: processedPropType<CoercableComponent>(Object, String, Function),\n required: true\n },\n style: processedPropType<StyleValue>(Object, String, Array),\n classes: processedPropType<Record<string, boolean>>(Object),\n direction: processedPropType<Direction>(String),\n xoffset: processedPropType<string>(String),\n yoffset: processedPropType<string>(String),\n pinned: Object as PropType<Persistent<boolean>>\n },\n setup(props) {\n const { element, display, pinned } = toRefs(props);\n\n const isHovered = ref(false);\n const isShown = computed(() => (unwrapRef(pinned) || isHovered.value) && comp.value);\n const comp = computeOptionalComponent(display);\n\n const elementComp = shallowRef<Component | \"\" | null>(null);\n watchEffect(() => {\n const currComponent = unwrapRef(element);\n elementComp.value =\n currComponent == null\n ? null\n : coerceComponent(jsx(() => render(currComponent) as JSX.Element));\n });\n\n function togglePinned(e: MouseEvent) {\n const isPinned = pinned as unknown as Persistent<boolean> | undefined; // Vue typing :/\n if (e.shiftKey && isPinned) {\n isPinned.value = !isPinned.value;\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n const showPin = computed(() => unwrapRef(pinned) && themes[settings.theme].showPin);\n\n return {\n Direction,\n isHovered,\n isShown,\n comp,\n elementComp,\n unref,\n togglePinned,\n showPin\n };\n }\n});\n","import { render } from \"./Tooltip.vue?vue&type=template&id=e03bc918&scoped=true&ts=true\"\nimport script from \"./Tooltip.vue?vue&type=script&lang=ts\"\nexport * from \"./Tooltip.vue?vue&type=script&lang=ts\"\n\nimport \"./Tooltip.vue?vue&type=style&index=0&id=e03bc918&scoped=true&lang=css\"\n\nimport exportComponent from \"/home/runner/work/TMT-Demo/TMT-Demo/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-e03bc918\"]])\n\nexport default __exports__","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 7634;\nmodule.exports = webpackEmptyContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkprofectus\"] = self[\"webpackChunkprofectus\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(7964); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["defaultTheme","variables","floatingTabs","mergeAdjacent","showPin","Themes","classic","paper","nordic","aqua","Component","Symbol","GatherProps","id","getUniqueID","prefix","Visibility","jsx","func","showIf","condition","otherwise","None","Visible","setDefault","object","key","value","undefined","findFeatures","obj","types","objects","handleObject","Object","keys","forEach","includes","type","push","isRef","globalBus","intervalID","hasWon","update","now","Date","diff","trueDiff","Math","max","offlineDiff","min","Number","isFinite","emit","requestAnimationFrame","clearInterval","setInterval","async","startGameLoop","watch","PersistentState","DefaultValue","StackTrace","Deleted","getStackTrace","Error","stack","split","slice","map","line","trim","join","persistent","defaultValue","ref","addingLayers","console","warn","persistentRefs","add","layer","saveData","features","path","foundPersistent","delete","persistentState","reduce","acc","curr","savedValue","isReactive","foundPersistentInChild","error","clear","state","reactive","devSpeed","name","tabs","time","autosave","offlineProd","offlineTime","timePlayed","keepGoing","modID","modVersion","layers","stringifySave","player","JSON","stringify","unref","playerHandler","get","target","Array","isArray","Proxy","set","property","receiver","isNaN","sign","mag","currentValue","ownKeys","Reflect","has","getOwnPropertyDescriptor","window","active","saves","showTPS","theme","unthrottled","loadSettings","item","localStorage","getItem","decodeURIComponent","escape","atob","settings","parse","assign","stringifiedSettings","setItem","deep","hardResetSettings","settingFields","registerSettingField","component","infoComponents","registerInfoComponent","gameComponents","shallowReactive","lastTenTicks","hasNaN","NaNPath","render","_ctx","_cache","$props","$setup","$data","$options","_component_Context","class","style","color","showGoBack","onClick","args","goBack","minimized","$event","onUpdateNodes","updateNodes","default","_","minimizable","defineComponent","components","Context","props","index","required","tab","Function","display","String","minWidth","Boolean","nodes","setup","toRefs","computed","projInfo","allowGoBack","Infinity","updateTab","width","parseInt","tabValue","flexGrow","flexShrink","flexBasis","margin","nextTick","__exports__","_withScopeId","n","_hoisted_1","_hoisted_2","open","__props","expose","isOpen","Modal","modelValue","header","body","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","href","_hoisted_13","_hoisted_14","changelog","_props","title","logo","author","discordName","discordLink","versionNumber","versionTitle","infoComponent","openChangelog","src","alt","shown","themes","label","settingFieldsComponent","isPaused","offlineProdTitle","autosaveTitle","isPausedTitle","Select","options","Toggle","enablePausing","disabled","skipConfirm","emits","isConfirming","click","cancel","confirming","$slots","left","activated","activatedTimeout","clearTimeout","setTimeout","_hoisted_15","_hoisted_16","save","dateFormat","Intl","DateTimeFormat","year","month","day","hour","minute","second","isEditing","newName","isActive","currentTime","changeName","FeedbackButton","Tooltip","direction","Left","DangerButton","onConfirmingChanged","format","Text","onSubmit","modal","importingFailed","saveToImport","selectedPreset","importedSave","playerData","e","bankContext","bank","cachedSaves","getCachedSave","exportSave","saveToExport","exportEncoding","btoa","unescape","encodeURIComponent","el","document","createElement","appendChild","select","setSelectionRange","execCommand","removeChild","duplicateSave","deleteSave","removeItem","openSave","newFromPreset","preset","editSave","currSave","ref_key","list","handle","itemKey","element","Save","onOpen","onExport","onEditName","onDuplicate","onDelete","footer","placeholder","length","closeOnSelect","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","info","savesManager","useHeader","banner","openDiscord","$attrs","Down","yoffset","xoffset","Right","Info","SavesManager","Options","Changelog","toRef","layerKeys","gatherLayerProps","classes","ref_for","Nav","Layer","$refs","playAgain","previous","setZero","setOne","ignore","NaN","neq","tps","lastTenFPS","watchEffect","round","toNumber","low","showLow","gt","isNan","gameComponent","Game","TPS","GameOverScreen","NaNScreen","log","vue","createApp","App","mount","MAX_SIGNIFICANT_DIGITS","EXP_LIMIT","LAYER_DOWN","log10","FIRST_NEG_LAYER","NUMBER_EXP_MAX","NUMBER_EXP_MIN","MAX_ES_IN_A_ROW","IGNORE_COMMAS","COMMAS_ARE_DECIMAL_POINTS","powerOf10","powersOf10","i","for","indexOf0InPowersOf10","power","critical_headers","E","critical_tetr_values","critical_slog_values","D","Decimal","fromValue_noAlloc","FC","fromComponents","FC_NN","fromComponents_noNormalize","decimalPlaces","places","len","numDigits","ceil","abs","rounded","pow","parseFloat","toFixed","f_maglog10","f_gamma","trunc","NEGATIVE_INFINITY","scal1","l","n2","np","exp","OMEGA","f_lambertw","z","tol","w","wn","toString","d_lambertw","ew","wewz","dZero","dOne","ln","sub","mul","div","lt","constructor","this","fromDecimal","fromNumber","fromString","m","floor","man","residue","fromMantissaExponent","exponent","POSITIVE_INFINITY","s","mantissa","fromMantissaExponent_noNormalize","fromValue","neg","other","recip","reciprocate","cmp","cmpabs","eq","notEquals","lte","gte","minabs","maxabs","clamp","clampMin","clampMax","tolerance","cmp_tolerance","eq_tolerance","neq_tolerance","notEquals_tolerance","lt_tolerance","lte_tolerance","gt_tolerance","gte_tolerance","pLog10","absLog10","base","log2","logarithm","pow10","root","_other","factorial","gamma","lngamma","sqr","sqrt","cube","cbrt","height","payload","tetrate","iteratedexp","times","iteratedlog","layeradd10","layeradd","slog","lambertw","ssqrt","pentate","resourcesAvailable","priceStart","priceRatio","currentOwned","affordGeometricSeries_core","numItems","sumGeometricSeries_core","priceAdd","affordArithmeticSeries_core","sumArithmeticSeries_core","cost","currentRpS","deltaRpS","efficiencyOfPurchase_core","maxLayers","random","randomsign","randomexp","randommag","actualStart","b","b2","plus","normalize","absmag","signmag","replace","pentationparts","heightparts","result","tetrationparts","powparts","toLowerCase","ptparts","parts","ecount","numberAttempt","newparts","charAt","layerstring","chrcode","charCodeAt","substr","me","mantissaWithDecimalPlaces","magnitudeWithDecimalPlaces","repeat","toExponential","toStringWithDecimalPlaces","toPrecision","valueOf","toJSON","negate","negated","sgn","decimal","a","layera","layerb","magdiff","subtract","minus","newmag","multiply","divide","divideBy","dividedBy","dNaN","reciprocal","compare","equals","compare_tolerance","magA","magB","equals_tolerance","pow_base","t","lm","adj","l2","this_num","negln","oldheight","fracheight","old_payload","next_payload","tetrate_critical","fulltimes","fraction","layerloss","dNegOne","copy","slog_critical","critical_section","grid","lower","upper","basefrac","frac","slogthis","slogdest","lnx","sin","cos","tan","asin","acos","atan","sinh","cosh","tanh","asinh","acosh","atanh","ascensionPenalty","ascensions","egg","lessThanOrEqualTo","lessThan","greaterThanOrEqualTo","greaterThan","MAX_VALUE","MIN_VALUE","decimalOne","exponentialFormat","num","precision","eString","defaultDecimalsShown","commaFormat","init","portions","regularFormat","eeee1000","e100000","e1000","e9","e6","e3","nearOne","thousandth","zero","small","defaultShowSmall","invertOOM","val","formatWhole","formatTime","seconds","toPlaces","x","maxAccepted","formatSmall","camelToTitle","camel","toUpperCase","isPlainObject","prototype","call","isFunction","Direction","DoNotCache","processComputable","computable","bind","convertComputable","ProxyState","ProxyPath","createLazyProxy","objectFunc","baseObject","calculated","calculateObj","setupInitialStore","stringifiedSave","load","loadSave","newSave","playerObj","removeLayer","addLayer","fixOldSave","getInitialLayers","onbeforeunload","hardReset","xmlns","viewBox","d","appear","script","createResource","displayName","resource","trackBest","best","amount","trackTotal","total","prevAmount","tetra8","e100","trackOOMPS","pointGain","oomps","oompsMag","lastPoints","prev","oompsString","displayResource","overrideAmount","_component_Links","nodesComp","leftNodesComp","rightNodesComp","branches","links","link","startNode","endNode","boundingRect","startPosition","rect","position","y","offsetStart","endPosition","offsetEnd","stroke","x1","y1","x2","y2","resizeListener","inject","NodesInjectionKey","outerBoundingRect","BoundsInjectionKey","getBoundingClientRect","validLinks","filter","Link","leftSideNodes","rightSideNodes","Links","shallowRef","currNodes","row","_component_MarkNode","_component_Node","visibility","Hidden","treeNode","can","canClick","onMousedown","start","onMouseleave","stop","onMouseup","onTouchstartPassive","onTouchendPassive","onTouchcancelPassive","backgroundColor","boxShadow","glowColor","comp","mark","register","RegisterNodeInjectionKey","unregister","UnregisterNodeInjectionKey","node","parentNode","parentElement","newNode","newID","prevNode","prevID","onUnmounted","onHold","MarkNode","Node","isCoercableComponent","TreeNodeType","TreeType","createTreeNode","optionsFunc","TreeNode","createTree","tree","Tree","isResetting","resettingNode","reset","genericTree","resetPropagation","onReset","branchedResetPropagation","visitedNodes","currentNodes","nextNodes","branch","createResourceTooltip","requiredResource","requirement","req","backgroundImage","earned","image","feature","achievement","locked","bought","getNotifyStyle","strength","transform","borderColor","zIndex","getHighNotifyStyle","use","toast","AchievementType","createAchievement","Achievement","complete","shouldEarn","genericAchievement","onComplete","Display","_component_GridCell","rows","cols","col","gatherCellProps","cells","tile","titleComponent","GridCell","cell","createGridProxy","getGridHandler","getCellHandler","configurable","enumerable","writable","cache","prop","getState","createGrid","cellState","Grid","getID","startState","setState","clickable","currDisplay","Title","Description","description","ClickableType","createClickable","Clickable","createResetButton","resetButton","resetDescription","conversion","gainResource","actualGain","minimumGain","buyMax","baseResource","nextAt","currentAt","showNextAt","convert","createLayerTreeNode","layerID","append","createConversion","currentGain","gain","gainModifier","apply","scaling","current","roundUpCost","next","createPolynomialScaling","processedBase","processedExponent","revert","createCumulativeConversion","createIndependentConversion","softcap","cap","addSoftcap","_component_CollapseTransition","collapsed","stacked","titleStyle","bodyComponent","bodyStyle","CollapseTransition","InfoboxType","createInfobox","infobox","Infobox","onInit","onContainerResized","onHotReload","app","resizeObserver","ResizeObserver","updateBounds","onMounted","resListener","observe","resizeTo","backgroundAlpha","view","onBeforeUnmount","destroy","isDirty","resize","fonts","ready","then","ParticlesType","createParticles","particles","Particles","addEmitter","config","genericParticles","Promise","resolve","stage","emittersToAdd","upgradeConfig","ResetType","createReset","values","thingsToReset","listeners","effectDisplay","effectComponent","showPrefix","Resource","addTooltip","pinnable","pinned","elementComponent","elementGratherProps","createAdditiveModifier","addend","enabled","processedAddend","processedDescription","processedEnabled","createMultiplicativeModifier","multiplier","processedMultiplier","createExponentialModifier","createSequentialModifier","modifiers","modifier","every","reduceRight","createModifierSection","subtitle","unit","baseText","fullWidth","top","observer","updateTop","newTop","previousSibling","sibling","dataset","offsetHeight","bar","borderStyle","textStyle","baseStyle","barStyle","fillStyle","progress","normalizedProgress","progressNumber","clipPath","BarType","createBar","Bar","BuyableType","createBuyable","buyable","canPurchase","canAfford","genericBuyable","purchaseLimit","maxed","currClasses","purchase","onPurchase","CurrDisplay","EffectDisplay","amountDisplay","notifyStyle","challenge","done","completed","canStart","toggle","buttonText","canComplete","currActive","currCanComplete","Goal","goal","Reward","reward","ChallengeType","createChallenge","completions","Challenge","completionLimit","genericChallenge","onExit","onEnter","remainInChallenge","currentReset","hotkeys","HotkeyType","createHotkey","hotkey","onkeydown","tagName","shiftKey","ctrlKey","preventDefault","onPress","LinksType","createLinks","milestone","Requirement","OptionsDisplay","optionsDisplay","MilestoneType","MilestoneDisplay","createMilestone","Milestone","All","Configurable","Incomplete","genericMilestone","msDisplayOptions","option","TabType","createTab","Tab","selectTab","glowColorStyle","floating","_component_TabButton","_component_Sticky","tabClasses","tabStyle","button","onSelectTab","selected","activeTab","gatherButtonProps","Sticky","TabButton","currActiveTab","TabButtonType","TabFamilyType","createTabFamily","tabFamily","TabFamily","parsedTabs","tabButton","processedTabFamily","firstTab","find","upgrade","currCost","UpgradeType","createUpgrade","Upgrade","genericUpgrade","createLayer","points","beep","thingy","otherThingy","spentOnBuyables","waffleBoost","icecreamCap","coolInfo","lollipopMilestone3","lollipopMilestone4","f","boop","lollipopMilestones","funChallenge","funEffect","main","generatorUpgrade","lollipopMultiplierUpgrade","lollipopMultiplierEffect","ret","unlockIlluminatiUpgrade","quasiUpgrade","exhancers","upgrades","thingEffect","stuffEffect","confirmRespec","respecBuyables","sellExhancer","buyablesDisplay","longBoi","tallBoi","textShadow","borderWidth","flatBoi","tooltip","textDecoration","g","h","right","spook","illuminatiTabs","first","border","marginLeft","marginRight","mainTab","thingies","jail","illuminati","bars","clickableState","initialState","pos","touches","confettiParticles","clientX","clientY","playOnceAndDestroy","resetClickable","modifyGainAmount","c","ach1","ach2","ach3","achievements","getStartState","getStyle","getTitle","getDisplay","getCanClick","openModal","setupLayerModal","toRaw","showAchievements","oldVersion","emitter","on","Set","pop","getLayer","reloadLayer","showModal","coerceComponent","defaultWrapper","template","renderRow","renderCol","renderJSX","Comp","setupHoldToClick","interval","event","handleHolding","computeComponent","unwrapRef","computeOptionalComponent","currComponent","wrapRef","processedPropType","observerOptions","attributes","childList","subtree","updateNode","provide","MutationObserver","disconnect","isAnimating","close","contextRef","to","onBeforeEnter","onAfterLeave","onPointerdown","onUpdate","textArea","maxHeight","field","focus","submit","onBlur","isShown","onMouseenter","isHovered","onClickCapture","togglePinned","elementComp","Up","bottom","isPinned","stopPropagation","webpackEmptyContext","code","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","fulfilled","j","splice","r","getter","__esModule","definition","o","defineProperty","globalThis","hasOwnProperty","toStringTag","nmd","paths","children","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}