From 98e6cd1dfc41ec199612b6e01291cb8ce4a288a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Sun, 2 May 2021 10:49:31 +0200 Subject: [PATCH 01/69] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..feb90ba8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" From be8cf101e481cf190a4dd38c370790673d17d498 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 May 2021 08:55:33 +0000 Subject: [PATCH 02/69] Bump @types/chai from 4.2.16 to 4.2.17 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.16 to 4.2.17. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a0e5fa5f..bdb0e41a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@eastdesire/jscolor": "^2.4.5" }, "devDependencies": { - "@types/chai": "^4.2.16", + "@types/chai": "^4.2.17", "@types/mocha": "^8.2.2", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.21.0", @@ -223,9 +223,9 @@ } }, "node_modules/@types/chai": { - "version": "4.2.16", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", - "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "version": "4.2.17", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.17.tgz", + "integrity": "sha512-LaiwWNnYuL8xJlQcE91QB2JoswWZckq9A4b+nMPq8dt8AP96727Nb3X4e74u+E3tm4NLTILNI9MYFsyVc30wSA==", "dev": true }, "node_modules/@types/eslint": { @@ -4995,9 +4995,9 @@ } }, "@types/chai": { - "version": "4.2.16", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", - "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "version": "4.2.17", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.17.tgz", + "integrity": "sha512-LaiwWNnYuL8xJlQcE91QB2JoswWZckq9A4b+nMPq8dt8AP96727Nb3X4e74u+E3tm4NLTILNI9MYFsyVc30wSA==", "dev": true }, "@types/eslint": { diff --git a/package.json b/package.json index e0813835..041a8094 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "homepage": "https://github.com/Aktanusa/CookieMonster#readme", "devDependencies": { - "@types/chai": "^4.2.16", + "@types/chai": "^4.2.17", "@types/mocha": "^8.2.2", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.21.0", From 932b03fd518bbff74310aa61e60f022b01c1d2e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 May 2021 08:55:41 +0000 Subject: [PATCH 03/69] Bump webpack from 5.32.0 to 5.36.2 Bumps [webpack](https://github.com/webpack/webpack) from 5.32.0 to 5.36.2. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.32.0...v5.36.2) Signed-off-by: dependabot[bot] --- package-lock.json | 62 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index a0e5fa5f..2bf58adb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "ts-loader": "^8.1.0", "ts-node": "^9.1.1", "typescript": "^4.2.3", - "webpack": "^5.24.4", + "webpack": "^5.36.2", "webpack-cli": "^4.5.0" } }, @@ -249,9 +249,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.46", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz", - "integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg==", + "version": "0.0.47", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", + "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==", "dev": true }, "node_modules/@types/json-schema": { @@ -4473,20 +4473,20 @@ } }, "node_modules/webpack": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.32.0.tgz", - "integrity": "sha512-jB9PrNMFnPRiZGnm/j3qfNqJmP3ViRzkuQMIf8za0dgOYvSLi/cgA+UEEGvik9EQHX1KYyGng5PgBTTzGrH9xg==", + "version": "5.36.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.36.2.tgz", + "integrity": "sha512-XJumVnnGoH2dV+Pk1VwgY4YT6AiMKpVoudUFCNOXMIVrEKPUgEwdIfWPjIuGLESAiS8EdIHX5+TiJz/5JccmRg==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.46", + "@types/estree": "^0.0.47", "@webassemblyjs/ast": "1.11.0", "@webassemblyjs/wasm-edit": "1.11.0", "@webassemblyjs/wasm-parser": "1.11.0", - "acorn": "^8.0.4", + "acorn": "^8.2.1", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.7.0", + "enhanced-resolve": "^5.8.0", "es-module-lexer": "^0.4.0", "eslint-scope": "^5.1.1", "events": "^3.2.0", @@ -4599,9 +4599,9 @@ } }, "node_modules/webpack/node_modules/acorn": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.1.tgz", - "integrity": "sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.2.tgz", + "integrity": "sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -4611,9 +4611,9 @@ } }, "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz", - "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", + "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -5021,9 +5021,9 @@ } }, "@types/estree": { - "version": "0.0.46", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz", - "integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg==", + "version": "0.0.47", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", + "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==", "dev": true }, "@types/json-schema": { @@ -8184,20 +8184,20 @@ } }, "webpack": { - "version": "5.32.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.32.0.tgz", - "integrity": "sha512-jB9PrNMFnPRiZGnm/j3qfNqJmP3ViRzkuQMIf8za0dgOYvSLi/cgA+UEEGvik9EQHX1KYyGng5PgBTTzGrH9xg==", + "version": "5.36.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.36.2.tgz", + "integrity": "sha512-XJumVnnGoH2dV+Pk1VwgY4YT6AiMKpVoudUFCNOXMIVrEKPUgEwdIfWPjIuGLESAiS8EdIHX5+TiJz/5JccmRg==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.46", + "@types/estree": "^0.0.47", "@webassemblyjs/ast": "1.11.0", "@webassemblyjs/wasm-edit": "1.11.0", "@webassemblyjs/wasm-parser": "1.11.0", - "acorn": "^8.0.4", + "acorn": "^8.2.1", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.7.0", + "enhanced-resolve": "^5.8.0", "es-module-lexer": "^0.4.0", "eslint-scope": "^5.1.1", "events": "^3.2.0", @@ -8215,15 +8215,15 @@ }, "dependencies": { "acorn": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.1.tgz", - "integrity": "sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.2.tgz", + "integrity": "sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==", "dev": true }, "enhanced-resolve": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz", - "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", + "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", "dev": true, "requires": { "graceful-fs": "^4.2.4", diff --git a/package.json b/package.json index e0813835..2b5e0507 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "ts-loader": "^8.1.0", "ts-node": "^9.1.1", "typescript": "^4.2.3", - "webpack": "^5.24.4", + "webpack": "^5.36.2", "webpack-cli": "^4.5.0" }, "ccrepo": { From 039155a60783fadaa1a194dee706ddac6cb3a198 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 May 2021 09:00:07 +0000 Subject: [PATCH 04/69] Bump ts-loader from 8.1.0 to 9.1.1 Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 8.1.0 to 9.1.1. - [Release notes](https://github.com/TypeStrong/ts-loader/releases) - [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/ts-loader/compare/v8.1.0...v9.1.1) Signed-off-by: dependabot[bot] --- package-lock.json | 343 ++++------------------------------------------ package.json | 2 +- 2 files changed, 28 insertions(+), 317 deletions(-) diff --git a/package-lock.json b/package-lock.json index be18660b..39a28b9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "mocha": "^8.3.2", "npm-run-all": "^4.1.5", "prettier": "2.2.1", - "ts-loader": "^8.1.0", + "ts-loader": "^9.1.1", "ts-node": "^9.1.1", "typescript": "^4.2.3", "webpack": "^5.36.2", @@ -811,15 +811,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1074,12 +1065,6 @@ "node": ">=0.10.0" } }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -1204,27 +1189,17 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/enhanced-resolve": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", - "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", + "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=10.13.0" } }, "node_modules/enquirer": { @@ -1251,18 +1226,6 @@ "node": ">=4" } }, - "node_modules/errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "dependencies": { - "prr": "~1.0.1" - }, - "bin": { - "errno": "cli.js" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2503,21 +2466,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -2564,20 +2512,6 @@ "node": ">=6.11.5" } }, - "node_modules/loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2647,19 +2581,6 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "node_modules/memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "dependencies": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -3433,12 +3354,6 @@ "node": ">=10.13.0" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -3448,12 +3363,6 @@ "node": ">=0.4.0" } }, - "node_modules/prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -3660,27 +3569,6 @@ "node": ">=4" } }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/readdirp": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", @@ -4022,21 +3910,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/string-width": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", @@ -4191,9 +4064,9 @@ "dev": true }, "node_modules/tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", "dev": true, "engines": { "node": ">=6" @@ -4268,19 +4141,18 @@ } }, "node_modules/ts-loader": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.1.0.tgz", - "integrity": "sha512-YiQipGGAFj2zBfqLhp28yUvPP9jUGqHxRzrGYuc82Z2wM27YIHbElXiaZDc93c3x0mz4zvBmS6q/DgExpdj37A==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.1.1.tgz", + "integrity": "sha512-u91MdIE4rtN/06Q881uUzVeMoYy+CdFXoanCQXVGRubKKxgLjqQ/H9nkDbp6klkiPv3t18KLjZbEofkJodM3ow==", "dev": true, "dependencies": { "chalk": "^4.1.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^2.0.0", + "enhanced-resolve": "^5.0.0", "micromatch": "^4.0.0", "semver": "^7.3.4" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" }, "peerDependencies": { "typescript": "*", @@ -4437,12 +4309,6 @@ "punycode": "^2.1.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -4610,28 +4476,6 @@ "node": ">=0.4.0" } }, - "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", - "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5446,12 +5290,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -5649,12 +5487,6 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -5747,21 +5579,14 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, "enhanced-resolve": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", - "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", + "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" } }, "enquirer": { @@ -5779,15 +5604,6 @@ "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", "dev": true }, - "errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -6717,15 +6533,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -6760,17 +6567,6 @@ "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", "dev": true }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -6828,16 +6624,6 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -7411,24 +7197,12 @@ "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -7580,29 +7354,6 @@ } } }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, "readdirp": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", @@ -7844,23 +7595,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, "string-width": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", @@ -7977,9 +7711,9 @@ } }, "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", "dev": true }, "terser": { @@ -8031,14 +7765,13 @@ } }, "ts-loader": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.1.0.tgz", - "integrity": "sha512-YiQipGGAFj2zBfqLhp28yUvPP9jUGqHxRzrGYuc82Z2wM27YIHbElXiaZDc93c3x0mz4zvBmS6q/DgExpdj37A==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.1.1.tgz", + "integrity": "sha512-u91MdIE4rtN/06Q881uUzVeMoYy+CdFXoanCQXVGRubKKxgLjqQ/H9nkDbp6klkiPv3t18KLjZbEofkJodM3ow==", "dev": true, "requires": { "chalk": "^4.1.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^2.0.0", + "enhanced-resolve": "^5.0.0", "micromatch": "^4.0.0", "semver": "^7.3.4" } @@ -8151,12 +7884,6 @@ "punycode": "^2.1.0" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -8219,22 +7946,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.2.tgz", "integrity": "sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==", "dev": true - }, - "enhanced-resolve": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", - "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", - "dev": true } } }, diff --git a/package.json b/package.json index c99a30db..f8aba8e3 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "mocha": "^8.3.2", "npm-run-all": "^4.1.5", "prettier": "2.2.1", - "ts-loader": "^8.1.0", + "ts-loader": "^9.1.1", "ts-node": "^9.1.1", "typescript": "^4.2.3", "webpack": "^5.36.2", From 941ccfeb79a9907dd5c2d41e9bf7daedd5d86a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Sun, 2 May 2021 11:44:27 +0200 Subject: [PATCH 05/69] Updated ESLint to 7.25.0 --- package-lock.json | 14 +++---- package.json | 2 +- src/Cache/CPS/AverageQueue.js | 20 +++++----- src/Cache/CPS/CPS.js | 10 ++--- src/Cache/CPS/CurrWrinklerCPS.js | 6 +-- src/Cache/CPS/NoGoldSwitchCPS.js | 4 +- src/Cache/CPS/SellChoEgg.js | 4 +- src/Cache/CacheInit.js | 6 +-- src/Cache/CacheLoop.js | 4 +- src/Cache/Dragon/CacheDragonAuras.js | 6 +-- src/Cache/Dragon/Dragon.js | 4 +- src/Cache/PP/Building.js | 4 +- src/Cache/PriceAndIncome/PriceAndIncome.js | 4 +- src/Cache/Stats/ChainCookies.js | 32 +++++++-------- src/Cache/Stats/HeavenlyChips.js | 4 +- src/Cache/Stats/MissingUpgrades.js | 6 +-- src/Cache/Stats/Reindeer.js | 4 +- src/Cache/Stats/Stats.js | 24 +++++------ src/Cache/Wrinklers/Wrinklers.js | 8 ++-- src/Data/SettingsData.js | 4 +- src/Disp/Tooltips/Tooltip.js | 6 +-- src/InitSaveLoad/init.js | 4 +- src/InitSaveLoad/load.js | 4 +- src/Main/CheckStates/GoldenCookie.js | 4 +- src/Main/CheckStates/Season.js | 4 +- src/Main/Initialization.js | 8 ++-- .../ReplaceGameElements/NativeGrimoire.js | 4 +- src/Main/ReplaceGameElements/Tooltips.js | 4 +- .../ReplaceGameFunctions/ReplaceNative.js | 14 +++---- src/Main/WrinklerArea/AddDetectArea.js | 4 +- src/Sim/Calculations/CalculateGains.js | 8 ++-- src/Sim/SimulationData/CopyData.js | 40 +++++++++---------- src/Sim/SimulationData/SimWin.js | 4 +- src/Sim/SimulationEvents/AuraChange.js | 4 +- src/Sim/SimulationEvents/BuyUpgrades.js | 4 +- src/Sim/SimulationEvents/GodChange.js | 2 +- src/Sim/SimulationEvents/ResetAscension.js | 4 +- .../SimulationEvents/SellBuildingForChoEgg.js | 4 +- 38 files changed, 148 insertions(+), 148 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39a28b9c..8bebadae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.21.0", "chai": "^4.3.4", - "eslint": "^7.23.0", + "eslint": "^7.25.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.22.1", @@ -1310,9 +1310,9 @@ } }, "node_modules/eslint": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", - "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz", + "integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==", "dev": true, "dependencies": { "@babel/code-frame": "7.12.11", @@ -5667,9 +5667,9 @@ "dev": true }, "eslint": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", - "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz", + "integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", diff --git a/package.json b/package.json index f8aba8e3..fdc6d60e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.21.0", "chai": "^4.3.4", - "eslint": "^7.23.0", + "eslint": "^7.25.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.22.1", diff --git a/src/Cache/CPS/AverageQueue.js b/src/Cache/CPS/AverageQueue.js index 76f3ede7..4f1d75f2 100644 --- a/src/Cache/CPS/AverageQueue.js +++ b/src/Cache/CPS/AverageQueue.js @@ -1,10 +1,10 @@ import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData'; import { - ChoEggDiff, - ClicksDiff, - CookiesDiff, - WrinkDiff, - WrinkFattestDiff, + ChoEggDiff, // eslint-disable-line no-unused-vars + ClicksDiff, // eslint-disable-line no-unused-vars + CookiesDiff, // eslint-disable-line no-unused-vars + WrinkDiff, // eslint-disable-line no-unused-vars + WrinkFattestDiff, // eslint-disable-line no-unused-vars } from '../VariablesAndData'; /** @@ -60,9 +60,9 @@ export class CMAvgQueue { * Called by CM.Cache.InitCache() */ export function InitCookiesDiff() { - CookiesDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars - WrinkDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars - WrinkFattestDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars - ChoEggDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); // eslint-disable-line no-unused-vars - ClicksDiff = new CMAvgQueue(ClickTimes[ClickTimes.length - 1]); // eslint-disable-line no-unused-vars + CookiesDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); + WrinkDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); + WrinkFattestDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); + ChoEggDiff = new CMAvgQueue(CookieTimes[CookieTimes.length - 1]); + ClicksDiff = new CMAvgQueue(ClickTimes[ClickTimes.length - 1]); } diff --git a/src/Cache/CPS/CPS.js b/src/Cache/CPS/CPS.js index db3b33a0..0bdfd03e 100644 --- a/src/Cache/CPS/CPS.js +++ b/src/Cache/CPS/CPS.js @@ -1,20 +1,20 @@ import { CMOptions } from '../../Config/VariablesAndData'; import { ClickTimes, CookieTimes } from '../../Disp/VariablesAndData'; import { - CacheAverageClicks, + CacheAverageClicks, // eslint-disable-line no-unused-vars CacheAverageCPS, CacheAverageGainBank, CacheAverageGainChoEgg, CacheAverageGainWrink, CacheAverageGainWrinkFattest, - CacheAvgCPSWithChoEgg, + CacheAvgCPSWithChoEgg, // eslint-disable-line no-unused-vars CacheLastChoEgg, CacheLastClicks, CacheLastCookies, CacheLastCPSCheck, CacheLastWrinkCookies, CacheLastWrinkFattestCookies, - CacheRealCookiesEarned, + CacheRealCookiesEarned, // eslint-disable-line no-unused-vars CacheSellForChoEgg, CacheWrinklersFattest, CacheWrinklersTotal, @@ -39,7 +39,7 @@ export default function CacheAvgCPS() { if ((Game.T / Game.fps) % 1 === 0) { let choEggTotal = Game.cookies + CacheSellForChoEgg; if (Game.cpsSucked > 0) choEggTotal += CacheWrinklersTotal; - CacheRealCookiesEarned = Math.max(Game.cookiesEarned, choEggTotal); // eslint-disable-line no-unused-vars + CacheRealCookiesEarned = Math.max(Game.cookiesEarned, choEggTotal); choEggTotal *= 0.05; // Add recent gains to AvgQueue's @@ -81,7 +81,7 @@ export default function CacheAvgCPS() { if (choEgg || CMOptions.CalcWrink === 0) { CacheAvgCPSWithChoEgg = CacheAverageGainBank + CacheAverageGainWrink + (choEgg ? CacheAverageGainChoEgg : 0); - } else CacheAvgCPSWithChoEgg = CacheAverageCPS; // eslint-disable-line no-unused-vars + } else CacheAvgCPSWithChoEgg = CacheAverageCPS; // eslint-disable-next-line no-unused-vars CacheAverageClicks = ClicksDiff.calcAverage(ClickTimes[CMOptions.AvgClicksHist]); diff --git a/src/Cache/CPS/CurrWrinklerCPS.js b/src/Cache/CPS/CurrWrinklerCPS.js index 5bdd4cf9..2ff4e95d 100644 --- a/src/Cache/CPS/CurrWrinklerCPS.js +++ b/src/Cache/CPS/CurrWrinklerCPS.js @@ -1,5 +1,5 @@ import { SimObjects } from '../../Sim/VariablesAndData'; -import { CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult } from '../VariablesAndData'; +import { CacheCurrWrinklerCount, CacheCurrWrinklerCPSMult } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This functions caches the current Wrinkler CPS multiplier @@ -19,8 +19,8 @@ export default function CacheCurrWrinklerCPS() { else if (godLvl === 2) godMult *= 1.1; else if (godLvl === 3) godMult *= 1.05; } - CacheCurrWrinklerCount = count; // eslint-disable-line no-unused-vars - CacheCurrWrinklerCPSMult = // eslint-disable-line no-unused-vars + CacheCurrWrinklerCount = count; + CacheCurrWrinklerCPSMult = count * (count * 0.05 * 1.1) * (Game.Has('Sacrilegious corruption') * 0.05 + 1) * diff --git a/src/Cache/CPS/NoGoldSwitchCPS.js b/src/Cache/CPS/NoGoldSwitchCPS.js index f0cd5bc3..afb77ef7 100644 --- a/src/Cache/CPS/NoGoldSwitchCPS.js +++ b/src/Cache/CPS/NoGoldSwitchCPS.js @@ -1,5 +1,5 @@ import CalcNoGoldSwitchCPS from '../../Sim/Calculations/NoGoldenSwitchCalc'; -import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData'; +import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This function calculates CPS without the Golden Switch as it might be needed in other functions @@ -9,5 +9,5 @@ import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData'; export default function CacheNoGoldSwitchCPS() { if (Game.Has('Golden switch [off]')) { CacheNoGoldSwitchCookiesPS = CalcNoGoldSwitchCPS(); - } else CacheNoGoldSwitchCookiesPS = Game.cookiesPs; // eslint-disable-line no-unused-vars + } else CacheNoGoldSwitchCookiesPS = Game.cookiesPs; } diff --git a/src/Cache/CPS/SellChoEgg.js b/src/Cache/CPS/SellChoEgg.js index e3222e29..7c3803a8 100644 --- a/src/Cache/CPS/SellChoEgg.js +++ b/src/Cache/CPS/SellChoEgg.js @@ -1,5 +1,5 @@ import SellBuildingsForChoEgg from '../../Sim/SimulationEvents/SellBuildingForChoEgg'; -import { CacheSellForChoEgg } from '../VariablesAndData'; +import { CacheSellForChoEgg } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This functions caches the reward for selling the Chocolate egg @@ -20,5 +20,5 @@ export default function CacheSellAllForChoEgg() { } // Compute cookies earned by selling all buildings with optimal auras (ES + RB) sellTotal += SellBuildingsForChoEgg(); - CacheSellForChoEgg = sellTotal; // eslint-disable-line no-unused-vars + CacheSellForChoEgg = sellTotal; } diff --git a/src/Cache/CacheInit.js b/src/Cache/CacheInit.js index e3d83190..398a2f8e 100644 --- a/src/Cache/CacheInit.js +++ b/src/Cache/CacheInit.js @@ -10,7 +10,7 @@ import CacheAllMissingUpgrades from './Stats/MissingUpgrades'; import CacheSeasonSpec from './Stats/Reindeer'; import { CacheGoldenAndWrathCookiesMults, CacheStatsCookies } from './Stats/Stats'; import AllAmountTillNextAchievement from './TillNextAchievement/AllAmountTillNextAchievement'; -import { CacheAverageCookiesFromClicks, HeavenlyChipsDiff } from './VariablesAndData'; +import { CacheAverageCookiesFromClicks, HeavenlyChipsDiff } from './VariablesAndData'; // eslint-disable-line no-unused-vars import CacheWrinklers from './Wrinklers/Wrinklers'; /** @@ -26,8 +26,8 @@ export default function InitCache() { CacheSeasonSpec(); InitCookiesDiff(); /** Used by CM.Cache.CacheHeavenlyChipsPS() */ - HeavenlyChipsDiff = new CMAvgQueue(5); // eslint-disable-line no-unused-vars - CacheAverageCookiesFromClicks = new CMAvgQueue(ClickTimes[ClickTimes.length - 1] * 20); // eslint-disable-line no-unused-vars + HeavenlyChipsDiff = new CMAvgQueue(5); + CacheAverageCookiesFromClicks = new CMAvgQueue(ClickTimes[ClickTimes.length - 1] * 20); CacheHeavenlyChipsPS(); AllAmountTillNextAchievement(); CacheAvgCPS(); diff --git a/src/Cache/CacheLoop.js b/src/Cache/CacheLoop.js index acd798c5..f54613bc 100644 --- a/src/Cache/CacheLoop.js +++ b/src/Cache/CacheLoop.js @@ -4,7 +4,7 @@ import CacheAvgCPS from './CPS/CPS'; import CacheCurrWrinklerCPS from './CPS/CurrWrinklerCPS'; import CachePP from './PP/PP'; import CacheHeavenlyChipsPS from './Stats/HeavenlyChips'; -import { CacheTimeTillNextPrestige } from './VariablesAndData'; +import { CacheTimeTillNextPrestige } from './VariablesAndData'; // eslint-disable-line no-unused-vars import CacheWrinklers from './Wrinklers/Wrinklers'; /** @@ -25,5 +25,5 @@ export default function LoopCache() { Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) + 1, ) - (Game.cookiesEarned + Game.cookiesReset); - CacheTimeTillNextPrestige = FormatTime(cookiesToNext / GetCPS()); // eslint-disable-line no-unused-vars + CacheTimeTillNextPrestige = FormatTime(cookiesToNext / GetCPS()); } diff --git a/src/Cache/Dragon/CacheDragonAuras.js b/src/Cache/Dragon/CacheDragonAuras.js index 32ef632c..9ba4defb 100644 --- a/src/Cache/Dragon/CacheDragonAuras.js +++ b/src/Cache/Dragon/CacheDragonAuras.js @@ -1,9 +1,9 @@ -import { CacheDragonAura, CacheDragonAura2 } from '../VariablesAndData'; +import { CacheDragonAura, CacheDragonAura2 } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This functions caches the currently selected Dragon Auras */ export default function CacheDragonAuras() { - CacheDragonAura = Game.dragonAura; // eslint-disable-line no-unused-vars - CacheDragonAura2 = Game.dragonAura2; // eslint-disable-line no-unused-vars + CacheDragonAura = Game.dragonAura; + CacheDragonAura2 = Game.dragonAura2; } diff --git a/src/Cache/Dragon/Dragon.js b/src/Cache/Dragon/Dragon.js index d466442e..991d2429 100644 --- a/src/Cache/Dragon/Dragon.js +++ b/src/Cache/Dragon/Dragon.js @@ -3,7 +3,7 @@ import Beautify from '../../Disp/BeautifyAndFormatting/Beautify'; import CopyData from '../../Sim/SimulationData/CopyData'; import { SimDoSims, SimObjects } from '../../Sim/VariablesAndData'; -import { CacheCostDragonUpgrade, CacheLastDragonLevel } from '../VariablesAndData'; +import { CacheCostDragonUpgrade, CacheLastDragonLevel } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This functions caches the current cost of upgrading the dragon level so it can be displayed in the tooltip @@ -56,7 +56,7 @@ export default function CacheDragonCost() { cost += price; SimObjects[target].amount -= 1; } - CacheCostDragonUpgrade = `Cost to rebuy: ${Beautify(cost)}`; // eslint-disable-line no-unused-vars + CacheCostDragonUpgrade = `Cost to rebuy: ${Beautify(cost)}`; }); } } diff --git a/src/Cache/PP/Building.js b/src/Cache/PP/Building.js index ba44113e..c7e519bc 100644 --- a/src/Cache/PP/Building.js +++ b/src/Cache/PP/Building.js @@ -2,7 +2,7 @@ import { CMOptions } from '../../Config/VariablesAndData'; import GetWrinkConfigBank from '../../Disp/HelperFunctions/GetWrinkConfigBank'; import { ColourGray } from '../../Disp/VariablesAndData'; import { - CacheMinPP, + CacheMinPP, // eslint-disable-line no-unused-vars CacheObjects1, CacheObjects10, CacheObjects100, @@ -67,7 +67,7 @@ export default function CacheBuildingsPP() { } } } - CacheMinPP = CachePPArray[CMOptions.PPExcludeTop][indexOfMin]; // eslint-disable-line no-unused-vars + CacheMinPP = CachePPArray[CMOptions.PPExcludeTop][indexOfMin]; CacheColour(CacheObjects1, 1); CacheColour(CacheObjects10, 10); diff --git a/src/Cache/PriceAndIncome/PriceAndIncome.js b/src/Cache/PriceAndIncome/PriceAndIncome.js index cc6208b6..22e4f216 100644 --- a/src/Cache/PriceAndIncome/PriceAndIncome.js +++ b/src/Cache/PriceAndIncome/PriceAndIncome.js @@ -8,7 +8,7 @@ import { CacheAverageGainBank, CacheAverageGainWrink, CacheAverageGainWrinkFattest, - CacheDoRemakeBuildPrices, + CacheDoRemakeBuildPrices, // eslint-disable-line no-unused-vars CacheObjects1, CacheObjects10, CacheObjects100, @@ -28,7 +28,7 @@ function CacheBuildingIncome(amount) { result[i] = {}; result[i].bonus = BuyBuildingsBonusIncome(i, amount); if (amount !== 1) { - CacheDoRemakeBuildPrices = 1; // eslint-disable-line no-unused-vars + CacheDoRemakeBuildPrices = 1; } }); return result; diff --git a/src/Cache/Stats/ChainCookies.js b/src/Cache/Stats/ChainCookies.js index 1b817234..145a8f25 100644 --- a/src/Cache/Stats/ChainCookies.js +++ b/src/Cache/Stats/ChainCookies.js @@ -1,17 +1,17 @@ import GetCPSBuffMult from '../CPS/GetCPSBuffMult'; import { CacheChainFrenzyMaxReward, - CacheChainFrenzyRequired, - CacheChainFrenzyRequiredNext, + CacheChainFrenzyRequired, // eslint-disable-line no-unused-vars + CacheChainFrenzyRequiredNext, // eslint-disable-line no-unused-vars CacheChainFrenzyWrathMaxReward, - CacheChainFrenzyWrathRequired, - CacheChainFrenzyWrathRequiredNext, + CacheChainFrenzyWrathRequired, // eslint-disable-line no-unused-vars + CacheChainFrenzyWrathRequiredNext, // eslint-disable-line no-unused-vars CacheChainMaxReward, - CacheChainRequired, - CacheChainRequiredNext, + CacheChainRequired, // eslint-disable-line no-unused-vars + CacheChainRequiredNext, // eslint-disable-line no-unused-vars CacheChainWrathMaxReward, - CacheChainWrathRequired, - CacheChainWrathRequiredNext, + CacheChainWrathRequired, // eslint-disable-line no-unused-vars + CacheChainWrathRequiredNext, // eslint-disable-line no-unused-vars CacheDragonsFortuneMultAdjustment, CacheGoldenCookiesMult, CacheNoGoldSwitchCookiesPS, @@ -72,21 +72,21 @@ export function CacheChain() { else maxPayout = 0; CacheChainMaxReward = MaxChainCookieReward(7, maxPayout, CacheGoldenCookiesMult); - CacheChainRequired = (CacheChainMaxReward[1] * 2) / CacheGoldenCookiesMult; // eslint-disable-line no-unused-vars - CacheChainRequiredNext = CacheChainMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; // eslint-disable-line no-unused-vars + CacheChainRequired = (CacheChainMaxReward[1] * 2) / CacheGoldenCookiesMult; + CacheChainRequiredNext = CacheChainMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; CacheChainWrathMaxReward = MaxChainCookieReward(6, maxPayout, CacheWrathCookiesMult); - CacheChainWrathRequired = (CacheChainWrathMaxReward[1] * 2) / CacheWrathCookiesMult; // eslint-disable-line no-unused-vars - CacheChainWrathRequiredNext = // eslint-disable-line no-unused-vars + CacheChainWrathRequired = (CacheChainWrathMaxReward[1] * 2) / CacheWrathCookiesMult; + CacheChainWrathRequiredNext = CacheChainWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; CacheChainFrenzyMaxReward = MaxChainCookieReward(7, maxPayout * 7, CacheGoldenCookiesMult); - CacheChainFrenzyRequired = (CacheChainFrenzyMaxReward[1] * 2) / CacheGoldenCookiesMult; // eslint-disable-line no-unused-vars - CacheChainFrenzyRequiredNext = // eslint-disable-line no-unused-vars + CacheChainFrenzyRequired = (CacheChainFrenzyMaxReward[1] * 2) / CacheGoldenCookiesMult; + CacheChainFrenzyRequiredNext = CacheChainFrenzyMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; CacheChainFrenzyWrathMaxReward = MaxChainCookieReward(6, maxPayout * 7, CacheWrathCookiesMult); - CacheChainFrenzyWrathRequired = (CacheChainFrenzyWrathMaxReward[1] * 2) / CacheWrathCookiesMult; // eslint-disable-line no-unused-vars - CacheChainFrenzyWrathRequiredNext = // eslint-disable-line no-unused-vars + CacheChainFrenzyWrathRequired = (CacheChainFrenzyWrathMaxReward[1] * 2) / CacheWrathCookiesMult; + CacheChainFrenzyWrathRequiredNext = CacheChainFrenzyWrathMaxReward[2] / 60 / 60 / 6 / CacheDragonsFortuneMultAdjustment; } diff --git a/src/Cache/Stats/HeavenlyChips.js b/src/Cache/Stats/HeavenlyChips.js index 17b071a5..1279bcee 100644 --- a/src/Cache/Stats/HeavenlyChips.js +++ b/src/Cache/Stats/HeavenlyChips.js @@ -1,5 +1,5 @@ import { - CacheHCPerSecond, + CacheHCPerSecond, // eslint-disable-line no-unused-vars CacheLastHeavenlyCheck, CacheLastHeavenlyChips, HeavenlyChipsDiff, @@ -30,6 +30,6 @@ export default function CacheHeavenlyChipsPS() { CacheLastHeavenlyChips = ascendNowToGet; // Get average gain over period of 5 seconds - CacheHCPerSecond = HeavenlyChipsDiff.calcAverage(5); // eslint-disable-line no-unused-vars + CacheHCPerSecond = HeavenlyChipsDiff.calcAverage(5); } } diff --git a/src/Cache/Stats/MissingUpgrades.js b/src/Cache/Stats/MissingUpgrades.js index e6eec50d..2be2806f 100644 --- a/src/Cache/Stats/MissingUpgrades.js +++ b/src/Cache/Stats/MissingUpgrades.js @@ -1,8 +1,8 @@ import { crateMissing } from '../../Disp/MenuSections/Statistics/CreateMissingUpgrades'; import { - CacheMissingUpgrades, - CacheMissingUpgradesCookies, - CacheMissingUpgradesPrestige, + CacheMissingUpgrades, // eslint-disable-line no-unused-vars + CacheMissingUpgradesCookies, // eslint-disable-line no-unused-vars + CacheMissingUpgradesPrestige, // eslint-disable-line no-unused-vars } from '../VariablesAndData'; /** diff --git a/src/Cache/Stats/Reindeer.js b/src/Cache/Stats/Reindeer.js index f4142d0b..ce9915d8 100644 --- a/src/Cache/Stats/Reindeer.js +++ b/src/Cache/Stats/Reindeer.js @@ -1,4 +1,4 @@ -import { CacheSeaSpec } from '../VariablesAndData'; +import { CacheSeaSpec } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This functions caches the reward of popping a reindeer @@ -11,6 +11,6 @@ export default function CacheSeasonSpec() { if (Game.hasBuff('Elder frenzy')) val *= 0.5; if (Game.hasBuff('Frenzy')) val *= 0.75; CacheSeaSpec = Math.max(25, val); - if (Game.Has('Ho ho ho-flavored frosting')) CacheSeaSpec *= 2; // eslint-disable-line no-unused-vars + if (Game.Has('Ho ho ho-flavored frosting')) CacheSeaSpec *= 2; } } diff --git a/src/Cache/Stats/Stats.js b/src/Cache/Stats/Stats.js index ce391099..556fa5d1 100644 --- a/src/Cache/Stats/Stats.js +++ b/src/Cache/Stats/Stats.js @@ -4,17 +4,17 @@ import SimHas from '../../Sim/ReplacedGameFunctions/SimHas'; import GetCPSBuffMult from '../CPS/GetCPSBuffMult'; import { CacheConjure, - CacheConjureReward, + CacheConjureReward, // eslint-disable-line no-unused-vars CacheDragonsFortuneMultAdjustment, CacheEdifice, - CacheEdificeBuilding, + CacheEdificeBuilding, // eslint-disable-line no-unused-vars CacheGoldenCookiesMult, CacheLucky, CacheLuckyFrenzy, - CacheLuckyReward, - CacheLuckyRewardFrenzy, - CacheLuckyWrathReward, - CacheLuckyWrathRewardFrenzy, + CacheLuckyReward, // eslint-disable-line no-unused-vars + CacheLuckyRewardFrenzy, // eslint-disable-line no-unused-vars + CacheLuckyWrathReward, // eslint-disable-line no-unused-vars + CacheLuckyWrathRewardFrenzy, // eslint-disable-line no-unused-vars CacheNoGoldSwitchCookiesPS, CacheWrathCookiesMult, } from '../VariablesAndData'; @@ -28,13 +28,13 @@ export function CacheStatsCookies() { const cpsBuffMult = GetCPSBuffMult(); if (cpsBuffMult > 0) CacheLucky /= cpsBuffMult; else CacheLucky = 0; - CacheLuckyReward = CacheGoldenCookiesMult * (CacheLucky * 0.15) + 13; // eslint-disable-line no-unused-vars - CacheLuckyWrathReward = CacheWrathCookiesMult * (CacheLucky * 0.15) + 13; // eslint-disable-line no-unused-vars + CacheLuckyReward = CacheGoldenCookiesMult * (CacheLucky * 0.15) + 13; + CacheLuckyWrathReward = CacheWrathCookiesMult * (CacheLucky * 0.15) + 13; CacheLuckyFrenzy = CacheLucky * 7; - CacheLuckyRewardFrenzy = CacheGoldenCookiesMult * (CacheLuckyFrenzy * 0.15) + 13; // eslint-disable-line no-unused-vars - CacheLuckyWrathRewardFrenzy = CacheWrathCookiesMult * (CacheLuckyFrenzy * 0.15) + 13; // eslint-disable-line no-unused-vars + CacheLuckyRewardFrenzy = CacheGoldenCookiesMult * (CacheLuckyFrenzy * 0.15) + 13; + CacheLuckyWrathRewardFrenzy = CacheWrathCookiesMult * (CacheLuckyFrenzy * 0.15) + 13; CacheConjure = CacheLucky * 2; - CacheConjureReward = CacheConjure * 0.15; // eslint-disable-line no-unused-vars + CacheConjureReward = CacheConjure * 0.15; CacheEdifice = 0; let max = 0; @@ -50,7 +50,7 @@ export function CacheStatsCookies() { Game.Objects[i].price * 2 > CacheEdifice ) { CacheEdifice = Game.Objects[i].price * 2; - CacheEdificeBuilding = i; // eslint-disable-line no-unused-vars + CacheEdificeBuilding = i; } }); } diff --git a/src/Cache/Wrinklers/Wrinklers.js b/src/Cache/Wrinklers/Wrinklers.js index 3963b910..2b942060 100644 --- a/src/Cache/Wrinklers/Wrinklers.js +++ b/src/Cache/Wrinklers/Wrinklers.js @@ -3,8 +3,8 @@ import { SimObjects } from '../../Sim/VariablesAndData'; import { CacheWrinklersFattest, - CacheWrinklersNormal, - CacheWrinklersTotal, + CacheWrinklersNormal, // eslint-disable-line no-unused-vars + CacheWrinklersTotal, // eslint-disable-line no-unused-vars } from '../VariablesAndData'; /** @@ -31,9 +31,9 @@ export default function CacheWrinklers() { else if (godLvl === 2) sucked *= 1.1; else if (godLvl === 3) sucked *= 1.05; } - CacheWrinklersTotal += sucked; // eslint-disable-line no-unused-vars + CacheWrinklersTotal += sucked; if (Game.wrinklers[i].type === 0) { - CacheWrinklersNormal += sucked; // eslint-disable-line no-unused-vars + CacheWrinklersNormal += sucked; if (sucked > CacheWrinklersFattest[0]) CacheWrinklersFattest = [sucked, i]; } } diff --git a/src/Data/SettingsData.js b/src/Data/SettingsData.js index 7e8cc76b..8ce78166 100644 --- a/src/Data/SettingsData.js +++ b/src/Data/SettingsData.js @@ -14,7 +14,7 @@ import UpdateUpgradeSectionsHeight from '../Disp/BuildingsUpgrades/UpdateUpgrade import UpdateUpgrades from '../Disp/BuildingsUpgrades/Upgrades'; import RefreshScale from '../Disp/HelperFunctions/RefreshScale'; import { UpdateFavicon } from '../Disp/TabTitle/FavIcon'; -import { SimDoSims } from '../Sim/VariablesAndData'; +import { SimDoSims } from '../Sim/VariablesAndData'; // eslint-disable-line no-unused-vars import SettingColours from './SettingClasses/SettingColours.ts'; import SettingInputNumber from './SettingClasses/SettingInputNumber.ts'; import SettingStandard from './SettingClasses/SettingStandard.ts'; @@ -70,7 +70,7 @@ const Config = { 'Calculate times and average Cookies Per Second with (only the single non-shiny fattest) wrinklers', true, () => { - SimDoSims = true; // eslint-disable-line no-unused-vars + SimDoSims = true; }, ), diff --git a/src/Disp/Tooltips/Tooltip.js b/src/Disp/Tooltips/Tooltip.js index 577912c5..29f48836 100644 --- a/src/Disp/Tooltips/Tooltip.js +++ b/src/Disp/Tooltips/Tooltip.js @@ -1,5 +1,5 @@ import UpdateTooltips from './UpdateTooltips'; -import { SimpleTooltipElements, TooltipName, TooltipType } from '../VariablesAndData'; +import { SimpleTooltipElements, TooltipName, TooltipType } from '../VariablesAndData'; // eslint-disable-line no-unused-vars import { CMOptions } from '../../Config/VariablesAndData'; import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding'; import GetTimeColour from '../BeautifyAndFormatting/GetTimeColour'; @@ -122,8 +122,8 @@ export function CreateTooltip(type, name) { } // Sets global variables used by CM.Disp.UpdateTooltip() - TooltipType = type; // eslint-disable-line no-unused-vars - TooltipName = name; // eslint-disable-line no-unused-vars + TooltipType = type; + TooltipName = name; UpdateTooltips(); diff --git a/src/InitSaveLoad/init.js b/src/InitSaveLoad/init.js index a743350e..e7f14b84 100644 --- a/src/InitSaveLoad/init.js +++ b/src/InitSaveLoad/init.js @@ -3,7 +3,7 @@ import CMDrawHook from '../Disp/DrawHook'; import CMClickHook from '../Main/ClickHook'; import InitializeCookieMonster from '../Main/Initialization'; import CMLoopHook from '../Main/LoopHook'; -import { isInitializing } from './Variables'; +import { isInitializing } from './Variables'; // eslint-disable-line no-unused-vars /** * This creates a init function for the CM object. Per Game code/comments: @@ -26,6 +26,6 @@ export default function init() { Game.registerHook('draw', CMDrawHook); Game.registerHook('logic', CMLoopHook); - isInitializing = false; // eslint-disable-line no-unused-vars + isInitializing = false; } } diff --git a/src/InitSaveLoad/load.js b/src/InitSaveLoad/load.js index bc53f542..ebfcebba 100644 --- a/src/InitSaveLoad/load.js +++ b/src/InitSaveLoad/load.js @@ -1,6 +1,6 @@ import { LoadConfig } from '../Config/SaveLoadReload/SaveLoadReloadSettings'; import { VersionMajor, VersionMinor } from '../Data/Moddata.ts'; -import { FavouriteSettings } from '../Disp/VariablesAndData'; +import { FavouriteSettings } from '../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars import InitData from '../Sim/InitializeData/InitData'; /** @@ -11,7 +11,7 @@ export default function load(str) { const save = JSON.parse(str); InitData(); // The if-statement is a failsafe for old saves - if (typeof save.favouriteSettings !== 'undefined') FavouriteSettings = save.favouriteSettings; // eslint-disable-line no-unused-vars + if (typeof save.favouriteSettings !== 'undefined') FavouriteSettings = save.favouriteSettings; LoadConfig(save.settings); if (save.version !== `${VersionMajor}.${VersionMinor}`) { if (Game.prefs.popups) diff --git a/src/Main/CheckStates/GoldenCookie.js b/src/Main/CheckStates/GoldenCookie.js index 2773ccfc..6eeb5915 100644 --- a/src/Main/CheckStates/GoldenCookie.js +++ b/src/Main/CheckStates/GoldenCookie.js @@ -1,4 +1,4 @@ -import { CacheSpawnedGoldenShimmer, CacheGoldenShimmersByID } from '../../Cache/VariablesAndData'; +import { CacheSpawnedGoldenShimmer, CacheGoldenShimmersByID } from '../../Cache/VariablesAndData'; // eslint-disable-line no-unused-vars import { CMOptions } from '../../Config/VariablesAndData'; import CreateGCTimer from '../../Disp/GoldenCookieTimers/GoldenCookieTimers'; import Flash from '../../Disp/Notifications/Flash'; @@ -62,7 +62,7 @@ export default function CheckGoldenCookie() { } UpdateFavicon(); LastSpawnedGoldenCookieState = CurrSpawnedGoldenCookieState; - if (CurrSpawnedGoldenCookieState === 0) CacheSpawnedGoldenShimmer = 0; // eslint-disable-line no-unused-vars + if (CurrSpawnedGoldenCookieState === 0) CacheSpawnedGoldenShimmer = 0; } else if (CMOptions.GCTimer === 1 && LastGoldenCookieState) { Object.keys(GCTimers).forEach((i) => { GCTimers[i].style.opacity = CacheGoldenShimmersByID[i].l.style.opacity; diff --git a/src/Main/CheckStates/Season.js b/src/Main/CheckStates/Season.js index b521dd2c..12751c33 100644 --- a/src/Main/CheckStates/Season.js +++ b/src/Main/CheckStates/Season.js @@ -1,4 +1,4 @@ -import { CacheSeasonPopShimmer } from '../../Cache/VariablesAndData'; +import { CacheSeasonPopShimmer } from '../../Cache/VariablesAndData'; // eslint-disable-line no-unused-vars import { CMOptions } from '../../Config/VariablesAndData'; import Flash from '../../Disp/Notifications/Flash'; import CreateNotification from '../../Disp/Notifications/Notification'; @@ -14,7 +14,7 @@ export default function CheckSeasonPopup() { LastSeasonPopupState = Game.shimmerTypes.reindeer.spawned; Object.keys(Game.shimmers).forEach((i) => { if (Game.shimmers[i].spawnLead && Game.shimmers[i].type === 'reindeer') { - CacheSeasonPopShimmer = Game.shimmers[i]; // eslint-disable-line no-unused-vars + CacheSeasonPopShimmer = Game.shimmers[i]; } }); Flash(3, 'SeaFlash', false); diff --git a/src/Main/Initialization.js b/src/Main/Initialization.js index 05f7435c..4ba08fdb 100644 --- a/src/Main/Initialization.js +++ b/src/Main/Initialization.js @@ -12,12 +12,12 @@ import UpdateBuildingUpgradeStyle from '../Disp/Initialization/UpdateBuildingUpg import CreateFlashScreen from '../Disp/Initialization/FlashScreen'; import { CreateFavicon } from '../Disp/TabTitle/FavIcon'; import { CreateSimpleTooltip } from '../Disp/Tooltips/Tooltip'; -import { CMLastAscendState, TooltipText } from '../Disp/VariablesAndData'; +import { CMLastAscendState, TooltipText } from '../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars import InitData from '../Sim/InitializeData/InitData'; import ReplaceNativeGrimoire from './ReplaceGameElements/NativeGrimoire'; import ReplaceTooltips from './ReplaceGameElements/Tooltips'; import ReplaceNative from './ReplaceGameFunctions/ReplaceNative'; -import { LastModCount } from './VariablesAndData'; +import { LastModCount } from './VariablesAndData'; // eslint-disable-line no-unused-vars import AddWrinklerAreaDetect from './WrinklerArea/AddDetectArea'; /** @@ -29,7 +29,7 @@ export default function InitializeCookieMonster() { InitCache(); // Stored to check if we need to re-initiliaze data - LastModCount = Object.keys(Game.mods).length; // eslint-disable-line no-unused-vars + LastModCount = Object.keys(Game.mods).length; // Creating visual elements CreateCssArea(); @@ -54,7 +54,7 @@ export default function InitializeCookieMonster() { Game.CalculateGains(); LoadConfig(); - CMLastAscendState = Game.OnAscend; // eslint-disable-line no-unused-vars + CMLastAscendState = Game.OnAscend; if (Game.prefs.popups) Game.Popup(`Cookie Monster version ${VersionMajor}.${VersionMinor} loaded!`); diff --git a/src/Main/ReplaceGameElements/NativeGrimoire.js b/src/Main/ReplaceGameElements/NativeGrimoire.js index b30f7e88..ca583763 100644 --- a/src/Main/ReplaceGameElements/NativeGrimoire.js +++ b/src/Main/ReplaceGameElements/NativeGrimoire.js @@ -3,7 +3,7 @@ import FormatTime from '../../Disp/BeautifyAndFormatting/FormatTime'; import CalculateGrimoireRefillTime from '../../Disp/HelperFunctions/CalculateGrimoireRefillTime'; import { BackupGrimoireDraw, - BackupGrimoireLaunch, + BackupGrimoireLaunch, // eslint-disable-line no-unused-vars BackupGrimoireLaunchMod, HasReplaceNativeGrimoireDraw, HasReplaceNativeGrimoireLaunch, @@ -35,7 +35,7 @@ function ReplaceNativeGrimoireDraw() { function ReplaceNativeGrimoireLaunch() { if (!HasReplaceNativeGrimoireLaunch && Game.Objects['Wizard tower'].minigameLoaded) { const { minigame } = Game.Objects['Wizard tower']; - BackupGrimoireLaunch = minigame.launch; // eslint-disable-line no-unused-vars + BackupGrimoireLaunch = minigame.launch; BackupGrimoireLaunchMod = new Function( // eslint-disable-line no-new-func `return ${minigame.launch .toString() diff --git a/src/Main/ReplaceGameElements/Tooltips.js b/src/Main/ReplaceGameElements/Tooltips.js index 09952fd4..d35e6616 100644 --- a/src/Main/ReplaceGameElements/Tooltips.js +++ b/src/Main/ReplaceGameElements/Tooltips.js @@ -1,7 +1,7 @@ /** Functions related to replacing tooltips */ import { CreateTooltip } from '../../Disp/Tooltips/Tooltip'; -import { LoadMinigames, TooltipBuildBackup, TooltipLumpBackup } from '../VariablesAndData'; +import { LoadMinigames, TooltipBuildBackup, TooltipLumpBackup } from '../VariablesAndData'; // eslint-disable-line no-unused-vars import ReplaceNativeGrimoire from './NativeGrimoire'; import ReplaceTooltipGrimoire from './TooltipGrimoire'; @@ -27,7 +27,7 @@ function ReplaceTooltipBuild() { */ function ReplaceTooltipLump() { if (Game.canLumps()) { - TooltipLumpBackup = l('lumps').onmouseover; // eslint-disable-line no-unused-vars + TooltipLumpBackup = l('lumps').onmouseover; l('lumps').onmouseover = function () { Game.tooltip.dynamic = 1; Game.tooltip.draw(this, () => CreateTooltip('s', 'Lump'), 'this'); diff --git a/src/Main/ReplaceGameFunctions/ReplaceNative.js b/src/Main/ReplaceGameFunctions/ReplaceNative.js index d28ecb1d..2285121d 100644 --- a/src/Main/ReplaceGameFunctions/ReplaceNative.js +++ b/src/Main/ReplaceGameFunctions/ReplaceNative.js @@ -7,13 +7,13 @@ import AddMenu from '../../Disp/MenuSections/AddMenus'; import UpdateTitle from '../../Disp/TabTitle/TabTitle'; import ReplaceAscendTooltip from '../../Disp/Tooltips/AscendButton'; import UpdateTooltipLocation from '../../Disp/Tooltips/PositionLocation'; -import { CMSayTime, Title } from '../../Disp/VariablesAndData'; -import { SimDoSims } from '../../Sim/VariablesAndData'; +import { CMSayTime, Title } from '../../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars +import { SimDoSims } from '../../Sim/VariablesAndData'; // eslint-disable-line no-unused-vars import ReplaceTooltipUpgrade from '../ReplaceGameElements/TooltipUpgrades'; import { BackupFunctions, - CenturyDateAtBeginLoop, - CycliusDateAtBeginLoop, + CenturyDateAtBeginLoop, // eslint-disable-line no-unused-vars + CycliusDateAtBeginLoop, // eslint-disable-line no-unused-vars } from '../VariablesAndData'; import FixMouseY from './FixMouse'; @@ -29,9 +29,9 @@ export default function ReplaceNative() { BackupFunctions.CalculateGains = Game.CalculateGains; Game.CalculateGains = function () { BackupFunctions.CalculateGains(); - SimDoSims = 1; // eslint-disable-line no-unused-vars - CycliusDateAtBeginLoop = Date.now(); // eslint-disable-line no-unused-vars - CenturyDateAtBeginLoop = Date.now(); // eslint-disable-line no-unused-vars + SimDoSims = 1; + CycliusDateAtBeginLoop = Date.now(); + CenturyDateAtBeginLoop = Date.now(); }; BackupFunctions.tooltip = {}; diff --git a/src/Main/WrinklerArea/AddDetectArea.js b/src/Main/WrinklerArea/AddDetectArea.js index fdf55202..7b50b753 100644 --- a/src/Main/WrinklerArea/AddDetectArea.js +++ b/src/Main/WrinklerArea/AddDetectArea.js @@ -1,4 +1,4 @@ -import { TooltipWrinklerArea, TooltipWrinklerBeingShown } from '../../Disp/VariablesAndData'; +import { TooltipWrinklerArea, TooltipWrinklerBeingShown } from '../../Disp/VariablesAndData'; // eslint-disable-line no-unused-vars /** * This function creates .onmouseover/out events that determine if the mouse is hovering-over a Wrinkler @@ -9,7 +9,7 @@ export default function AddWrinklerAreaDetect() { TooltipWrinklerArea = 1; }; l('backgroundLeftCanvas').onmouseout = function () { - TooltipWrinklerArea = 0; // eslint-disable-line no-unused-vars + TooltipWrinklerArea = 0; Game.tooltip.hide(); Object.keys(Game.wrinklers).forEach((i) => { TooltipWrinklerBeingShown[i] = 0; diff --git a/src/Sim/Calculations/CalculateGains.js b/src/Sim/Calculations/CalculateGains.js index 9d46954c..c793ee5d 100644 --- a/src/Sim/Calculations/CalculateGains.js +++ b/src/Sim/Calculations/CalculateGains.js @@ -10,8 +10,8 @@ import SimWin from '../SimulationData/SimWin'; import { SimAchievementsOwned, SimCookiesPs, - SimCookiesPsRaw, - SimEffs, + SimCookiesPsRaw, // eslint-disable-line no-unused-vars + SimEffs, // eslint-disable-line no-unused-vars SimHeavenlyPower, SimObjects, SimPrestige, @@ -38,7 +38,7 @@ export default function CalculateGains() { }); } }); - SimEffs = effs; // eslint-disable-line no-unused-vars + SimEffs = effs; if (Game.ascensionMode !== 1) mult += parseFloat(SimPrestige) * 0.01 * SimHeavenlyPower * SimGetHeavenlyMultiplier(); @@ -189,7 +189,7 @@ export default function CalculateGains() { if (rawCookiesPs >= Game.CpsAchievements[i].threshold) SimWin(Game.CpsAchievements[i].name); }); - SimCookiesPsRaw = rawCookiesPs; // eslint-disable-line no-unused-vars + SimCookiesPsRaw = rawCookiesPs; const { n } = Game.shimmerTypes.golden; const auraMult = SimAuraMult("Dragon's Fortune"); diff --git a/src/Sim/SimulationData/CopyData.js b/src/Sim/SimulationData/CopyData.js index 3d6cdc64..3545c32d 100644 --- a/src/Sim/SimulationData/CopyData.js +++ b/src/Sim/SimulationData/CopyData.js @@ -6,18 +6,18 @@ import InitialBuildingData from '../InitializeData/InitialBuildingData'; import InitUpgrade from '../InitializeData/InitUpgrade'; import { SimAchievements, - SimAchievementsOwned, - SimDragonAura, - SimDragonAura2, - SimGod1, - SimGod2, - SimGod3, - SimHeavenlyPower, + SimAchievementsOwned, // eslint-disable-line no-unused-vars + SimDragonAura, // eslint-disable-line no-unused-vars + SimDragonAura2, // eslint-disable-line no-unused-vars + SimGod1, // eslint-disable-line no-unused-vars + SimGod2, // eslint-disable-line no-unused-vars + SimGod3, // eslint-disable-line no-unused-vars + SimHeavenlyPower, // eslint-disable-line no-unused-vars SimObjects, - SimPledges, - SimPrestige, + SimPledges, // eslint-disable-line no-unused-vars + SimPrestige, // eslint-disable-line no-unused-vars SimUpgrades, - SimUpgradesOwned, + SimUpgradesOwned, // eslint-disable-line no-unused-vars } from '../VariablesAndData'; /** @@ -26,11 +26,11 @@ import { */ export default function CopyData() { // Other variables - SimUpgradesOwned = Game.UpgradesOwned; // eslint-disable-line no-unused-vars - SimPledges = Game.pledges; // eslint-disable-line no-unused-vars - SimAchievementsOwned = Game.AchievementsOwned; // eslint-disable-line no-unused-vars - SimHeavenlyPower = Game.heavenlyPower; // eslint-disable-line no-unused-vars - SimPrestige = Game.prestige; // eslint-disable-line no-unused-vars + SimUpgradesOwned = Game.UpgradesOwned; + SimPledges = Game.pledges; + SimAchievementsOwned = Game.AchievementsOwned; + SimHeavenlyPower = Game.heavenlyPower; + SimPrestige = Game.prestige; // Buildings Object.keys(Game.Objects).forEach((i) => { @@ -49,9 +49,9 @@ export default function CopyData() { you.free = me.free; if (me.minigameLoaded) { if (me.name === 'Temple') { - SimGod1 = me.minigame.slot[0]; // eslint-disable-line no-unused-vars - SimGod2 = me.minigame.slot[1]; // eslint-disable-line no-unused-vars - SimGod3 = me.minigame.slot[2]; // eslint-disable-line no-unused-vars + SimGod1 = me.minigame.slot[0]; + SimGod2 = me.minigame.slot[1]; + SimGod3 = me.minigame.slot[2]; } you.minigameLoaded = me.minigameLoaded; you.minigame = me.minigame; @@ -85,6 +85,6 @@ export default function CopyData() { // Auras CacheDragonAuras(); - SimDragonAura = CacheDragonAura; // eslint-disable-line no-unused-vars - SimDragonAura2 = CacheDragonAura2; // eslint-disable-line no-unused-vars + SimDragonAura = CacheDragonAura; + SimDragonAura2 = CacheDragonAura2; } diff --git a/src/Sim/SimulationData/SimWin.js b/src/Sim/SimulationData/SimWin.js index 58a3d1ef..c2fc90ab 100644 --- a/src/Sim/SimulationData/SimWin.js +++ b/src/Sim/SimulationData/SimWin.js @@ -1,4 +1,4 @@ -import { SimAchievements, SimAchievementsOwned } from '../VariablesAndData'; +import { SimAchievements, SimAchievementsOwned } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This function "wins" an achievement in the current sim data @@ -10,7 +10,7 @@ export default function SimWin(what) { if (SimAchievements[what]) { if (SimAchievements[what].won === 0) { SimAchievements[what].won = 1; - if (Game.Achievements[what].pool !== 'shadow') SimAchievementsOwned += 1; // eslint-disable-line no-unused-vars + if (Game.Achievements[what].pool !== 'shadow') SimAchievementsOwned += 1; } } } diff --git a/src/Sim/SimulationEvents/AuraChange.js b/src/Sim/SimulationEvents/AuraChange.js index 6564aad8..5127639f 100644 --- a/src/Sim/SimulationEvents/AuraChange.js +++ b/src/Sim/SimulationEvents/AuraChange.js @@ -4,7 +4,7 @@ import CheckOtherAchiev from '../Calculations/CheckOtherAchiev'; import CopyData from '../SimulationData/CopyData'; import { SimAchievementsOwned, - SimBuildingsOwned, + SimBuildingsOwned, // eslint-disable-line no-unused-vars SimCookiesPs, SimDragonAura, SimDragonAura2, @@ -32,7 +32,7 @@ export default function CalculateChangeAura(aura) { if (Game.ObjectsById[i].amount > 0) { const highestBuilding = SimObjects[Game.ObjectsById[i].name].name; SimObjects[highestBuilding].amount -= 1; - SimBuildingsOwned -= 1; // eslint-disable-line no-unused-vars + SimBuildingsOwned -= 1; price = SimObjects[highestBuilding].basePrice * Game.priceIncrease ** diff --git a/src/Sim/SimulationEvents/BuyUpgrades.js b/src/Sim/SimulationEvents/BuyUpgrades.js index 23fee710..f0742121 100644 --- a/src/Sim/SimulationEvents/BuyUpgrades.js +++ b/src/Sim/SimulationEvents/BuyUpgrades.js @@ -12,7 +12,7 @@ import { SimObjects, SimPledges, SimUpgrades, - SimUpgradesOwned, + SimUpgradesOwned, // eslint-disable-line no-unused-vars } from '../VariablesAndData'; /** @@ -122,7 +122,7 @@ export default function BuyUpgradesBonusIncome(upgrade) { } else { SimUpgrades[upgrade].bought = (SimUpgrades[upgrade].bought + 1) % 2; } - if (Game.CountsAsUpgradeOwned(Game.Upgrades[upgrade].pool)) SimUpgradesOwned += 1; // eslint-disable-line no-unused-vars + if (Game.CountsAsUpgradeOwned(Game.Upgrades[upgrade].pool)) SimUpgradesOwned += 1; if (upgrade === 'Elder Pledge') { SimPledges += 1; diff --git a/src/Sim/SimulationEvents/GodChange.js b/src/Sim/SimulationEvents/GodChange.js index 86198aca..012990bb 100644 --- a/src/Sim/SimulationEvents/GodChange.js +++ b/src/Sim/SimulationEvents/GodChange.js @@ -1,7 +1,7 @@ import CalculateGains from '../Calculations/CalculateGains'; import CheckOtherAchiev from '../Calculations/CheckOtherAchiev'; import CopyData from '../SimulationData/CopyData'; -import { SimAchievementsOwned, SimCookiesPs, SimGod1, SimGod2, SimGod3 } from '../VariablesAndData'; +import { SimAchievementsOwned, SimCookiesPs, SimGod1, SimGod2, SimGod3 } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This functions calculates the cps and cost of changing a Dragon Aura diff --git a/src/Sim/SimulationEvents/ResetAscension.js b/src/Sim/SimulationEvents/ResetAscension.js index 5b3bcec5..fc785d43 100644 --- a/src/Sim/SimulationEvents/ResetAscension.js +++ b/src/Sim/SimulationEvents/ResetAscension.js @@ -3,7 +3,7 @@ import CalculateGains from '../Calculations/CalculateGains'; import CheckOtherAchiev from '../Calculations/CheckOtherAchiev'; import CopyData from '../SimulationData/CopyData'; import SimWin from '../SimulationData/SimWin'; -import { SimAchievementsOwned, SimCookiesPs, SimPrestige, SimUpgrades } from '../VariablesAndData'; +import { SimAchievementsOwned, SimCookiesPs, SimPrestige, SimUpgrades } from '../VariablesAndData'; // eslint-disable-line no-unused-vars /** * This function calculates the cookies per click difference betwene current and after a ascension @@ -76,7 +76,7 @@ export default function ResetBonus(newHeavenlyChips) { const ResetCPS = SimCookiesPs - curCPS; // Reset Pretige level after calculation as it is used in CM.Sim.CalculateGains() so can't be local - SimPrestige = Game.prestige; // eslint-disable-line no-unused-vars + SimPrestige = Game.prestige; return ResetCPS; } diff --git a/src/Sim/SimulationEvents/SellBuildingForChoEgg.js b/src/Sim/SimulationEvents/SellBuildingForChoEgg.js index 1bbfedb3..911b1c34 100644 --- a/src/Sim/SimulationEvents/SellBuildingForChoEgg.js +++ b/src/Sim/SimulationEvents/SellBuildingForChoEgg.js @@ -1,5 +1,5 @@ import CopyData from '../SimulationData/CopyData'; -import { SimBuildingsOwned, SimDragonAura, SimDragonAura2, SimObjects } from '../VariablesAndData'; +import { SimBuildingsOwned, SimDragonAura, SimDragonAura2, SimObjects } from '../VariablesAndData'; // eslint-disable-line no-unused-vars import BuildingSell from './SellBuilding'; /** @@ -32,7 +32,7 @@ export default function SellBuildingsForChoEgg() { } }); SimObjects[highestBuilding].amount -= 1; - SimBuildingsOwned -= 1; // eslint-disable-line no-unused-vars + SimBuildingsOwned -= 1; } // Get money made by selling all remaining buildings From 48c1d12d86ba05f8875ab89bad7ffd623af4836c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Thu, 6 May 2021 19:41:32 +0200 Subject: [PATCH 06/69] Update to new repo location --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fdc6d60e..e5fa4738 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/Aktanusa/CookieMonster.git" + "url": "git+https://github.com/CookieMonsterTeam/CookieMonster" }, "license": "MIT", "author": { @@ -39,9 +39,9 @@ } ], "bugs": { - "url": "https://github.com/Aktanusa/CookieMonster/issues" + "url": "https://github.com/CookieMonsterTeam/CookieMonster/issues" }, - "homepage": "https://github.com/Aktanusa/CookieMonster#readme", + "homepage": "https://github.com/CookieMonsterTeam/CookieMonster#readme", "devDependencies": { "@types/chai": "^4.2.17", "@types/mocha": "^8.2.2", From e44e39bc2cea4bc6be8e688611137e1f46b089da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Thu, 6 May 2021 20:17:32 +0200 Subject: [PATCH 07/69] Stop making report minified --- .mocharc.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.mocharc.json b/.mocharc.json index 91cead16..6f60b0d7 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,5 +1,4 @@ { "recursive": true, - "require": ["esm", "ts-node/register"], - "reporter": "min" + "require": ["esm", "ts-node/register"] } From cc2a754425316e3397500f663be01d69ba40324c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Thu, 6 May 2021 20:19:09 +0200 Subject: [PATCH 08/69] Run tests before build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5fa4738..2d290875 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ ], "scripts": { "eslint-src": "eslint src test", - "build": "run-s eslint-src pack-prod test", + "build": "run-s eslint-src test pack-prod", "build-test": "run-s pack-dev", "pack-prod": "webpack --env production", "pack-dev": "webpack", From 5a045e7ac493762cba37e5eaab8276978c1f8402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Thu, 6 May 2021 20:27:17 +0200 Subject: [PATCH 09/69] Expose building and upgrade data to global scope --- README.md | 13 +++++++++++-- dist/CookieMonsterDev.js | 2 +- dist/CookieMonsterDev.js.map | 2 +- src/Cache/PP/PP.js | 8 ++++++++ src/Main/Initialization.js | 3 +++ 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9f98c08b..cbc1d5dd 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ max(cost - cookies in bank, 0)/cps + cost/Δ cps If the relevant option is enabled, CM will color-code each of them based on their value. CM compares the PP across all possible buy options: if a buy 10 option is better than any of the buy 1 options Cookie Monster will colour them accordingly. Note that sometimes it is better to buy 10 of a building than to buy only 1, CM will also indicate this! -The following standard colours are used: - +
+ The following standard colours are used: + * Light Blue: (upgrades) This item has a better PP than the best building to buy * Green: This building has the best PP * Yellow: This building is within the top 10 of best PP's @@ -29,6 +30,8 @@ The following standard colours are used: * Purple: This building is worse than the top 10 of best PP's * Gray: This item does not have a PP, often this means that there is no change to CPS +
+ Note: For this index, **lower is better**, meaning a building with a PP of 1 is more interesting than one with a PP of 3. ## Using @@ -59,6 +62,12 @@ Before submitting a bug, make sure to give a shot at the latest version of the a All suggestions are welcome, even the smallest ones. +## For developers + +Cookie Monster exposes some of the data it creates to the global scope. This data can be found in the `CookieMonsterData` object after loading Cookie Monster. + +Currently we exposes relevant data for buildings and upgrades (PP, colour and bonus income). If you would like us to add any aditional data, please feel free to open an issue or create a PR doing so! + ## Contributing To contribute you can fork and clone the repository and run `npm install`. diff --git a/dist/CookieMonsterDev.js b/dist/CookieMonsterDev.js index b6d10d81..345fd2c1 100644 --- a/dist/CookieMonsterDev.js +++ b/dist/CookieMonsterDev.js @@ -1,3 +1,3 @@ /*! For license information please see CookieMonsterDev.js.LICENSE.txt */ -(()=>{var e={877:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,n,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r-1},isButtonEmpty:function(e){switch(i.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(n=e.document.createElement("input"),!(!n.setAttribute||(n.setAttribute("type","color"),"color"!=n.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t=3&&(n=l[0].match(s))&&(i=l[1].match(s))&&(a=l[2].match(s)))return o.format="rgb",o.rgba=[parseFloat(n[1])||0,parseFloat(i[1])||0,parseFloat(a[1])||0,null],l.length>=4&&(r=l[3].match(s))&&(o.format="rgba",o.rgba[3]=parseFloat(r[1])||0),o}return!1},parsePaletteValue:function(e){var t=[];"string"==typeof e?e.replace(/#[0-9A-F]{3}([0-9A-F]{3})?|rgba?\(([^)]*)\)/gi,(function(e){t.push(e)})):Array.isArray(e)&&(t=e);for(var o=[],n=0;ns[n]&&-t[n]+e[n]+l[n]/2>s[n]/2&&e[n]+l[n]-d[n]>=0?e[n]+l[n]-d[n]:e[n],-t[a]+e[a]+l[a]+d[a]-p+p*r>s[a]?-t[a]+e[a]+l[a]/2>s[a]/2&&e[a]+l[a]-p-p*r>=0?e[a]+l[a]-p-p*r:e[a]+l[a]-p+p*r:e[a]+l[a]-p+p*r>=0?e[a]+l[a]-p+p*r:e[a]+l[a]-p-p*r];else var u=[e[n],e[a]+l[a]-p+p*r];var m=u[n],h=u[a],g=o.fixed?"fixed":"absolute",f=(u[0]+d[0]>e[0]||u[0]0?Math.ceil(l/o):0,i=Math.max(1,Math.floor((t-(o-1)*e.paletteSpacing)/o)),a=e.paletteHeight?Math.min(e.paletteHeight,i):i),n&&(r=n*a+(n-1)*e.paletteSpacing),{cols:o,rows:n,cellW:i,cellH:a,width:t,height:r}},getControlPadding:function(e){return Math.max(e.padding/2,2*e.pointerBorderWidth+e.pointerThickness-e.controlBorderWidth)},getPadYChannel:function(e){switch(e.mode.charAt(1).toLowerCase()){case"v":return"v"}return"s"},getSliderChannel:function(e){if(e.mode.length>2)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},triggerCallback:function(e,t){if(e[t]){var o=null;if("string"==typeof e[t])try{o=new Function(e[t])}catch(e){console.error(e)}else o=e[t];o&&o.call(e)}},triggerGlobal:function(e){for(var t=i.getInstances(),o=0;o0)for(var c=0;c=2&&"string"==typeof arguments[0]){try{if(!a(arguments[0],arguments[1]))return!1}catch(e){return console.warn(e),!1}return this.redraw(),this.exposeColor(),!0}if(1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0],t=!0;for(var o in e)if(e.hasOwnProperty(o))try{a(o,e[o])||(t=!1)}catch(e){console.warn(e),t=!1}return this.redraw(),this.exposeColor(),t}throw new Error("Invalid arguments")},this.channel=function(e,t){if("string"!=typeof e)throw new Error("Invalid value for channel name: "+e);if(void 0===t)return this.channels.hasOwnProperty(e.toLowerCase())?this.channels[e.toLowerCase()]:(console.warn("Getting unknown channel: "+e),!1);var o=!1;switch(e.toLowerCase()){case"r":o=this.fromRGBA(t,null,null,null);break;case"g":o=this.fromRGBA(null,t,null,null);break;case"b":o=this.fromRGBA(null,null,t,null);break;case"h":o=this.fromHSVA(t,null,null,null);break;case"s":o=this.fromHSVA(null,t,null,null);break;case"v":o=this.fromHSVA(null,null,t,null);break;case"a":o=this.fromHSVA(null,null,null,t);break;default:return console.warn("Setting unknown channel: "+e),!1}return!!o&&(this.redraw(),!0)},this.trigger=function(e){for(var t=i.strList(e),o=0;o127.5},this.hide=function(){p()&&(i.removeClass(n.targetElement,i.pub.activeClassName),i.picker.wrap.parentNode.removeChild(i.picker.wrap),delete i.picker.owner)},this.show=function(){l()},this.redraw=function(){p()&&l()},this.getFormat=function(){return this._currentFormat},this._setFormat=function(e){this._currentFormat=e.toLowerCase()},this.hasAlphaChannel=function(){return"auto"===this.alphaChannel?"any"===this.format.toLowerCase()||i.isAlphaFormat(this.getFormat())||void 0!==this.alpha||void 0!==this.alphaElement:this.alphaChannel},this.processValueInput=function(e){this.fromString(e)||this.exposeColor()},this.processAlphaInput=function(e){this.fromHSVA(null,null,null,parseFloat(e))||this.exposeColor()},this.exposeColor=function(e){var t=this.toString(),o=this.getFormat();if(i.setDataAttr(this.targetElement,"current-color",t),e&i.flags.leaveValue||!this.valueElement||("hex"!==o&&"hexa"!==o||(this.uppercase||(t=t.toLowerCase()),this.hash||(t=t.replace(/^#/,""))),this.setValueElementValue(t)),!(e&i.flags.leaveAlpha)&&this.alphaElement){var n=Math.round(100*this.channels.a)/100;this.setAlphaElementValue(n)}e&i.flags.leavePreview||!this.previewElement||((i.isTextInput(this.previewElement)||i.isButton(this.previewElement)&&!i.isButtonEmpty(this.previewElement))&&this.previewPosition,this.setPreviewElementBg(this.toRGBAString())),p()&&(s(),c(),d())},this.setPreviewElementBg=function(e){if(this.previewElement){var t=null,o=null;(i.isTextInput(this.previewElement)||i.isButton(this.previewElement)&&!i.isButtonEmpty(this.previewElement))&&(t=this.previewPosition,o=this.previewSize);var n=[];if(e){n.push({image:i.genColorPreviewGradient(e,t,o?o-i.pub.previewSeparator.length:null),position:"left top",size:"auto",repeat:t?"repeat-y":"repeat",origin:"padding-box"});var a=i.genColorPreviewCanvas("rgba(0,0,0,0)",t?{left:"right",right:"left"}[t]:null,o,!0);n.push({image:"url('"+a.canvas.toDataURL()+"')",position:(t||"left")+" top",size:a.width+"px "+a.height+"px",repeat:t?"repeat-y":"repeat",origin:"padding-box"})}else n.push({image:"none",position:"left top",size:"auto",repeat:"no-repeat",origin:"padding-box"});for(var r={image:[],position:[],size:[],repeat:[],origin:[]},l=0;l=0;h-=1){var g=m[h];if(g)if(i.pub.presets.hasOwnProperty(g)){for(var u in i.pub.presets[g])if(i.pub.presets[g].hasOwnProperty(u))try{a(u,i.pub.presets[g][u])}catch(e){console.warn(e)}}else console.warn("Unknown preset: %s",g)}var f=["preset"];for(var u in o)if(o.hasOwnProperty(u)&&-1===f.indexOf(u))try{a(u,o[u])}catch(e){console.warn(e)}if(void 0===this.container?this.container=e.document.body:this.container=i.node(this.container),!this.container)throw new Error("Cannot instantiate color picker without a container element");if(this.targetElement=i.node(t),!this.targetElement){if("string"==typeof t&&/^[a-zA-Z][\w:.-]*$/.test(t))throw new Error("If '"+t+"' is supposed to be an ID, please use '#"+t+"' or any valid CSS selector.");throw new Error("Cannot instantiate color picker without a target element")}if(this.targetElement.jscolor&&this.targetElement.jscolor instanceof i.pub)throw new Error("Color picker already installed on this element");if(this.targetElement.jscolor=this,i.addClass(this.targetElement,i.pub.className),i.instances.push(this),i.isButton(this.targetElement)&&("button"!==this.targetElement.type.toLowerCase()&&(this.targetElement.type="button"),i.isButtonEmpty(this.targetElement))){i.removeChildren(this.targetElement),this.targetElement.appendChild(e.document.createTextNode(" "));var C=i.getCompStyle(this.targetElement);(parseFloat(C["min-width"])||0)-1){var G=i.parseColorString(b);this._currentFormat=G?G.format:"hex"}else this._currentFormat=this.format.toLowerCase();this.processValueInput(b),void 0!==k&&this.processAlphaInput(k)}}).pub.className="jscolor",i.pub.activeClassName="jscolor-active",i.pub.looseJSON=!0,i.pub.presets={},i.pub.presets.default={},i.pub.presets.light={backgroundColor:"rgba(255,255,255,1)",controlBorderColor:"rgba(187,187,187,1)",buttonColor:"rgba(0,0,0,1)"},i.pub.presets.dark={backgroundColor:"rgba(51,51,51,1)",controlBorderColor:"rgba(153,153,153,1)",buttonColor:"rgba(240,240,240,1)"},i.pub.presets.small={width:101,height:101,padding:10,sliderSize:14,paletteCols:8},i.pub.presets.medium={width:181,height:101,padding:12,sliderSize:16,paletteCols:10},i.pub.presets.large={width:271,height:151,padding:12,sliderSize:24,paletteCols:15},i.pub.presets.thin={borderWidth:1,controlBorderWidth:1,pointerBorderWidth:1},i.pub.presets.thick={borderWidth:2,controlBorderWidth:2,pointerBorderWidth:2},i.pub.sliderInnerSpace=3,i.pub.chessboardSize=8,i.pub.chessboardColor1="#666666",i.pub.chessboardColor2="#999999",i.pub.previewSeparator=["rgba(255,255,255,.65)","rgba(128,128,128,.65)"],i.pub.init=function(){if(!i.initialized)for(e.document.addEventListener("mousedown",i.onDocumentMouseDown,!1),e.document.addEventListener("keyup",i.onDocumentKeyUp,!1),e.addEventListener("resize",i.onWindowResize,!1),e.addEventListener("scroll",i.onWindowScroll,!1),i.pub.install(),i.initialized=!0;i.readyQueue.length;)i.readyQueue.shift()()},i.pub.install=function(e){var t=!0;try{i.installBySelector("[data-jscolor]",e)}catch(e){t=!1,console.warn(e)}if(i.pub.lookupClass)try{i.installBySelector("input."+i.pub.lookupClass+", button."+i.pub.lookupClass,e)}catch(e){}return t},i.pub.ready=function(e){return"function"!=typeof e?(console.warn("Passed value is not a function"),!1):(i.initialized?e():i.readyQueue.push(e),!0)},i.pub.trigger=function(e){var t=function(){i.triggerGlobal(e)};i.initialized?t():i.pub.ready(t)},i.pub.hide=function(){i.picker&&i.picker.owner&&i.picker.owner.hide()},i.pub.chessboard=function(e){return e||(e="rgba(0,0,0,0)"),i.genColorPreviewCanvas(e).canvas.toDataURL()},i.pub.background=function(e){var t=[];t.push(i.genColorPreviewGradient(e));var o=i.genColorPreviewCanvas();return t.push(["url('"+o.canvas.toDataURL()+"')","left top","repeat"].join(" ")),t.join(", ")},i.pub.options={},i.pub.lookupClass="jscolor",i.pub.installByClassName=function(){return console.error('jscolor.installByClassName() is DEPRECATED. Use data-jscolor="" attribute instead of a class name.'+i.docsRef),!1},i.register(),i.pub);return void 0===e.jscolor&&(e.jscolor=e.JSColor=a),a}))}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";let e={};function t(){e.WrinklerButtons&&Game.elderWrath?(l("PopAllNormalWrinklerButton").style.display="",l("PopFattestWrinklerButton").style.display=""):(l("PopAllNormalWrinklerButton").style.display="none",l("PopFattestWrinklerButton").style.display="none")}const n=["","","M","G","T","P","E","Z","Y"],i=["","","M","B","Tr","Quadr","Quint","Sext","Sept","Oct","Non","Dec","Undec","Duodec","Tredec","Quattuordec","Quindec","Sexdec","Septendec","Octodec","Novemdec","Vigint","Unvigint","Duovigint","Trevigint","Quattuorvigint"],a=["","K","M","B","T","Qa","Qi","Sx","Sp","Oc","No","De","UDe","DDe","TDe","QaDe","QiDe","SxDe","SpDe","ODe","NDe","Vi","UVi","DVi","TVi","QaVi","QiVi","SxVi","SpVi","OVi","NVi","Tr","UTr","DTr","TTr","QaTr","QiTr","SxTr","SpTr","OTr","NTr","Qaa","UQa","DQa","TQa","QaQa","QiQa","SxQa","SpQa","OQa","NQa","Qia","UQi","DQi","TQi","QaQi","QiQi","SxQi","SpQi","OQi","NQi","Sxa","USx","DSx","TSx","QaSx","QiSx","SxSx","SpSx","OSx","NSx","Spa","USp","DSp","TSp","QaSp","QiSp","SxSp","SpSp","OSp","NSp","Oco","UOc","DOc","TOc","QaOc","QiOc","SxOc","SpOc","OOc","NOc","Noa","UNo","DNo","TNo","QaNo","QiNo","SxNo","SpNo","ONo","NNo","Ct","UCt"];let r,s,c,d,p,u,m,h,g,f,C,y,b,k,G,v,w=[],x=[],M=[],T={},S=Date.now(),P=Date.now();function B(t,o,r){const l=e.ScaleDecimals+1;if(t===1/0)return"Infinity";if(void 0===t)return"0";if(0===e.Scale)return T.Beautify(t,o);if(Number.isFinite(t)){if(t<0)return`-${B(Math.abs(t))}`;let s="";if(0===t)return t.toString();if(t>.001&&t=.01&&t=.01&&t=.01&&t0&&(c+=o,s-=1)}return c}const St="CMText",Pt="CMBack",Bt="Blue",Et="Green",Nt="Yellow",Ot="Orange",Ft="Red",Lt="Purple",Wt="Gray",At="Pink",jt="Brown",Dt=[Bt,Et,Nt,Ot,Ft,Lt,At,jt,Wt],Ht=[["GoldCookTooltipPlaceholder","Calculated with Golden Switch off","200px"],["GoldCookDragonsFortuneTooltipPlaceholder","Calculated with Golden Switch off and at least one golden cookie on-screen","240px"],["PrestMaxTooltipPlaceholder","The MAX prestige is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg","320px"],["NextPrestTooltipPlaceholder","Calculated with cookies gained from wrinklers and Chocolate egg","200px"],["HeavenChipMaxTooltipPlaceholder","The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg","330px"],["ResetTooltipPlaceholder","The bonus income you would get from new prestige levels unlocked at 100% of its potential and from ascension achievements if you have the same buildings/upgrades after reset","370px"],["ChoEggTooltipPlaceholder","The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and then buying Chocolate egg","300px"],["ChainNextLevelPlaceholder","Cheated cookies might break this formula","250px"],["FavouriteSettingPlaceholder","Click to set this setting as favourite and show it in 'favourite' settings at the top of the Cookie Monster Settings","250px"]],Ut={};let $t,Rt=0,It=-1,zt=[],Vt=function(){},_t=1,Qt=1,Xt=1;const qt=[10,15,30,60,300,600,900,1800],Yt=[1,5,10,15,30],Kt={Frenzy:Nt,"Dragon Harvest":jt,"Elder frenzy":Et,Clot:Ft,"Click frenzy":Bt,Dragonflight:At};let Jt,Zt,eo,to,oo,no,io,ao={},ro="",lo=[];function so(){let t=Game.buyBulk;if(1===Game.buyMode?Qt=t:t=Qt,1===t?t=We:10===t?t=Ae:100===t&&(t=je),1===Game.buyMode?1===e.BuildColour?Object.keys(t).forEach((o=>{l(`productPrice${Game.Objects[o].id}`).style.color=e[`Colour${t[o].color}`]})):Object.keys(Game.Objects).forEach((e=>{l(`productPrice${Game.Objects[e].id}`).style.removeProperty("color")})):-1===Game.buyMode&&Object.keys(We).forEach((e=>{const t=Game.Objects[e];l(`productPrice${t.id}`).style.color="",l(`productPrice${t.id}`).innerHTML=B(Tt(t,t.basePrice,t.amount,t.free,Game.buyBulk,1))})),1===Game.buyMode&&e.SortBuildings){let o;1===e.SortBuildings?(o=Object.keys(We).map((e=>{const t=We[e];return t.name=e,t.id=Game.Objects[e].id,t})),o.sort(((e,t)=>Dt.indexOf(e.color)>Dt.indexOf(t.color)?1:Dt.indexOf(e.color){const o=t[e];return o.name=e,o.id=Game.Objects[e].id,o})),o.sort(((e,t)=>Dt.indexOf(e.color)>Dt.indexOf(t.color)?1:Dt.indexOf(e.color){const t=We[e];return t.name=e,t.id=Game.Objects[e].id,t}));e.sort(((e,t)=>e.id-t.id));for(let t=0;t{e.UpgradesNeverCollapse||"products"===t.id?t.style.height="auto":"vaultUpgrades"===t.id?(t.style.height="",t.style.minHeight="0px"):"upgrades"===t.id?(t.style.height="",t.className.includes("hasMenu")?t.style.minHeight="82px":t.style.minHeight="60px"):(t.style.height="",t.style.minHeight="60px")}))}function po(){if(e.UpBarColour>0){let e=0,t=0,o=0,n=0,i=0,a=0,r=0;Object.keys(Game.UpgradesInStore).forEach((s=>{const c=Game.UpgradesInStore[s];let d=!1;for(let e=0;eDt.indexOf(e.color)>Dt.indexOf(t.color)?1:Dt.indexOf(e.color)e.price-t.price));const o=function(e,t){return e.findIndex((e=>e.name===t.name))};for(let e=0;e315576e4)return"XX:XX:XX:XX:XX";c+=(i<10?"0":"")+i+":",c+=(a<10?"0":"")+a+":",c+=(r<10?"0":"")+r+":",c+=(l<10?"0":"")+l+":",c+=(s<10?"0":"")+s}else{if(n>7776e5)return o?"Over 9000 days!":">9000d";c+=i>0?i+(o?1===i?" year":" years":"y")+", ":"",(c.length>0||a>0)&&(c+=a+(o?1===a?" day":" days":"d")+", "),(c.length>0||r>0)&&(c+=r+(o?1===r?" hour":" hours":"h")+", "),(c.length>0||l>0)&&(c+=l+(o?1===l?" minute":" minutes":"m")+", "),c+=s+(o?1===s?" second":" seconds":"s")}return c}function mo(t){let o,n;return t<=0?(n=e.TimeFormat?"00:00:00:00:00":"Done!",o=Et):(n=uo(t),o=t>300?Ft:t>60?Ot:Nt),{text:n,color:o}}function ho(){return e.CPSMode?_:0===e.CalcWrink?Game.cookiesPs*(1-Game.cpsSucked):1===e.CalcWrink?Game.cookiesPs*(Re+(1-.05*Ie)):null!==$e[1]&&2===e.CalcWrink&&1===Game.wrinklers[$e[1]].type?Game.cookiesPs*(3*Re/Ie+(1-.05*Ie)):Game.cookiesPs*(Re/Ie+(1-.05*Ie))}function go(){return 1===e.CalcWrink?He:2===e.CalcWrink?$e[0]:0}function fo(e,t,o){const n=document.createElement("div");n.id=e,n.style.height="12px",n.style.margin="0px 10px",n.style.position="relative";const i=document.createElement("div");i.style.width="100%",i.style.height="10px",i.style.margin="auto",i.style.position="absolute",i.style.left="0px",i.style.top="0px",i.style.right="0px",i.style.bottom="0px";const a=document.createElement("span");a.style.display="inline-block",a.style.textAlign="right",a.style.fontSize="10px",a.style.width="108px",a.style.marginRight="5px",a.style.verticalAlign="text-top",a.textContent=t,i.appendChild(a);for(let e=0;e{let n,i=Game.buyBulk;1===Game.buyMode?_t=i:i=_t,1===i&&(i=We),10===i&&(i=Ae),100===i&&(i=je),t+=1,l("CMBotBar").firstChild.firstChild.childNodes[0].childNodes[t].childNodes[1].textContent=Game.Objects[o].amount,l("CMBotBar").firstChild.firstChild.childNodes[1].childNodes[t].textContent=B(i[o].bonus,2),l("CMBotBar").firstChild.firstChild.childNodes[2].childNodes[t].className=St+i[o].color,n=e.PPDisplayTime?uo(Math.round(i[o].pp)):B(Math.round(i[o].pp),2),l("CMBotBar").firstChild.firstChild.childNodes[2].childNodes[t].textContent=n;const a=mo((Game.Objects[o].bulkPrice-(Game.cookies+go()))/ho());l("CMBotBar").firstChild.firstChild.childNodes[3].childNodes[t].className=St+a.color,"Done!"===a.text&&Game.cookies{!Game.Tiers[e.tieredUpgrades[o].tier].special&&wt(e.tieredUpgrades[o].name)&&(t*=2)})),Object.keys(e.synergies).forEach((o=>{if(wt(e.synergies[o].name)){const n=e.synergies[o];n.buildingTie1.name===e.name?t*=1+.05*n.buildingTie2.amount:n.buildingTie2.name===e.name&&(t*=1+.001*n.buildingTie1.amount)}})),e.fortune&&wt(e.fortune.name)&&(t*=1.07),e.grandma&&wt(e.grandma.name)&&(t*=1+.01*Ct.Grandma.amount*(1/(e.id-1))),"object"==typeof e.tieredUpgrades.misfortune&&1===e.vanilla&&wt(e.tieredUpgrades.misfortune.name))switch(Game.elderWrath){default:t*=1;break;case 1:t*=1.02;break;case 2:t*=1.04;break;case 3:t*=1.06}return t}function Mo(e){const t=Game.Objects[e],o={};return"Cursor"===t.name?o.cps=function(e){let t=0;wt("Thousand fingers")&&(t+=.1),wt("Million fingers")&&(t*=5),wt("Billion fingers")&&(t*=10),wt("Trillion fingers")&&(t*=20),wt("Quadrillion fingers")&&(t*=20),wt("Quintillion fingers")&&(t*=20),wt("Sextillion fingers")&&(t*=20),wt("Septillion fingers")&&(t*=20),wt("Octillion fingers")&&(t*=20),wt("Nonillion fingers")&&(t*=20);let o=1,n=0;return Object.keys(Ct).forEach((e=>{"Cursor"!==Ct[e].name&&(n+=Ct[e].amount)})),t*=n,o*=xo(e),o*=Game.magicCpS("Cursor"),o*=vt("cursorCps"),Game.ComputeCps(.1,wt("Reinforced index finger")+wt("Carpal tunnel prevention cream")+wt("Ambidextrous"),t)*o}:"Grandma"===t.name?o.cps=function(e){let o=1;if(Object.keys(Game.GrandmaSynergies).forEach((e=>{wt(Game.GrandmaSynergies[e])&&(o*=2)})),wt("Bingo center/Research facility")&&(o*=4),wt("Ritual rolling pins")&&(o*=2),wt("Naughty list")&&(o*=2),wt("Elderwort biscuits")&&(o*=1.02),o*=vt("grandmaCps"),wt("Cat ladies"))for(let e=0;e{"Grandma"!==Ct[e].name&&(i+=Ct[e].amount)})),o*=1+.01*kt("Elder Battalion")*i,o*=Game.magicCpS(t.name),(t.baseCps+n)*o}:o.cps=function(e){let t=1;return t*=xo(e),t*=Game.magicCpS(e.name),e.baseCPS*t},o.baseCps=t.baseCps,o.name=t.name,o.tieredUpgrades=t.tieredUpgrades,o.synergies=t.synergies,o.fortune=t.fortune,o.grandma=t.grandma,o.baseCPS=t.baseCps,o.id=t.id,o.vanilla=t.vanilla,o}function To(e){const t=Game.Upgrades[e],o={};return o.power=t.power,"function"==typeof o.power&&("Sugar crystal cookies"===t.name?o.power=function(){let e=5;return Object.keys(Ct).forEach((t=>{Ct[t].level>=10&&(e+=1)})),e}:o.power=function(){let e=2;if(wt("Starlove")&&(e=3),Game.hasGod){const t=xt("seasons");1===t?e*=1.3:2===t?e*=1.2:3===t&&(e*=1.1)}return e}),o.pool=t.pool,o.name=t.name,o}function So(){J=Game.UpgradesOwned,Z=Game.pledges,ee=Game.AchievementsOwned,te=Game.heavenlyPower,oe=Game.prestige,Object.keys(Game.Objects).forEach((e=>{const t=Game.Objects[e];let o=Ct[e];void 0===o&&(Ct[e]=Mo(e),o=Ct[e],Co(e)),o.amount=t.amount,o.level=t.level,o.totalCookies=t.totalCookies,o.basePrice=t.basePrice,o.free=t.free,t.minigameLoaded&&("Temple"===t.name&&(ae=t.minigame.slot[0],re=t.minigame.slot[1],le=t.minigame.slot[2]),o.minigameLoaded=t.minigameLoaded,o.minigame=t.minigame),Ct[e]=o})),Object.keys(Game.Upgrades).forEach((e=>{const t=Game.Upgrades[e];let o=yt[e];void 0===o&&(yt[e]=To(e),o=yt[e]),o.bought=t.bought,yt[e]=o})),Object.keys(Game.Achievements).forEach((e=>{const t=Game.Achievements[e];let o=bt[e];void 0===o&&(bt[e]=wo(e),o=bt[e]),o.won=t.won,bt[e]=o})),vo(),ne=me,ie=he}function Po(e){const t=document.createElement("div");return t.style.fontWeight="bold",t.id=`${e}Title`,t.className="CMTextBlue",t.textContent=e,t}function Bo(e){e.appendChild(Po("Bonus Income"));const t=document.createElement("div");t.style.marginBottom="4px",t.style.color="white",t.id="CMTooltipIncome",e.appendChild(t),e.appendChild(Po("Bonus Cookies per Click")),e.lastChild.style.display="none";const o=document.createElement("div");o.style.marginBottom="4px",o.style.color="white",o.style.display="none",o.id="CMTooltipCookiePerClick",e.appendChild(o),e.appendChild(Po("Payback Period"));const n=document.createElement("div");n.style.marginBottom="4px",n.id="CMTooltipPP",e.appendChild(n),e.appendChild(Po("Time Left"));const i=document.createElement("div");if(i.id="CMTooltipTime",e.appendChild(i),"b"===eo){e.appendChild(Po("Production left till next achievement")),e.lastChild.id="CMTooltipProductionLeftHeader";const t=document.createElement("div");t.id="CMTooltipProductionLeft",e.appendChild(t)}if("b"===eo){e.appendChild(Po("Buildings (price / PP) left till next achievement")),e.lastChild.id="CMTooltipNextAchievementHeader";const t=document.createElement("div");t.id="CMTooltipNextAchievement",e.appendChild(t)}}function Eo(t,o){let n="";return n=t.pp<=0||t.pp===1/0?Wt:t.pp0&&(n=Ft),n}function No(){let e=1;return Object.keys(Game.buffs).forEach((t=>{void 0!==Game.buffs[t].multCpS&&(e*=Game.buffs[t].multCpS)})),e}function Oo(e){bt[e]&&0===bt[e].won&&(bt[e].won=1,"shadow"!==Game.Achievements[e].pool&&(ee+=1))}function Fo(){de=0;let e=1;const t={};Object.keys(Game.Objects).forEach((e=>{if(Game.Objects[e].minigameLoaded&&Game.Objects[e].minigame.effs){const o=Game.Objects[e].minigame.effs;Object.keys(o).forEach((e=>{t[e]?t[e]*=o[e]:t[e]=o[e]}))}})),ce=t,1!==Game.ascensionMode&&(e+=.01*parseFloat(oe)*te*function(){let e=0;if(wt("Heavenly chip secret")&&(e+=.05),wt("Heavenly cookie stand")&&(e+=.2),wt("Heavenly bakery")&&(e+=.25),wt("Heavenly confectionery")&&(e+=.25),wt("Heavenly key")&&(e+=.25),e*=1+.05*kt("Dragon God"),wt("Lucky digit")&&(e*=1.01),wt("Lucky number")&&(e*=1.01),wt("Lucky payout")&&(e*=1.01),Game.hasGod){const t=xt("creation");1===t?e*=.7:2===t?e*=.8:3===t&&(e*=.9)}return e}()),e*=vt("cps"),wt("Heralds")&&1!==Game.ascensionMode&&(e*=1+.01*Game.heralds),Object.keys(Game.cookieUpgrades).forEach((t=>{const o=Game.cookieUpgrades[t];wt(o.name)&&("function"==typeof o.power?e*=1+.01*yt[o.name].power(yt[o.name]):e*=1+.01*o.power)})),wt("Specialized chocolate chips")&&(e*=1.01),wt("Designer cocoa beans")&&(e*=1.02),wt("Underworld ovens")&&(e*=1.03),wt("Exotic nuts")&&(e*=1.04),wt("Arcane sugar")&&(e*=1.05),wt("Increased merriness")&&(e*=1.15),wt("Improved jolliness")&&(e*=1.15),wt("A lump of coal")&&(e*=1.01),wt("An itchy sweater")&&(e*=1.01),wt("Santa's dominion")&&(e*=1.2),wt("Fortune #100")&&(e*=1.01),wt("Fortune #101")&&(e*=1.07),wt("Dragon scale")&&(e*=1.03);let o=1;if(xt){let t=xt("asceticism");1===t?e*=1.15:2===t?e*=1.1:3===t&&(e*=1.05),t=xt("ages"),1===t?e*=1+.15*Math.sin(S/1e3/10800*Math.PI*2):2===t?e*=1+.15*Math.sin(S/1e3/43200*Math.PI*2):3===t&&(e*=1+.15*Math.sin(S/1e3/86400*Math.PI*2)),t=xt("decadence"),1===t?o*=.93:2===t?o*=.95:3===t&&(o*=.98),t=xt("industry"),1===t?o*=1.1:2===t?o*=1.06:3===t&&(o*=1.03),t=xt("labor"),1===t?o*=.97:2===t?o*=.98:3===t&&(o*=.99)}wt("Santa's legacy")&&(e*=1+.03*(Game.santaLevel+1));const n=ee/25;let i=1;if(wt("Santa's milk and cookies")&&(i*=1.05),i*=1+.05*kt("Breath of Milk"),xt){const e=xt("mother");1===e?i*=1.1:2===e?i*=1.05:3===e&&(i*=1.03)}i*=vt("milk");let a=1;wt("Kitten helpers")&&(a*=1+.1*n*i),wt("Kitten workers")&&(a*=1+.125*n*i),wt("Kitten engineers")&&(a*=1+.15*n*i),wt("Kitten overseers")&&(a*=1+.175*n*i),wt("Kitten managers")&&(a*=1+.2*n*i),wt("Kitten accountants")&&(a*=1+.2*n*i),wt("Kitten specialists")&&(a*=1+.2*n*i),wt("Kitten experts")&&(a*=1+.2*n*i),wt("Kitten consultants")&&(a*=1+.2*n*i),wt("Kitten assistants to the regional manager")&&(a*=1+.175*n*i),wt("Kitten marketeers")&&(a*=1+.15*n*i),wt("Kitten analysts")&&(a*=1+.125*n*i),wt("Kitten executives")&&(a*=1+.115*n*i),wt("Kitten angels")&&(a*=1+.1*n*i),wt("Fortune #103")&&(a*=1+.05*n*i),Object.keys(Ct).forEach((e=>{const t=Ct[e];let a=t.cps(t);1!==Game.ascensionMode&&(a*=(1+.01*t.level)*o),"Grandma"===t.name&&wt("Milkhelp® lactose intolerance relief tablets")&&(a*=1+.05*n*i),de+=t.amount*a})),wt('"egg"')&&(de+=9),e*=a;let r=1;if(wt("Chicken egg")&&(r*=1.01),wt("Duck egg")&&(r*=1.01),wt("Turkey egg")&&(r*=1.01),wt("Quail egg")&&(r*=1.01),wt("Robin egg")&&(r*=1.01),wt("Ostrich egg")&&(r*=1.01),wt("Cassowary egg")&&(r*=1.01),wt("Salmon roe")&&(r*=1.01),wt("Frogspawn")&&(r*=1.01),wt("Shark egg")&&(r*=1.01),wt("Turtle egg")&&(r*=1.01),wt("Ant larva")&&(r*=1.01),wt("Century egg")){let e=10*Math.floor((P-Game.startDate)/1e3/10)/60/60/24;e=Math.min(e,100),Oe=1+.1*(1-(1-e/100)**3),r*=Oe}e*=r,wt("Sugar baking")&&(e*=1+.01*Math.min(100,Game.lumps)),e*=1+kt("Radiant Appetite");const l=de*e;Object.keys(Game.CpsAchievements).forEach((e=>{l>=Game.CpsAchievements[e].threshold&&Oo(Game.CpsAchievements[e].name)})),pe=l;const{n:s}=Game.shimmerTypes.golden,c=kt("Dragon's Fortune");for(let t=0;t{wt(e[o])&&(t+=.1)}))}e*=t}if(wt("Shimmering veil [off]")){let t=.5;wt("Reinforced membrane")&&(t+=.1),e*=1+t}wt("Magic shenanigans")&&(e*=1e3),wt("Occult obstruction")&&(e*=0),de=Game.runModHookOnValue("cps",de),e*=No(),de*=e}const Lo=["Fortune #001","Fortune #002","Fortune #003","Fortune #004","Fortune #005","Fortune #006","Fortune #007","Fortune #008","Fortune #009","Fortune #010","Fortune #011","Fortune #012","Fortune #013","Fortune #014","Fortune #015","Fortune #016","Fortune #017","Fortune #018","Fortune #100","Fortune #101","Fortune #102","Fortune #103","Fortune #104"],Wo=["Skull cookies","Ghost cookies","Bat cookies","Slime cookies","Pumpkin cookies","Eyeball cookies","Spider cookies"],Ao=["Christmas tree biscuits","Snowflake biscuits","Snowman biscuits","Holly biscuits","Candy cane biscuits","Bell biscuits","Present biscuits"],jo=["Pure heart biscuits","Ardent heart biscuits","Sour heart biscuits","Weeping heart biscuits","Golden heart biscuits","Eternal heart biscuits","Prism heart biscuits"],Do=["Elderwort biscuits","Bakeberry cookies","Duketater cookies","Green yeast digestives","Wheat slims","Fern tea","Ichor syrup"];function Ho(e){return bt[e]?bt[e].won:0}function Uo(){let e=0;Object.keys(Game.GrandmaSynergies).forEach((t=>{wt(Game.GrandmaSynergies[t])&&(e+=1)})),!Ho("Elder")&&e>=7&&Oo("Elder"),!Ho("Veteran")&&e>=14&&Oo("Veteran");let t=0,o=1,n=1,i=1e5;Object.keys(Ct).forEach((e=>{t+=Ct[e].amount,i=Math.min(Ct[e].amount,i),Ho("Mathematician")||Ct[e].amount=1&&Oo("One with everything"),1===o&&Oo("Mathematician"),1===n&&Oo("Base 10"),i>=100&&Oo("Centennial"),i>=150&&Oo("Centennial and a half"),i>=200&&Oo("Bicentennial"),i>=250&&Oo("Bicentennial and a half"),i>=300&&Oo("Tricentennial"),i>=350&&Oo("Tricentennial and a half"),i>=400&&Oo("Quadricentennial"),i>=450&&Oo("Quadricentennial and a half"),i>=500&&Oo("Quincentennial"),i>=550&&Oo("Quincentennial and a half"),i>=600&&Oo("Sexcentennial"),t>=100&&Oo("Builder"),t>=500&&Oo("Architect"),t>=1e3&&Oo("Engineer"),t>=2e3&&Oo("Lord of Constructs"),t>=4e3&&Oo("Grand design"),t>=8e3&&Oo("Ecumenopolis"),J>=20&&Oo("Enhancer"),J>=50&&Oo("Augmenter"),J>=100&&Oo("Upgrader"),J>=200&&Oo("Lord of Progress"),J>=300&&Oo("The full picture"),J>=400&&Oo("When there's nothing left to add"),t>=4e3&&J>=300&&Oo("Polymath"),t>=8e3&&J>=400&&Oo("Renaissance baker"),Ct.Cursor.amount+Ct.Grandma.amount>=777&&Oo("The elder scrolls");let a=!0;Object.keys(Wo).forEach((e=>{wt(Wo[e])||(a=!1)})),a&&Oo("Spooky cookies");let r=!0;if(Object.keys(Ao).forEach((e=>{wt(Ao[e])||(r=!1)})),r&&Oo("Let it snow"),wt("Fortune cookies")){const e=Game.Tiers.fortune.upgrades;let t=0;Object.keys(e).forEach((o=>{wt(e[o].name)&&(t+=1)})),t>=e.length&&Oo("O Fortuna")}}function $o(e,t){So(),Ct[e].amount+=t;const o=Ct[e];"Cursor"===e?(o.amount>=1&&Oo("Click"),o.amount>=2&&Oo("Double-click"),o.amount>=50&&Oo("Mouse wheel"),o.amount>=100&&Oo("Of Mice and Men"),o.amount>=200&&Oo("The Digital"),o.amount>=300&&Oo("Extreme polydactyly"),o.amount>=400&&Oo("Dr. T"),o.amount>=500&&Oo("Thumbs, phalanges, metacarpals"),o.amount>=600&&Oo("With her finger and her thumb"),o.amount>=700&&Oo("Gotta hand it to you"),o.amount>=800&&Oo("The devil's workshop")):Object.keys(Game.Objects[o.name].tieredAchievs).forEach((e=>{o.amount>=Game.Tiers[Game.Objects[o.name].tieredAchievs[e].tier].achievUnlock&&Oo(Game.Objects[o.name].tieredAchievs[e].name)}));const n=ee;return Fo(),Uo(),n!==ee&&Fo(),de-Game.cookiesPs}function Ro(e,t,o){let n=e,i=0;for(;nt.plantsById[t.plot[to[1]][to[0]][0]-1].mature,o=t.plantsById[t.plot[to[1]][to[0]][0]-1].name;l("CMTooltipBorder").appendChild(Po("Reward (Current / Maximum)"));const n=document.createElement("div");n.id="CMTooltipPlantReward",l("CMTooltipBorder").appendChild(n),"Bakeberry"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.03*Game.cookies,60*Game.cookiesPs*30)):"0"} / ${B(60*Game.cookiesPs*30)}`:"Chocoroot"===o||"White chocoroot"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.03*Game.cookies,60*Game.cookiesPs*3)):"0"} / ${B(60*Game.cookiesPs*3)}`:"Queenbeet"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.04*Game.cookies,60*Game.cookiesPs*60)):"0"} / ${B(60*Game.cookiesPs*60)}`:"Duketater"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.08*Game.cookies,60*Game.cookiesPs*120)):"0"} / ${B(60*Game.cookiesPs*120)}`:l("CMTooltipArea").style.display="none"}else l("CMTooltipArea").style.display="none"}():"ha"===eo?function(){const{minigame:t}=Game.Objects.Farm;if(e.TooltipLump){l("CMTooltipBorder").appendChild(Po("Cookies gained from harvesting:"));let e=0,o=0;Game.keys[16]&&Game.keys[17]&&(o=1);for(let n=0;n<6;n++)for(let i=0;i<6;i++)if(t.plot[n][i][0]>=1){const a=t.plot[n][i],r=t.plantsById[a[0]-1],l=r.name;let s=!0;o&&r.immortal&&(s=!1),a[1]0&&t=1?l("CMTimerBarGCMinBar").textContent=Math.ceil((Game.shimmerTypes.golden.minTime-Game.shimmerTypes.golden.time)/Game.fps):l("CMTimerBarGCMinBar").textContent="",Game.shimmerTypes.golden.minTime===Game.shimmerTypes.golden.maxTime?(l("CMTimerBarGCMinBar").style.borderTopRightRadius="10px",l("CMTimerBarGCMinBar").style.borderBottomRightRadius="10px"):(l("CMTimerBarGCMinBar").style.borderTopRightRadius="",l("CMTimerBarGCMinBar").style.borderBottomRightRadius=""),l("CMTimerBarGCBar").style.width=`${Math.round(Math.min(Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.minTime,Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)*t/Game.shimmerTypes.golden.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarGCBar").textContent=Math.ceil(Math.min(Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.minTime,Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps):l("CMTimerBarGCBar").textContent="",l("CMTimerBarGCTime").textContent=Math.ceil((Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps),n+=1),"christmas"===Game.season&&0===Game.shimmerTypes.reindeer.spawned?(l("CMTimerBarRen").style.display="",l("CMTimerBarRenMinBar").style.width=`${Math.round(Math.max(0,Game.shimmerTypes.reindeer.minTime-Game.shimmerTypes.reindeer.time)*t/Game.shimmerTypes.reindeer.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarRenMinBar").textContent=Math.ceil((Game.shimmerTypes.reindeer.minTime-Game.shimmerTypes.reindeer.time)/Game.fps):l("CMTimerBarRenMinBar").textContent="",l("CMTimerBarRenBar").style.width=`${Math.round(Math.min(Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.minTime,Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)*t/Game.shimmerTypes.reindeer.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarRenBar").textContent=Math.ceil(Math.min(Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.minTime,Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps):l("CMTimerBarRenBar").textContent="",l("CMTimerBarRenTime").textContent=Math.ceil((Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps),n+=1):l("CMTimerBarRen").style.display="none";const i={};l("CMTimerBarBuffTimers").innerHTML="",Object.keys(Game.buffs).forEach((t=>{if(Game.buffs[t]){const a=fo(Game.buffs[t].name,Game.buffs[t].name,[{id:`${Game.buffs[t].name}Bar`}]);a.style.display="";let r="";r=void 0!==Kt[Game.buffs[t].name]?Kt[Game.buffs[t].name]:Lt,a.lastChild.children[1].className=Pt+r,a.lastChild.children[1].style.color="black",2===e.TimerBarOverlay?a.lastChild.children[1].textContent=`${Math.round(Game.buffs[t].time/Game.buffs[t].maxTime*100)}%`:a.lastChild.children[1].textContent="",a.lastChild.children[1].style.width=`${Math.round(Game.buffs[t].time*(o-8*Math.ceil(Game.buffs[t].time/Game.fps).toString().length)/Game.buffs[t].maxTime)}px`,a.lastChild.children[2].textContent=Math.ceil(Game.buffs[t].time/Game.fps),n+=1,i[Game.buffs[t].name]=a}})),Object.keys(i).forEach((e=>{l("CMTimerBarBuffTimers").appendChild(i[e])})),0!==n&&(l("CMTimerBar").style.height=12*n+2+"px"),io!==n&&(io=n,ko())}}(),yo(),zo(),function(){if(1===e.TooltipWrink&&1===Rt){let e=!1;Object.keys(Game.wrinklers).forEach((t=>{const o=Game.wrinklers[t];if(o.phase>0&&o.selected){if(e=!0,0===zt[t]||void 0===zt[t]){const e=document.createElement("div"),o=document.createElement("div");o.style.minWidth="120px",o.style.marginBottom="4px";const n=document.createElement("div");n.style.textAlign="center",n.id="CMTooltipWrinkler",o.appendChild(n),e.appendChild(o),Game.tooltip.draw(this,escape(e.innerHTML)),It=t,zt[t]=1}}else zt[t]=0})),e||Game.tooltip.hide()}}(),function(){if(1===e.TooltipWrink&&null!==l("CMTooltipWrinkler")){let{sucked:e}=Game.wrinklers[It],t=1.1;if(Game.Has("Sacrilegious corruption")&&(t*=1.05),1===Game.wrinklers[It].type&&(t*=3),e*=t,Game.Has("Wrinklerspawn")&&(e*=1.05),Ct.Temple.minigameLoaded){const t=Game.hasGod("scorn");1===t?e*=1.15:2===t?e*=1.1:3===t&&(e*=1.05)}l("CMTooltipWrinkler").textContent=B(e)}}(),e.UpStats&&"stats"===Game.onMenu&&(Game.drawT-1)%(5*Game.fps)!=0&&(Game.drawT-1)%Game.fps==0&&Game.UpdateMenu(),t(),e.Scale){let e=l("cookies").innerHTML.replace(/.*(?=
)/i,B(Game.cookies));Game.prefs.monospace&&(e=`${e}`),l("cookies").innerHTML=e}}function _o(){E.addLatest(Game.computedMouseCps)}class Qo{constructor(e){this.maxLength=e,this.queue=[]}addLatest(e){this.queue.push(e)>this.maxLength&&this.queue.shift()}calcAverage(e){let t=e;t>this.maxLength&&(t=this.maxLength),t>this.queue.length&&(t=this.queue.length);let o=0;for(let e=this.queue.length-1;e>=0&&e>this.queue.length-1-t;e--)o+=this.queue[e];return 0===o?0:o/t}calcSum(e){let t=e;return t>this.maxLength&&(t=this.maxLength),t>this.queue.length&&(t=this.queue.length),0===t?0:this.queue.slice(-t).reduce(((e,t)=>e+t),0)}}function Xo(){const t=Math.floor(Date.now()/1e3);if(Game.T/Game.fps%1==0){let o=Game.cookies+gt;Game.cpsSucked>0&&(o+=He),lt=Math.max(Game.cookiesEarned,o),o*=.05;const n=t-j,i=Math.max(0,Game.cookies-D)/n,a=Math.max(0,He-H)/n,r=Math.max(0,$e[0]-U)/n,l=Math.max(0,o-Le)/n,s=(Game.cookieClicks-$)/n;for(let e=0;e{if(e.PPRigidelMode&&1===o)t[n].color=Wt;else{t[n].color=Eo(t[n],Game.Objects[n].getSumPrice(o));for(let o=0;o{const i=Game.Objects[n].getSumPrice(o);Game.cookiesPs?t[n].pp=Math.max(i-(Game.cookies+go()),0)/Game.cookiesPs+i/t[n].bonus:t[n].pp=i/t[n].bonus,e.PPRigidelMode&&1===o||mt.push([t[n].pp,o])}))}function Ko(){!function(){ut=1/0,mt=[],void 0===e.PPExcludeTop&&(e.PPExcludeTop=0),Yo(We,1),Yo(Ae,10),Yo(je,100),mt.sort(((e,t)=>e[0]-t[0]));let t=0;if(e.PPOnlyConsiderBuyable)for(;mt[t][1]>Game.cookies&&(t+=1,mt.length!==t+1););ut=mt[e.PPExcludeTop][t],qo(We,1),qo(Ae,10),qo(je,100)}(),Object.keys(ze).forEach((e=>{Game.cookiesPs?ze[e].pp=Math.max(Game.Upgrades[e].getPrice()-(Game.cookies+go()),0)/Game.cookiesPs+Game.Upgrades[e].getPrice()/ze[e].bonus:ze[e].pp=Game.Upgrades[e].getPrice()/ze[e].bonus,Number.isNaN(ze[e].pp)&&(ze[e].pp=1/0),ze[e].color=Eo(ze[e],Game.Upgrades[e].getPrice())}))}function Jo(e,t,o,n,i){let a=o,r=0;for(let o=0;o{t[o]={},t[o].bonus=$o(o,e),1!==e&&(q=1)})),t}function en(){Object.keys(Game.Objects).forEach((e=>{We[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,1),Ae[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,10),je[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,100),De[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,De[e].AmountNeeded)}))}function tn(){We=Zo(1),Ae=Zo(10),je=Zo(100),ze=[],Object.keys(Game.Upgrades).forEach((t=>{const o=function(e){if("toggle"===Game.Upgrades[e].pool||0===Game.Upgrades[e].bought&&Game.Upgrades[e].unlocked&&"prestige"!==Game.Upgrades[e].pool){So(),"Shimmering veil [on]"===yt[e].name?yt["Shimmering veil [off]"].bought=0:"Golden switch [on]"===yt[e].name?yt["Golden switch [off]"].bought=0:yt[e].bought=(yt[e].bought+1)%2,Game.CountsAsUpgradeOwned(Game.Upgrades[e].pool)&&(J+=1),"Elder Pledge"===e?(Z+=1,Z>0&&Oo("Elder nap"),Z>=5&&Oo("Elder slumber")):"Elder Covenant"===e?Oo("Elder calm"):"Prism heart biscuits"===e?Oo("Lovely cookies"):"Heavenly key"===e&&Oo("Wholesome");const t=ee;Fo(),Uo(),t!==ee&&Fo();const o=function(){let e=0;wt("Thousand fingers")&&(e+=.1),wt("Million fingers")&&(e*=5),wt("Billion fingers")&&(e*=10),wt("Trillion fingers")&&(e*=20),wt("Quadrillion fingers")&&(e*=20),wt("Quintillion fingers")&&(e*=20),wt("Sextillion fingers")&&(e*=20),wt("Septillion fingers")&&(e*=20),wt("Octillion fingers")&&(e*=20),wt("Nonillion fingers")&&(e*=20);let t=0;Object.keys(Ct).forEach((e=>{t+=Ct[e].amount})),t-=Ct.Cursor.amount,e*=t,wt("Plastic mouse")&&(e+=.01*de),wt("Iron mouse")&&(e+=.01*de),wt("Titanium mouse")&&(e+=.01*de),wt("Adamantium mouse")&&(e+=.01*de),wt("Unobtainium mouse")&&(e+=.01*de),wt("Eludium mouse")&&(e+=.01*de),wt("Wishalloy mouse")&&(e+=.01*de),wt("Fantasteel mouse")&&(e+=.01*de),wt("Nevercrack mouse")&&(e+=.01*de),wt("Armythril mouse")&&(e+=.01*de),wt("Technobsidian mouse")&&(e+=.01*de),wt("Plasmarble mouse")&&(e+=.01*de),wt("Miraculite mouse")&&(e+=.01*de),wt("Fortune #104")&&(e+=.01*de);let o=1;if(wt("Santa's helpers")&&(o*=1.1),wt("Cookie egg")&&(o*=1.1),wt("Halo gloves")&&(o*=1.1),wt("Dragon claw")&&(o*=1.03),wt("Aura gloves")&&(o*=1+.05*Math.min(Game.Objects.Cursor.level,wt("Luminous gloves")?20:10)),o*=vt("click"),Ct.Temple.minigameLoaded&&xt){const e=xt("labor");1===e?o*=1.15:2===e?o*=1.1:3===e&&(o*=1.05)}Object.keys(Game.buffs).forEach((e=>{void 0!==Game.buffs[e].multClick&&(o*=Game.buffs[e].multClick)})),o*=1+.05*kt("Dragon Cursor");let n=o*Game.ComputeCps(1,wt("Reinforced index finger")+wt("Carpal tunnel prevention cream")+wt("Ambidextrous"),e);return n=Game.runModHookOnValue("cookiesPerClick",n),Game.hasBuff("Cursed finger")&&(n=Game.buffs["Cursed finger"].power),n}()-Game.computedMouseCps;return o?[de-Game.cookiesPs,o]:[de-Game.cookiesPs]}return[]}(t);"Elder Pledge"===t?(ze[t]={bonus:Game.cookiesPs-R},1===e.CalcWrink?ze[t].bonus-=I:2===e.CalcWrink&&(ze[t].bonus-=z),Number.isFinite(ze[t].bonus)||(ze[t].bonus=0)):(ze[t]={},o[0]&&(ze[t].bonus=o[0]),o[1]&&(ze[t].bonusMouse=o[1]))}))}function on(e,t,o){let n=0,i=0,a=0,r=0,l=1+Math.max(0,Math.ceil(Math.log(Game.cookies)/Math.LN10)-10);for(;a0?e/=t:e=0,Ke=on(7,e,Be),qe=2*Ke[1]/Be,Ye=Ke[2]/60/60/6/Pe,et=on(6,e,Ee),Je=2*et[1]/Ee,Ze=et[2]/60/60/6/Pe,nt=on(7,7*e,Be),tt=2*nt[1]/Be,ot=nt[2]/60/60/6/Pe,rt=on(6,7*e,Ee),it=2*rt[1]/Ee,at=rt[2]/60/60/6/Pe}function an(){const e=Math.floor(Date.now()/1e3);if(Game.T/Game.fps%1==0){const t=Game.HowMuchPrestige(Game.cookiesReset),o=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))-Math.floor(t),n=e-Q,i=Math.max(0,o-X)/n;for(let e=0;e{e.push(Game.Upgrades[t])})),e.sort((function(e,t){return e.order>t.order?1:e.order{const o=e[t];if(0===o.bought){let e="";e+=function(e){let t="crate upgrade missing";"prestige"===e.pool&&(t+=" heavenly");let o=0;Game.prefs.crates||(o=1),o&&(t+=" noFrame");let{icon:n}=e;e.iconFunction&&(n=e.iconFunction());const i=`function() {return Game.crateTooltip(Game.UpgradesById[${e.id}], 'stats');}`;return`
\n\t
`}(o),"prestige"===o.pool?Qe+=e:"cookie"===o.pool?Xe+=e:"toggle"!==o.pool&&"unused"!==o.pool&&"debug"!==o.pool&&(_e+=e)}}))}function ln(){if("christmas"===Game.season){let e=60*Game.cookiesPs;Game.hasBuff("Elder frenzy")&&(e*=.5),Game.hasBuff("Frenzy")&&(e*=.75),Fe=Math.max(25,e),Game.Has("Ho ho ho-flavored frosting")&&(Fe*=2)}}function sn(){Ce=900*Se/.15,Ce*=Pe;const e=No();e>0?Ce/=e:Ce=0,ye=Be*(.15*Ce)+13,be=Ee*(.15*Ce)+13,ke=7*Ce,Ge=Be*(.15*ke)+13,ve=Ee*(.15*ke)+13,we=2*Ce,xe=.15*we,Me=0;let t=0,o=0;Object.keys(Game.Objects).forEach((e=>{Game.Objects[e].amount>t&&(t=Game.Objects[e].amount),Game.Objects[e].amount>0&&(o+=1)})),Object.keys(Game.Objects).forEach((e=>{(Game.Objects[e].amountMe&&(Me=2*Game.Objects[e].price,Te=e)}))}function cn(){let e=1,t=1,o=1;wt("Green yeast digestives")&&(o*=1.01),wt("Dragon fang")&&(o*=1.03),e*=1+.1*Game.auraMult("Ancestral Metamorphosis"),e*=Game.eff("goldenCookieGain"),t*=1+.1*Game.auraMult("Unholy Dominion"),t*=Game.eff("wrathCookieGain"),Be=o*e,Ee=o*t,Pe=1,0===Game.shimmerTypes.golden.n&&(Pe*=1+1.23*Game.auraMult("Dragon's Fortune"))}function dn(){const e={};Object.keys(Game.Objects).forEach((t=>{if(0!==Object.keys(De).length&&De[t].TotalNeeded>Game.Objects[t].amount)e[t]={AmountNeeded:De[t].TotalNeeded-Game.Objects[t].amount,TotalNeeded:De[t].TotalNeeded};else{const o=function(e){const t=Game.AchievementsOwned;for(let o=0;o<101;o++)if($o(e,o),ee>t)return o;return 101}(t);e[t]={AmountNeeded:o,TotalNeeded:Game.Objects[t].amount+o}}})),De=e}function pn(){He=0,Ue=0,$e=[0,null];for(let e=0;e$e[0]&&($e=[t,e]))}}function un(){vo(),pn(),sn(),cn(),nn(),rn(),ln(),N=new Qo(qt[qt.length-1]),O=new Qo(qt[qt.length-1]),F=new Qo(qt[qt.length-1]),L=new Qo(qt[qt.length-1]),W=new Qo(Yt[Yt.length-1]),A=new Qo(5),E=new Qo(20*Yt[Yt.length-1]),an(),dn(),Xo(),tn(),en(),Ko()}const mn={CPSMode:1,AvgCPSHist:3,AvgClicksHist:0,CalcWrink:0,Scale:2,ScaleDecimals:2,ScaleSeparator:0,ScaleCutoff:999999,TimeFormat:0,DetailedTime:1,PPDisplayTime:0,BuildColour:1,PPOnlyConsiderBuyable:0,PPExcludeTop:0,PPRigidelMode:0,PPSecondsLowerLimit:0,ColourBlue:"#4bb8f0",ColourGreen:"#00ff00",ColourYellow:"#ffff00",ColourOrange:"#ff7f00",ColourRed:"#ff0000",ColourPurple:"#ff00ff",ColourGray:"#b3b3b3",ColourPink:"#ff1493",ColourBrown:"#8b4513",BotBar:1,TimerBar:1,TimerBarPos:0,TimerBarOverlay:2,UpBarColour:1,UpgradeBarFixedPos:1,SortBuildings:0,SortUpgrades:0,UpgradesNeverCollapse:0,DragonAuraInfo:1,GrimoireBar:1,GCTimer:1,Favicon:1,WrinklerButtons:1,HideSectionsButtons:0,TooltipBuildUpgrade:1,TooltipAmor:0,ToolWarnLucky:1,ToolWarnLuckyFrenzy:1,ToolWarnConjure:1,ToolWarnConjureFrenzy:1,ToolWarnEdifice:1,ToolWarnUser:0,ToolWarnBon:1,ToolWarnPos:1,TooltipGrim:1,TooltipWrink:1,TooltipLump:1,TooltipPlots:1,TooltipPantheon:1,TooltipAscendButton:1,Stats:1,MissingUpgrades:1,MissingAchievements:0,UpStats:1,HeavenlyChipsTarget:1,ShowMissedGC:1,Title:1,GeneralSound:1,GCNotification:0,GCFlash:1,ColourGCFlash:"#ffffff",GCSound:1,GCVolume:100,GCSoundURL:"https://freesound.org/data/previews/66/66717_931655-lq.mp3",FortuneNotification:0,FortuneFlash:1,ColourFortuneFlash:"#ffffff",FortuneSound:1,FortuneVolume:100,FortuneSoundURL:"https://freesound.org/data/previews/174/174027_3242494-lq.mp3",SeaNotification:0,SeaFlash:1,ColourSeaFlash:"#ffffff",SeaSound:1,SeaVolume:100,SeaSoundURL:"https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3",GardFlash:1,ColourGardFlash:"#ffffff",GardSound:1,GardVolume:100,GardSoundURL:"https://freesound.org/data/previews/103/103046_861714-lq.mp3",MagicNotification:0,MagicFlash:1,ColourMagicFlash:"#ffffff",MagicSound:1,MagicVolume:100,MagicSoundURL:"https://freesound.org/data/previews/221/221683_1015240-lq.mp3",WrinklerNotification:0,WrinklerFlash:1,ColourWrinklerFlash:"#ffffff",WrinklerSound:1,WrinklerVolume:100,WrinklerSoundURL:"https://freesound.org/data/previews/124/124186_8043-lq.mp3",WrinklerMaxNotification:0,WrinklerMaxFlash:1,ColourWrinklerMaxFlash:"#ffffff",WrinklerMaxSound:1,WrinklerMaxVolume:100,WrinklerMaxSoundURL:"https://freesound.org/data/previews/152/152743_15663-lq.mp3",BulkBuyBlock:0,FavouriteSettings:1,Header:{Favourite:1,Calculation:1,Notation:1,Colours:1,BarsDisplay:1,Tooltip:1,Statistics:1,Notification:1,NotificationGeneral:1,NotificationGC:1,NotificationFC:1,NotificationSea:1,NotificationGard:1,NotificationMagi:1,NotificationWrink:1,NotificationWrinkMax:1,Miscellaneous:1,Lucky:1,Chain:1,Spells:1,Garden:1,Prestige:1,Wrink:1,Sea:1,Misc:1,InfoTab:1}},hn=function(e){if(1===e){const e=function(){try{Notification.requestPermission().then()}catch(e){return!1}return!0};"Notification"in window?e()?Notification.requestPermission().then():Notification.requestPermission():console.log("This browser does not support notifications.")}};function gn(){1===e.BotBar?(l("CMBotBar").style.display="",yo()):l("CMBotBar").style.display="none",ko()}function fn(){BeautifyAll(),Game.RefreshStore(),Game.RebuildUpgrades(),yo(),so(),po()}function Cn(){1===e.Favicon&&y>0?ct.wrath?l("CMFavicon").href="https://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico":l("CMFavicon").href="https://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico":l("CMFavicon").href="https://orteil.dashnet.org/cookieclicker/favicon.ico"}class yn{constructor(e,t){this.type=e,this.group=t}}class bn extends yn{constructor(e,t,o){super(e,t),this.desc=o}}class kn extends yn{constructor(e,t,o,n,i,a){super(e,t),this.label=o,this.desc=n,this.min=i,this.max=a}}class Gn extends yn{constructor(e,t,o,n,i,a){super(e,t),this.label=o,this.desc=n,this.toggle=i,void 0!==a&&(this.func=a)}}class vn extends yn{constructor(e,t,o,n){super(e,t),this.label=o,this.desc=n;for(let e=0;e<101;e++)this.label[e]=`${e}%`}}const wn={CPSMode:new Gn("bool","Calculation",["Current cookies per second","Average cookies per second"],"Calculate times using current cookies per second or average cookies per second",!1),AvgCPSHist:new Gn("bool","Calculation",["Average CPS in past 10s","Average CPS in past 15s","Average CPS in past 30s","Average CPS in past 1m","Average CPS in past 5m","Average CPS in past 10m","Average CPS in past 15m","Average CPS in past 30m"],"How much time average Cookies Per Second should consider",!1),AvgClicksHist:new Gn("bool","Calculation",["Average clicks in past 1s","Average clicks in past 5s","Average clicks in past 10s","Average clicks in past 15s","Average clicks in past 30s"],"How much time average Cookie Clicks should consider",!1),CalcWrink:new Gn("bool","Calculation",["Calculate with wrinklers OFF","Calculate with wrinklers ON","Calculate with single fattest wrinkler ON"],"Calculate times and average Cookies Per Second with (only the single non-shiny fattest) wrinklers",!0,(()=>{se=!0})),Scale:new Gn("bool","Notation",["Game's setting scale","Metric","Short scale","Short scale (Abbreviated)","Scientific notation","Engineering notation"],"Change how long numbers are formatted",!1,(()=>{fn()})),ScaleDecimals:new Gn("bool","Notation",["1 decimals","2 decimals","3 decimals"],'Set the number of decimals used when applicable. This only works with Cookie Monster scales and not with "Game\'s Setting Scale"',!1,(()=>{fn()})),ScaleSeparator:new Gn("bool","Notation",[". for decimals (standard)",". for thousands"],"Set the separator used for decimals and thousands",!1,(()=>{fn()})),ScaleCutoff:new kn("numscale","Notation","Notation cut-off point: ","The number from which Cookie Monster will start formatting numbers based on chosen scale. Standard is 999,999. Setting this above 999,999,999 might break certain notations",1,999999999),TimeFormat:new Gn("bool","Notation",["Time XXd, XXh, XXm, XXs","Time XX:XX:XX:XX:XX"],"Change the time format",!1),DetailedTime:new Gn("bool","Notation",["Detailed time OFF","Detailed time ON"],"Change how time is displayed in certain statistics and tooltips",!0,(()=>{1===e.DetailedTime?Game.sayTime=Vt:Game.sayTime=T.sayTime})),PPDisplayTime:new Gn("bool","Notation",["PP as value (standard)","PP as time unit"],"Display PP as calculated value or as approximate time unit. Note that PP does not translate directly into a time unit and this is therefore only an approximation.",!1),BuildColour:new Gn("bool","Colours",["Building colours OFF","Building colours ON"],"Colour code buildings",!0,(()=>{so()})),PPOnlyConsiderBuyable:new Gn("bool","Colours",["Don't ignore non-buyable","Ignore non-buyable"],"Makes Cookie Monster label buildings and upgrades you can't buy right now red, useful in those situations where you just want to spend your full bank 'most optimally'",!0),PPExcludeTop:new Gn("bool","Colours",["Don't ignore any","Ignore 1st best","Ignore 1st and 2nd best","Ignore 1st, 2nd and 3rd best"],"Makes Cookie Monster ignore the 1st, 2nd or 3rd best buildings in labeling and colouring PP values",!0),PPRigidelMode:new Gn("bool","Colours",["Rigidel mode OFF","Rigidel mode ON"],'Makes Cookie Monster ignore all "buy 1" options when colouring PP in order to stay at a total building count ending in 10 for pantheon god Rigidel',!0),PPSecondsLowerLimit:new kn("numscale","Colours","Lower limit for PP (in seconds): ",'If a building or upgrade costs less than the specified seconds of CPS it will also be considered optimal and label it as such ("PP is less than xx seconds of CPS"); setting to 0 ignores this option',0,1/0),ColourBlue:new bn("colour","Colours","Standard colour is blue. Used to show upgrades better than best PP building, for Click Frenzy bar, and for various labels"),ColourGreen:new bn("colour","Colours","Standard colour is green. Used to show best PP building, for Blood Frenzy bar, and for various labels"),ColourYellow:new bn("colour","Colours","Standard colour is yellow. Used to show buildings within the top 10 of PP, for Frenzy bar, and for various labels"),ColourOrange:new bn("colour","Colours","Standard colour is orange. Used to show buildings within the top 20 of PP, for Next Reindeer bar, and for various labels"),ColourRed:new bn("colour","Colours","Standard colour is Red. Used to show buildings within the top 30 of PP, for Clot bar, and for various labels"),ColourPurple:new bn("colour","Colours","Standard colour is purple. Used to show buildings outside of the top 30 of PP, for Next Cookie bar, and for various labels"),ColourGray:new bn("colour","Colours","Standard colour is gray. Used to show negative or infinity PP, and for Next Cookie/Next Reindeer bar"),ColourPink:new bn("colour","Colours","Standard colour is pink. Used for Dragonflight bar"),ColourBrown:new bn("colour","Colours","Standard colour is brown. Used for Dragon Harvest bar"),BotBar:new Gn("bool","BarsDisplay",["Bottom bar OFF","Bottom bar ON"],"Building information",!0,(()=>{gn()})),TimerBar:new Gn("bool","BarsDisplay",["Timer bar OFF","Timer bar ON"],"Bar with timers for golden cookie, season popup, Frenzy (Normal, Clot, Elder), Click Frenzy",!0,(()=>{Go()})),TimerBarPos:new Gn("bool","BarsDisplay",["Timer bar position (top left)","Timer bar position (bottom)"],"Placement of the timer bar",!1,(()=>{0===e.TimerBarPos?(l("CMTimerBar").style.width="30%",l("CMTimerBar").style.bottom="",l("game").insertBefore(l("CMTimerBar"),l("sectionLeft"))):(l("CMTimerBar").style.width="100%",l("CMTimerBar").style.bottom="0px",l("wrapper").appendChild(l("CMTimerBar"))),ko()})),TimerBarOverlay:new Gn("bool","BarsDisplay",["Timer bar overlay OFF","Timer bar overlay only seconds","Timer bar overlay full"],"Overlay on timers displaying seconds and/or percentage left",!0),UpBarColour:new Gn("bool","BarsDisplay",["Upgrade colours/bar OFF","Upgrade colours with bar ON","Upgrade colours without bar ON"],"Colour code upgrades and optionally add a counter bar",!1,(()=>{1===e.UpBarColor?(l("CMUpgradeBar").style.display="",po()):2===e.UpBarColor?(l("CMUpgradeBar").style.display="none",po()):(l("CMUpgradeBar").style.display="none",Game.RebuildUpgrades())})),UpgradeBarFixedPos:new Gn("bool","BarsDisplay",["Upgrade bar fixed position OFF","Upgrade bar fixed position ON"],"Lock the upgrade bar at top of the screen to prevent it from moving ofscreen when scrolling",!0,(()=>{1===e.UpgradeBarFixedPos?(l("CMUpgradeBar").style.position="sticky",l("CMUpgradeBar").style.top="0px"):l("CMUpgradeBar").style.position=""})),SortBuildings:new Gn("bool","BarsDisplay",["Sort buildings: default","Sort buildings: PP of x1 purchase","Sort buildings: PP of selected bulk mode"],"Sort the display of buildings in either default order or by PP",!1,(()=>{so()})),SortUpgrades:new Gn("bool","BarsDisplay",["Sort upgrades: default","Sort upgrades: PP"],"Sort the display of upgrades in either default order or by PP",!1,(()=>{po()})),UpgradesNeverCollapse:new Gn("bool","BarsDisplay",["Upgrades always expanded OFF","Upgrades always expanded ON"],"Toggle to make the upgrades sections always expanded to the size needed to display all upgrades",!0,(()=>{co()})),DragonAuraInfo:new Gn("bool","BarsDisplay",["Extra dragon aura info OFF","Extra dragon aura info ON"],"Shows information about changes in CPS and costs in the dragon aura interface.",!0),GrimoireBar:new Gn("bool","BarsDisplay",["Grimoire magic meter timer OFF","Grimoire magic meter timer ON"],"A timer on how long before the Grimoire magic meter is full",!0),GCTimer:new Gn("bool","BarsDisplay",["Golden cookie timer OFF","Golden cookie timer ON"],"A timer on the golden cookie when it has been spawned",!0,(()=>{1===e.GCTimer?Object.keys(ao).forEach((e=>{ao[e].style.display="block",ao[e].style.left=ht[e].l.style.left,ao[e].style.top=ht[e].l.style.top})):Object.keys(ao).forEach((e=>ao[e].style.display="none"))})),Favicon:new Gn("bool","BarsDisplay",["Favicon OFF","Favicon ON"],"Update favicon with golden/wrath cookie",!0,(()=>{Cn()})),WrinklerButtons:new Gn("bool","BarsDisplay",["Extra wrinkler buttons OFF","Extra wrinkler buttons ON"],"Show buttons for popping wrinklers at bottom of cookie section",!0,(()=>{t()})),HideSectionsButtons:new Gn("bool","BarsDisplay",["Hide buildings/upgrades button OFF","Hide buildings/upgrades button ON"],"Show buttons for hiding and showing the buildings and upgrades sections in the right column",!0,(()=>{e.HideSectionsButtons?l("CMSectionHidButtons").style.display="":l("CMSectionHidButtons").style.display="none"})),TooltipBuildUpgrade:new Gn("bool","Tooltip",["Building/upgrade tooltip information OFF","Building/upgrade tooltip information ON"],"Extra information in building/upgrade tooltips",!0),TooltipAmor:new Gn("bool","Tooltip",["Buildings tooltip amortization information OFF","Buildings tooltip amortization information ON"],"Add amortization information to buildings tooltip",!0),ToolWarnLucky:new Gn("bool","Tooltip",["Tooltip lucky warning OFF","Tooltip lucky warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Lucky!" rewards',!0),ToolWarnLuckyFrenzy:new Gn("bool","Tooltip",["Tooltip lucky frenzy warning OFF","Tooltip lucky frenzy warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Lucky!" (Frenzy) rewards',!0),ToolWarnConjure:new Gn("bool","Tooltip",["Tooltip conjure warning OFF","Tooltip conjure warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards',!0),ToolWarnConjureFrenzy:new Gn("bool","Tooltip",["Tooltip conjure frenzy warning OFF","Tooltip conjure frenzy warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards with Frenzy active',!0),ToolWarnEdifice:new Gn("bool","Tooltip",["Tooltip edifice warning OFF","Tooltip edifice warning ON"],'A warning when buying if it will put the bank under the amount needed for "Spontaneous Edifice" to possibly give you your most expensive building',!0),ToolWarnUser:new kn("numscale","Tooltip","Tooltip warning at x times CPS: ","Use this to show a customized warning if buying it will put the bank under the amount equal to value times cps; setting to 0 disables the function altogether",0,1/0),ToolWarnBon:new Gn("bool","Tooltip",["Calculate tooltip warning with bonus CPS OFF","Calculate tooltip warning with bonus CPS ON"],"Calculate the warning with or without the bonus CPS you get from buying",!0),ToolWarnPos:new Gn("bool","Tooltip",["Tooltip warning position (left)","Tooltip warning position (bottom)"],"Placement of the warning boxes",!1,(()=>{Io()})),TooltipGrim:new Gn("bool","Tooltip",["Grimoire tooltip information OFF","Grimoire tooltip information ON"],"Extra information in tooltip for grimoire",!0),TooltipWrink:new Gn("bool","Tooltip",["Wrinkler tooltip OFF","Wrinkler tooltip ON"],"Shows the amount of cookies a wrinkler will give when popping it",!0),TooltipLump:new Gn("bool","Tooltip",["Sugar lump tooltip OFF","Sugar lump tooltip ON"],"Shows the current Sugar Lump type in Sugar lump tooltip.",!0),TooltipPlots:new Gn("bool","Tooltip",["Garden plots tooltip OFF","Garden plots tooltip ON"],"Shows a tooltip for plants that have a cookie reward.",!0),TooltipPantheon:new Gn("bool","Tooltip",["Pantheon tooltip OFF","Pantheon tooltip ON"],"Shows additional info in the pantheon tooltip",!0),TooltipAscendButton:new Gn("bool","Tooltip",["Show Extra Info Ascend Tooltip OFF","Show Extra Info Ascend Tooltip ON"],"Shows additional info in the ascend tooltip",!0),Stats:new Gn("bool","Statistics",["Statistics OFF","Statistics ON"],"Extra Cookie Monster statistics!",!0),MissingUpgrades:new Gn("bool","Statistics",["Missing upgrades OFF","Missing upgrades ON"],"Shows missing upgrades in statistics menu",!0),MissingAchievements:new Gn("bool","Statistics",["Missing Achievements OFF","Missing Normal Achievements ON"],"Shows missing normal achievements in statistics menu.",!0),UpStats:new Gn("bool","Statistics",["Statistics update rate (default)","Statistics update rate (1s)"],"Default rate is once every 5 seconds",!1),HeavenlyChipsTarget:new kn("numscale","Statistics","Heavenly chips target: ",'Use this to set a heavenly chips target that will be counted towards in the "prestige" statsistics sections',1,1/0),ShowMissedGC:new Gn("bool","Statistics",["Missed GC OFF","Missed GC ON"],"Show a stat in the statistics screen that counts how many golden cookies you have missed",!0),Title:new Gn("bool","NotificationGeneral",["Title OFF","Title ON","Title pinned tab highlight"],'Update title with colden cookie/season popup timers; pinned tab highlight only changes the title when a golden cookie/season popup spawns; "!" means that golden cookie/reindeer can spawn',!0),GeneralSound:new Gn("bool","NotificationGeneral",["Consider game volume setting OFF","Consider game volume setting ON"],'Turning this toggle to "off" makes Cookie Monster no longer consider the volume setting of the base game, allowing mod notifications to play with base game volume turned down',!0),GCNotification:new Gn("bool","NotificationGC",["Notification OFF","Notification ON"],"Create a notification when golden cookie spawns",!0,(()=>{hn(e.GCNotification)})),GCFlash:new Gn("bool","NotificationGC",["Flash OFF","Flash ON"],"Flash screen on golden cookie",!0),ColourGCFlash:new bn("colour","NotificationGC","The colour of the GC flash, standard colour is white"),GCSound:new Gn("bool","NotificationGC",["Sound OFF","Sound ON"],"Play a sound on golden cookie",!0),GCVolume:new vn("vol","NotificationGC",[],"Volume"),GCSoundURL:new Gn("url","NotificationGC","Sound URL:","URL of the sound to be played when a golden cookie spawns"),FortuneNotification:new Gn("bool","NotificationFC",["Notification OFF","Notification ON"],"Create a notification when fortune cookie is on the ticker",!0,(()=>{hn(e.FortuneNotification)})),FortuneFlash:new Gn("bool","NotificationFC",["Flash OFF","Flash ON"],"Flash screen on fortune cookie spawn",!0),ColourFortuneFlash:new bn("colour","NotificationFC","The colour of the fortune flash, standard colour is white"),FortuneSound:new Gn("bool","NotificationFC",["Sound OFF","Sound ON"],"Play a sound on fortune cookie spawn",!0),FortuneVolume:new vn("vol","NotificationFC",[],"Volume"),FortuneSoundURL:new Gn("url","NotificationFC","Sound URL:","URL of the sound to be played when the ticker has a fortune cookie"),SeaNotification:new Gn("bool","NotificationSea",["Notification OFF","Notification ON"],"Create a notification on season popup",!0,(()=>{hn(e.SeaNotification)})),SeaFlash:new Gn("bool","NotificationSea",["Flash OFF","Flash ON"],"Flash screen on season popup",!0),ColourSeaFlash:new bn("colour","NotificationSea","The colour of the season popup flash, standard colour is white"),SeaSound:new Gn("bool","NotificationSea",["Sound OFF","Sound ON"],"Play a sound on season popup",!0),SeaVolume:new vn("vol","NotificationSea",[],"Volume"),SeaSoundURL:new Gn("url","NotificationSea","Sound URL:","URL of the sound to be played when on season popup spawns"),GardFlash:new Gn("bool","NotificationGard",["Garden Tick Flash OFF","Flash ON"],"Flash screen on garden tick",!0),ColourGardFlash:new bn("colour","NotificationGard","The colour of the garden flash, standard colour is white"),GardSound:new Gn("bool","NotificationGard",["Sound OFF","Sound ON"],"Play a sound on garden tick",!0),GardVolume:new vn("vol","NotificationGard",[],"Volume"),GardSoundURL:new Gn("url","NotificationGard","Garden Tick Sound URL:","URL of the sound to be played when the garden ticks"),MagicNotification:new Gn("bool","NotificationMagi",["Notification OFF","Notification ON"],"Create a notification when magic reaches maximum",!0,(()=>{hn(e.MagicNotification)})),MagicFlash:new Gn("bool","NotificationMagi",["Flash OFF","Flash ON"],"Flash screen when magic reaches maximum",!0),ColourMagicFlash:new bn("colour","NotificationMagi","The colour of the magic flash, standard colour is white"),MagicSound:new Gn("bool","NotificationMagi",["Sound OFF","Sound ON"],"Play a sound when magic reaches maximum",!0),MagicVolume:new vn("vol","NotificationMagi",[],"Volume"),MagicSoundURL:new Gn("url","NotificationMagi","Sound URL:","URL of the sound to be played when magic reaches maxium"),WrinklerNotification:new Gn("bool","NotificationWrink",["Notification OFF","Notification ON"],"Create a notification when a wrinkler appears",!0,(()=>{hn(e.WrinklerNotification)})),WrinklerFlash:new Gn("bool","NotificationWrink",["Flash OFF","Flash ON"],"Flash screen when a wrinkler appears",!0),ColourWrinklerFlash:new bn("colour","NotificationWrink","The colour of the wrinkler flash, standard colour is white"),WrinklerSound:new Gn("bool","NotificationWrink",["Sound OFF","Sound ON"],"Play a sound when a wrinkler appears",!0),WrinklerVolume:new vn("vol","NotificationWrink",[],"Volume"),WrinklerSoundURL:new Gn("url","NotificationWrink","Sound URL:","URL of the sound to be played when a wrinkler appears"),WrinklerMaxNotification:new Gn("bool","NotificationWrinkMax",["Notification OFF","Notification ON"],"Create a notification when the maximum amount of wrinklers has appeared",!0,(()=>{hn(e.WrinklerMaxNotification)})),WrinklerMaxFlash:new Gn("bool","NotificationWrinkMax",["Flash OFF","Flash ON"],"Flash screen when the maximum amount of Wrinklers has appeared",!0),ColourWrinklerMaxFlash:new bn("colour","NotificationWrinkMax","The colour of the maximum wrinkler flash, standard colour is white"),WrinklerMaxSound:new Gn("bool","NotificationWrinkMax",["Sound OFF","Sound ON"],"Play a sound when the maximum amount of wrinklers has appeared",!0),WrinklerMaxVolume:new vn("vol","NotificationWrinkMax",[],"Volume"),WrinklerMaxSoundURL:new Gn("url","NotificationWrinkMax","Sound URL:","URL of the sound to be played when the maximum amount of wrinklers has appeared"),BulkBuyBlock:new Gn("bool","Miscellaneous",["Block bulk buying OFF","Block bulk buying ON"],"Block clicking bulk buying when you can't buy all. This prevents buying 7 of a building when you are in buy-10 or buy-100 mode.",!0),FavouriteSettings:new Gn("bool","Miscellaneous",["Favourite settings section OFF","Favourite settings section ON","Favourite settings section ON (Locked)"],"Show stars before each setting which allows selecting it for a 'favourites' section at the top of the Cookie Monster settings. Setting this to Locked removes the stars but shows the 'favourites' section",!0,(()=>{Game.UpdateMenu()}))};function xn(){return JSON.stringify({favouriteSettings:lo,settings:e,version:"2.031.8"})}function Mn(){if(ge!==Game.dragonLevel||se){if(Game.dragonLevel<25&&Game.dragonLevels[Game.dragonLevel].buy.toString().includes("sacrifice")){let e=Game.dragonLevels[Game.dragonLevel].buy.toString().match(/Objects\[(.*)\]/)[1];const t=Game.dragonLevels[Game.dragonLevel].buy.toString().match(/sacrifice\((.*?)\)/)[1];if("i"!==e)if(e=e.replaceAll("'",""),Game.Objects[e].amount{if(e=n,Game.Objects[e].amount{Ct[e]=Mo(e)})),yt=[],Object.keys(Game.Upgrades).forEach((e=>{yt[e]=To(e)})),bt=[],Object.keys(Game.Achievements).forEach((e=>{bt[e]=wo(e)})),So()}let Pn=!1;function Bn(t,o,n){(1===e[o]||n)&&3===t&&!1===Pn||1===t?(l("CMFlashScreen").style.backgroundColor=e[`Colour${o}`],l("CMFlashScreen").style.opacity="0.5",3===t?(l("CMFlashScreen").style.display="inline",setTimeout((()=>{Bn(2,o,!0)}),1e3/Game.fps)):setTimeout((()=>{Bn(0,o,!0)}),1e3/Game.fps)):2===t?(l("CMFlashScreen").style.opacity="1",setTimeout((()=>{Bn(1,o,!0)}),1e3/Game.fps)):0===t&&(l("CMFlashScreen").style.display="none")}function En(t,o,n,i){if((1===e[o]||i)&&!1===Pn){const o=new Audio(t);e.GeneralSound?o.volume=e[n]/100*(Game.volume/100):o.volume=e[n]/100,o.play()}}function Nn(t,o,n){1===e[t]&&"hidden"===document.visibilityState&&!1===Pn&&new Notification(o,{body:n,badge:"https://orteil.dashnet.org/cookieclicker/favicon.ico"})}function On(){if(no!==Game.OnAscend&&(no=Game.OnAscend,Game.OnAscend?(l("game").style.bottom="0px",1===e.BotBar&&(l("CMBotBar").style.display="none"),1===e.TimerBar&&(l("CMTimerBar").style.display="none")):(gn(),Go()),bo()),!Game.OnAscend&&0===Game.AscendTimer){r!==Object.keys(Game.mods).length&&(Sn(),un(),r=Object.keys(Game.mods).length),se&&(dn(),tn(),Game.Has("Golden switch [off]")?(So(),yt["Golden switch [off]"].bought=0,Fo(),Se=de):Se=Game.cookiesPs,cn(),sn(),rn(),nn(),Mn(),function(){for(let e=0;e<11;e+=1)for(let t=0;t<3;t+=1)ft[e][t]=Tn(e,t)}(),ln(),function(){let e=0;if(Game.Objects.Bank.minigameLoaded){const t=Game.Objects.Bank.minigame.goods;let o=0;Object.keys(t).forEach((e=>{const n=t[e];o+=n.stock*n.val})),e+=o*Game.cookiesPsRawHighest}e+=function(){let e=0;So();let t=2;5!==ne&&18!==ne||(t-=1),5!==ie&&18!==ie||(t-=1),ne=5,ie=18;for(let e=0;e{Ct[t].amount>0&&(e=t)})),Ct[e].amount-=1,K-=1}return Object.keys(Ct).forEach((t=>{const o=Ct[t];e+=Tt(Game.Objects[o.name],Game.Objects[t].basePrice,o.amount,Game.Objects[t].free,o.amount)})),e}(),gt=e}(),se=0);const t=Game.auraMult("Fierce Hoarder")>0;!Y&&t?(Y=!0,q=1):Y&&!t&&(Y=!1,q=1),q&&(en(),q=0),function(){pn(),Ko(),function(){Re=0;let e=0;Object.keys(Game.wrinklers).forEach((t=>{2===Game.wrinklers[t].phase&&(e+=1)}));let t=1;if(Ct.Temple.minigameLoaded){const e=Game.hasGod("scorn");1===e?t*=1.15:2===e?t*=1.1:3===e&&(t*=1.05)}Ie=e,Re=e*(.05*e*1.1)*(.05*Game.Has("Sacrilegious corruption")+1)*(.05*Game.Has("Wrinklerspawn")+1)*t}(),Xo(),an();const e=Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset);pt=uo(e/ho())}(),f!==(Game.TickerEffect&&"fortune"===Game.TickerEffect.type)&&(f=Game.TickerEffect&&"fortune"===Game.TickerEffect.type,f&&(Bn(3,"FortuneFlash",!1),En(e.FortuneSoundURL,"FortuneSound","FortuneVolume",!1),Nn("FortuneNotification","Fortune Cookie found","A Fortune Cookie has appeared on the Ticker."))),g!==Game.shimmerTypes.reindeer.spawned&&(g=Game.shimmerTypes.reindeer.spawned,Object.keys(Game.shimmers).forEach((e=>{Game.shimmers[e].spawnLead&&"reindeer"===Game.shimmers[e].type&&(dt=Game.shimmers[e])})),Bn(3,"SeaFlash",!1),En(e.SeaSoundURL,"SeaSound","SeaVolume",!1),Nn("SeaNotification","Reindeer sighted!","A Reindeer has spawned. Click it now!")),Game.Objects.Farm.minigameLoaded&&C!==Game.Objects.Farm.minigame.nextStep&&(0!==C&&C0){let t=0;Object.keys(Game.wrinklers).forEach((e=>{2===Game.wrinklers[e].phase&&(t+=1)})),t>v?(v=t,t===Game.getWrinklersMax()&&e.WrinklerMaxFlash?Bn(3,"WrinklerMaxFlash",!1):Bn(3,"WrinklerFlash",!1),t===Game.getWrinklersMax()&&e.WrinklerMaxSound?En(e.WrinklerMaxSoundURL,"WrinklerMaxSound","WrinklerMaxVolume",!1):En(e.WrinklerSoundURL,"WrinklerSound","WrinklerVolume",!1),t===Game.getWrinklersMax()&&e.WrinklerMaxNotification?Nn("WrinklerMaxNotification","Maximum Wrinklers Reached","You have reached your maximum ammount of wrinklers"):Nn("WrinklerNotification","A Wrinkler appeared","A new wrinkler has appeared")):v=t}}()}G=0,ht={},Object.keys(Game.shimmers).forEach((e=>{ht[Game.shimmers[e].id]=Game.shimmers[e],Game.shimmers[e].spawnLead&&"golden"===Game.shimmers[e].type&&(ct=Game.shimmers[e],G+=1)})),Object.keys(ao).forEach((e=>{void 0===ht[e]&&(ao[e].parentNode.removeChild(ao[e]),delete ao[e])})),y!==Game.shimmerTypes.golden.n?(y=Game.shimmerTypes.golden.n,y&&(b{void 0===ao[Game.shimmers[t].id]&&function(t){const o=document.createElement("div");o.id=`GCTimer${t.id}`,o.style.width="96px",o.style.height="96px",o.style.position="absolute",o.style.zIndex="10000000001",o.style.textAlign="center",o.style.lineHeight="96px",o.style.fontFamily='"Kavoon", Georgia, serif',o.style.fontSize="35px",o.style.cursor="pointer",o.style.display="block",0===e.GCTimer&&(o.style.display="none"),o.style.left=t.l.style.left,o.style.top=t.l.style.top,o.onclick=function(){t.pop()},o.onmouseover=function(){t.l.style.filter="brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))",t.l.style.webkitFilter="brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))"},o.onmouseout=function(){t.l.style.filter="",t.l.style.webkitFilter=""},ao[t.id]=o,l("shimmers").appendChild(o)}(Game.shimmers[t])}))),Cn(),b=G,0===G&&(ct=0)):1===e.GCTimer&&y&&Object.keys(ao).forEach((e=>{ao[e].style.opacity=ht[e].l.style.opacity,ao[e].style.transform=ht[e].l.style.transform,ao[e].textContent=Math.ceil(ht[e].life/Game.fps)}))}function Fn(){let t="";for(let o=0;o{void 0===e[t]?(o=!0,e[t]=mn[t]):"Header"===t&&Object.keys(mn.Header).forEach((n=>{void 0!==e[t][n]&&e[t][n]>-1&&e[t][n]<2||(o=!0,e[t][n]=mn[t][n])}))})),o&&Ln(),On(),Object.keys(mn).forEach((e=>{"Header"!==e&&void 0!==wn[e].func&&wn[e].func()}))}else Wn(mn);Game.UpdateMenu(),Fn()}function An(){Object.keys(Game.wrinklers).forEach((e=>{Game.wrinklers[e].sucked>0&&0===Game.wrinklers[e].type&&(Game.wrinklers[e].hp=0)}))}function jn(t,o){if("b"===t){if(l("tooltip").innerHTML=Game.Objects[o].tooltip(),1===e.TooltipAmor){const e=Jo(Game.Objects[o],Game.Objects[o].basePrice,0,Game.Objects[o].free,Game.Objects[o].amount),t=e-Game.Objects[o].totalCookies;t>0&&(l("tooltip").innerHTML=l("tooltip").innerHTML.split("so far").join(`so far
${B(t)} ${1===Math.floor(t)?"cookie":"cookies"} left to amortize (${mo((e-Game.Objects[o].totalCookies)/(Game.Objects[o].storedTotalCps*Game.globalCpsMult)).text})`))}-1===Game.buyMode&&(l("tooltip").innerHTML=l("tooltip").innerHTML.split(B(Game.Objects[o].bulkPrice)).join(B((Game.Objects[o],Game.Objects[o].basePrice,Game.Objects[o].amount,Game.Objects[o].free,Game.buyBulk,1))))}else if("u"===t){if(!Game.UpgradesInStore[o])return"";l("tooltip").innerHTML=Game.crateTooltip(Game.UpgradesInStore[o],"store")}else"s"===t?l("tooltip").innerHTML=Game.lumpTooltip():"g"===t?l("tooltip").innerHTML=Game.Objects["Wizard tower"].minigame.spellTooltip(o)():"p"===t?l("tooltip").innerHTML=Game.ObjectsById[2].minigame.tileTooltip(o[0],o[1])():"ha"===t?l("tooltip").innerHTML=Game.ObjectsById[2].minigame.toolTooltip(1)():"wb"===t?l("tooltip").innerHTML="":"pag"===t?l("tooltip").innerHTML=Game.Objects.Temple.minigame.godTooltip(o)():"pas"===t&&(l("tooltip").innerHTML=Game.Objects.Temple.minigame.slotTooltip(o[0])());if("b"===t&&1===Game.buyMode||"u"===t||"s"===t||"g"===t||"p"===t&&!Game.keys[16]||"ha"===t||"wb"===t||"pag"===t||"pas"===t&&-1!==o[1]){const e=document.createElement("div");e.id="CMTooltipArea",l("tooltip").appendChild(e)}return eo=t,to=o,zo(),l("tooltip").innerHTML}function Dn(){Game.Objects["Wizard tower"].minigameLoaded&&Object.keys(Game.Objects["Wizard tower"].minigame.spellsById).forEach((e=>{null!==l(`grimoireSpell${e}`).onmouseover&&(x[e]=l(`grimoireSpell${e}`).onmouseover,l(`grimoireSpell${e}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("g",`${e}`)),"this"),Game.tooltip.wobble()})}))}function Hn(){if(!m&&Game.Objects["Wizard tower"].minigameLoaded){const{minigame:t}=Game.Objects["Wizard tower"];p=t.draw,Game.Objects["Wizard tower"].minigame.draw=function(){p(),1===e.GrimoireBar&&t.magic1&&(e.Header[t]=0),Ln()}function _n(t,o){const n=document.createElement("div");n.className="title",n.style.padding="0px 16px",n.style.opacity="0.7",n.style.fontSize="17px",n.style.fontFamily='"Kavoon", Georgia, serif',n.appendChild(document.createTextNode(`${t} `));const i=document.createElement("span");return i.style.cursor="pointer",i.style.display="inline-block",i.style.height="14px",i.style.width="14px",i.style.borderRadius="7px",i.style.textAlign="center",i.style.backgroundColor="#C0C0C0",i.style.color="black",i.style.fontSize="13px",i.style.verticalAlign="middle",i.textContent=e.Header[o]?"-":"+",i.onclick=function(){Vn(o),Game.UpdateMenu()},n.appendChild(i),n}function Qn(e,t,o,n){const i=document.createElement("div");i.className="listing";const a=document.createElement("b");if(a.textContent=t,i.appendChild(a),"withTooltip"===e){i.className="listing",i.appendChild(document.createTextNode(" "));const e=document.createElement("span");e.onmouseout=function(){Game.tooltip.hide()},e.onmouseover=function(){Game.tooltip.draw(this,escape(Ut[n].innerHTML))},e.style.cursor="default",e.style.display="inline-block",e.style.height="10px",e.style.width="10px",e.style.borderRadius="5px",e.style.textAlign="center",e.style.backgroundColor="#C0C0C0",e.style.color="black",e.style.fontSize="9px",e.style.verticalAlign="bottom",e.textContent="?",i.appendChild(e)}return i.appendChild(document.createTextNode(": ")),i.appendChild(o),i}function Xn(e){const t=document.createDocumentFragment();t.appendChild(document.createTextNode(`${e.length} `));const o=document.createElement("span");o.onmouseout=function(){Game.tooltip.hide()};const n=document.createElement("div"),i=document.createElement("div");i.style.minWidth="140px",i.style.marginBottom="4px";const a=document.createElement("div");return a.className="name",a.style.marginBottom="4px",a.style.textAlign="center",a.textContent="Missing",i.appendChild(a),Object.keys(e).forEach((t=>{const o=document.createElement("div");o.style.textAlign="center",o.appendChild(document.createTextNode(e[t])),i.appendChild(o)})),n.appendChild(i),o.onmouseover=function(){Game.tooltip.draw(this,escape(n.innerHTML))},o.style.cursor="default",o.style.display="inline-block",o.style.height="10px",o.style.width="10px",o.style.borderRadius="5px",o.style.textAlign="center",o.style.backgroundColor="#C0C0C0",o.style.color="black",o.style.fontSize="9px",o.style.verticalAlign="bottom",o.textContent="?",t.appendChild(o),t}function qn(t){const o=document.createElement("div");if(o.className="subsection",o.appendChild(t),o.appendChild(_n("Lucky Cookies","Lucky")),e.Header.Lucky&&o.appendChild(function(){const e=Game.auraMult("Dragon's Fortune")?"GoldCookDragonsFortuneTooltipPlaceholder":"GoldCookTooltipPlaceholder",t=document.createElement("div");t.className="CMStatsLuckySection";const o=Game.cookies+go(){Game.HasUnlocked(Do[e])||c.push(Do[e])})),0!==c.length&&e.appendChild(Qn("basic","Rare plant drops left to unlock",Xn(c))),e}())),o.appendChild(_n("Prestige","Prestige")),e.Header.Prestige&&o.appendChild(function(){const t=document.createElement("div");t.className="CMStatsPrestigeSection";const o=Math.floor(Game.HowMuchPrestige(lt+Game.cookiesReset+He+(Game.HasUnlocked("Chocolate egg")&&!Game.Has("Chocolate egg")?Le:0)));t.appendChild(Qn("withTooltip","Prestige level (cur / max)",document.createTextNode(`${B(Game.prestige)} / ${B(o)}`),"PrestMaxTooltipPlaceholder"));const n=Math.max(0,Game.HowManyCookiesReset(o+1)-(lt+Game.cookiesReset+He+(Game.HasUnlocked("Chocolate egg")&&!Game.Has("Chocolate egg")&&Le?Le:0))),i=document.createDocumentFragment();i.appendChild(document.createTextNode(B(n)));const a=document.createElement("small");a.textContent=` (${uo(n/st,1)})`,i.appendChild(a),t.appendChild(Qn("withTooltip","Cookies to next level",i,"NextPrestTooltipPlaceholder")),t.appendChild(Qn("withTooltip","Heavenly chips (cur / max)",document.createTextNode(`${B(Game.heavenlyChips)} / ${B(o-Game.prestige+Game.heavenlyChips)}`),"HeavenChipMaxTooltipPlaceholder")),t.appendChild(Qn("basic","Heavenly chips per second (last 5 seconds)",document.createTextNode(B(Ne,2))));const r=Number(e.HeavenlyChipsTarget);if(!Number.isNaN(r)){const e=r-Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned));e>0&&(t.appendChild(Qn("basic","Heavenly chips to target set in settings (cur)",document.createTextNode(B(e)))),t.appendChild(Qn("basic","Time till target (cur, current 5 second average)",document.createTextNode(uo(e/Ne)))))}const l=function(e){let t=Game.cookiesPs;So(),0===yt["Heavenly key"].bought&&(yt["Heavenly chip secret"].bought=1,yt["Heavenly cookie stand"].bought=1,yt["Heavenly bakery"].bought=1,yt["Heavenly confectionery"].bought=1,yt["Heavenly key"].bought=1,Fo(),t=de,So()),lt>=1e6&&Oo("Sacrifice"),lt>=1e9&&Oo("Oblivion"),lt>=1e12&&Oo("From scratch"),lt>=1e15&&Oo("Nihilism"),lt>=1e18&&Oo("Dematerialize"),lt>=1e21&&Oo("Nil zero zilch"),lt>=1e24&&Oo("Transcendence"),lt>=1e27&&Oo("Obliterate"),lt>=1e30&&Oo("Negative void"),lt>=1e33&&Oo("To crumbs, you say?"),lt>=1e36&&Oo("You get nothing"),lt>=1e39&&Oo("Humble rebeginnings"),lt>=1e42&&Oo("The end of the world"),lt>=1e45&&Oo("Oh, you're back"),lt>=1e48&&Oo("Lazarus"),lt>=1e51&&Oo("Smurf account"),lt>=1e54&&Oo("If at first you don't succeed"),yt["Heavenly chip secret"].bought=1,yt["Heavenly cookie stand"].bought=1,yt["Heavenly bakery"].bought=1,yt["Heavenly confectionery"].bought=1,yt["Heavenly key"].bought=1,oe=e;const o=ee;Fo(),Uo(),o!==ee&&Fo();const n=de-t;return oe=Game.prestige,n}(o),s=document.createDocumentFragment();s.appendChild(document.createTextNode(B(l)));const c=Math.round(l/Game.cookiesPs*1e4);if(Number.isFinite(c)&&0!==c){const e=document.createElement("small");e.textContent=` (${c/100}% of income)`,s.appendChild(e)}t.appendChild(Qn("withTooltip","Reset bonus income",s,"ResetTooltipPlaceholder"));const d=Math.floor(Game.HowMuchPrestige(Game.cookiesReset)),p=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned)),u=p-d;if(!Game.Has("Lucky digit")){let e=7-p%10;e<0&&(e+=10);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Qn("basic",'Next "Lucky Digit" (total / reset)',i))}if(!Game.Has("Lucky number")){let e=777-p%1e3;e<0&&(e+=1e3);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Qn("basic",'Next "Lucky Number" (total / reset)',i))}if(!Game.Has("Lucky payout")){let e=777777-p%1e6;e<0&&(e+=1e6);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Qn("basic",'Next "Lucky Payout" (total / reset)',i))}return t}()),Game.cpsSucked>0&&(o.appendChild(_n("Wrinklers","Wrink")),e.Header.Wrink)){const e=document.createDocumentFragment();e.appendChild(document.createTextNode(`${B(He)} / ${B(Ue)} `));const t=document.createElement("a");t.textContent="Pop All Normal",t.className="option",t.onclick=function(){An()},e.appendChild(t),o.appendChild(Qn("basic","Rewards of Popping (All/Normal)",e));const n=document.createDocumentFragment();n.appendChild(document.createTextNode(`${B($e[0])} `));const i=document.createElement("a");i.textContent="Pop Single Fattest",i.className="option",i.onclick=function(){null!==$e[1]&&(Game.wrinklers[$e[1]].hp=0)},n.appendChild(i),o.appendChild(Qn("basic",`Rewards of Popping Single Fattest Non-Shiny Wrinkler (id: ${null!==$e[1]?$e[1]:"None"})`,n))}if(o.appendChild(function(){const t=document.createElement("div");t.className="CMStatsSeasonSection";let o=!1;const n=[];Object.keys(Wo).forEach((e=>{Game.Has(Wo[e])||(n.push(Wo[e]),o=!0)}));const i=[];Object.keys(Ao).forEach((e=>{Game.Has(Ao[e])||(i.push(Ao[e]),o=!0)}));const a=[];Object.keys(jo).forEach((e=>{Game.Has(jo[e])||(a.push(jo[e]),o=!0)}));const r=[];Object.keys(Game.eggDrops).forEach((e=>{Game.HasUnlocked(Game.eggDrops[e])||(r.push(Game.eggDrops[e]),o=!0)}));const l=[];Object.keys(Game.rareEggDrops).forEach((e=>{Game.HasUnlocked(Game.rareEggDrops[e])||(l.push(Game.rareEggDrops[e]),o=!0)}));const s=Game.HasUnlocked("Chocolate egg")&&!Game.Has("Chocolate egg"),c=Game.Has("Century egg");if(("christmas"===Game.season||o||s||c)&&(t.appendChild(_n("Season Specials","Sea")),e.Header.Sea)){if(0!==n.length){t.appendChild(Qn("basic","Halloween cookies left to buy",Xn(n)));let e=.95;if(Game.HasAchiev("Spooky cookies")&&(e=.8),Game.Has("Starterror")&&(e*=.9),e*=1/Game.dropRateMult(),Game.hasGod){const t=Game.hasGod("seasons");1===t?e*=.9:2===t?e*=.95:3===t&&(e*=.97)}const o=n.length/7;t.appendChild(Qn("basic","Chance of receiving a cookie from wrinkler/shiny wrinkler",document.createTextNode(`${B((1-e)*o*100)}% / ${B((1-.9*e)*o*100)}%`)))}if(0!==i.length){t.appendChild(Qn("basic","Christmas cookies left to buy",Xn(i)));let e=.8;if(Game.HasAchiev("Let it snow")&&(e=.6),e*=1/Game.dropRateMult(),Game.Has("Starsnow")&&(e*=.95),Game.hasGod){const t=Game.hasGod("seasons");1===t?e*=.9:2===t?e*=.95:3===t&&(e*=.97)}const o=i.length/7;t.appendChild(Qn("basic","Chance of receiving a cookie from reindeer",document.createTextNode(`${B((1-e)*o*100)}%`)))}0!==a.length&&t.appendChild(Qn("basic","Valentine cookies left to buy",Xn(a)));const e=function(e){let t=e*(1/Game.dropRateMult());if(Game.HasAchiev("Hide & seek champion")&&(t*=.7),Game.Has("Omelette")&&(t*=.9),Game.Has("Starspawn")&&(t*=.9),Game.hasGod){const e=Game.hasGod("seasons");1===e?t*=.9:2===e?t*=.95:3===e&&(t*=.97)}const o=1-t,n=Game.eggDrops.length-r.length,i=Game.rareEggDrops.length-l.length,a=.9*o*(1-n/Game.eggDrops.length),s=.1*o*(1-i/Game.rareEggDrops.length),c=.9*o*(n/Game.eggDrops.length)+.1*o*(i/Game.rareEggDrops.length);return[a+.9*c*(1-n/Game.eggDrops.length),s+.1*c*(1-i/Game.rareEggDrops.length)]};0!==r.length&&(t.appendChild(Qn("basic","Normal easter eggs left to unlock",Xn(r))),t.appendChild(Qn("basic","Chance of receiving an egg from wrinkler/golden cookie",document.createTextNode(`${B(100*e(.98)[0])}% / ${B(100*e(.9)[0])}%`)))),0!==l.length&&(t.appendChild(Qn("basic","Rare easter eggs left to unlock",Xn(l))),t.appendChild(Qn("basic","Chance of receiving a rare egg from wrinkler/golden cookie",document.createTextNode(`${B(100*e(.98)[1])}% / ${B(100*e(.9)[1])}%`)))),"christmas"===Game.season&&t.appendChild(Qn("basic","Reindeer reward",document.createTextNode(B(Fe)))),s&&t.appendChild(Qn("withTooltip","Chocolate egg cookies",document.createTextNode(B(Le)),"ChoEggTooltipPlaceholder")),c&&t.appendChild(Qn("basic","Century egg multiplier",document.createTextNode(Math.round(1e4*(Oe-1))/100+"%")))}return t}()),o.appendChild(_n("Miscellaneous","Misc")),e.Header.Misc){if(o.appendChild(Qn("basic",`Average cookies per second (past ${qt[e.AvgCPSHist]<60?`${qt[e.AvgCPSHist]} seconds`:qt[e.AvgCPSHist]/60+(3===e.AvgCPSHist?" minute":" minutes")})`,document.createTextNode(B(ho(),3)))),o.appendChild(Qn("basic",`Average cookie clicks per second (past ${Yt[e.AvgClicksHist]}${0===e.AvgClicksHist?" second":" seconds"})`,document.createTextNode(B(Ve,1)))),o.appendChild(Qn("basic",`Cookies from clicking (past ${Yt[e.AvgClicksHist]}${0===e.AvgClicksHist?" second":" seconds"})`,document.createTextNode(B(E.calcSum(Ve*Yt[e.AvgClicksHist]))))),Game.Has("Fortune cookies")){const e=[];Object.keys(Lo).forEach((t=>{Game.Has(Lo[t])||e.push(Lo[t])})),0!==e.length&&o.appendChild(Qn("basic","Fortune Upgrades Left to Buy",Xn(e)))}if(e.ShowMissedGC&&o.appendChild(Qn("basic","Missed golden cookies",document.createTextNode(B(Game.missedGoldenClicks)))),Game.prefs.autosave){const e=document.createElement("span");e.id="CMStatsAutosaveTimer",e.innerText=Game.sayTime(60*Game.fps-(Game.OnAscend?0:Game.T%(60*Game.fps)),4),o.appendChild(Qn("basic","Time till autosave",e))}}l("menu").insertBefore(o,l("menu").childNodes[2]),e.MissingUpgrades&&l("menu").childNodes.forEach((e=>{if(e.children[0])if("Prestige"===e.children[0].innerHTML&&Qe){const t=Qe.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesPrestigeTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing Prestige upgrades: ${t}/${Game.PrestigeUpgrades.length} (${Math.floor(t/Game.PrestigeUpgrades.length*100)}%)`,o.appendChild(n),e.appendChild(o);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=Qe,e.appendChild(i)}else if("Upgrades"===e.children[0].innerHTML){if(_e){const t=_e.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing normal upgrades: ${t}/${Game.UpgradesByPool[""].length+Game.UpgradesByPool.tech.length} (${Math.floor(t/(Game.UpgradesByPool[""].length+Game.UpgradesByPool.tech.length)*100)}%)`,o.appendChild(n),e.insertBefore(o,e.childNodes[3]);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=_e,e.insertBefore(i,document.getElementById("CMMissingUpgradesTitle").nextSibling)}if(Xe){const t=Xe.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesCookiesTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing Cookie upgrades: ${t}/${Game.UpgradesByPool.cookie.length} (${Math.floor(t/Game.UpgradesByPool.cookie.length*100)}%)`,o.appendChild(n),e.appendChild(o);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=Xe,e.appendChild(i)}}})),e.MissingAchievements&&function(){let t;Object.values(document.querySelectorAll("div.title")).forEach((e=>{e.textContent.includes("Achievements")&&(t=e.parentElement.querySelectorAll("div.listing.crateBox")[0])})),e.MissingAchievements&&Object.values(t.children).forEach((e=>{if(!e.className.includes("enabled")){const t=e.onclick.toString().split(/\[(.*)\]/gi)[1],{icon:o}=Game.AchievementsById[t];e.style.backgroundPosition=`${48*-o[0]}px ${48*-o[1]}px`,e.onmouseover=function(){Game.mouseDown||(Game.setOnCrate(this),Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>function(e){const t=[];"shadow"===e.pool?t.push("Shadow Achievement","#9700cf"):t.push("Achievement",0),t.push("Locked",0);let o=0;(Game.Has("Neuromancy")||Game.sesame&&"debug"===e.pool)&&(o=1),o&&0===e.won?t.push("Click to win!","#00c462"):o&&e.won>0&&t.push("Click to lose!","#00c462");let{icon:n}=e;e.iconFunction&&(n=e.iconFunction());let{desc:i}=e;e.descFunc&&(i=e.descFunc("stats"));let a="";for(let e=0;e[${t[e]}]`);return a=a.substring(1),`
\n
\n
${e.name}
\n ${a}
${i}
\n ${Game.sesame?`
Id : ${e.id} | Order : ${Math.floor(e.order)}${e.tier?` | Tier : ${e.tier}`:""}
`:""}`}(Game.AchievementsById[t])),"top"),Game.tooltip.wobble())}}}))}()}const Yn={Favourite:"Favourite Settings",Calculation:"Calculation",Notation:"Notation",Colours:"Colours and colour coding",BarsDisplay:"Infobars and visual settings",Tooltip:"Tooltips",Statistics:"Statistics",Notification:"Notifications",Miscellaneous:"Miscellaneous"},Kn={NotificationGeneral:"General Notifications",NotificationGC:"Golden Cookie",NotificationFC:"Fortune Cookie",NotificationSea:"Season Special",NotificationGard:"Garden Tick",NotificationMagi:"Full Magic Bar",NotificationWrink:"Wrinkler",NotificationWrinkMax:"Maximum Wrinklers"};function Jn(t,o){const n=document.createElement("div");n.className="title",n.style.opacity="0.7",n.style.fontSize="17px",n.appendChild(document.createTextNode(`${o} `));const i=document.createElement("span");return i.style.cursor="pointer",i.style.display="inline-block",i.style.height="14px",i.style.width="14px",i.style.borderRadius="7px",i.style.textAlign="center",i.style.backgroundColor="#C0C0C0",i.style.color="black",i.style.fontSize="13px",i.style.verticalAlign="middle",i.textContent=e.Header[t]?"-":"+",i.onclick=function(){Vn(t),Game.UpdateMenu()},n.appendChild(i),n}function Zn(t){const o=document.createElement("div");if(o.className="listing",1===e.FavouriteSettings&&o.appendChild(function(e){const t=document.createElement("a");return lo.includes(e)?(t.innerText="★",t.style.color="yellow"):t.innerText="☆",t.className="option",t.onclick=function(){!function(e){lo.includes(e)?lo=lo.filter((t=>t!==e)):lo.push(e)}(e),Ln(),Game.UpdateMenu()},t.onmouseover=function(){Game.tooltip.draw(this,escape(Ut.FavouriteSettingPlaceholder.innerHTML))},t.onmouseout=function(){Game.tooltip.hide()},t.appendChild(document.createTextNode(" ")),t}(t)),"bool"===wn[t].type){const n=document.createElement("a");wn[t].toggle&&0===e[t]?n.className="option off":n.className="option",n.id=In+t,n.onclick=function(){!function(t){e[t]+=1,e[t]===wn[t].label.length?(e[t]=0,wn[t].toggle&&(l(In+t).className="option off")):l(In+t).className="option",void 0!==wn[t].func&&wn[t].func(),Ln()}(t),Game.UpdateMenu()},n.textContent=wn[t].label[e[t]],o.appendChild(n);const i=document.createElement("label");return i.textContent=wn[t].desc,i.style.lineHeight="1.6",o.appendChild(i),o}if("vol"===wn[t].type){const n=document.createElement("div");n.className="sliderBox";const i=document.createElement("div");i.style.float="left",i.innerHTML=wn[t].desc,n.appendChild(i);const a=document.createElement("div");a.id=`slider${t}right`,a.style.float="right",a.innerHTML=`${e[t]}%`,n.appendChild(a);const r=document.createElement("input");r.className="slider",r.id=`slider${t}`,r.style.clear="both",r.type="range",r.min="0",r.max="100",r.step="1",r.value=e[t],r.oninput=function(){zn(t),Game.UpdateMenu()},r.onchange=function(){zn(t),Game.UpdateMenu()},n.appendChild(r),o.appendChild(n);const l=document.createElement("a");return l.className="option",l.onclick=function(){En(e[t.replace("Volume","SoundURL")],t.replace("Volume","Sound"),t,!0)},l.textContent="Test sound",o.appendChild(l),o}if("url"===wn[t].type){const n=document.createElement("span");n.className="option",n.textContent=`${wn[t].label} `,n.style.lineHeight="1.6",o.appendChild(n);const i=document.createElement("input");i.id=In+t,i.className="option",i.type="text",i.readOnly=!0,i.setAttribute("value",e[t]),i.style.width="300px",o.appendChild(i),o.appendChild(document.createTextNode(" "));const a=document.createElement("input");a.id=`${In+t}Prompt`,a.className="option",a.type="text",a.setAttribute("value",e[t]);const r=document.createElement("a");r.className="option",r.onclick=function(){!function(e,t){Game.promptWrapL.className="framed";const o=e;Game.promptL.innerHTML=`${o}
`,Object.keys(t).forEach((e=>{const o=document.createElement("a");o.id=`promptOption${e}`,o.className="option",o.onclick=function(){PlaySound("snd/tick.mp3"),t[e][1]()},o.textContent=t[e][0],Game.promptL.children[1].appendChild(o)})),Game.promptAnchorL.style.display="block",Game.darkenL.style.display="block",Game.promptL.focus(),Game.promptOn=1,Game.UpdatePrompt()}(a.outerHTML,[["Save",function(){e[t]=l(`CMConfig${t}Prompt`).value,Ln(),Game.ClosePrompt(),Game.UpdateMenu()}],["Cancel",function(){Game.ClosePrompt()}]])},r.textContent="Edit",o.appendChild(r);const s=document.createElement("label");return s.textContent=wn[t].desc,s.style.lineHeight="1.6",o.appendChild(s),o}if("colour"===wn[t].type){const n=document.createElement("span");n.className="option";const i=document.createElement("input");i.id=t,i.style.width="65px",i.setAttribute("value",e[t]),n.appendChild(i),new $n(i,{hash:!0,position:"right",onInput:function(){e[this.targetElement.id]=this.toHEXString(),Fn(),Ln(),Game.UpdateMenu()}});const a=document.createElement("label");if(a.textContent=wn[t].desc,a.style.lineHeight="1.6",n.appendChild(a),t.includes("Flash")){const e=document.createElement("a");e.className="option",e.onclick=function(){Bn(3,t.replace("Colour",""),!0)},e.textContent="Test flash",n.appendChild(e)}return o.appendChild(n),Rn().init(),o}if("numscale"===wn[t].type){const n=document.createElement("span");n.className="option",n.textContent=`${wn[t].label} `,n.style.lineHeight="1.6",o.appendChild(n);const i=document.createElement("input");i.id=In+t,i.className="option",i.type="number",i.value=e[t],i.min=wn[t].min,i.max=wn[t].max,i.oninput=function(){e[t]=this.value,Ln(),fn(),Game.UpdateMenu()},o.appendChild(i),o.appendChild(document.createTextNode(" "));const a=document.createElement("label");return a.textContent=wn[t].desc,a.style.lineHeight="1.6",o.appendChild(a),o}return o}function ei(t){if(1===e.TimerBar&&0===e.TimerBarPos){const e=parseInt(l("CMTimerBar").style.height,10);Game.mouseY-=e,t(),Game.mouseY+=e}else t()}function ti(){T.Beautify=Beautify,Beautify=B,T.CalculateGains=Game.CalculateGains,Game.CalculateGains=function(){T.CalculateGains(),se=1,S=Date.now(),P=Date.now()},T.tooltip={},T.tooltip.draw=Game.tooltip.draw,T.tooltip.drawMod=new Function(`return ${Game.tooltip.draw.toString().split("this").join("Game.tooltip")}`)(),Game.tooltip.draw=function(e,t,o){T.tooltip.drawMod(e,t,o)},T.tooltip.update=Game.tooltip.update,T.tooltip.updateMod=new Function(`return ${Game.tooltip.update.toString().split("this.").join("Game.tooltip.")}`)(),Game.tooltip.update=function(){T.tooltip.updateMod(),function(){if("store"===Game.tooltip.origin){let t=0;1===e.ToolWarnLucky&&1===e.ToolWarnPos&&null!==l("CMDispTooltipWarningParent")&&(t=l("CMDispTooltipWarningParent").clientHeight-4),Game.tooltip.tta.style.top=`${Math.min(parseInt(Game.tooltip.tta.style.top,10),l("game").clientHeight+l("topBar").clientHeight-Game.tooltip.tt.clientHeight-t-46)}px`}}()},T.UpdateWrinklers=Game.UpdateWrinklers,Game.UpdateWrinklers=function(){ei(T.UpdateWrinklers)},T.UpdateSpecial=Game.UpdateSpecial,Game.UpdateSpecial=function(){ei(T.UpdateSpecial)},l("bigCookie").removeEventListener("click",Game.ClickCookie,!1),l("bigCookie").addEventListener("click",(()=>{ei(Game.ClickCookie)}),!1),T.RebuildUpgrades=Game.RebuildUpgrades,Game.RebuildUpgrades=function(){T.RebuildUpgrades(),M=[],Object.keys(Game.UpgradesInStore).forEach((e=>{null!==l(`upgrade${e}`).onmouseover&&(M[e]=l(`upgrade${e}`).onmouseover,l(`upgrade${e}`).onmouseover=function(){Game.mouseDown||(Game.setOnCrate(this),Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("u",`${e}`)),"store"),Game.tooltip.wobble())})})),Game.CalculateGains()},T.ClickProduct=Game.ClickProduct,Game.ClickProduct=function(t){(!e.BulkBuyBlock||Game.ObjectsById[t].bulkPrice-1;--e)if(Game.ObjectsById[e].amount>0){const o=Ct[Game.ObjectsById[e].name].name;Ct[o].amount-=1,K-=1,t=Ct[o].basePrice*Game.priceIncrease**Math.max(0,Ct[o].amount-1-Ct[o].free),t=Game.modifyBuildingPrice(Ct[o],t),t=Math.ceil(t);break}const o=ee;return Fo(),Uo(),o!==ee&&Fo(),[de-Game.cookiesPs,t]}(t),n=uo(o/(e+Game.cookiesPs));let i;i=0===Game.cookiesPs?B(1/0):B(e/Game.cookiesPs*100),l("dragonAuraInfo").style.minHeight="60px",l("dragonAuraInfo").style.margin="8px",l("dragonAuraInfo").appendChild(document.createElement("div")).className="line";const a=document.createElement("div");a.style.minWidth="200px",a.style.textAlign="center",a.textContent=`Picking this aura will change CPS by ${B(e)} (${i}% of current CPS).`,l("dragonAuraInfo").appendChild(a);const r=document.createElement("div");r.style.minWidth="200px",r.style.textAlign="center",r.textContent=`It will take ${n} to recover the cost.`,l("dragonAuraInfo").appendChild(r)}}(t)},T.ToggleSpecialMenu=Game.ToggleSpecialMenu,Game.ToggleSpecialMenu=function(e){T.ToggleSpecialMenu(e),function(){if(null!==(l("specialPopup").className.match(/onScreen/)&&l("specialPopup").children[0].style.background.match(/dragon/)))for(let e=0;e${fe}`,"this"),Game.tooltip.wobble()},l("specialPopup").children[e].onmouseout=function(){Game.tooltip.shouldHide=1})}()},T.UpdateMenu=Game.UpdateMenu,Game.UpdateMenu=function(){void 0!==Rn().picker&&void 0!==Rn().picker.owner||(T.UpdateMenu(),function(){const t=document.createElement("div");t.className="title","prefs"===Game.onMenu?(t.textContent="Cookie Monster Settings",function(t){const o=document.createDocumentFragment();o.appendChild(t),Object.keys(Yn).forEach((t=>{if("Favourite"===t){if(0!==lo.length&&e.FavouriteSettings>0&&(o.appendChild(Jn(t,Yn[t])),e.Header[t]))for(let e=0;e{const n=Jn(t,Kn[t]);n.style.fontSize="15px",n.style.opacity="0.5",o.appendChild(n),e.Header[t]&&Object.keys(wn).forEach((e=>{wn[e].group===t&&o.appendChild(Zn(e))}))})):Object.keys(wn).forEach((e=>{wn[e].group===t&&o.appendChild(Zn(e))})))}));const n=document.createElement("div");n.className="listing";const i=document.createElement("a");i.className="option",i.onclick=function(){Wn(mn)},i.textContent="Restore Default",n.appendChild(i),o.appendChild(n),l("menu").childNodes[2].insertBefore(o,l("menu").childNodes[2].childNodes[l("menu").childNodes[2].childNodes.length-1])}(t)):"stats"===Game.onMenu?e.Stats&&(t.textContent="Cookie Monster Statistics",qn(t)):"log"===Game.onMenu&&(t.textContent="Cookie Monster ",function(t){const o=document.createElement("div");o.className="subsection";const n=document.createElement("span");if(n.style.cursor="pointer",n.style.display="inline-block",n.style.height="14px",n.style.width="14px",n.style.borderRadius="7px",n.style.textAlign="center",n.style.backgroundColor="#C0C0C0",n.style.color="black",n.style.fontSize="13px",n.style.verticalAlign="middle",n.textContent=e.Header.InfoTab?"-":"+",n.onclick=function(){Vn("InfoTab"),Game.UpdateMenu()},t.appendChild(n),o.appendChild(t),e.Header.InfoTab){const e=document.createElement("div");e.innerHTML='
\n Cookie Monster\n offers a wide range of tools and statistics to enhance your game experience.\n It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want.
\n Progess on new updates and all previous release notes can be found on the GitHub page linked above!
\n Please also report any bugs you may find over there!
\n
\n ',o.appendChild(e);const t=document.createElement("div");t.innerHTML='
\nWe have moved Cookie Monster to a new location!
\nPlease update the link you are using to load Cookie Monster to https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js and let everybody know this is the new place to find Cookie Monster!
\nThese are the release notes for the latest update (v 2.031.8).
\n
\nThis update implements the following functions:
\n- The tooltip of buildings now shows how many buildings need to be bought before a new achievement is reached and the cost and PP of this
\n- New setting to force the upgrades sections to always show all available upgrades, stopping them from collapsing and expanding
\n
\nThis update fixes the following bugs:
\n- Settings menu now correctly updates after changing a setting
\n- Fixed incorrect calculation of dates in rare cases
\n- Remove golden cookie timers when you ascend
\n
\n',o.appendChild(t)}const i=l("menu").children[1];i.insertBefore(o,i.children[1])}(t))}())},T.sayTime=Game.sayTime,Vt=function(e,t){return Number.isNaN(e)||e<=0?T.sayTime(e,t):uo(e/Game.fps,1)},T.Logic=Game.Logic,Game.Logic=function(){T.Logic();let t="Cookie Clicker";"fools"===Game.season&&(t="Cookie Baker"),ro=`${Game.OnAscend?"Ascending! ":""}${B(Game.cookies)} ${1===Game.cookies?"cookie":"cookies"} - ${t}`,function(){if(Game.OnAscend||0===e.Title)document.title=ro;else if(1===e.Title){let e,t,o,n=!1,i=!1;e=ct?ct.wrath?`[W${Math.ceil(ct.life/Game.fps)}]`:`[G${Math.ceil(ct.life/Game.fps)}]`:Game.Has("Golden switch [off]")?"[GS]":`[${Number(l("CMTimerBarGCMinBar").textContent)<0?"!":""}${Math.ceil((Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps)}]`,f&&(n=!0,t="[F]"),"christmas"===Game.season&&(i=!0,o=g?`[R${Math.ceil(dt.life/Game.fps)}]`:`[${Number(l("CMTimerBarRenMinBar").textContent)<0?"!":""}${Math.ceil((Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps)}]`);let a=ro;"["===a.charAt(0)&&(a=a.substring(a.lastIndexOf("]")+1)),document.title=`${e+(n?t:"")+(i?o:"")} ${a}`}else if(2===e.Title){let e="",t=!1;ct&&(t=!0,ct.wrath?e+=`[W${Math.ceil(ct.life/Game.fps)}]`:e+=`[G${Math.ceil(ct.life/Game.fps)}]`),f&&(t=!0,e+="[F]"),"christmas"===Game.season&&g&&(e+=`[R${Math.ceil(dt.life/Game.fps)}]`,t=!0),t&&(e+=" - ");let o="Cookie Clicker";"fools"===Game.season&&(o="Cookie Baker"),e+=o,document.title=e}}(),function(){const t=Math.max(0,Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset)),o=Game.sayTime((Date.now()-Game.startDate)/1e3*Game.fps,-1);let n="";n+=`You've been on this run for ${""===o?"not very long":o}.
`,n+='
',Game.prestige>0&&(n+=`Your prestige level is currently ${B(Game.prestige)}.
(CpS +${B(Game.prestige)}%)`,n+='
'),n+=X<1?"Ascending now would grant you no prestige.":X<2?"Ascending now would grant you
1 prestige level (+1% CpS)
and 1 heavenly chip to spend.":`Ascending now would grant you
${B(X)} prestige levels (+${B(X)}% CpS)
and ${B(X)} heavenly chips to spend.`,n+='
',n+=`You need ${B(t)} more cookies for the next level.
`,n+=e.TooltipAscendButton?`
It takes ${pt} to reach the next level and you were making ${B(Ne,2)} chips on average in the last 5 seconds.
`:"",l("ascendTooltip").innerHTML=n}()}}function oi(){Sn(),sn(),un(),r=Object.keys(Game.mods).length,ue=document.createElement("style"),ue.type="text/css",ue.id="CMCSS",document.head.appendChild(ue),function(){const e=document.createElement("div");e.id="CMBotBar",e.style.height="69px",e.style.width="100%",e.style.position="absolute",e.style.display="none",e.style.backgroundColor="#262224",e.style.backgroundImage="linear-gradient(to bottom, #4d4548, #000000)",e.style.borderTop="1px solid black",e.style.overflow="auto",e.style.textShadow="-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black";const t=e.appendChild(document.createElement("table"));t.style.width="100%",t.style.textAlign="center",t.style.whiteSpace="nowrap";const o=t.appendChild(document.createElement("tbody")),n=function(e,t){const o=document.createElement("td");return o.style.textAlign="right",o.className=St+t,o.textContent=e,o},i=o.appendChild(document.createElement("tr"));i.style.fontWeight="bold",i.appendChild(n("CM 2.031.8",Nt)),o.appendChild(document.createElement("tr")).appendChild(n("Bonus Income",Bt)),o.appendChild(document.createElement("tr")).appendChild(n("Payback Period",Bt)),o.appendChild(document.createElement("tr")).appendChild(n("Time Left",Bt)),l("wrapper").appendChild(e),Object.keys(Game.Objects).forEach((e=>{Co(e)}))}(),function(){const e=document.createElement("div");e.id="CMTimerBar",e.style.position="absolute",e.style.display="none",e.style.height="0px",e.style.fontSize="10px",e.style.fontWeight="bold",e.style.backgroundColor="black";const t=fo("CMTimerBarGC","Next Cookie",[{id:"CMTimerBarGCMinBar",color:Wt},{id:"CMTimerBarGCBar",color:Lt}]);e.appendChild(t);const o=fo("CMTimerBarRen","Next Reindeer",[{id:"CMTimerBarRenMinBar",color:Wt},{id:"CMTimerBarRenBar",color:Ot}]);e.appendChild(o);const n=document.createElement("div");n.id="CMTimerBarBuffTimers",e.appendChild(n),l("wrapper").appendChild(e)}(),function(){const e=document.createElement("div");e.id="CMUpgradeBar",e.style.width="100%",e.style.backgroundColor="black",e.style.textAlign="center",e.style.fontWeight="bold",e.style.display="none",e.style.zIndex="21",e.onmouseout=function(){Game.tooltip.hide()};const t=document.createElement("div");t.appendChild(function(){const e=document.createElement("div");e.style.minWidth="330px",e.style.marginBottom="4px";const t=document.createElement("div");t.className="name",t.style.marginBottom="4px",t.textContent="Legend",e.appendChild(t);const o=function(e,t){const o=document.createElement("div");o.style.verticalAlign="middle";const n=document.createElement("span");return n.className=Pt+e,n.style.display="inline-block",n.style.height="10px",n.style.width="10px",n.style.marginRight="4px",o.appendChild(n),o.appendChild(document.createTextNode(t)),o};return e.appendChild(o(Bt,"Better than the best PP of a building option")),e.appendChild(o(Et,"Same as the best PP building option")),e.appendChild(o(Nt,"Within the top 10 of PP for buildings")),e.appendChild(o(Ot,"Within the top 20 of PP for buildings")),e.appendChild(o(Ft,"Within the top 30 of PP for buildings")),e.appendChild(o(Lt,"Outside of the top 30 of PP for buildings")),e.appendChild(o(Wt,"Negative or infinity PP")),e}()),e.onmouseover=function(){Game.tooltip.draw(this,escape(t.innerHTML),"store")};const o=function(e,t){const o=document.createElement("span");return o.id=e,o.className=St+t,o.style.width="14.28571428571429%",o.style.display="inline-block",o.textContent="0",o};e.appendChild(o("CMUpgradeBarBlue",Bt)),e.appendChild(o("CMUpgradeBarGreen",Et)),e.appendChild(o("CMUpgradeBarYellow",Nt)),e.appendChild(o("CMUpgradeBarOrange",Ot)),e.appendChild(o("CMUpgradeBarRed",Ft)),e.appendChild(o("CMUpgradeBarPurple",Lt)),e.appendChild(o("CMUpgradeBarGray",Wt)),l("upgrades").parentNode.insertBefore(e,l("upgrades").parentNode.childNodes[3])}(),function(){const e=document.createElement("div");e.id="CMFlashScreen",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="white",e.style.display="none",e.style.zIndex="9999999999",e.style.position="absolute",l("wrapper").appendChild(e)}(),function(){const e=document.createElement("div");e.id="CMSectionHidButtons",e.style.textAlign="center";const t=document.createElement("a");t.className="option",t.onclick=function(){"flex"===l("upgrades").style.display?(l("upgrades").style.display="none",l("toggleUpgrades").style.display="none",l("techUpgrades").style.display="none",l("vaultUpgrades").style.display="none"):(l("upgrades").style.display="flex",0!==l("toggleUpgrades").children.length&&(l("toggleUpgrades").style.display="block"),0!==l("techUpgrades").children.length&&(l("techUpgrades").style.display="block"),0!==l("vaultUpgrades").children.length&&(l("vaultUpgrades").style.display="block"))},t.textContent="Hide/Show Upgrades",e.appendChild(t);const o=document.createElement("a");o.className="option",o.onclick=function(){"grid"===l("products").style.display?l("products").style.display="none":l("products").style.display="grid"},o.textContent="Hide/Show Buildings",e.appendChild(o),l("store").insertBefore(e,l("store").childNodes[2])}(),function(){const e=document.createElement("link");e.id="CMFavicon",e.rel="shortcut icon",e.href="https://orteil.dashnet.org/cookieclicker/favicon.ico",document.getElementsByTagName("head")[0].appendChild(e)}(),Object.keys(Ht).forEach((e=>{!function(e,t,o){const n=document.createElement("div");n.id=e;const i=document.createElement("div");i.style.minWidth=o,i.style.marginBottom="4px";const a=document.createElement("div");a.style.textAlign="left",a.textContent=t,i.appendChild(a),n.appendChild(i),Ut[e]=n}(Ht[e][0],Ht[e][1],Ht[e][2])})),function(){const e=document.createElement("a");e.id="PopAllNormalWrinklerButton",e.textContent="Pop All Normal",e.className="option",e.onclick=function(){An()},e.onmouseout=function(){Game.tooltip.shouldHide=1},e.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("wb","PopAll")),"this"),Game.tooltip.wobble()},l("sectionLeftExtra").children[0].append(e);const t=document.createElement("a");t.id="PopFattestWrinklerButton",t.textContent="Pop Single Fattest",t.className="option",t.onclick=function(){null!==$e[1]&&(Game.wrinklers[$e[1]].hp=0)},t.onmouseout=function(){Game.tooltip.shouldHide=1},t.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("wb","PopFattest")),"this"),Game.tooltip.wobble()},l("sectionLeftExtra").children[0].append(t)}(),l("products").style.display="grid",l("storeBulk").style.gridRow="1/1",l("upgrades").style.display="flex",l("upgrades").style["flex-wrap"]="wrap",Object.keys(Game.Objects).forEach((e=>{const t=Game.Objects[e];null!==l(`product${t.id}`).onmouseover&&(w[e]=l(`product${t.id}`).onmouseover,l(`product${t.id}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("b",`${e}`)),"store"),Game.tooltip.wobble()})})),Game.canLumps()&&(s=l("lumps").onmouseover,l("lumps").onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("s","Lump")),"this"),Game.tooltip.wobble()}),h=Game.LoadMinigames,Game.LoadMinigames=function(){h(),Game.Objects.Farm.minigameLoaded&&(l("gardenTool-1").onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("ha","HarvestAllButton")),"this"),Game.tooltip.wobble()},Array.from(l("gardenPlot").children).forEach((e=>{const t=e.id.slice(-3);e.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("p",[`${t[0]}`,`${t[2]}`])),"this"),Game.tooltip.wobble()}}))),Dn(),function(){if(Game.Objects.Temple.minigameLoaded){for(let e=0;e<11;e+=1)l(`templeGod${e}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("pag",e)),"this"),Game.tooltip.wobble()};for(let e=0;e<3;e+=1)l(`templeSlot${e}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("pas",[e,Game.Objects.Temple.minigame.slot[e]])),"this"),Game.tooltip.wobble()}}}(),Un()},Game.LoadMinigames(),l("backgroundLeftCanvas").onmouseover=function(){Rt=1},l("backgroundLeftCanvas").onmouseout=function(){Rt=0,Game.tooltip.hide(),Object.keys(Game.wrinklers).forEach((e=>{zt[e]=0}))},ti(),Un(),Game.CalculateGains(),Wn(),$t=Game.OnAscend,Game.prefs.popups?Game.Popup("Cookie Monster version 2.031.8 loaded!"):Game.Notify("Cookie Monster version 2.031.8 loaded!","","",1,1),Game.Win("Third-party")}const ni={init:function(){Pn=!0;let e=!0;Game.version!==Number("2.031")&&(e=confirm("Cookie Monster version 2.031.8 is meant for Game version 2.031. Loading a different version may cause errors. Do you still want to load Cookie Monster?")),e&&(oi(),Game.registerHook("click",_o),Game.registerHook("draw",Vo),Game.registerHook("logic",On),Pn=!1)},load:function(e){const t=JSON.parse(e);Sn(),void 0!==t.favouriteSettings&&(lo=t.favouriteSettings),Wn(t.settings),"2.031.8"!==t.version&&(Game.prefs.popups?Game.Popup("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!"):Game.Notify("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!","","",0,1))},save:xn};Game.registerMod("CookieMonster",ni)})()})(); +(()=>{var e={877:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,n,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r-1},isButtonEmpty:function(e){switch(i.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(n=e.document.createElement("input"),!(!n.setAttribute||(n.setAttribute("type","color"),"color"!=n.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t=3&&(n=l[0].match(s))&&(i=l[1].match(s))&&(a=l[2].match(s)))return o.format="rgb",o.rgba=[parseFloat(n[1])||0,parseFloat(i[1])||0,parseFloat(a[1])||0,null],l.length>=4&&(r=l[3].match(s))&&(o.format="rgba",o.rgba[3]=parseFloat(r[1])||0),o}return!1},parsePaletteValue:function(e){var t=[];"string"==typeof e?e.replace(/#[0-9A-F]{3}([0-9A-F]{3})?|rgba?\(([^)]*)\)/gi,(function(e){t.push(e)})):Array.isArray(e)&&(t=e);for(var o=[],n=0;ns[n]&&-t[n]+e[n]+l[n]/2>s[n]/2&&e[n]+l[n]-d[n]>=0?e[n]+l[n]-d[n]:e[n],-t[a]+e[a]+l[a]+d[a]-p+p*r>s[a]?-t[a]+e[a]+l[a]/2>s[a]/2&&e[a]+l[a]-p-p*r>=0?e[a]+l[a]-p-p*r:e[a]+l[a]-p+p*r:e[a]+l[a]-p+p*r>=0?e[a]+l[a]-p+p*r:e[a]+l[a]-p-p*r];else var u=[e[n],e[a]+l[a]-p+p*r];var m=u[n],h=u[a],g=o.fixed?"fixed":"absolute",f=(u[0]+d[0]>e[0]||u[0]0?Math.ceil(l/o):0,i=Math.max(1,Math.floor((t-(o-1)*e.paletteSpacing)/o)),a=e.paletteHeight?Math.min(e.paletteHeight,i):i),n&&(r=n*a+(n-1)*e.paletteSpacing),{cols:o,rows:n,cellW:i,cellH:a,width:t,height:r}},getControlPadding:function(e){return Math.max(e.padding/2,2*e.pointerBorderWidth+e.pointerThickness-e.controlBorderWidth)},getPadYChannel:function(e){switch(e.mode.charAt(1).toLowerCase()){case"v":return"v"}return"s"},getSliderChannel:function(e){if(e.mode.length>2)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},triggerCallback:function(e,t){if(e[t]){var o=null;if("string"==typeof e[t])try{o=new Function(e[t])}catch(e){console.error(e)}else o=e[t];o&&o.call(e)}},triggerGlobal:function(e){for(var t=i.getInstances(),o=0;o0)for(var c=0;c=2&&"string"==typeof arguments[0]){try{if(!a(arguments[0],arguments[1]))return!1}catch(e){return console.warn(e),!1}return this.redraw(),this.exposeColor(),!0}if(1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0],t=!0;for(var o in e)if(e.hasOwnProperty(o))try{a(o,e[o])||(t=!1)}catch(e){console.warn(e),t=!1}return this.redraw(),this.exposeColor(),t}throw new Error("Invalid arguments")},this.channel=function(e,t){if("string"!=typeof e)throw new Error("Invalid value for channel name: "+e);if(void 0===t)return this.channels.hasOwnProperty(e.toLowerCase())?this.channels[e.toLowerCase()]:(console.warn("Getting unknown channel: "+e),!1);var o=!1;switch(e.toLowerCase()){case"r":o=this.fromRGBA(t,null,null,null);break;case"g":o=this.fromRGBA(null,t,null,null);break;case"b":o=this.fromRGBA(null,null,t,null);break;case"h":o=this.fromHSVA(t,null,null,null);break;case"s":o=this.fromHSVA(null,t,null,null);break;case"v":o=this.fromHSVA(null,null,t,null);break;case"a":o=this.fromHSVA(null,null,null,t);break;default:return console.warn("Setting unknown channel: "+e),!1}return!!o&&(this.redraw(),!0)},this.trigger=function(e){for(var t=i.strList(e),o=0;o127.5},this.hide=function(){p()&&(i.removeClass(n.targetElement,i.pub.activeClassName),i.picker.wrap.parentNode.removeChild(i.picker.wrap),delete i.picker.owner)},this.show=function(){l()},this.redraw=function(){p()&&l()},this.getFormat=function(){return this._currentFormat},this._setFormat=function(e){this._currentFormat=e.toLowerCase()},this.hasAlphaChannel=function(){return"auto"===this.alphaChannel?"any"===this.format.toLowerCase()||i.isAlphaFormat(this.getFormat())||void 0!==this.alpha||void 0!==this.alphaElement:this.alphaChannel},this.processValueInput=function(e){this.fromString(e)||this.exposeColor()},this.processAlphaInput=function(e){this.fromHSVA(null,null,null,parseFloat(e))||this.exposeColor()},this.exposeColor=function(e){var t=this.toString(),o=this.getFormat();if(i.setDataAttr(this.targetElement,"current-color",t),e&i.flags.leaveValue||!this.valueElement||("hex"!==o&&"hexa"!==o||(this.uppercase||(t=t.toLowerCase()),this.hash||(t=t.replace(/^#/,""))),this.setValueElementValue(t)),!(e&i.flags.leaveAlpha)&&this.alphaElement){var n=Math.round(100*this.channels.a)/100;this.setAlphaElementValue(n)}e&i.flags.leavePreview||!this.previewElement||((i.isTextInput(this.previewElement)||i.isButton(this.previewElement)&&!i.isButtonEmpty(this.previewElement))&&this.previewPosition,this.setPreviewElementBg(this.toRGBAString())),p()&&(s(),c(),d())},this.setPreviewElementBg=function(e){if(this.previewElement){var t=null,o=null;(i.isTextInput(this.previewElement)||i.isButton(this.previewElement)&&!i.isButtonEmpty(this.previewElement))&&(t=this.previewPosition,o=this.previewSize);var n=[];if(e){n.push({image:i.genColorPreviewGradient(e,t,o?o-i.pub.previewSeparator.length:null),position:"left top",size:"auto",repeat:t?"repeat-y":"repeat",origin:"padding-box"});var a=i.genColorPreviewCanvas("rgba(0,0,0,0)",t?{left:"right",right:"left"}[t]:null,o,!0);n.push({image:"url('"+a.canvas.toDataURL()+"')",position:(t||"left")+" top",size:a.width+"px "+a.height+"px",repeat:t?"repeat-y":"repeat",origin:"padding-box"})}else n.push({image:"none",position:"left top",size:"auto",repeat:"no-repeat",origin:"padding-box"});for(var r={image:[],position:[],size:[],repeat:[],origin:[]},l=0;l=0;h-=1){var g=m[h];if(g)if(i.pub.presets.hasOwnProperty(g)){for(var u in i.pub.presets[g])if(i.pub.presets[g].hasOwnProperty(u))try{a(u,i.pub.presets[g][u])}catch(e){console.warn(e)}}else console.warn("Unknown preset: %s",g)}var f=["preset"];for(var u in o)if(o.hasOwnProperty(u)&&-1===f.indexOf(u))try{a(u,o[u])}catch(e){console.warn(e)}if(void 0===this.container?this.container=e.document.body:this.container=i.node(this.container),!this.container)throw new Error("Cannot instantiate color picker without a container element");if(this.targetElement=i.node(t),!this.targetElement){if("string"==typeof t&&/^[a-zA-Z][\w:.-]*$/.test(t))throw new Error("If '"+t+"' is supposed to be an ID, please use '#"+t+"' or any valid CSS selector.");throw new Error("Cannot instantiate color picker without a target element")}if(this.targetElement.jscolor&&this.targetElement.jscolor instanceof i.pub)throw new Error("Color picker already installed on this element");if(this.targetElement.jscolor=this,i.addClass(this.targetElement,i.pub.className),i.instances.push(this),i.isButton(this.targetElement)&&("button"!==this.targetElement.type.toLowerCase()&&(this.targetElement.type="button"),i.isButtonEmpty(this.targetElement))){i.removeChildren(this.targetElement),this.targetElement.appendChild(e.document.createTextNode(" "));var C=i.getCompStyle(this.targetElement);(parseFloat(C["min-width"])||0)-1){var G=i.parseColorString(b);this._currentFormat=G?G.format:"hex"}else this._currentFormat=this.format.toLowerCase();this.processValueInput(b),void 0!==k&&this.processAlphaInput(k)}}).pub.className="jscolor",i.pub.activeClassName="jscolor-active",i.pub.looseJSON=!0,i.pub.presets={},i.pub.presets.default={},i.pub.presets.light={backgroundColor:"rgba(255,255,255,1)",controlBorderColor:"rgba(187,187,187,1)",buttonColor:"rgba(0,0,0,1)"},i.pub.presets.dark={backgroundColor:"rgba(51,51,51,1)",controlBorderColor:"rgba(153,153,153,1)",buttonColor:"rgba(240,240,240,1)"},i.pub.presets.small={width:101,height:101,padding:10,sliderSize:14,paletteCols:8},i.pub.presets.medium={width:181,height:101,padding:12,sliderSize:16,paletteCols:10},i.pub.presets.large={width:271,height:151,padding:12,sliderSize:24,paletteCols:15},i.pub.presets.thin={borderWidth:1,controlBorderWidth:1,pointerBorderWidth:1},i.pub.presets.thick={borderWidth:2,controlBorderWidth:2,pointerBorderWidth:2},i.pub.sliderInnerSpace=3,i.pub.chessboardSize=8,i.pub.chessboardColor1="#666666",i.pub.chessboardColor2="#999999",i.pub.previewSeparator=["rgba(255,255,255,.65)","rgba(128,128,128,.65)"],i.pub.init=function(){if(!i.initialized)for(e.document.addEventListener("mousedown",i.onDocumentMouseDown,!1),e.document.addEventListener("keyup",i.onDocumentKeyUp,!1),e.addEventListener("resize",i.onWindowResize,!1),e.addEventListener("scroll",i.onWindowScroll,!1),i.pub.install(),i.initialized=!0;i.readyQueue.length;)i.readyQueue.shift()()},i.pub.install=function(e){var t=!0;try{i.installBySelector("[data-jscolor]",e)}catch(e){t=!1,console.warn(e)}if(i.pub.lookupClass)try{i.installBySelector("input."+i.pub.lookupClass+", button."+i.pub.lookupClass,e)}catch(e){}return t},i.pub.ready=function(e){return"function"!=typeof e?(console.warn("Passed value is not a function"),!1):(i.initialized?e():i.readyQueue.push(e),!0)},i.pub.trigger=function(e){var t=function(){i.triggerGlobal(e)};i.initialized?t():i.pub.ready(t)},i.pub.hide=function(){i.picker&&i.picker.owner&&i.picker.owner.hide()},i.pub.chessboard=function(e){return e||(e="rgba(0,0,0,0)"),i.genColorPreviewCanvas(e).canvas.toDataURL()},i.pub.background=function(e){var t=[];t.push(i.genColorPreviewGradient(e));var o=i.genColorPreviewCanvas();return t.push(["url('"+o.canvas.toDataURL()+"')","left top","repeat"].join(" ")),t.join(", ")},i.pub.options={},i.pub.lookupClass="jscolor",i.pub.installByClassName=function(){return console.error('jscolor.installByClassName() is DEPRECATED. Use data-jscolor="" attribute instead of a class name.'+i.docsRef),!1},i.register(),i.pub);return void 0===e.jscolor&&(e.jscolor=e.JSColor=a),a}))}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";let e={};function t(){e.WrinklerButtons&&Game.elderWrath?(l("PopAllNormalWrinklerButton").style.display="",l("PopFattestWrinklerButton").style.display=""):(l("PopAllNormalWrinklerButton").style.display="none",l("PopFattestWrinklerButton").style.display="none")}const n=["","","M","G","T","P","E","Z","Y"],i=["","","M","B","Tr","Quadr","Quint","Sext","Sept","Oct","Non","Dec","Undec","Duodec","Tredec","Quattuordec","Quindec","Sexdec","Septendec","Octodec","Novemdec","Vigint","Unvigint","Duovigint","Trevigint","Quattuorvigint"],a=["","K","M","B","T","Qa","Qi","Sx","Sp","Oc","No","De","UDe","DDe","TDe","QaDe","QiDe","SxDe","SpDe","ODe","NDe","Vi","UVi","DVi","TVi","QaVi","QiVi","SxVi","SpVi","OVi","NVi","Tr","UTr","DTr","TTr","QaTr","QiTr","SxTr","SpTr","OTr","NTr","Qaa","UQa","DQa","TQa","QaQa","QiQa","SxQa","SpQa","OQa","NQa","Qia","UQi","DQi","TQi","QaQi","QiQi","SxQi","SpQi","OQi","NQi","Sxa","USx","DSx","TSx","QaSx","QiSx","SxSx","SpSx","OSx","NSx","Spa","USp","DSp","TSp","QaSp","QiSp","SxSp","SpSp","OSp","NSp","Oco","UOc","DOc","TOc","QaOc","QiOc","SxOc","SpOc","OOc","NOc","Noa","UNo","DNo","TNo","QaNo","QiNo","SxNo","SpNo","ONo","NNo","Ct","UCt"];let r,s,c,d,p,u,m,h,g,f,C,y,b,k,G,v,w=[],x=[],M=[],T={},S=Date.now(),P=Date.now();function B(t,o,r){const l=e.ScaleDecimals+1;if(t===1/0)return"Infinity";if(void 0===t)return"0";if(0===e.Scale)return T.Beautify(t,o);if(Number.isFinite(t)){if(t<0)return`-${B(Math.abs(t))}`;let s="";if(0===t)return t.toString();if(t>.001&&t=.01&&t=.01&&t=.01&&t0&&(c+=o,s-=1)}return c}const St="CMText",Pt="CMBack",Bt="Blue",Et="Green",Nt="Yellow",Ot="Orange",Ft="Red",Lt="Purple",Wt="Gray",At="Pink",jt="Brown",Dt=[Bt,Et,Nt,Ot,Ft,Lt,At,jt,Wt],Ht=[["GoldCookTooltipPlaceholder","Calculated with Golden Switch off","200px"],["GoldCookDragonsFortuneTooltipPlaceholder","Calculated with Golden Switch off and at least one golden cookie on-screen","240px"],["PrestMaxTooltipPlaceholder","The MAX prestige is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg","320px"],["NextPrestTooltipPlaceholder","Calculated with cookies gained from wrinklers and Chocolate egg","200px"],["HeavenChipMaxTooltipPlaceholder","The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg","330px"],["ResetTooltipPlaceholder","The bonus income you would get from new prestige levels unlocked at 100% of its potential and from ascension achievements if you have the same buildings/upgrades after reset","370px"],["ChoEggTooltipPlaceholder","The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all stock market goods, selling all buildings with Earth Shatterer and Reality Bending auras, and then buying Chocolate egg","300px"],["ChainNextLevelPlaceholder","Cheated cookies might break this formula","250px"],["FavouriteSettingPlaceholder","Click to set this setting as favourite and show it in 'favourite' settings at the top of the Cookie Monster Settings","250px"]],Ut={};let $t,Rt=0,It=-1,zt=[],Vt=function(){},_t=1,Qt=1,Xt=1;const qt=[10,15,30,60,300,600,900,1800],Yt=[1,5,10,15,30],Kt={Frenzy:Nt,"Dragon Harvest":jt,"Elder frenzy":Et,Clot:Ft,"Click frenzy":Bt,Dragonflight:At};let Jt,Zt,eo,to,oo,no,io,ao={},ro="",lo=[];function so(){let t=Game.buyBulk;if(1===Game.buyMode?Qt=t:t=Qt,1===t?t=We:10===t?t=Ae:100===t&&(t=je),1===Game.buyMode?1===e.BuildColour?Object.keys(t).forEach((o=>{l(`productPrice${Game.Objects[o].id}`).style.color=e[`Colour${t[o].color}`]})):Object.keys(Game.Objects).forEach((e=>{l(`productPrice${Game.Objects[e].id}`).style.removeProperty("color")})):-1===Game.buyMode&&Object.keys(We).forEach((e=>{const t=Game.Objects[e];l(`productPrice${t.id}`).style.color="",l(`productPrice${t.id}`).innerHTML=B(Tt(t,t.basePrice,t.amount,t.free,Game.buyBulk,1))})),1===Game.buyMode&&e.SortBuildings){let o;1===e.SortBuildings?(o=Object.keys(We).map((e=>{const t=We[e];return t.name=e,t.id=Game.Objects[e].id,t})),o.sort(((e,t)=>Dt.indexOf(e.color)>Dt.indexOf(t.color)?1:Dt.indexOf(e.color){const o=t[e];return o.name=e,o.id=Game.Objects[e].id,o})),o.sort(((e,t)=>Dt.indexOf(e.color)>Dt.indexOf(t.color)?1:Dt.indexOf(e.color){const t=We[e];return t.name=e,t.id=Game.Objects[e].id,t}));e.sort(((e,t)=>e.id-t.id));for(let t=0;t{e.UpgradesNeverCollapse||"products"===t.id?t.style.height="auto":"vaultUpgrades"===t.id?(t.style.height="",t.style.minHeight="0px"):"upgrades"===t.id?(t.style.height="",t.className.includes("hasMenu")?t.style.minHeight="82px":t.style.minHeight="60px"):(t.style.height="",t.style.minHeight="60px")}))}function po(){if(e.UpBarColour>0){let e=0,t=0,o=0,n=0,i=0,a=0,r=0;Object.keys(Game.UpgradesInStore).forEach((s=>{const c=Game.UpgradesInStore[s];let d=!1;for(let e=0;eDt.indexOf(e.color)>Dt.indexOf(t.color)?1:Dt.indexOf(e.color)e.price-t.price));const o=function(e,t){return e.findIndex((e=>e.name===t.name))};for(let e=0;e315576e4)return"XX:XX:XX:XX:XX";c+=(i<10?"0":"")+i+":",c+=(a<10?"0":"")+a+":",c+=(r<10?"0":"")+r+":",c+=(l<10?"0":"")+l+":",c+=(s<10?"0":"")+s}else{if(n>7776e5)return o?"Over 9000 days!":">9000d";c+=i>0?i+(o?1===i?" year":" years":"y")+", ":"",(c.length>0||a>0)&&(c+=a+(o?1===a?" day":" days":"d")+", "),(c.length>0||r>0)&&(c+=r+(o?1===r?" hour":" hours":"h")+", "),(c.length>0||l>0)&&(c+=l+(o?1===l?" minute":" minutes":"m")+", "),c+=s+(o?1===s?" second":" seconds":"s")}return c}function mo(t){let o,n;return t<=0?(n=e.TimeFormat?"00:00:00:00:00":"Done!",o=Et):(n=uo(t),o=t>300?Ft:t>60?Ot:Nt),{text:n,color:o}}function ho(){return e.CPSMode?_:0===e.CalcWrink?Game.cookiesPs*(1-Game.cpsSucked):1===e.CalcWrink?Game.cookiesPs*(Re+(1-.05*Ie)):null!==$e[1]&&2===e.CalcWrink&&1===Game.wrinklers[$e[1]].type?Game.cookiesPs*(3*Re/Ie+(1-.05*Ie)):Game.cookiesPs*(Re/Ie+(1-.05*Ie))}function go(){return 1===e.CalcWrink?He:2===e.CalcWrink?$e[0]:0}function fo(e,t,o){const n=document.createElement("div");n.id=e,n.style.height="12px",n.style.margin="0px 10px",n.style.position="relative";const i=document.createElement("div");i.style.width="100%",i.style.height="10px",i.style.margin="auto",i.style.position="absolute",i.style.left="0px",i.style.top="0px",i.style.right="0px",i.style.bottom="0px";const a=document.createElement("span");a.style.display="inline-block",a.style.textAlign="right",a.style.fontSize="10px",a.style.width="108px",a.style.marginRight="5px",a.style.verticalAlign="text-top",a.textContent=t,i.appendChild(a);for(let e=0;e{let n,i=Game.buyBulk;1===Game.buyMode?_t=i:i=_t,1===i&&(i=We),10===i&&(i=Ae),100===i&&(i=je),t+=1,l("CMBotBar").firstChild.firstChild.childNodes[0].childNodes[t].childNodes[1].textContent=Game.Objects[o].amount,l("CMBotBar").firstChild.firstChild.childNodes[1].childNodes[t].textContent=B(i[o].bonus,2),l("CMBotBar").firstChild.firstChild.childNodes[2].childNodes[t].className=St+i[o].color,n=e.PPDisplayTime?uo(Math.round(i[o].pp)):B(Math.round(i[o].pp),2),l("CMBotBar").firstChild.firstChild.childNodes[2].childNodes[t].textContent=n;const a=mo((Game.Objects[o].bulkPrice-(Game.cookies+go()))/ho());l("CMBotBar").firstChild.firstChild.childNodes[3].childNodes[t].className=St+a.color,"Done!"===a.text&&Game.cookies{!Game.Tiers[e.tieredUpgrades[o].tier].special&&wt(e.tieredUpgrades[o].name)&&(t*=2)})),Object.keys(e.synergies).forEach((o=>{if(wt(e.synergies[o].name)){const n=e.synergies[o];n.buildingTie1.name===e.name?t*=1+.05*n.buildingTie2.amount:n.buildingTie2.name===e.name&&(t*=1+.001*n.buildingTie1.amount)}})),e.fortune&&wt(e.fortune.name)&&(t*=1.07),e.grandma&&wt(e.grandma.name)&&(t*=1+.01*Ct.Grandma.amount*(1/(e.id-1))),"object"==typeof e.tieredUpgrades.misfortune&&1===e.vanilla&&wt(e.tieredUpgrades.misfortune.name))switch(Game.elderWrath){default:t*=1;break;case 1:t*=1.02;break;case 2:t*=1.04;break;case 3:t*=1.06}return t}function Mo(e){const t=Game.Objects[e],o={};return"Cursor"===t.name?o.cps=function(e){let t=0;wt("Thousand fingers")&&(t+=.1),wt("Million fingers")&&(t*=5),wt("Billion fingers")&&(t*=10),wt("Trillion fingers")&&(t*=20),wt("Quadrillion fingers")&&(t*=20),wt("Quintillion fingers")&&(t*=20),wt("Sextillion fingers")&&(t*=20),wt("Septillion fingers")&&(t*=20),wt("Octillion fingers")&&(t*=20),wt("Nonillion fingers")&&(t*=20);let o=1,n=0;return Object.keys(Ct).forEach((e=>{"Cursor"!==Ct[e].name&&(n+=Ct[e].amount)})),t*=n,o*=xo(e),o*=Game.magicCpS("Cursor"),o*=vt("cursorCps"),Game.ComputeCps(.1,wt("Reinforced index finger")+wt("Carpal tunnel prevention cream")+wt("Ambidextrous"),t)*o}:"Grandma"===t.name?o.cps=function(e){let o=1;if(Object.keys(Game.GrandmaSynergies).forEach((e=>{wt(Game.GrandmaSynergies[e])&&(o*=2)})),wt("Bingo center/Research facility")&&(o*=4),wt("Ritual rolling pins")&&(o*=2),wt("Naughty list")&&(o*=2),wt("Elderwort biscuits")&&(o*=1.02),o*=vt("grandmaCps"),wt("Cat ladies"))for(let e=0;e{"Grandma"!==Ct[e].name&&(i+=Ct[e].amount)})),o*=1+.01*kt("Elder Battalion")*i,o*=Game.magicCpS(t.name),(t.baseCps+n)*o}:o.cps=function(e){let t=1;return t*=xo(e),t*=Game.magicCpS(e.name),e.baseCPS*t},o.baseCps=t.baseCps,o.name=t.name,o.tieredUpgrades=t.tieredUpgrades,o.synergies=t.synergies,o.fortune=t.fortune,o.grandma=t.grandma,o.baseCPS=t.baseCps,o.id=t.id,o.vanilla=t.vanilla,o}function To(e){const t=Game.Upgrades[e],o={};return o.power=t.power,"function"==typeof o.power&&("Sugar crystal cookies"===t.name?o.power=function(){let e=5;return Object.keys(Ct).forEach((t=>{Ct[t].level>=10&&(e+=1)})),e}:o.power=function(){let e=2;if(wt("Starlove")&&(e=3),Game.hasGod){const t=xt("seasons");1===t?e*=1.3:2===t?e*=1.2:3===t&&(e*=1.1)}return e}),o.pool=t.pool,o.name=t.name,o}function So(){J=Game.UpgradesOwned,Z=Game.pledges,ee=Game.AchievementsOwned,te=Game.heavenlyPower,oe=Game.prestige,Object.keys(Game.Objects).forEach((e=>{const t=Game.Objects[e];let o=Ct[e];void 0===o&&(Ct[e]=Mo(e),o=Ct[e],Co(e)),o.amount=t.amount,o.level=t.level,o.totalCookies=t.totalCookies,o.basePrice=t.basePrice,o.free=t.free,t.minigameLoaded&&("Temple"===t.name&&(ae=t.minigame.slot[0],re=t.minigame.slot[1],le=t.minigame.slot[2]),o.minigameLoaded=t.minigameLoaded,o.minigame=t.minigame),Ct[e]=o})),Object.keys(Game.Upgrades).forEach((e=>{const t=Game.Upgrades[e];let o=yt[e];void 0===o&&(yt[e]=To(e),o=yt[e]),o.bought=t.bought,yt[e]=o})),Object.keys(Game.Achievements).forEach((e=>{const t=Game.Achievements[e];let o=bt[e];void 0===o&&(bt[e]=wo(e),o=bt[e]),o.won=t.won,bt[e]=o})),vo(),ne=me,ie=he}function Po(e){const t=document.createElement("div");return t.style.fontWeight="bold",t.id=`${e}Title`,t.className="CMTextBlue",t.textContent=e,t}function Bo(e){e.appendChild(Po("Bonus Income"));const t=document.createElement("div");t.style.marginBottom="4px",t.style.color="white",t.id="CMTooltipIncome",e.appendChild(t),e.appendChild(Po("Bonus Cookies per Click")),e.lastChild.style.display="none";const o=document.createElement("div");o.style.marginBottom="4px",o.style.color="white",o.style.display="none",o.id="CMTooltipCookiePerClick",e.appendChild(o),e.appendChild(Po("Payback Period"));const n=document.createElement("div");n.style.marginBottom="4px",n.id="CMTooltipPP",e.appendChild(n),e.appendChild(Po("Time Left"));const i=document.createElement("div");if(i.id="CMTooltipTime",e.appendChild(i),"b"===eo){e.appendChild(Po("Production left till next achievement")),e.lastChild.id="CMTooltipProductionLeftHeader";const t=document.createElement("div");t.id="CMTooltipProductionLeft",e.appendChild(t)}if("b"===eo){e.appendChild(Po("Buildings (price / PP) left till next achievement")),e.lastChild.id="CMTooltipNextAchievementHeader";const t=document.createElement("div");t.id="CMTooltipNextAchievement",e.appendChild(t)}}function Eo(t,o){let n="";return n=t.pp<=0||t.pp===1/0?Wt:t.pp0&&(n=Ft),n}function No(){let e=1;return Object.keys(Game.buffs).forEach((t=>{void 0!==Game.buffs[t].multCpS&&(e*=Game.buffs[t].multCpS)})),e}function Oo(e){bt[e]&&0===bt[e].won&&(bt[e].won=1,"shadow"!==Game.Achievements[e].pool&&(ee+=1))}function Fo(){de=0;let e=1;const t={};Object.keys(Game.Objects).forEach((e=>{if(Game.Objects[e].minigameLoaded&&Game.Objects[e].minigame.effs){const o=Game.Objects[e].minigame.effs;Object.keys(o).forEach((e=>{t[e]?t[e]*=o[e]:t[e]=o[e]}))}})),ce=t,1!==Game.ascensionMode&&(e+=.01*parseFloat(oe)*te*function(){let e=0;if(wt("Heavenly chip secret")&&(e+=.05),wt("Heavenly cookie stand")&&(e+=.2),wt("Heavenly bakery")&&(e+=.25),wt("Heavenly confectionery")&&(e+=.25),wt("Heavenly key")&&(e+=.25),e*=1+.05*kt("Dragon God"),wt("Lucky digit")&&(e*=1.01),wt("Lucky number")&&(e*=1.01),wt("Lucky payout")&&(e*=1.01),Game.hasGod){const t=xt("creation");1===t?e*=.7:2===t?e*=.8:3===t&&(e*=.9)}return e}()),e*=vt("cps"),wt("Heralds")&&1!==Game.ascensionMode&&(e*=1+.01*Game.heralds),Object.keys(Game.cookieUpgrades).forEach((t=>{const o=Game.cookieUpgrades[t];wt(o.name)&&("function"==typeof o.power?e*=1+.01*yt[o.name].power(yt[o.name]):e*=1+.01*o.power)})),wt("Specialized chocolate chips")&&(e*=1.01),wt("Designer cocoa beans")&&(e*=1.02),wt("Underworld ovens")&&(e*=1.03),wt("Exotic nuts")&&(e*=1.04),wt("Arcane sugar")&&(e*=1.05),wt("Increased merriness")&&(e*=1.15),wt("Improved jolliness")&&(e*=1.15),wt("A lump of coal")&&(e*=1.01),wt("An itchy sweater")&&(e*=1.01),wt("Santa's dominion")&&(e*=1.2),wt("Fortune #100")&&(e*=1.01),wt("Fortune #101")&&(e*=1.07),wt("Dragon scale")&&(e*=1.03);let o=1;if(xt){let t=xt("asceticism");1===t?e*=1.15:2===t?e*=1.1:3===t&&(e*=1.05),t=xt("ages"),1===t?e*=1+.15*Math.sin(S/1e3/10800*Math.PI*2):2===t?e*=1+.15*Math.sin(S/1e3/43200*Math.PI*2):3===t&&(e*=1+.15*Math.sin(S/1e3/86400*Math.PI*2)),t=xt("decadence"),1===t?o*=.93:2===t?o*=.95:3===t&&(o*=.98),t=xt("industry"),1===t?o*=1.1:2===t?o*=1.06:3===t&&(o*=1.03),t=xt("labor"),1===t?o*=.97:2===t?o*=.98:3===t&&(o*=.99)}wt("Santa's legacy")&&(e*=1+.03*(Game.santaLevel+1));const n=ee/25;let i=1;if(wt("Santa's milk and cookies")&&(i*=1.05),i*=1+.05*kt("Breath of Milk"),xt){const e=xt("mother");1===e?i*=1.1:2===e?i*=1.05:3===e&&(i*=1.03)}i*=vt("milk");let a=1;wt("Kitten helpers")&&(a*=1+.1*n*i),wt("Kitten workers")&&(a*=1+.125*n*i),wt("Kitten engineers")&&(a*=1+.15*n*i),wt("Kitten overseers")&&(a*=1+.175*n*i),wt("Kitten managers")&&(a*=1+.2*n*i),wt("Kitten accountants")&&(a*=1+.2*n*i),wt("Kitten specialists")&&(a*=1+.2*n*i),wt("Kitten experts")&&(a*=1+.2*n*i),wt("Kitten consultants")&&(a*=1+.2*n*i),wt("Kitten assistants to the regional manager")&&(a*=1+.175*n*i),wt("Kitten marketeers")&&(a*=1+.15*n*i),wt("Kitten analysts")&&(a*=1+.125*n*i),wt("Kitten executives")&&(a*=1+.115*n*i),wt("Kitten angels")&&(a*=1+.1*n*i),wt("Fortune #103")&&(a*=1+.05*n*i),Object.keys(Ct).forEach((e=>{const t=Ct[e];let a=t.cps(t);1!==Game.ascensionMode&&(a*=(1+.01*t.level)*o),"Grandma"===t.name&&wt("Milkhelp® lactose intolerance relief tablets")&&(a*=1+.05*n*i),de+=t.amount*a})),wt('"egg"')&&(de+=9),e*=a;let r=1;if(wt("Chicken egg")&&(r*=1.01),wt("Duck egg")&&(r*=1.01),wt("Turkey egg")&&(r*=1.01),wt("Quail egg")&&(r*=1.01),wt("Robin egg")&&(r*=1.01),wt("Ostrich egg")&&(r*=1.01),wt("Cassowary egg")&&(r*=1.01),wt("Salmon roe")&&(r*=1.01),wt("Frogspawn")&&(r*=1.01),wt("Shark egg")&&(r*=1.01),wt("Turtle egg")&&(r*=1.01),wt("Ant larva")&&(r*=1.01),wt("Century egg")){let e=10*Math.floor((P-Game.startDate)/1e3/10)/60/60/24;e=Math.min(e,100),Oe=1+.1*(1-(1-e/100)**3),r*=Oe}e*=r,wt("Sugar baking")&&(e*=1+.01*Math.min(100,Game.lumps)),e*=1+kt("Radiant Appetite");const l=de*e;Object.keys(Game.CpsAchievements).forEach((e=>{l>=Game.CpsAchievements[e].threshold&&Oo(Game.CpsAchievements[e].name)})),pe=l;const{n:s}=Game.shimmerTypes.golden,c=kt("Dragon's Fortune");for(let t=0;t{wt(e[o])&&(t+=.1)}))}e*=t}if(wt("Shimmering veil [off]")){let t=.5;wt("Reinforced membrane")&&(t+=.1),e*=1+t}wt("Magic shenanigans")&&(e*=1e3),wt("Occult obstruction")&&(e*=0),de=Game.runModHookOnValue("cps",de),e*=No(),de*=e}const Lo=["Fortune #001","Fortune #002","Fortune #003","Fortune #004","Fortune #005","Fortune #006","Fortune #007","Fortune #008","Fortune #009","Fortune #010","Fortune #011","Fortune #012","Fortune #013","Fortune #014","Fortune #015","Fortune #016","Fortune #017","Fortune #018","Fortune #100","Fortune #101","Fortune #102","Fortune #103","Fortune #104"],Wo=["Skull cookies","Ghost cookies","Bat cookies","Slime cookies","Pumpkin cookies","Eyeball cookies","Spider cookies"],Ao=["Christmas tree biscuits","Snowflake biscuits","Snowman biscuits","Holly biscuits","Candy cane biscuits","Bell biscuits","Present biscuits"],jo=["Pure heart biscuits","Ardent heart biscuits","Sour heart biscuits","Weeping heart biscuits","Golden heart biscuits","Eternal heart biscuits","Prism heart biscuits"],Do=["Elderwort biscuits","Bakeberry cookies","Duketater cookies","Green yeast digestives","Wheat slims","Fern tea","Ichor syrup"];function Ho(e){return bt[e]?bt[e].won:0}function Uo(){let e=0;Object.keys(Game.GrandmaSynergies).forEach((t=>{wt(Game.GrandmaSynergies[t])&&(e+=1)})),!Ho("Elder")&&e>=7&&Oo("Elder"),!Ho("Veteran")&&e>=14&&Oo("Veteran");let t=0,o=1,n=1,i=1e5;Object.keys(Ct).forEach((e=>{t+=Ct[e].amount,i=Math.min(Ct[e].amount,i),Ho("Mathematician")||Ct[e].amount=1&&Oo("One with everything"),1===o&&Oo("Mathematician"),1===n&&Oo("Base 10"),i>=100&&Oo("Centennial"),i>=150&&Oo("Centennial and a half"),i>=200&&Oo("Bicentennial"),i>=250&&Oo("Bicentennial and a half"),i>=300&&Oo("Tricentennial"),i>=350&&Oo("Tricentennial and a half"),i>=400&&Oo("Quadricentennial"),i>=450&&Oo("Quadricentennial and a half"),i>=500&&Oo("Quincentennial"),i>=550&&Oo("Quincentennial and a half"),i>=600&&Oo("Sexcentennial"),t>=100&&Oo("Builder"),t>=500&&Oo("Architect"),t>=1e3&&Oo("Engineer"),t>=2e3&&Oo("Lord of Constructs"),t>=4e3&&Oo("Grand design"),t>=8e3&&Oo("Ecumenopolis"),J>=20&&Oo("Enhancer"),J>=50&&Oo("Augmenter"),J>=100&&Oo("Upgrader"),J>=200&&Oo("Lord of Progress"),J>=300&&Oo("The full picture"),J>=400&&Oo("When there's nothing left to add"),t>=4e3&&J>=300&&Oo("Polymath"),t>=8e3&&J>=400&&Oo("Renaissance baker"),Ct.Cursor.amount+Ct.Grandma.amount>=777&&Oo("The elder scrolls");let a=!0;Object.keys(Wo).forEach((e=>{wt(Wo[e])||(a=!1)})),a&&Oo("Spooky cookies");let r=!0;if(Object.keys(Ao).forEach((e=>{wt(Ao[e])||(r=!1)})),r&&Oo("Let it snow"),wt("Fortune cookies")){const e=Game.Tiers.fortune.upgrades;let t=0;Object.keys(e).forEach((o=>{wt(e[o].name)&&(t+=1)})),t>=e.length&&Oo("O Fortuna")}}function $o(e,t){So(),Ct[e].amount+=t;const o=Ct[e];"Cursor"===e?(o.amount>=1&&Oo("Click"),o.amount>=2&&Oo("Double-click"),o.amount>=50&&Oo("Mouse wheel"),o.amount>=100&&Oo("Of Mice and Men"),o.amount>=200&&Oo("The Digital"),o.amount>=300&&Oo("Extreme polydactyly"),o.amount>=400&&Oo("Dr. T"),o.amount>=500&&Oo("Thumbs, phalanges, metacarpals"),o.amount>=600&&Oo("With her finger and her thumb"),o.amount>=700&&Oo("Gotta hand it to you"),o.amount>=800&&Oo("The devil's workshop")):Object.keys(Game.Objects[o.name].tieredAchievs).forEach((e=>{o.amount>=Game.Tiers[Game.Objects[o.name].tieredAchievs[e].tier].achievUnlock&&Oo(Game.Objects[o.name].tieredAchievs[e].name)}));const n=ee;return Fo(),Uo(),n!==ee&&Fo(),de-Game.cookiesPs}function Ro(e,t,o){let n=e,i=0;for(;nt.plantsById[t.plot[to[1]][to[0]][0]-1].mature,o=t.plantsById[t.plot[to[1]][to[0]][0]-1].name;l("CMTooltipBorder").appendChild(Po("Reward (Current / Maximum)"));const n=document.createElement("div");n.id="CMTooltipPlantReward",l("CMTooltipBorder").appendChild(n),"Bakeberry"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.03*Game.cookies,60*Game.cookiesPs*30)):"0"} / ${B(60*Game.cookiesPs*30)}`:"Chocoroot"===o||"White chocoroot"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.03*Game.cookies,60*Game.cookiesPs*3)):"0"} / ${B(60*Game.cookiesPs*3)}`:"Queenbeet"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.04*Game.cookies,60*Game.cookiesPs*60)):"0"} / ${B(60*Game.cookiesPs*60)}`:"Duketater"===o?l("CMTooltipPlantReward").textContent=`${e?B(Math.min(.08*Game.cookies,60*Game.cookiesPs*120)):"0"} / ${B(60*Game.cookiesPs*120)}`:l("CMTooltipArea").style.display="none"}else l("CMTooltipArea").style.display="none"}():"ha"===eo?function(){const{minigame:t}=Game.Objects.Farm;if(e.TooltipLump){l("CMTooltipBorder").appendChild(Po("Cookies gained from harvesting:"));let e=0,o=0;Game.keys[16]&&Game.keys[17]&&(o=1);for(let n=0;n<6;n++)for(let i=0;i<6;i++)if(t.plot[n][i][0]>=1){const a=t.plot[n][i],r=t.plantsById[a[0]-1],l=r.name;let s=!0;o&&r.immortal&&(s=!1),a[1]0&&t=1?l("CMTimerBarGCMinBar").textContent=Math.ceil((Game.shimmerTypes.golden.minTime-Game.shimmerTypes.golden.time)/Game.fps):l("CMTimerBarGCMinBar").textContent="",Game.shimmerTypes.golden.minTime===Game.shimmerTypes.golden.maxTime?(l("CMTimerBarGCMinBar").style.borderTopRightRadius="10px",l("CMTimerBarGCMinBar").style.borderBottomRightRadius="10px"):(l("CMTimerBarGCMinBar").style.borderTopRightRadius="",l("CMTimerBarGCMinBar").style.borderBottomRightRadius=""),l("CMTimerBarGCBar").style.width=`${Math.round(Math.min(Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.minTime,Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)*t/Game.shimmerTypes.golden.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarGCBar").textContent=Math.ceil(Math.min(Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.minTime,Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps):l("CMTimerBarGCBar").textContent="",l("CMTimerBarGCTime").textContent=Math.ceil((Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps),n+=1),"christmas"===Game.season&&0===Game.shimmerTypes.reindeer.spawned?(l("CMTimerBarRen").style.display="",l("CMTimerBarRenMinBar").style.width=`${Math.round(Math.max(0,Game.shimmerTypes.reindeer.minTime-Game.shimmerTypes.reindeer.time)*t/Game.shimmerTypes.reindeer.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarRenMinBar").textContent=Math.ceil((Game.shimmerTypes.reindeer.minTime-Game.shimmerTypes.reindeer.time)/Game.fps):l("CMTimerBarRenMinBar").textContent="",l("CMTimerBarRenBar").style.width=`${Math.round(Math.min(Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.minTime,Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)*t/Game.shimmerTypes.reindeer.maxTime)}px`,e.TimerBarOverlay>=1?l("CMTimerBarRenBar").textContent=Math.ceil(Math.min(Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.minTime,Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps):l("CMTimerBarRenBar").textContent="",l("CMTimerBarRenTime").textContent=Math.ceil((Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps),n+=1):l("CMTimerBarRen").style.display="none";const i={};l("CMTimerBarBuffTimers").innerHTML="",Object.keys(Game.buffs).forEach((t=>{if(Game.buffs[t]){const a=fo(Game.buffs[t].name,Game.buffs[t].name,[{id:`${Game.buffs[t].name}Bar`}]);a.style.display="";let r="";r=void 0!==Kt[Game.buffs[t].name]?Kt[Game.buffs[t].name]:Lt,a.lastChild.children[1].className=Pt+r,a.lastChild.children[1].style.color="black",2===e.TimerBarOverlay?a.lastChild.children[1].textContent=`${Math.round(Game.buffs[t].time/Game.buffs[t].maxTime*100)}%`:a.lastChild.children[1].textContent="",a.lastChild.children[1].style.width=`${Math.round(Game.buffs[t].time*(o-8*Math.ceil(Game.buffs[t].time/Game.fps).toString().length)/Game.buffs[t].maxTime)}px`,a.lastChild.children[2].textContent=Math.ceil(Game.buffs[t].time/Game.fps),n+=1,i[Game.buffs[t].name]=a}})),Object.keys(i).forEach((e=>{l("CMTimerBarBuffTimers").appendChild(i[e])})),0!==n&&(l("CMTimerBar").style.height=12*n+2+"px"),io!==n&&(io=n,ko())}}(),yo(),zo(),function(){if(1===e.TooltipWrink&&1===Rt){let e=!1;Object.keys(Game.wrinklers).forEach((t=>{const o=Game.wrinklers[t];if(o.phase>0&&o.selected){if(e=!0,0===zt[t]||void 0===zt[t]){const e=document.createElement("div"),o=document.createElement("div");o.style.minWidth="120px",o.style.marginBottom="4px";const n=document.createElement("div");n.style.textAlign="center",n.id="CMTooltipWrinkler",o.appendChild(n),e.appendChild(o),Game.tooltip.draw(this,escape(e.innerHTML)),It=t,zt[t]=1}}else zt[t]=0})),e||Game.tooltip.hide()}}(),function(){if(1===e.TooltipWrink&&null!==l("CMTooltipWrinkler")){let{sucked:e}=Game.wrinklers[It],t=1.1;if(Game.Has("Sacrilegious corruption")&&(t*=1.05),1===Game.wrinklers[It].type&&(t*=3),e*=t,Game.Has("Wrinklerspawn")&&(e*=1.05),Ct.Temple.minigameLoaded){const t=Game.hasGod("scorn");1===t?e*=1.15:2===t?e*=1.1:3===t&&(e*=1.05)}l("CMTooltipWrinkler").textContent=B(e)}}(),e.UpStats&&"stats"===Game.onMenu&&(Game.drawT-1)%(5*Game.fps)!=0&&(Game.drawT-1)%Game.fps==0&&Game.UpdateMenu(),t(),e.Scale){let e=l("cookies").innerHTML.replace(/.*(?=
)/i,B(Game.cookies));Game.prefs.monospace&&(e=`${e}`),l("cookies").innerHTML=e}}function _o(){E.addLatest(Game.computedMouseCps)}class Qo{constructor(e){this.maxLength=e,this.queue=[]}addLatest(e){this.queue.push(e)>this.maxLength&&this.queue.shift()}calcAverage(e){let t=e;t>this.maxLength&&(t=this.maxLength),t>this.queue.length&&(t=this.queue.length);let o=0;for(let e=this.queue.length-1;e>=0&&e>this.queue.length-1-t;e--)o+=this.queue[e];return 0===o?0:o/t}calcSum(e){let t=e;return t>this.maxLength&&(t=this.maxLength),t>this.queue.length&&(t=this.queue.length),0===t?0:this.queue.slice(-t).reduce(((e,t)=>e+t),0)}}function Xo(){const t=Math.floor(Date.now()/1e3);if(Game.T/Game.fps%1==0){let o=Game.cookies+gt;Game.cpsSucked>0&&(o+=He),lt=Math.max(Game.cookiesEarned,o),o*=.05;const n=t-j,i=Math.max(0,Game.cookies-D)/n,a=Math.max(0,He-H)/n,r=Math.max(0,$e[0]-U)/n,l=Math.max(0,o-Le)/n,s=(Game.cookieClicks-$)/n;for(let e=0;e{if(e.PPRigidelMode&&1===o)t[n].color=Wt;else{t[n].color=Eo(t[n],Game.Objects[n].getSumPrice(o));for(let o=0;o{const i=Game.Objects[n].getSumPrice(o);Game.cookiesPs?t[n].pp=Math.max(i-(Game.cookies+go()),0)/Game.cookiesPs+i/t[n].bonus:t[n].pp=i/t[n].bonus,e.PPRigidelMode&&1===o||mt.push([t[n].pp,o])}))}function Ko(){!function(){ut=1/0,mt=[],void 0===e.PPExcludeTop&&(e.PPExcludeTop=0),Yo(We,1),Yo(Ae,10),Yo(je,100),mt.sort(((e,t)=>e[0]-t[0]));let t=0;if(e.PPOnlyConsiderBuyable)for(;mt[t][1]>Game.cookies&&(t+=1,mt.length!==t+1););ut=mt[e.PPExcludeTop][t],qo(We,1),qo(Ae,10),qo(je,100)}(),Object.keys(ze).forEach((e=>{Game.cookiesPs?ze[e].pp=Math.max(Game.Upgrades[e].getPrice()-(Game.cookies+go()),0)/Game.cookiesPs+Game.Upgrades[e].getPrice()/ze[e].bonus:ze[e].pp=Game.Upgrades[e].getPrice()/ze[e].bonus,Number.isNaN(ze[e].pp)&&(ze[e].pp=1/0),ze[e].color=Eo(ze[e],Game.Upgrades[e].getPrice())})),window.CookieMonsterData.Objects1=JSON.parse(JSON.stringify(We)),window.CookieMonsterData.Objects10=JSON.parse(JSON.stringify(Ae)),window.CookieMonsterData.Objects100=JSON.parse(JSON.stringify(je)),window.CookieMonsterData.Upgrades=[],Object.entries(ze).forEach((e=>{window.CookieMonsterData.Upgrades[e[0]]=JSON.parse(JSON.stringify(e[1]))}))}function Jo(e,t,o,n,i){let a=o,r=0;for(let o=0;o{t[o]={},t[o].bonus=$o(o,e),1!==e&&(q=1)})),t}function en(){Object.keys(Game.Objects).forEach((e=>{We[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,1),Ae[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,10),je[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,100),De[e].price=Jo(Game.Objects[e],Game.Objects[e].basePrice,Game.Objects[e].amount,Game.Objects[e].free,De[e].AmountNeeded)}))}function tn(){We=Zo(1),Ae=Zo(10),je=Zo(100),ze=[],Object.keys(Game.Upgrades).forEach((t=>{const o=function(e){if("toggle"===Game.Upgrades[e].pool||0===Game.Upgrades[e].bought&&Game.Upgrades[e].unlocked&&"prestige"!==Game.Upgrades[e].pool){So(),"Shimmering veil [on]"===yt[e].name?yt["Shimmering veil [off]"].bought=0:"Golden switch [on]"===yt[e].name?yt["Golden switch [off]"].bought=0:yt[e].bought=(yt[e].bought+1)%2,Game.CountsAsUpgradeOwned(Game.Upgrades[e].pool)&&(J+=1),"Elder Pledge"===e?(Z+=1,Z>0&&Oo("Elder nap"),Z>=5&&Oo("Elder slumber")):"Elder Covenant"===e?Oo("Elder calm"):"Prism heart biscuits"===e?Oo("Lovely cookies"):"Heavenly key"===e&&Oo("Wholesome");const t=ee;Fo(),Uo(),t!==ee&&Fo();const o=function(){let e=0;wt("Thousand fingers")&&(e+=.1),wt("Million fingers")&&(e*=5),wt("Billion fingers")&&(e*=10),wt("Trillion fingers")&&(e*=20),wt("Quadrillion fingers")&&(e*=20),wt("Quintillion fingers")&&(e*=20),wt("Sextillion fingers")&&(e*=20),wt("Septillion fingers")&&(e*=20),wt("Octillion fingers")&&(e*=20),wt("Nonillion fingers")&&(e*=20);let t=0;Object.keys(Ct).forEach((e=>{t+=Ct[e].amount})),t-=Ct.Cursor.amount,e*=t,wt("Plastic mouse")&&(e+=.01*de),wt("Iron mouse")&&(e+=.01*de),wt("Titanium mouse")&&(e+=.01*de),wt("Adamantium mouse")&&(e+=.01*de),wt("Unobtainium mouse")&&(e+=.01*de),wt("Eludium mouse")&&(e+=.01*de),wt("Wishalloy mouse")&&(e+=.01*de),wt("Fantasteel mouse")&&(e+=.01*de),wt("Nevercrack mouse")&&(e+=.01*de),wt("Armythril mouse")&&(e+=.01*de),wt("Technobsidian mouse")&&(e+=.01*de),wt("Plasmarble mouse")&&(e+=.01*de),wt("Miraculite mouse")&&(e+=.01*de),wt("Fortune #104")&&(e+=.01*de);let o=1;if(wt("Santa's helpers")&&(o*=1.1),wt("Cookie egg")&&(o*=1.1),wt("Halo gloves")&&(o*=1.1),wt("Dragon claw")&&(o*=1.03),wt("Aura gloves")&&(o*=1+.05*Math.min(Game.Objects.Cursor.level,wt("Luminous gloves")?20:10)),o*=vt("click"),Ct.Temple.minigameLoaded&&xt){const e=xt("labor");1===e?o*=1.15:2===e?o*=1.1:3===e&&(o*=1.05)}Object.keys(Game.buffs).forEach((e=>{void 0!==Game.buffs[e].multClick&&(o*=Game.buffs[e].multClick)})),o*=1+.05*kt("Dragon Cursor");let n=o*Game.ComputeCps(1,wt("Reinforced index finger")+wt("Carpal tunnel prevention cream")+wt("Ambidextrous"),e);return n=Game.runModHookOnValue("cookiesPerClick",n),Game.hasBuff("Cursed finger")&&(n=Game.buffs["Cursed finger"].power),n}()-Game.computedMouseCps;return o?[de-Game.cookiesPs,o]:[de-Game.cookiesPs]}return[]}(t);"Elder Pledge"===t?(ze[t]={bonus:Game.cookiesPs-R},1===e.CalcWrink?ze[t].bonus-=I:2===e.CalcWrink&&(ze[t].bonus-=z),Number.isFinite(ze[t].bonus)||(ze[t].bonus=0)):(ze[t]={},o[0]&&(ze[t].bonus=o[0]),o[1]&&(ze[t].bonusMouse=o[1]))}))}function on(e,t,o){let n=0,i=0,a=0,r=0,l=1+Math.max(0,Math.ceil(Math.log(Game.cookies)/Math.LN10)-10);for(;a0?e/=t:e=0,Ke=on(7,e,Be),qe=2*Ke[1]/Be,Ye=Ke[2]/60/60/6/Pe,et=on(6,e,Ee),Je=2*et[1]/Ee,Ze=et[2]/60/60/6/Pe,nt=on(7,7*e,Be),tt=2*nt[1]/Be,ot=nt[2]/60/60/6/Pe,rt=on(6,7*e,Ee),it=2*rt[1]/Ee,at=rt[2]/60/60/6/Pe}function an(){const e=Math.floor(Date.now()/1e3);if(Game.T/Game.fps%1==0){const t=Game.HowMuchPrestige(Game.cookiesReset),o=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))-Math.floor(t),n=e-Q,i=Math.max(0,o-X)/n;for(let e=0;e{e.push(Game.Upgrades[t])})),e.sort((function(e,t){return e.order>t.order?1:e.order{const o=e[t];if(0===o.bought){let e="";e+=function(e){let t="crate upgrade missing";"prestige"===e.pool&&(t+=" heavenly");let o=0;Game.prefs.crates||(o=1),o&&(t+=" noFrame");let{icon:n}=e;e.iconFunction&&(n=e.iconFunction());const i=`function() {return Game.crateTooltip(Game.UpgradesById[${e.id}], 'stats');}`;return`
\n\t
`}(o),"prestige"===o.pool?Qe+=e:"cookie"===o.pool?Xe+=e:"toggle"!==o.pool&&"unused"!==o.pool&&"debug"!==o.pool&&(_e+=e)}}))}function ln(){if("christmas"===Game.season){let e=60*Game.cookiesPs;Game.hasBuff("Elder frenzy")&&(e*=.5),Game.hasBuff("Frenzy")&&(e*=.75),Fe=Math.max(25,e),Game.Has("Ho ho ho-flavored frosting")&&(Fe*=2)}}function sn(){Ce=900*Se/.15,Ce*=Pe;const e=No();e>0?Ce/=e:Ce=0,ye=Be*(.15*Ce)+13,be=Ee*(.15*Ce)+13,ke=7*Ce,Ge=Be*(.15*ke)+13,ve=Ee*(.15*ke)+13,we=2*Ce,xe=.15*we,Me=0;let t=0,o=0;Object.keys(Game.Objects).forEach((e=>{Game.Objects[e].amount>t&&(t=Game.Objects[e].amount),Game.Objects[e].amount>0&&(o+=1)})),Object.keys(Game.Objects).forEach((e=>{(Game.Objects[e].amountMe&&(Me=2*Game.Objects[e].price,Te=e)}))}function cn(){let e=1,t=1,o=1;wt("Green yeast digestives")&&(o*=1.01),wt("Dragon fang")&&(o*=1.03),e*=1+.1*Game.auraMult("Ancestral Metamorphosis"),e*=Game.eff("goldenCookieGain"),t*=1+.1*Game.auraMult("Unholy Dominion"),t*=Game.eff("wrathCookieGain"),Be=o*e,Ee=o*t,Pe=1,0===Game.shimmerTypes.golden.n&&(Pe*=1+1.23*Game.auraMult("Dragon's Fortune"))}function dn(){const e={};Object.keys(Game.Objects).forEach((t=>{if(0!==Object.keys(De).length&&De[t].TotalNeeded>Game.Objects[t].amount)e[t]={AmountNeeded:De[t].TotalNeeded-Game.Objects[t].amount,TotalNeeded:De[t].TotalNeeded};else{const o=function(e){const t=Game.AchievementsOwned;for(let o=0;o<101;o++)if($o(e,o),ee>t)return o;return 101}(t);e[t]={AmountNeeded:o,TotalNeeded:Game.Objects[t].amount+o}}})),De=e}function pn(){He=0,Ue=0,$e=[0,null];for(let e=0;e$e[0]&&($e=[t,e]))}}function un(){vo(),pn(),sn(),cn(),nn(),rn(),ln(),N=new Qo(qt[qt.length-1]),O=new Qo(qt[qt.length-1]),F=new Qo(qt[qt.length-1]),L=new Qo(qt[qt.length-1]),W=new Qo(Yt[Yt.length-1]),A=new Qo(5),E=new Qo(20*Yt[Yt.length-1]),an(),dn(),Xo(),tn(),en(),Ko()}const mn={CPSMode:1,AvgCPSHist:3,AvgClicksHist:0,CalcWrink:0,Scale:2,ScaleDecimals:2,ScaleSeparator:0,ScaleCutoff:999999,TimeFormat:0,DetailedTime:1,PPDisplayTime:0,BuildColour:1,PPOnlyConsiderBuyable:0,PPExcludeTop:0,PPRigidelMode:0,PPSecondsLowerLimit:0,ColourBlue:"#4bb8f0",ColourGreen:"#00ff00",ColourYellow:"#ffff00",ColourOrange:"#ff7f00",ColourRed:"#ff0000",ColourPurple:"#ff00ff",ColourGray:"#b3b3b3",ColourPink:"#ff1493",ColourBrown:"#8b4513",BotBar:1,TimerBar:1,TimerBarPos:0,TimerBarOverlay:2,UpBarColour:1,UpgradeBarFixedPos:1,SortBuildings:0,SortUpgrades:0,UpgradesNeverCollapse:0,DragonAuraInfo:1,GrimoireBar:1,GCTimer:1,Favicon:1,WrinklerButtons:1,HideSectionsButtons:0,TooltipBuildUpgrade:1,TooltipAmor:0,ToolWarnLucky:1,ToolWarnLuckyFrenzy:1,ToolWarnConjure:1,ToolWarnConjureFrenzy:1,ToolWarnEdifice:1,ToolWarnUser:0,ToolWarnBon:1,ToolWarnPos:1,TooltipGrim:1,TooltipWrink:1,TooltipLump:1,TooltipPlots:1,TooltipPantheon:1,TooltipAscendButton:1,Stats:1,MissingUpgrades:1,MissingAchievements:0,UpStats:1,HeavenlyChipsTarget:1,ShowMissedGC:1,Title:1,GeneralSound:1,GCNotification:0,GCFlash:1,ColourGCFlash:"#ffffff",GCSound:1,GCVolume:100,GCSoundURL:"https://freesound.org/data/previews/66/66717_931655-lq.mp3",FortuneNotification:0,FortuneFlash:1,ColourFortuneFlash:"#ffffff",FortuneSound:1,FortuneVolume:100,FortuneSoundURL:"https://freesound.org/data/previews/174/174027_3242494-lq.mp3",SeaNotification:0,SeaFlash:1,ColourSeaFlash:"#ffffff",SeaSound:1,SeaVolume:100,SeaSoundURL:"https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3",GardFlash:1,ColourGardFlash:"#ffffff",GardSound:1,GardVolume:100,GardSoundURL:"https://freesound.org/data/previews/103/103046_861714-lq.mp3",MagicNotification:0,MagicFlash:1,ColourMagicFlash:"#ffffff",MagicSound:1,MagicVolume:100,MagicSoundURL:"https://freesound.org/data/previews/221/221683_1015240-lq.mp3",WrinklerNotification:0,WrinklerFlash:1,ColourWrinklerFlash:"#ffffff",WrinklerSound:1,WrinklerVolume:100,WrinklerSoundURL:"https://freesound.org/data/previews/124/124186_8043-lq.mp3",WrinklerMaxNotification:0,WrinklerMaxFlash:1,ColourWrinklerMaxFlash:"#ffffff",WrinklerMaxSound:1,WrinklerMaxVolume:100,WrinklerMaxSoundURL:"https://freesound.org/data/previews/152/152743_15663-lq.mp3",BulkBuyBlock:0,FavouriteSettings:1,Header:{Favourite:1,Calculation:1,Notation:1,Colours:1,BarsDisplay:1,Tooltip:1,Statistics:1,Notification:1,NotificationGeneral:1,NotificationGC:1,NotificationFC:1,NotificationSea:1,NotificationGard:1,NotificationMagi:1,NotificationWrink:1,NotificationWrinkMax:1,Miscellaneous:1,Lucky:1,Chain:1,Spells:1,Garden:1,Prestige:1,Wrink:1,Sea:1,Misc:1,InfoTab:1}},hn=function(e){if(1===e){const e=function(){try{Notification.requestPermission().then()}catch(e){return!1}return!0};"Notification"in window?e()?Notification.requestPermission().then():Notification.requestPermission():console.log("This browser does not support notifications.")}};function gn(){1===e.BotBar?(l("CMBotBar").style.display="",yo()):l("CMBotBar").style.display="none",ko()}function fn(){BeautifyAll(),Game.RefreshStore(),Game.RebuildUpgrades(),yo(),so(),po()}function Cn(){1===e.Favicon&&y>0?ct.wrath?l("CMFavicon").href="https://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico":l("CMFavicon").href="https://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico":l("CMFavicon").href="https://orteil.dashnet.org/cookieclicker/favicon.ico"}class yn{constructor(e,t){this.type=e,this.group=t}}class bn extends yn{constructor(e,t,o){super(e,t),this.desc=o}}class kn extends yn{constructor(e,t,o,n,i,a){super(e,t),this.label=o,this.desc=n,this.min=i,this.max=a}}class Gn extends yn{constructor(e,t,o,n,i,a){super(e,t),this.label=o,this.desc=n,this.toggle=i,void 0!==a&&(this.func=a)}}class vn extends yn{constructor(e,t,o,n){super(e,t),this.label=o,this.desc=n;for(let e=0;e<101;e++)this.label[e]=`${e}%`}}const wn={CPSMode:new Gn("bool","Calculation",["Current cookies per second","Average cookies per second"],"Calculate times using current cookies per second or average cookies per second",!1),AvgCPSHist:new Gn("bool","Calculation",["Average CPS in past 10s","Average CPS in past 15s","Average CPS in past 30s","Average CPS in past 1m","Average CPS in past 5m","Average CPS in past 10m","Average CPS in past 15m","Average CPS in past 30m"],"How much time average Cookies Per Second should consider",!1),AvgClicksHist:new Gn("bool","Calculation",["Average clicks in past 1s","Average clicks in past 5s","Average clicks in past 10s","Average clicks in past 15s","Average clicks in past 30s"],"How much time average Cookie Clicks should consider",!1),CalcWrink:new Gn("bool","Calculation",["Calculate with wrinklers OFF","Calculate with wrinklers ON","Calculate with single fattest wrinkler ON"],"Calculate times and average Cookies Per Second with (only the single non-shiny fattest) wrinklers",!0,(()=>{se=!0})),Scale:new Gn("bool","Notation",["Game's setting scale","Metric","Short scale","Short scale (Abbreviated)","Scientific notation","Engineering notation"],"Change how long numbers are formatted",!1,(()=>{fn()})),ScaleDecimals:new Gn("bool","Notation",["1 decimals","2 decimals","3 decimals"],'Set the number of decimals used when applicable. This only works with Cookie Monster scales and not with "Game\'s Setting Scale"',!1,(()=>{fn()})),ScaleSeparator:new Gn("bool","Notation",[". for decimals (standard)",". for thousands"],"Set the separator used for decimals and thousands",!1,(()=>{fn()})),ScaleCutoff:new kn("numscale","Notation","Notation cut-off point: ","The number from which Cookie Monster will start formatting numbers based on chosen scale. Standard is 999,999. Setting this above 999,999,999 might break certain notations",1,999999999),TimeFormat:new Gn("bool","Notation",["Time XXd, XXh, XXm, XXs","Time XX:XX:XX:XX:XX"],"Change the time format",!1),DetailedTime:new Gn("bool","Notation",["Detailed time OFF","Detailed time ON"],"Change how time is displayed in certain statistics and tooltips",!0,(()=>{1===e.DetailedTime?Game.sayTime=Vt:Game.sayTime=T.sayTime})),PPDisplayTime:new Gn("bool","Notation",["PP as value (standard)","PP as time unit"],"Display PP as calculated value or as approximate time unit. Note that PP does not translate directly into a time unit and this is therefore only an approximation.",!1),BuildColour:new Gn("bool","Colours",["Building colours OFF","Building colours ON"],"Colour code buildings",!0,(()=>{so()})),PPOnlyConsiderBuyable:new Gn("bool","Colours",["Don't ignore non-buyable","Ignore non-buyable"],"Makes Cookie Monster label buildings and upgrades you can't buy right now red, useful in those situations where you just want to spend your full bank 'most optimally'",!0),PPExcludeTop:new Gn("bool","Colours",["Don't ignore any","Ignore 1st best","Ignore 1st and 2nd best","Ignore 1st, 2nd and 3rd best"],"Makes Cookie Monster ignore the 1st, 2nd or 3rd best buildings in labeling and colouring PP values",!0),PPRigidelMode:new Gn("bool","Colours",["Rigidel mode OFF","Rigidel mode ON"],'Makes Cookie Monster ignore all "buy 1" options when colouring PP in order to stay at a total building count ending in 10 for pantheon god Rigidel',!0),PPSecondsLowerLimit:new kn("numscale","Colours","Lower limit for PP (in seconds): ",'If a building or upgrade costs less than the specified seconds of CPS it will also be considered optimal and label it as such ("PP is less than xx seconds of CPS"); setting to 0 ignores this option',0,1/0),ColourBlue:new bn("colour","Colours","Standard colour is blue. Used to show upgrades better than best PP building, for Click Frenzy bar, and for various labels"),ColourGreen:new bn("colour","Colours","Standard colour is green. Used to show best PP building, for Blood Frenzy bar, and for various labels"),ColourYellow:new bn("colour","Colours","Standard colour is yellow. Used to show buildings within the top 10 of PP, for Frenzy bar, and for various labels"),ColourOrange:new bn("colour","Colours","Standard colour is orange. Used to show buildings within the top 20 of PP, for Next Reindeer bar, and for various labels"),ColourRed:new bn("colour","Colours","Standard colour is Red. Used to show buildings within the top 30 of PP, for Clot bar, and for various labels"),ColourPurple:new bn("colour","Colours","Standard colour is purple. Used to show buildings outside of the top 30 of PP, for Next Cookie bar, and for various labels"),ColourGray:new bn("colour","Colours","Standard colour is gray. Used to show negative or infinity PP, and for Next Cookie/Next Reindeer bar"),ColourPink:new bn("colour","Colours","Standard colour is pink. Used for Dragonflight bar"),ColourBrown:new bn("colour","Colours","Standard colour is brown. Used for Dragon Harvest bar"),BotBar:new Gn("bool","BarsDisplay",["Bottom bar OFF","Bottom bar ON"],"Building information",!0,(()=>{gn()})),TimerBar:new Gn("bool","BarsDisplay",["Timer bar OFF","Timer bar ON"],"Bar with timers for golden cookie, season popup, Frenzy (Normal, Clot, Elder), Click Frenzy",!0,(()=>{Go()})),TimerBarPos:new Gn("bool","BarsDisplay",["Timer bar position (top left)","Timer bar position (bottom)"],"Placement of the timer bar",!1,(()=>{0===e.TimerBarPos?(l("CMTimerBar").style.width="30%",l("CMTimerBar").style.bottom="",l("game").insertBefore(l("CMTimerBar"),l("sectionLeft"))):(l("CMTimerBar").style.width="100%",l("CMTimerBar").style.bottom="0px",l("wrapper").appendChild(l("CMTimerBar"))),ko()})),TimerBarOverlay:new Gn("bool","BarsDisplay",["Timer bar overlay OFF","Timer bar overlay only seconds","Timer bar overlay full"],"Overlay on timers displaying seconds and/or percentage left",!0),UpBarColour:new Gn("bool","BarsDisplay",["Upgrade colours/bar OFF","Upgrade colours with bar ON","Upgrade colours without bar ON"],"Colour code upgrades and optionally add a counter bar",!1,(()=>{1===e.UpBarColor?(l("CMUpgradeBar").style.display="",po()):2===e.UpBarColor?(l("CMUpgradeBar").style.display="none",po()):(l("CMUpgradeBar").style.display="none",Game.RebuildUpgrades())})),UpgradeBarFixedPos:new Gn("bool","BarsDisplay",["Upgrade bar fixed position OFF","Upgrade bar fixed position ON"],"Lock the upgrade bar at top of the screen to prevent it from moving ofscreen when scrolling",!0,(()=>{1===e.UpgradeBarFixedPos?(l("CMUpgradeBar").style.position="sticky",l("CMUpgradeBar").style.top="0px"):l("CMUpgradeBar").style.position=""})),SortBuildings:new Gn("bool","BarsDisplay",["Sort buildings: default","Sort buildings: PP of x1 purchase","Sort buildings: PP of selected bulk mode"],"Sort the display of buildings in either default order or by PP",!1,(()=>{so()})),SortUpgrades:new Gn("bool","BarsDisplay",["Sort upgrades: default","Sort upgrades: PP"],"Sort the display of upgrades in either default order or by PP",!1,(()=>{po()})),UpgradesNeverCollapse:new Gn("bool","BarsDisplay",["Upgrades always expanded OFF","Upgrades always expanded ON"],"Toggle to make the upgrades sections always expanded to the size needed to display all upgrades",!0,(()=>{co()})),DragonAuraInfo:new Gn("bool","BarsDisplay",["Extra dragon aura info OFF","Extra dragon aura info ON"],"Shows information about changes in CPS and costs in the dragon aura interface.",!0),GrimoireBar:new Gn("bool","BarsDisplay",["Grimoire magic meter timer OFF","Grimoire magic meter timer ON"],"A timer on how long before the Grimoire magic meter is full",!0),GCTimer:new Gn("bool","BarsDisplay",["Golden cookie timer OFF","Golden cookie timer ON"],"A timer on the golden cookie when it has been spawned",!0,(()=>{1===e.GCTimer?Object.keys(ao).forEach((e=>{ao[e].style.display="block",ao[e].style.left=ht[e].l.style.left,ao[e].style.top=ht[e].l.style.top})):Object.keys(ao).forEach((e=>ao[e].style.display="none"))})),Favicon:new Gn("bool","BarsDisplay",["Favicon OFF","Favicon ON"],"Update favicon with golden/wrath cookie",!0,(()=>{Cn()})),WrinklerButtons:new Gn("bool","BarsDisplay",["Extra wrinkler buttons OFF","Extra wrinkler buttons ON"],"Show buttons for popping wrinklers at bottom of cookie section",!0,(()=>{t()})),HideSectionsButtons:new Gn("bool","BarsDisplay",["Hide buildings/upgrades button OFF","Hide buildings/upgrades button ON"],"Show buttons for hiding and showing the buildings and upgrades sections in the right column",!0,(()=>{e.HideSectionsButtons?l("CMSectionHidButtons").style.display="":l("CMSectionHidButtons").style.display="none"})),TooltipBuildUpgrade:new Gn("bool","Tooltip",["Building/upgrade tooltip information OFF","Building/upgrade tooltip information ON"],"Extra information in building/upgrade tooltips",!0),TooltipAmor:new Gn("bool","Tooltip",["Buildings tooltip amortization information OFF","Buildings tooltip amortization information ON"],"Add amortization information to buildings tooltip",!0),ToolWarnLucky:new Gn("bool","Tooltip",["Tooltip lucky warning OFF","Tooltip lucky warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Lucky!" rewards',!0),ToolWarnLuckyFrenzy:new Gn("bool","Tooltip",["Tooltip lucky frenzy warning OFF","Tooltip lucky frenzy warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Lucky!" (Frenzy) rewards',!0),ToolWarnConjure:new Gn("bool","Tooltip",["Tooltip conjure warning OFF","Tooltip conjure warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards',!0),ToolWarnConjureFrenzy:new Gn("bool","Tooltip",["Tooltip conjure frenzy warning OFF","Tooltip conjure frenzy warning ON"],'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards with Frenzy active',!0),ToolWarnEdifice:new Gn("bool","Tooltip",["Tooltip edifice warning OFF","Tooltip edifice warning ON"],'A warning when buying if it will put the bank under the amount needed for "Spontaneous Edifice" to possibly give you your most expensive building',!0),ToolWarnUser:new kn("numscale","Tooltip","Tooltip warning at x times CPS: ","Use this to show a customized warning if buying it will put the bank under the amount equal to value times cps; setting to 0 disables the function altogether",0,1/0),ToolWarnBon:new Gn("bool","Tooltip",["Calculate tooltip warning with bonus CPS OFF","Calculate tooltip warning with bonus CPS ON"],"Calculate the warning with or without the bonus CPS you get from buying",!0),ToolWarnPos:new Gn("bool","Tooltip",["Tooltip warning position (left)","Tooltip warning position (bottom)"],"Placement of the warning boxes",!1,(()=>{Io()})),TooltipGrim:new Gn("bool","Tooltip",["Grimoire tooltip information OFF","Grimoire tooltip information ON"],"Extra information in tooltip for grimoire",!0),TooltipWrink:new Gn("bool","Tooltip",["Wrinkler tooltip OFF","Wrinkler tooltip ON"],"Shows the amount of cookies a wrinkler will give when popping it",!0),TooltipLump:new Gn("bool","Tooltip",["Sugar lump tooltip OFF","Sugar lump tooltip ON"],"Shows the current Sugar Lump type in Sugar lump tooltip.",!0),TooltipPlots:new Gn("bool","Tooltip",["Garden plots tooltip OFF","Garden plots tooltip ON"],"Shows a tooltip for plants that have a cookie reward.",!0),TooltipPantheon:new Gn("bool","Tooltip",["Pantheon tooltip OFF","Pantheon tooltip ON"],"Shows additional info in the pantheon tooltip",!0),TooltipAscendButton:new Gn("bool","Tooltip",["Show Extra Info Ascend Tooltip OFF","Show Extra Info Ascend Tooltip ON"],"Shows additional info in the ascend tooltip",!0),Stats:new Gn("bool","Statistics",["Statistics OFF","Statistics ON"],"Extra Cookie Monster statistics!",!0),MissingUpgrades:new Gn("bool","Statistics",["Missing upgrades OFF","Missing upgrades ON"],"Shows missing upgrades in statistics menu",!0),MissingAchievements:new Gn("bool","Statistics",["Missing Achievements OFF","Missing Normal Achievements ON"],"Shows missing normal achievements in statistics menu.",!0),UpStats:new Gn("bool","Statistics",["Statistics update rate (default)","Statistics update rate (1s)"],"Default rate is once every 5 seconds",!1),HeavenlyChipsTarget:new kn("numscale","Statistics","Heavenly chips target: ",'Use this to set a heavenly chips target that will be counted towards in the "prestige" statsistics sections',1,1/0),ShowMissedGC:new Gn("bool","Statistics",["Missed GC OFF","Missed GC ON"],"Show a stat in the statistics screen that counts how many golden cookies you have missed",!0),Title:new Gn("bool","NotificationGeneral",["Title OFF","Title ON","Title pinned tab highlight"],'Update title with colden cookie/season popup timers; pinned tab highlight only changes the title when a golden cookie/season popup spawns; "!" means that golden cookie/reindeer can spawn',!0),GeneralSound:new Gn("bool","NotificationGeneral",["Consider game volume setting OFF","Consider game volume setting ON"],'Turning this toggle to "off" makes Cookie Monster no longer consider the volume setting of the base game, allowing mod notifications to play with base game volume turned down',!0),GCNotification:new Gn("bool","NotificationGC",["Notification OFF","Notification ON"],"Create a notification when golden cookie spawns",!0,(()=>{hn(e.GCNotification)})),GCFlash:new Gn("bool","NotificationGC",["Flash OFF","Flash ON"],"Flash screen on golden cookie",!0),ColourGCFlash:new bn("colour","NotificationGC","The colour of the GC flash, standard colour is white"),GCSound:new Gn("bool","NotificationGC",["Sound OFF","Sound ON"],"Play a sound on golden cookie",!0),GCVolume:new vn("vol","NotificationGC",[],"Volume"),GCSoundURL:new Gn("url","NotificationGC","Sound URL:","URL of the sound to be played when a golden cookie spawns"),FortuneNotification:new Gn("bool","NotificationFC",["Notification OFF","Notification ON"],"Create a notification when fortune cookie is on the ticker",!0,(()=>{hn(e.FortuneNotification)})),FortuneFlash:new Gn("bool","NotificationFC",["Flash OFF","Flash ON"],"Flash screen on fortune cookie spawn",!0),ColourFortuneFlash:new bn("colour","NotificationFC","The colour of the fortune flash, standard colour is white"),FortuneSound:new Gn("bool","NotificationFC",["Sound OFF","Sound ON"],"Play a sound on fortune cookie spawn",!0),FortuneVolume:new vn("vol","NotificationFC",[],"Volume"),FortuneSoundURL:new Gn("url","NotificationFC","Sound URL:","URL of the sound to be played when the ticker has a fortune cookie"),SeaNotification:new Gn("bool","NotificationSea",["Notification OFF","Notification ON"],"Create a notification on season popup",!0,(()=>{hn(e.SeaNotification)})),SeaFlash:new Gn("bool","NotificationSea",["Flash OFF","Flash ON"],"Flash screen on season popup",!0),ColourSeaFlash:new bn("colour","NotificationSea","The colour of the season popup flash, standard colour is white"),SeaSound:new Gn("bool","NotificationSea",["Sound OFF","Sound ON"],"Play a sound on season popup",!0),SeaVolume:new vn("vol","NotificationSea",[],"Volume"),SeaSoundURL:new Gn("url","NotificationSea","Sound URL:","URL of the sound to be played when on season popup spawns"),GardFlash:new Gn("bool","NotificationGard",["Garden Tick Flash OFF","Flash ON"],"Flash screen on garden tick",!0),ColourGardFlash:new bn("colour","NotificationGard","The colour of the garden flash, standard colour is white"),GardSound:new Gn("bool","NotificationGard",["Sound OFF","Sound ON"],"Play a sound on garden tick",!0),GardVolume:new vn("vol","NotificationGard",[],"Volume"),GardSoundURL:new Gn("url","NotificationGard","Garden Tick Sound URL:","URL of the sound to be played when the garden ticks"),MagicNotification:new Gn("bool","NotificationMagi",["Notification OFF","Notification ON"],"Create a notification when magic reaches maximum",!0,(()=>{hn(e.MagicNotification)})),MagicFlash:new Gn("bool","NotificationMagi",["Flash OFF","Flash ON"],"Flash screen when magic reaches maximum",!0),ColourMagicFlash:new bn("colour","NotificationMagi","The colour of the magic flash, standard colour is white"),MagicSound:new Gn("bool","NotificationMagi",["Sound OFF","Sound ON"],"Play a sound when magic reaches maximum",!0),MagicVolume:new vn("vol","NotificationMagi",[],"Volume"),MagicSoundURL:new Gn("url","NotificationMagi","Sound URL:","URL of the sound to be played when magic reaches maxium"),WrinklerNotification:new Gn("bool","NotificationWrink",["Notification OFF","Notification ON"],"Create a notification when a wrinkler appears",!0,(()=>{hn(e.WrinklerNotification)})),WrinklerFlash:new Gn("bool","NotificationWrink",["Flash OFF","Flash ON"],"Flash screen when a wrinkler appears",!0),ColourWrinklerFlash:new bn("colour","NotificationWrink","The colour of the wrinkler flash, standard colour is white"),WrinklerSound:new Gn("bool","NotificationWrink",["Sound OFF","Sound ON"],"Play a sound when a wrinkler appears",!0),WrinklerVolume:new vn("vol","NotificationWrink",[],"Volume"),WrinklerSoundURL:new Gn("url","NotificationWrink","Sound URL:","URL of the sound to be played when a wrinkler appears"),WrinklerMaxNotification:new Gn("bool","NotificationWrinkMax",["Notification OFF","Notification ON"],"Create a notification when the maximum amount of wrinklers has appeared",!0,(()=>{hn(e.WrinklerMaxNotification)})),WrinklerMaxFlash:new Gn("bool","NotificationWrinkMax",["Flash OFF","Flash ON"],"Flash screen when the maximum amount of Wrinklers has appeared",!0),ColourWrinklerMaxFlash:new bn("colour","NotificationWrinkMax","The colour of the maximum wrinkler flash, standard colour is white"),WrinklerMaxSound:new Gn("bool","NotificationWrinkMax",["Sound OFF","Sound ON"],"Play a sound when the maximum amount of wrinklers has appeared",!0),WrinklerMaxVolume:new vn("vol","NotificationWrinkMax",[],"Volume"),WrinklerMaxSoundURL:new Gn("url","NotificationWrinkMax","Sound URL:","URL of the sound to be played when the maximum amount of wrinklers has appeared"),BulkBuyBlock:new Gn("bool","Miscellaneous",["Block bulk buying OFF","Block bulk buying ON"],"Block clicking bulk buying when you can't buy all. This prevents buying 7 of a building when you are in buy-10 or buy-100 mode.",!0),FavouriteSettings:new Gn("bool","Miscellaneous",["Favourite settings section OFF","Favourite settings section ON","Favourite settings section ON (Locked)"],"Show stars before each setting which allows selecting it for a 'favourites' section at the top of the Cookie Monster settings. Setting this to Locked removes the stars but shows the 'favourites' section",!0,(()=>{Game.UpdateMenu()}))};function xn(){return JSON.stringify({favouriteSettings:lo,settings:e,version:"2.031.8"})}function Mn(){if(ge!==Game.dragonLevel||se){if(Game.dragonLevel<25&&Game.dragonLevels[Game.dragonLevel].buy.toString().includes("sacrifice")){let e=Game.dragonLevels[Game.dragonLevel].buy.toString().match(/Objects\[(.*)\]/)[1];const t=Game.dragonLevels[Game.dragonLevel].buy.toString().match(/sacrifice\((.*?)\)/)[1];if("i"!==e)if(e=e.replaceAll("'",""),Game.Objects[e].amount{if(e=n,Game.Objects[e].amount{Ct[e]=Mo(e)})),yt=[],Object.keys(Game.Upgrades).forEach((e=>{yt[e]=To(e)})),bt=[],Object.keys(Game.Achievements).forEach((e=>{bt[e]=wo(e)})),So()}let Pn=!1;function Bn(t,o,n){(1===e[o]||n)&&3===t&&!1===Pn||1===t?(l("CMFlashScreen").style.backgroundColor=e[`Colour${o}`],l("CMFlashScreen").style.opacity="0.5",3===t?(l("CMFlashScreen").style.display="inline",setTimeout((()=>{Bn(2,o,!0)}),1e3/Game.fps)):setTimeout((()=>{Bn(0,o,!0)}),1e3/Game.fps)):2===t?(l("CMFlashScreen").style.opacity="1",setTimeout((()=>{Bn(1,o,!0)}),1e3/Game.fps)):0===t&&(l("CMFlashScreen").style.display="none")}function En(t,o,n,i){if((1===e[o]||i)&&!1===Pn){const o=new Audio(t);e.GeneralSound?o.volume=e[n]/100*(Game.volume/100):o.volume=e[n]/100,o.play()}}function Nn(t,o,n){1===e[t]&&"hidden"===document.visibilityState&&!1===Pn&&new Notification(o,{body:n,badge:"https://orteil.dashnet.org/cookieclicker/favicon.ico"})}function On(){if(no!==Game.OnAscend&&(no=Game.OnAscend,Game.OnAscend?(l("game").style.bottom="0px",1===e.BotBar&&(l("CMBotBar").style.display="none"),1===e.TimerBar&&(l("CMTimerBar").style.display="none")):(gn(),Go()),bo()),!Game.OnAscend&&0===Game.AscendTimer){r!==Object.keys(Game.mods).length&&(Sn(),un(),r=Object.keys(Game.mods).length),se&&(dn(),tn(),Game.Has("Golden switch [off]")?(So(),yt["Golden switch [off]"].bought=0,Fo(),Se=de):Se=Game.cookiesPs,cn(),sn(),rn(),nn(),Mn(),function(){for(let e=0;e<11;e+=1)for(let t=0;t<3;t+=1)ft[e][t]=Tn(e,t)}(),ln(),function(){let e=0;if(Game.Objects.Bank.minigameLoaded){const t=Game.Objects.Bank.minigame.goods;let o=0;Object.keys(t).forEach((e=>{const n=t[e];o+=n.stock*n.val})),e+=o*Game.cookiesPsRawHighest}e+=function(){let e=0;So();let t=2;5!==ne&&18!==ne||(t-=1),5!==ie&&18!==ie||(t-=1),ne=5,ie=18;for(let e=0;e{Ct[t].amount>0&&(e=t)})),Ct[e].amount-=1,K-=1}return Object.keys(Ct).forEach((t=>{const o=Ct[t];e+=Tt(Game.Objects[o.name],Game.Objects[t].basePrice,o.amount,Game.Objects[t].free,o.amount)})),e}(),gt=e}(),se=0);const t=Game.auraMult("Fierce Hoarder")>0;!Y&&t?(Y=!0,q=1):Y&&!t&&(Y=!1,q=1),q&&(en(),q=0),function(){pn(),Ko(),function(){Re=0;let e=0;Object.keys(Game.wrinklers).forEach((t=>{2===Game.wrinklers[t].phase&&(e+=1)}));let t=1;if(Ct.Temple.minigameLoaded){const e=Game.hasGod("scorn");1===e?t*=1.15:2===e?t*=1.1:3===e&&(t*=1.05)}Ie=e,Re=e*(.05*e*1.1)*(.05*Game.Has("Sacrilegious corruption")+1)*(.05*Game.Has("Wrinklerspawn")+1)*t}(),Xo(),an();const e=Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset);pt=uo(e/ho())}(),f!==(Game.TickerEffect&&"fortune"===Game.TickerEffect.type)&&(f=Game.TickerEffect&&"fortune"===Game.TickerEffect.type,f&&(Bn(3,"FortuneFlash",!1),En(e.FortuneSoundURL,"FortuneSound","FortuneVolume",!1),Nn("FortuneNotification","Fortune Cookie found","A Fortune Cookie has appeared on the Ticker."))),g!==Game.shimmerTypes.reindeer.spawned&&(g=Game.shimmerTypes.reindeer.spawned,Object.keys(Game.shimmers).forEach((e=>{Game.shimmers[e].spawnLead&&"reindeer"===Game.shimmers[e].type&&(dt=Game.shimmers[e])})),Bn(3,"SeaFlash",!1),En(e.SeaSoundURL,"SeaSound","SeaVolume",!1),Nn("SeaNotification","Reindeer sighted!","A Reindeer has spawned. Click it now!")),Game.Objects.Farm.minigameLoaded&&C!==Game.Objects.Farm.minigame.nextStep&&(0!==C&&C0){let t=0;Object.keys(Game.wrinklers).forEach((e=>{2===Game.wrinklers[e].phase&&(t+=1)})),t>v?(v=t,t===Game.getWrinklersMax()&&e.WrinklerMaxFlash?Bn(3,"WrinklerMaxFlash",!1):Bn(3,"WrinklerFlash",!1),t===Game.getWrinklersMax()&&e.WrinklerMaxSound?En(e.WrinklerMaxSoundURL,"WrinklerMaxSound","WrinklerMaxVolume",!1):En(e.WrinklerSoundURL,"WrinklerSound","WrinklerVolume",!1),t===Game.getWrinklersMax()&&e.WrinklerMaxNotification?Nn("WrinklerMaxNotification","Maximum Wrinklers Reached","You have reached your maximum ammount of wrinklers"):Nn("WrinklerNotification","A Wrinkler appeared","A new wrinkler has appeared")):v=t}}()}G=0,ht={},Object.keys(Game.shimmers).forEach((e=>{ht[Game.shimmers[e].id]=Game.shimmers[e],Game.shimmers[e].spawnLead&&"golden"===Game.shimmers[e].type&&(ct=Game.shimmers[e],G+=1)})),Object.keys(ao).forEach((e=>{void 0===ht[e]&&(ao[e].parentNode.removeChild(ao[e]),delete ao[e])})),y!==Game.shimmerTypes.golden.n?(y=Game.shimmerTypes.golden.n,y&&(b{void 0===ao[Game.shimmers[t].id]&&function(t){const o=document.createElement("div");o.id=`GCTimer${t.id}`,o.style.width="96px",o.style.height="96px",o.style.position="absolute",o.style.zIndex="10000000001",o.style.textAlign="center",o.style.lineHeight="96px",o.style.fontFamily='"Kavoon", Georgia, serif',o.style.fontSize="35px",o.style.cursor="pointer",o.style.display="block",0===e.GCTimer&&(o.style.display="none"),o.style.left=t.l.style.left,o.style.top=t.l.style.top,o.onclick=function(){t.pop()},o.onmouseover=function(){t.l.style.filter="brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))",t.l.style.webkitFilter="brightness(125%) drop-shadow(0px 0px 3px rgba(255,255,255,1))"},o.onmouseout=function(){t.l.style.filter="",t.l.style.webkitFilter=""},ao[t.id]=o,l("shimmers").appendChild(o)}(Game.shimmers[t])}))),Cn(),b=G,0===G&&(ct=0)):1===e.GCTimer&&y&&Object.keys(ao).forEach((e=>{ao[e].style.opacity=ht[e].l.style.opacity,ao[e].style.transform=ht[e].l.style.transform,ao[e].textContent=Math.ceil(ht[e].life/Game.fps)}))}function Fn(){let t="";for(let o=0;o{void 0===e[t]?(o=!0,e[t]=mn[t]):"Header"===t&&Object.keys(mn.Header).forEach((n=>{void 0!==e[t][n]&&e[t][n]>-1&&e[t][n]<2||(o=!0,e[t][n]=mn[t][n])}))})),o&&Ln(),On(),Object.keys(mn).forEach((e=>{"Header"!==e&&void 0!==wn[e].func&&wn[e].func()}))}else Wn(mn);Game.UpdateMenu(),Fn()}function An(){Object.keys(Game.wrinklers).forEach((e=>{Game.wrinklers[e].sucked>0&&0===Game.wrinklers[e].type&&(Game.wrinklers[e].hp=0)}))}function jn(t,o){if("b"===t){if(l("tooltip").innerHTML=Game.Objects[o].tooltip(),1===e.TooltipAmor){const e=Jo(Game.Objects[o],Game.Objects[o].basePrice,0,Game.Objects[o].free,Game.Objects[o].amount),t=e-Game.Objects[o].totalCookies;t>0&&(l("tooltip").innerHTML=l("tooltip").innerHTML.split("so far").join(`so far
${B(t)} ${1===Math.floor(t)?"cookie":"cookies"} left to amortize (${mo((e-Game.Objects[o].totalCookies)/(Game.Objects[o].storedTotalCps*Game.globalCpsMult)).text})`))}-1===Game.buyMode&&(l("tooltip").innerHTML=l("tooltip").innerHTML.split(B(Game.Objects[o].bulkPrice)).join(B((Game.Objects[o],Game.Objects[o].basePrice,Game.Objects[o].amount,Game.Objects[o].free,Game.buyBulk,1))))}else if("u"===t){if(!Game.UpgradesInStore[o])return"";l("tooltip").innerHTML=Game.crateTooltip(Game.UpgradesInStore[o],"store")}else"s"===t?l("tooltip").innerHTML=Game.lumpTooltip():"g"===t?l("tooltip").innerHTML=Game.Objects["Wizard tower"].minigame.spellTooltip(o)():"p"===t?l("tooltip").innerHTML=Game.ObjectsById[2].minigame.tileTooltip(o[0],o[1])():"ha"===t?l("tooltip").innerHTML=Game.ObjectsById[2].minigame.toolTooltip(1)():"wb"===t?l("tooltip").innerHTML="":"pag"===t?l("tooltip").innerHTML=Game.Objects.Temple.minigame.godTooltip(o)():"pas"===t&&(l("tooltip").innerHTML=Game.Objects.Temple.minigame.slotTooltip(o[0])());if("b"===t&&1===Game.buyMode||"u"===t||"s"===t||"g"===t||"p"===t&&!Game.keys[16]||"ha"===t||"wb"===t||"pag"===t||"pas"===t&&-1!==o[1]){const e=document.createElement("div");e.id="CMTooltipArea",l("tooltip").appendChild(e)}return eo=t,to=o,zo(),l("tooltip").innerHTML}function Dn(){Game.Objects["Wizard tower"].minigameLoaded&&Object.keys(Game.Objects["Wizard tower"].minigame.spellsById).forEach((e=>{null!==l(`grimoireSpell${e}`).onmouseover&&(x[e]=l(`grimoireSpell${e}`).onmouseover,l(`grimoireSpell${e}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("g",`${e}`)),"this"),Game.tooltip.wobble()})}))}function Hn(){if(!m&&Game.Objects["Wizard tower"].minigameLoaded){const{minigame:t}=Game.Objects["Wizard tower"];p=t.draw,Game.Objects["Wizard tower"].minigame.draw=function(){p(),1===e.GrimoireBar&&t.magic1&&(e.Header[t]=0),Ln()}function _n(t,o){const n=document.createElement("div");n.className="title",n.style.padding="0px 16px",n.style.opacity="0.7",n.style.fontSize="17px",n.style.fontFamily='"Kavoon", Georgia, serif',n.appendChild(document.createTextNode(`${t} `));const i=document.createElement("span");return i.style.cursor="pointer",i.style.display="inline-block",i.style.height="14px",i.style.width="14px",i.style.borderRadius="7px",i.style.textAlign="center",i.style.backgroundColor="#C0C0C0",i.style.color="black",i.style.fontSize="13px",i.style.verticalAlign="middle",i.textContent=e.Header[o]?"-":"+",i.onclick=function(){Vn(o),Game.UpdateMenu()},n.appendChild(i),n}function Qn(e,t,o,n){const i=document.createElement("div");i.className="listing";const a=document.createElement("b");if(a.textContent=t,i.appendChild(a),"withTooltip"===e){i.className="listing",i.appendChild(document.createTextNode(" "));const e=document.createElement("span");e.onmouseout=function(){Game.tooltip.hide()},e.onmouseover=function(){Game.tooltip.draw(this,escape(Ut[n].innerHTML))},e.style.cursor="default",e.style.display="inline-block",e.style.height="10px",e.style.width="10px",e.style.borderRadius="5px",e.style.textAlign="center",e.style.backgroundColor="#C0C0C0",e.style.color="black",e.style.fontSize="9px",e.style.verticalAlign="bottom",e.textContent="?",i.appendChild(e)}return i.appendChild(document.createTextNode(": ")),i.appendChild(o),i}function Xn(e){const t=document.createDocumentFragment();t.appendChild(document.createTextNode(`${e.length} `));const o=document.createElement("span");o.onmouseout=function(){Game.tooltip.hide()};const n=document.createElement("div"),i=document.createElement("div");i.style.minWidth="140px",i.style.marginBottom="4px";const a=document.createElement("div");return a.className="name",a.style.marginBottom="4px",a.style.textAlign="center",a.textContent="Missing",i.appendChild(a),Object.keys(e).forEach((t=>{const o=document.createElement("div");o.style.textAlign="center",o.appendChild(document.createTextNode(e[t])),i.appendChild(o)})),n.appendChild(i),o.onmouseover=function(){Game.tooltip.draw(this,escape(n.innerHTML))},o.style.cursor="default",o.style.display="inline-block",o.style.height="10px",o.style.width="10px",o.style.borderRadius="5px",o.style.textAlign="center",o.style.backgroundColor="#C0C0C0",o.style.color="black",o.style.fontSize="9px",o.style.verticalAlign="bottom",o.textContent="?",t.appendChild(o),t}function qn(t){const o=document.createElement("div");if(o.className="subsection",o.appendChild(t),o.appendChild(_n("Lucky Cookies","Lucky")),e.Header.Lucky&&o.appendChild(function(){const e=Game.auraMult("Dragon's Fortune")?"GoldCookDragonsFortuneTooltipPlaceholder":"GoldCookTooltipPlaceholder",t=document.createElement("div");t.className="CMStatsLuckySection";const o=Game.cookies+go(){Game.HasUnlocked(Do[e])||c.push(Do[e])})),0!==c.length&&e.appendChild(Qn("basic","Rare plant drops left to unlock",Xn(c))),e}())),o.appendChild(_n("Prestige","Prestige")),e.Header.Prestige&&o.appendChild(function(){const t=document.createElement("div");t.className="CMStatsPrestigeSection";const o=Math.floor(Game.HowMuchPrestige(lt+Game.cookiesReset+He+(Game.HasUnlocked("Chocolate egg")&&!Game.Has("Chocolate egg")?Le:0)));t.appendChild(Qn("withTooltip","Prestige level (cur / max)",document.createTextNode(`${B(Game.prestige)} / ${B(o)}`),"PrestMaxTooltipPlaceholder"));const n=Math.max(0,Game.HowManyCookiesReset(o+1)-(lt+Game.cookiesReset+He+(Game.HasUnlocked("Chocolate egg")&&!Game.Has("Chocolate egg")&&Le?Le:0))),i=document.createDocumentFragment();i.appendChild(document.createTextNode(B(n)));const a=document.createElement("small");a.textContent=` (${uo(n/st,1)})`,i.appendChild(a),t.appendChild(Qn("withTooltip","Cookies to next level",i,"NextPrestTooltipPlaceholder")),t.appendChild(Qn("withTooltip","Heavenly chips (cur / max)",document.createTextNode(`${B(Game.heavenlyChips)} / ${B(o-Game.prestige+Game.heavenlyChips)}`),"HeavenChipMaxTooltipPlaceholder")),t.appendChild(Qn("basic","Heavenly chips per second (last 5 seconds)",document.createTextNode(B(Ne,2))));const r=Number(e.HeavenlyChipsTarget);if(!Number.isNaN(r)){const e=r-Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned));e>0&&(t.appendChild(Qn("basic","Heavenly chips to target set in settings (cur)",document.createTextNode(B(e)))),t.appendChild(Qn("basic","Time till target (cur, current 5 second average)",document.createTextNode(uo(e/Ne)))))}const l=function(e){let t=Game.cookiesPs;So(),0===yt["Heavenly key"].bought&&(yt["Heavenly chip secret"].bought=1,yt["Heavenly cookie stand"].bought=1,yt["Heavenly bakery"].bought=1,yt["Heavenly confectionery"].bought=1,yt["Heavenly key"].bought=1,Fo(),t=de,So()),lt>=1e6&&Oo("Sacrifice"),lt>=1e9&&Oo("Oblivion"),lt>=1e12&&Oo("From scratch"),lt>=1e15&&Oo("Nihilism"),lt>=1e18&&Oo("Dematerialize"),lt>=1e21&&Oo("Nil zero zilch"),lt>=1e24&&Oo("Transcendence"),lt>=1e27&&Oo("Obliterate"),lt>=1e30&&Oo("Negative void"),lt>=1e33&&Oo("To crumbs, you say?"),lt>=1e36&&Oo("You get nothing"),lt>=1e39&&Oo("Humble rebeginnings"),lt>=1e42&&Oo("The end of the world"),lt>=1e45&&Oo("Oh, you're back"),lt>=1e48&&Oo("Lazarus"),lt>=1e51&&Oo("Smurf account"),lt>=1e54&&Oo("If at first you don't succeed"),yt["Heavenly chip secret"].bought=1,yt["Heavenly cookie stand"].bought=1,yt["Heavenly bakery"].bought=1,yt["Heavenly confectionery"].bought=1,yt["Heavenly key"].bought=1,oe=e;const o=ee;Fo(),Uo(),o!==ee&&Fo();const n=de-t;return oe=Game.prestige,n}(o),s=document.createDocumentFragment();s.appendChild(document.createTextNode(B(l)));const c=Math.round(l/Game.cookiesPs*1e4);if(Number.isFinite(c)&&0!==c){const e=document.createElement("small");e.textContent=` (${c/100}% of income)`,s.appendChild(e)}t.appendChild(Qn("withTooltip","Reset bonus income",s,"ResetTooltipPlaceholder"));const d=Math.floor(Game.HowMuchPrestige(Game.cookiesReset)),p=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned)),u=p-d;if(!Game.Has("Lucky digit")){let e=7-p%10;e<0&&(e+=10);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Qn("basic",'Next "Lucky Digit" (total / reset)',i))}if(!Game.Has("Lucky number")){let e=777-p%1e3;e<0&&(e+=1e3);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Qn("basic",'Next "Lucky Number" (total / reset)',i))}if(!Game.Has("Lucky payout")){let e=777777-p%1e6;e<0&&(e+=1e6);const o=u+e,n=p+e,i=document.createDocumentFragment();i.appendChild(document.createTextNode(`${n.toLocaleString()} / ${o.toLocaleString()} (+${e})`)),t.appendChild(Qn("basic",'Next "Lucky Payout" (total / reset)',i))}return t}()),Game.cpsSucked>0&&(o.appendChild(_n("Wrinklers","Wrink")),e.Header.Wrink)){const e=document.createDocumentFragment();e.appendChild(document.createTextNode(`${B(He)} / ${B(Ue)} `));const t=document.createElement("a");t.textContent="Pop All Normal",t.className="option",t.onclick=function(){An()},e.appendChild(t),o.appendChild(Qn("basic","Rewards of Popping (All/Normal)",e));const n=document.createDocumentFragment();n.appendChild(document.createTextNode(`${B($e[0])} `));const i=document.createElement("a");i.textContent="Pop Single Fattest",i.className="option",i.onclick=function(){null!==$e[1]&&(Game.wrinklers[$e[1]].hp=0)},n.appendChild(i),o.appendChild(Qn("basic",`Rewards of Popping Single Fattest Non-Shiny Wrinkler (id: ${null!==$e[1]?$e[1]:"None"})`,n))}if(o.appendChild(function(){const t=document.createElement("div");t.className="CMStatsSeasonSection";let o=!1;const n=[];Object.keys(Wo).forEach((e=>{Game.Has(Wo[e])||(n.push(Wo[e]),o=!0)}));const i=[];Object.keys(Ao).forEach((e=>{Game.Has(Ao[e])||(i.push(Ao[e]),o=!0)}));const a=[];Object.keys(jo).forEach((e=>{Game.Has(jo[e])||(a.push(jo[e]),o=!0)}));const r=[];Object.keys(Game.eggDrops).forEach((e=>{Game.HasUnlocked(Game.eggDrops[e])||(r.push(Game.eggDrops[e]),o=!0)}));const l=[];Object.keys(Game.rareEggDrops).forEach((e=>{Game.HasUnlocked(Game.rareEggDrops[e])||(l.push(Game.rareEggDrops[e]),o=!0)}));const s=Game.HasUnlocked("Chocolate egg")&&!Game.Has("Chocolate egg"),c=Game.Has("Century egg");if(("christmas"===Game.season||o||s||c)&&(t.appendChild(_n("Season Specials","Sea")),e.Header.Sea)){if(0!==n.length){t.appendChild(Qn("basic","Halloween cookies left to buy",Xn(n)));let e=.95;if(Game.HasAchiev("Spooky cookies")&&(e=.8),Game.Has("Starterror")&&(e*=.9),e*=1/Game.dropRateMult(),Game.hasGod){const t=Game.hasGod("seasons");1===t?e*=.9:2===t?e*=.95:3===t&&(e*=.97)}const o=n.length/7;t.appendChild(Qn("basic","Chance of receiving a cookie from wrinkler/shiny wrinkler",document.createTextNode(`${B((1-e)*o*100)}% / ${B((1-.9*e)*o*100)}%`)))}if(0!==i.length){t.appendChild(Qn("basic","Christmas cookies left to buy",Xn(i)));let e=.8;if(Game.HasAchiev("Let it snow")&&(e=.6),e*=1/Game.dropRateMult(),Game.Has("Starsnow")&&(e*=.95),Game.hasGod){const t=Game.hasGod("seasons");1===t?e*=.9:2===t?e*=.95:3===t&&(e*=.97)}const o=i.length/7;t.appendChild(Qn("basic","Chance of receiving a cookie from reindeer",document.createTextNode(`${B((1-e)*o*100)}%`)))}0!==a.length&&t.appendChild(Qn("basic","Valentine cookies left to buy",Xn(a)));const e=function(e){let t=e*(1/Game.dropRateMult());if(Game.HasAchiev("Hide & seek champion")&&(t*=.7),Game.Has("Omelette")&&(t*=.9),Game.Has("Starspawn")&&(t*=.9),Game.hasGod){const e=Game.hasGod("seasons");1===e?t*=.9:2===e?t*=.95:3===e&&(t*=.97)}const o=1-t,n=Game.eggDrops.length-r.length,i=Game.rareEggDrops.length-l.length,a=.9*o*(1-n/Game.eggDrops.length),s=.1*o*(1-i/Game.rareEggDrops.length),c=.9*o*(n/Game.eggDrops.length)+.1*o*(i/Game.rareEggDrops.length);return[a+.9*c*(1-n/Game.eggDrops.length),s+.1*c*(1-i/Game.rareEggDrops.length)]};0!==r.length&&(t.appendChild(Qn("basic","Normal easter eggs left to unlock",Xn(r))),t.appendChild(Qn("basic","Chance of receiving an egg from wrinkler/golden cookie",document.createTextNode(`${B(100*e(.98)[0])}% / ${B(100*e(.9)[0])}%`)))),0!==l.length&&(t.appendChild(Qn("basic","Rare easter eggs left to unlock",Xn(l))),t.appendChild(Qn("basic","Chance of receiving a rare egg from wrinkler/golden cookie",document.createTextNode(`${B(100*e(.98)[1])}% / ${B(100*e(.9)[1])}%`)))),"christmas"===Game.season&&t.appendChild(Qn("basic","Reindeer reward",document.createTextNode(B(Fe)))),s&&t.appendChild(Qn("withTooltip","Chocolate egg cookies",document.createTextNode(B(Le)),"ChoEggTooltipPlaceholder")),c&&t.appendChild(Qn("basic","Century egg multiplier",document.createTextNode(Math.round(1e4*(Oe-1))/100+"%")))}return t}()),o.appendChild(_n("Miscellaneous","Misc")),e.Header.Misc){if(o.appendChild(Qn("basic",`Average cookies per second (past ${qt[e.AvgCPSHist]<60?`${qt[e.AvgCPSHist]} seconds`:qt[e.AvgCPSHist]/60+(3===e.AvgCPSHist?" minute":" minutes")})`,document.createTextNode(B(ho(),3)))),o.appendChild(Qn("basic",`Average cookie clicks per second (past ${Yt[e.AvgClicksHist]}${0===e.AvgClicksHist?" second":" seconds"})`,document.createTextNode(B(Ve,1)))),o.appendChild(Qn("basic",`Cookies from clicking (past ${Yt[e.AvgClicksHist]}${0===e.AvgClicksHist?" second":" seconds"})`,document.createTextNode(B(E.calcSum(Ve*Yt[e.AvgClicksHist]))))),Game.Has("Fortune cookies")){const e=[];Object.keys(Lo).forEach((t=>{Game.Has(Lo[t])||e.push(Lo[t])})),0!==e.length&&o.appendChild(Qn("basic","Fortune Upgrades Left to Buy",Xn(e)))}if(e.ShowMissedGC&&o.appendChild(Qn("basic","Missed golden cookies",document.createTextNode(B(Game.missedGoldenClicks)))),Game.prefs.autosave){const e=document.createElement("span");e.id="CMStatsAutosaveTimer",e.innerText=Game.sayTime(60*Game.fps-(Game.OnAscend?0:Game.T%(60*Game.fps)),4),o.appendChild(Qn("basic","Time till autosave",e))}}l("menu").insertBefore(o,l("menu").childNodes[2]),e.MissingUpgrades&&l("menu").childNodes.forEach((e=>{if(e.children[0])if("Prestige"===e.children[0].innerHTML&&Qe){const t=Qe.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesPrestigeTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing Prestige upgrades: ${t}/${Game.PrestigeUpgrades.length} (${Math.floor(t/Game.PrestigeUpgrades.length*100)}%)`,o.appendChild(n),e.appendChild(o);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=Qe,e.appendChild(i)}else if("Upgrades"===e.children[0].innerHTML){if(_e){const t=_e.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing normal upgrades: ${t}/${Game.UpgradesByPool[""].length+Game.UpgradesByPool.tech.length} (${Math.floor(t/(Game.UpgradesByPool[""].length+Game.UpgradesByPool.tech.length)*100)}%)`,o.appendChild(n),e.insertBefore(o,e.childNodes[3]);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=_e,e.insertBefore(i,document.getElementById("CMMissingUpgradesTitle").nextSibling)}if(Xe){const t=Xe.match(new RegExp("div","g")||0).length/2,o=document.createElement("div");o.id="CMMissingUpgradesCookiesTitle",o.className="listing";const n=document.createElement("div");n.innerHTML=`Missing Cookie upgrades: ${t}/${Game.UpgradesByPool.cookie.length} (${Math.floor(t/Game.UpgradesByPool.cookie.length*100)}%)`,o.appendChild(n),e.appendChild(o);const i=document.createElement("div");i.className="listing crateBox",i.innerHTML=Xe,e.appendChild(i)}}})),e.MissingAchievements&&function(){let t;Object.values(document.querySelectorAll("div.title")).forEach((e=>{e.textContent.includes("Achievements")&&(t=e.parentElement.querySelectorAll("div.listing.crateBox")[0])})),e.MissingAchievements&&Object.values(t.children).forEach((e=>{if(!e.className.includes("enabled")){const t=e.onclick.toString().split(/\[(.*)\]/gi)[1],{icon:o}=Game.AchievementsById[t];e.style.backgroundPosition=`${48*-o[0]}px ${48*-o[1]}px`,e.onmouseover=function(){Game.mouseDown||(Game.setOnCrate(this),Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>function(e){const t=[];"shadow"===e.pool?t.push("Shadow Achievement","#9700cf"):t.push("Achievement",0),t.push("Locked",0);let o=0;(Game.Has("Neuromancy")||Game.sesame&&"debug"===e.pool)&&(o=1),o&&0===e.won?t.push("Click to win!","#00c462"):o&&e.won>0&&t.push("Click to lose!","#00c462");let{icon:n}=e;e.iconFunction&&(n=e.iconFunction());let{desc:i}=e;e.descFunc&&(i=e.descFunc("stats"));let a="";for(let e=0;e[${t[e]}]`);return a=a.substring(1),`
\n
\n
${e.name}
\n ${a}
${i}
\n ${Game.sesame?`
Id : ${e.id} | Order : ${Math.floor(e.order)}${e.tier?` | Tier : ${e.tier}`:""}
`:""}`}(Game.AchievementsById[t])),"top"),Game.tooltip.wobble())}}}))}()}const Yn={Favourite:"Favourite Settings",Calculation:"Calculation",Notation:"Notation",Colours:"Colours and colour coding",BarsDisplay:"Infobars and visual settings",Tooltip:"Tooltips",Statistics:"Statistics",Notification:"Notifications",Miscellaneous:"Miscellaneous"},Kn={NotificationGeneral:"General Notifications",NotificationGC:"Golden Cookie",NotificationFC:"Fortune Cookie",NotificationSea:"Season Special",NotificationGard:"Garden Tick",NotificationMagi:"Full Magic Bar",NotificationWrink:"Wrinkler",NotificationWrinkMax:"Maximum Wrinklers"};function Jn(t,o){const n=document.createElement("div");n.className="title",n.style.opacity="0.7",n.style.fontSize="17px",n.appendChild(document.createTextNode(`${o} `));const i=document.createElement("span");return i.style.cursor="pointer",i.style.display="inline-block",i.style.height="14px",i.style.width="14px",i.style.borderRadius="7px",i.style.textAlign="center",i.style.backgroundColor="#C0C0C0",i.style.color="black",i.style.fontSize="13px",i.style.verticalAlign="middle",i.textContent=e.Header[t]?"-":"+",i.onclick=function(){Vn(t),Game.UpdateMenu()},n.appendChild(i),n}function Zn(t){const o=document.createElement("div");if(o.className="listing",1===e.FavouriteSettings&&o.appendChild(function(e){const t=document.createElement("a");return lo.includes(e)?(t.innerText="★",t.style.color="yellow"):t.innerText="☆",t.className="option",t.onclick=function(){!function(e){lo.includes(e)?lo=lo.filter((t=>t!==e)):lo.push(e)}(e),Ln(),Game.UpdateMenu()},t.onmouseover=function(){Game.tooltip.draw(this,escape(Ut.FavouriteSettingPlaceholder.innerHTML))},t.onmouseout=function(){Game.tooltip.hide()},t.appendChild(document.createTextNode(" ")),t}(t)),"bool"===wn[t].type){const n=document.createElement("a");wn[t].toggle&&0===e[t]?n.className="option off":n.className="option",n.id=In+t,n.onclick=function(){!function(t){e[t]+=1,e[t]===wn[t].label.length?(e[t]=0,wn[t].toggle&&(l(In+t).className="option off")):l(In+t).className="option",void 0!==wn[t].func&&wn[t].func(),Ln()}(t),Game.UpdateMenu()},n.textContent=wn[t].label[e[t]],o.appendChild(n);const i=document.createElement("label");return i.textContent=wn[t].desc,i.style.lineHeight="1.6",o.appendChild(i),o}if("vol"===wn[t].type){const n=document.createElement("div");n.className="sliderBox";const i=document.createElement("div");i.style.float="left",i.innerHTML=wn[t].desc,n.appendChild(i);const a=document.createElement("div");a.id=`slider${t}right`,a.style.float="right",a.innerHTML=`${e[t]}%`,n.appendChild(a);const r=document.createElement("input");r.className="slider",r.id=`slider${t}`,r.style.clear="both",r.type="range",r.min="0",r.max="100",r.step="1",r.value=e[t],r.oninput=function(){zn(t),Game.UpdateMenu()},r.onchange=function(){zn(t),Game.UpdateMenu()},n.appendChild(r),o.appendChild(n);const l=document.createElement("a");return l.className="option",l.onclick=function(){En(e[t.replace("Volume","SoundURL")],t.replace("Volume","Sound"),t,!0)},l.textContent="Test sound",o.appendChild(l),o}if("url"===wn[t].type){const n=document.createElement("span");n.className="option",n.textContent=`${wn[t].label} `,n.style.lineHeight="1.6",o.appendChild(n);const i=document.createElement("input");i.id=In+t,i.className="option",i.type="text",i.readOnly=!0,i.setAttribute("value",e[t]),i.style.width="300px",o.appendChild(i),o.appendChild(document.createTextNode(" "));const a=document.createElement("input");a.id=`${In+t}Prompt`,a.className="option",a.type="text",a.setAttribute("value",e[t]);const r=document.createElement("a");r.className="option",r.onclick=function(){!function(e,t){Game.promptWrapL.className="framed";const o=e;Game.promptL.innerHTML=`${o}
`,Object.keys(t).forEach((e=>{const o=document.createElement("a");o.id=`promptOption${e}`,o.className="option",o.onclick=function(){PlaySound("snd/tick.mp3"),t[e][1]()},o.textContent=t[e][0],Game.promptL.children[1].appendChild(o)})),Game.promptAnchorL.style.display="block",Game.darkenL.style.display="block",Game.promptL.focus(),Game.promptOn=1,Game.UpdatePrompt()}(a.outerHTML,[["Save",function(){e[t]=l(`CMConfig${t}Prompt`).value,Ln(),Game.ClosePrompt(),Game.UpdateMenu()}],["Cancel",function(){Game.ClosePrompt()}]])},r.textContent="Edit",o.appendChild(r);const s=document.createElement("label");return s.textContent=wn[t].desc,s.style.lineHeight="1.6",o.appendChild(s),o}if("colour"===wn[t].type){const n=document.createElement("span");n.className="option";const i=document.createElement("input");i.id=t,i.style.width="65px",i.setAttribute("value",e[t]),n.appendChild(i),new $n(i,{hash:!0,position:"right",onInput:function(){e[this.targetElement.id]=this.toHEXString(),Fn(),Ln(),Game.UpdateMenu()}});const a=document.createElement("label");if(a.textContent=wn[t].desc,a.style.lineHeight="1.6",n.appendChild(a),t.includes("Flash")){const e=document.createElement("a");e.className="option",e.onclick=function(){Bn(3,t.replace("Colour",""),!0)},e.textContent="Test flash",n.appendChild(e)}return o.appendChild(n),Rn().init(),o}if("numscale"===wn[t].type){const n=document.createElement("span");n.className="option",n.textContent=`${wn[t].label} `,n.style.lineHeight="1.6",o.appendChild(n);const i=document.createElement("input");i.id=In+t,i.className="option",i.type="number",i.value=e[t],i.min=wn[t].min,i.max=wn[t].max,i.oninput=function(){e[t]=this.value,Ln(),fn(),Game.UpdateMenu()},o.appendChild(i),o.appendChild(document.createTextNode(" "));const a=document.createElement("label");return a.textContent=wn[t].desc,a.style.lineHeight="1.6",o.appendChild(a),o}return o}function ei(t){if(1===e.TimerBar&&0===e.TimerBarPos){const e=parseInt(l("CMTimerBar").style.height,10);Game.mouseY-=e,t(),Game.mouseY+=e}else t()}function ti(){T.Beautify=Beautify,Beautify=B,T.CalculateGains=Game.CalculateGains,Game.CalculateGains=function(){T.CalculateGains(),se=1,S=Date.now(),P=Date.now()},T.tooltip={},T.tooltip.draw=Game.tooltip.draw,T.tooltip.drawMod=new Function(`return ${Game.tooltip.draw.toString().split("this").join("Game.tooltip")}`)(),Game.tooltip.draw=function(e,t,o){T.tooltip.drawMod(e,t,o)},T.tooltip.update=Game.tooltip.update,T.tooltip.updateMod=new Function(`return ${Game.tooltip.update.toString().split("this.").join("Game.tooltip.")}`)(),Game.tooltip.update=function(){T.tooltip.updateMod(),function(){if("store"===Game.tooltip.origin){let t=0;1===e.ToolWarnLucky&&1===e.ToolWarnPos&&null!==l("CMDispTooltipWarningParent")&&(t=l("CMDispTooltipWarningParent").clientHeight-4),Game.tooltip.tta.style.top=`${Math.min(parseInt(Game.tooltip.tta.style.top,10),l("game").clientHeight+l("topBar").clientHeight-Game.tooltip.tt.clientHeight-t-46)}px`}}()},T.UpdateWrinklers=Game.UpdateWrinklers,Game.UpdateWrinklers=function(){ei(T.UpdateWrinklers)},T.UpdateSpecial=Game.UpdateSpecial,Game.UpdateSpecial=function(){ei(T.UpdateSpecial)},l("bigCookie").removeEventListener("click",Game.ClickCookie,!1),l("bigCookie").addEventListener("click",(()=>{ei(Game.ClickCookie)}),!1),T.RebuildUpgrades=Game.RebuildUpgrades,Game.RebuildUpgrades=function(){T.RebuildUpgrades(),M=[],Object.keys(Game.UpgradesInStore).forEach((e=>{null!==l(`upgrade${e}`).onmouseover&&(M[e]=l(`upgrade${e}`).onmouseover,l(`upgrade${e}`).onmouseover=function(){Game.mouseDown||(Game.setOnCrate(this),Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("u",`${e}`)),"store"),Game.tooltip.wobble())})})),Game.CalculateGains()},T.ClickProduct=Game.ClickProduct,Game.ClickProduct=function(t){(!e.BulkBuyBlock||Game.ObjectsById[t].bulkPrice-1;--e)if(Game.ObjectsById[e].amount>0){const o=Ct[Game.ObjectsById[e].name].name;Ct[o].amount-=1,K-=1,t=Ct[o].basePrice*Game.priceIncrease**Math.max(0,Ct[o].amount-1-Ct[o].free),t=Game.modifyBuildingPrice(Ct[o],t),t=Math.ceil(t);break}const o=ee;return Fo(),Uo(),o!==ee&&Fo(),[de-Game.cookiesPs,t]}(t),n=uo(o/(e+Game.cookiesPs));let i;i=0===Game.cookiesPs?B(1/0):B(e/Game.cookiesPs*100),l("dragonAuraInfo").style.minHeight="60px",l("dragonAuraInfo").style.margin="8px",l("dragonAuraInfo").appendChild(document.createElement("div")).className="line";const a=document.createElement("div");a.style.minWidth="200px",a.style.textAlign="center",a.textContent=`Picking this aura will change CPS by ${B(e)} (${i}% of current CPS).`,l("dragonAuraInfo").appendChild(a);const r=document.createElement("div");r.style.minWidth="200px",r.style.textAlign="center",r.textContent=`It will take ${n} to recover the cost.`,l("dragonAuraInfo").appendChild(r)}}(t)},T.ToggleSpecialMenu=Game.ToggleSpecialMenu,Game.ToggleSpecialMenu=function(e){T.ToggleSpecialMenu(e),function(){if(null!==(l("specialPopup").className.match(/onScreen/)&&l("specialPopup").children[0].style.background.match(/dragon/)))for(let e=0;e${fe}`,"this"),Game.tooltip.wobble()},l("specialPopup").children[e].onmouseout=function(){Game.tooltip.shouldHide=1})}()},T.UpdateMenu=Game.UpdateMenu,Game.UpdateMenu=function(){void 0!==Rn().picker&&void 0!==Rn().picker.owner||(T.UpdateMenu(),function(){const t=document.createElement("div");t.className="title","prefs"===Game.onMenu?(t.textContent="Cookie Monster Settings",function(t){const o=document.createDocumentFragment();o.appendChild(t),Object.keys(Yn).forEach((t=>{if("Favourite"===t){if(0!==lo.length&&e.FavouriteSettings>0&&(o.appendChild(Jn(t,Yn[t])),e.Header[t]))for(let e=0;e{const n=Jn(t,Kn[t]);n.style.fontSize="15px",n.style.opacity="0.5",o.appendChild(n),e.Header[t]&&Object.keys(wn).forEach((e=>{wn[e].group===t&&o.appendChild(Zn(e))}))})):Object.keys(wn).forEach((e=>{wn[e].group===t&&o.appendChild(Zn(e))})))}));const n=document.createElement("div");n.className="listing";const i=document.createElement("a");i.className="option",i.onclick=function(){Wn(mn)},i.textContent="Restore Default",n.appendChild(i),o.appendChild(n),l("menu").childNodes[2].insertBefore(o,l("menu").childNodes[2].childNodes[l("menu").childNodes[2].childNodes.length-1])}(t)):"stats"===Game.onMenu?e.Stats&&(t.textContent="Cookie Monster Statistics",qn(t)):"log"===Game.onMenu&&(t.textContent="Cookie Monster ",function(t){const o=document.createElement("div");o.className="subsection";const n=document.createElement("span");if(n.style.cursor="pointer",n.style.display="inline-block",n.style.height="14px",n.style.width="14px",n.style.borderRadius="7px",n.style.textAlign="center",n.style.backgroundColor="#C0C0C0",n.style.color="black",n.style.fontSize="13px",n.style.verticalAlign="middle",n.textContent=e.Header.InfoTab?"-":"+",n.onclick=function(){Vn("InfoTab"),Game.UpdateMenu()},t.appendChild(n),o.appendChild(t),e.Header.InfoTab){const e=document.createElement("div");e.innerHTML='
\n Cookie Monster\n offers a wide range of tools and statistics to enhance your game experience.\n It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want.
\n Progess on new updates and all previous release notes can be found on the GitHub page linked above!
\n Please also report any bugs you may find over there!
\n
\n ',o.appendChild(e);const t=document.createElement("div");t.innerHTML='
\nWe have moved Cookie Monster to a new location!
\nPlease update the link you are using to load Cookie Monster to https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js and let everybody know this is the new place to find Cookie Monster!
\nThese are the release notes for the latest update (v 2.031.8).
\n
\nThis update implements the following functions:
\n- The tooltip of buildings now shows how many buildings need to be bought before a new achievement is reached and the cost and PP of this
\n- New setting to force the upgrades sections to always show all available upgrades, stopping them from collapsing and expanding
\n
\nThis update fixes the following bugs:
\n- Settings menu now correctly updates after changing a setting
\n- Fixed incorrect calculation of dates in rare cases
\n- Remove golden cookie timers when you ascend
\n
\n',o.appendChild(t)}const i=l("menu").children[1];i.insertBefore(o,i.children[1])}(t))}())},T.sayTime=Game.sayTime,Vt=function(e,t){return Number.isNaN(e)||e<=0?T.sayTime(e,t):uo(e/Game.fps,1)},T.Logic=Game.Logic,Game.Logic=function(){T.Logic();let t="Cookie Clicker";"fools"===Game.season&&(t="Cookie Baker"),ro=`${Game.OnAscend?"Ascending! ":""}${B(Game.cookies)} ${1===Game.cookies?"cookie":"cookies"} - ${t}`,function(){if(Game.OnAscend||0===e.Title)document.title=ro;else if(1===e.Title){let e,t,o,n=!1,i=!1;e=ct?ct.wrath?`[W${Math.ceil(ct.life/Game.fps)}]`:`[G${Math.ceil(ct.life/Game.fps)}]`:Game.Has("Golden switch [off]")?"[GS]":`[${Number(l("CMTimerBarGCMinBar").textContent)<0?"!":""}${Math.ceil((Game.shimmerTypes.golden.maxTime-Game.shimmerTypes.golden.time)/Game.fps)}]`,f&&(n=!0,t="[F]"),"christmas"===Game.season&&(i=!0,o=g?`[R${Math.ceil(dt.life/Game.fps)}]`:`[${Number(l("CMTimerBarRenMinBar").textContent)<0?"!":""}${Math.ceil((Game.shimmerTypes.reindeer.maxTime-Game.shimmerTypes.reindeer.time)/Game.fps)}]`);let a=ro;"["===a.charAt(0)&&(a=a.substring(a.lastIndexOf("]")+1)),document.title=`${e+(n?t:"")+(i?o:"")} ${a}`}else if(2===e.Title){let e="",t=!1;ct&&(t=!0,ct.wrath?e+=`[W${Math.ceil(ct.life/Game.fps)}]`:e+=`[G${Math.ceil(ct.life/Game.fps)}]`),f&&(t=!0,e+="[F]"),"christmas"===Game.season&&g&&(e+=`[R${Math.ceil(dt.life/Game.fps)}]`,t=!0),t&&(e+=" - ");let o="Cookie Clicker";"fools"===Game.season&&(o="Cookie Baker"),e+=o,document.title=e}}(),function(){const t=Math.max(0,Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset)),o=Game.sayTime((Date.now()-Game.startDate)/1e3*Game.fps,-1);let n="";n+=`You've been on this run for ${""===o?"not very long":o}.
`,n+='
',Game.prestige>0&&(n+=`Your prestige level is currently ${B(Game.prestige)}.
(CpS +${B(Game.prestige)}%)`,n+='
'),n+=X<1?"Ascending now would grant you no prestige.":X<2?"Ascending now would grant you
1 prestige level (+1% CpS)
and 1 heavenly chip to spend.":`Ascending now would grant you
${B(X)} prestige levels (+${B(X)}% CpS)
and ${B(X)} heavenly chips to spend.`,n+='
',n+=`You need ${B(t)} more cookies for the next level.
`,n+=e.TooltipAscendButton?`
It takes ${pt} to reach the next level and you were making ${B(Ne,2)} chips on average in the last 5 seconds.
`:"",l("ascendTooltip").innerHTML=n}()}}function oi(){window.CookieMonsterData={},Sn(),sn(),un(),r=Object.keys(Game.mods).length,ue=document.createElement("style"),ue.type="text/css",ue.id="CMCSS",document.head.appendChild(ue),function(){const e=document.createElement("div");e.id="CMBotBar",e.style.height="69px",e.style.width="100%",e.style.position="absolute",e.style.display="none",e.style.backgroundColor="#262224",e.style.backgroundImage="linear-gradient(to bottom, #4d4548, #000000)",e.style.borderTop="1px solid black",e.style.overflow="auto",e.style.textShadow="-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black";const t=e.appendChild(document.createElement("table"));t.style.width="100%",t.style.textAlign="center",t.style.whiteSpace="nowrap";const o=t.appendChild(document.createElement("tbody")),n=function(e,t){const o=document.createElement("td");return o.style.textAlign="right",o.className=St+t,o.textContent=e,o},i=o.appendChild(document.createElement("tr"));i.style.fontWeight="bold",i.appendChild(n("CM 2.031.8",Nt)),o.appendChild(document.createElement("tr")).appendChild(n("Bonus Income",Bt)),o.appendChild(document.createElement("tr")).appendChild(n("Payback Period",Bt)),o.appendChild(document.createElement("tr")).appendChild(n("Time Left",Bt)),l("wrapper").appendChild(e),Object.keys(Game.Objects).forEach((e=>{Co(e)}))}(),function(){const e=document.createElement("div");e.id="CMTimerBar",e.style.position="absolute",e.style.display="none",e.style.height="0px",e.style.fontSize="10px",e.style.fontWeight="bold",e.style.backgroundColor="black";const t=fo("CMTimerBarGC","Next Cookie",[{id:"CMTimerBarGCMinBar",color:Wt},{id:"CMTimerBarGCBar",color:Lt}]);e.appendChild(t);const o=fo("CMTimerBarRen","Next Reindeer",[{id:"CMTimerBarRenMinBar",color:Wt},{id:"CMTimerBarRenBar",color:Ot}]);e.appendChild(o);const n=document.createElement("div");n.id="CMTimerBarBuffTimers",e.appendChild(n),l("wrapper").appendChild(e)}(),function(){const e=document.createElement("div");e.id="CMUpgradeBar",e.style.width="100%",e.style.backgroundColor="black",e.style.textAlign="center",e.style.fontWeight="bold",e.style.display="none",e.style.zIndex="21",e.onmouseout=function(){Game.tooltip.hide()};const t=document.createElement("div");t.appendChild(function(){const e=document.createElement("div");e.style.minWidth="330px",e.style.marginBottom="4px";const t=document.createElement("div");t.className="name",t.style.marginBottom="4px",t.textContent="Legend",e.appendChild(t);const o=function(e,t){const o=document.createElement("div");o.style.verticalAlign="middle";const n=document.createElement("span");return n.className=Pt+e,n.style.display="inline-block",n.style.height="10px",n.style.width="10px",n.style.marginRight="4px",o.appendChild(n),o.appendChild(document.createTextNode(t)),o};return e.appendChild(o(Bt,"Better than the best PP of a building option")),e.appendChild(o(Et,"Same as the best PP building option")),e.appendChild(o(Nt,"Within the top 10 of PP for buildings")),e.appendChild(o(Ot,"Within the top 20 of PP for buildings")),e.appendChild(o(Ft,"Within the top 30 of PP for buildings")),e.appendChild(o(Lt,"Outside of the top 30 of PP for buildings")),e.appendChild(o(Wt,"Negative or infinity PP")),e}()),e.onmouseover=function(){Game.tooltip.draw(this,escape(t.innerHTML),"store")};const o=function(e,t){const o=document.createElement("span");return o.id=e,o.className=St+t,o.style.width="14.28571428571429%",o.style.display="inline-block",o.textContent="0",o};e.appendChild(o("CMUpgradeBarBlue",Bt)),e.appendChild(o("CMUpgradeBarGreen",Et)),e.appendChild(o("CMUpgradeBarYellow",Nt)),e.appendChild(o("CMUpgradeBarOrange",Ot)),e.appendChild(o("CMUpgradeBarRed",Ft)),e.appendChild(o("CMUpgradeBarPurple",Lt)),e.appendChild(o("CMUpgradeBarGray",Wt)),l("upgrades").parentNode.insertBefore(e,l("upgrades").parentNode.childNodes[3])}(),function(){const e=document.createElement("div");e.id="CMFlashScreen",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="white",e.style.display="none",e.style.zIndex="9999999999",e.style.position="absolute",l("wrapper").appendChild(e)}(),function(){const e=document.createElement("div");e.id="CMSectionHidButtons",e.style.textAlign="center";const t=document.createElement("a");t.className="option",t.onclick=function(){"flex"===l("upgrades").style.display?(l("upgrades").style.display="none",l("toggleUpgrades").style.display="none",l("techUpgrades").style.display="none",l("vaultUpgrades").style.display="none"):(l("upgrades").style.display="flex",0!==l("toggleUpgrades").children.length&&(l("toggleUpgrades").style.display="block"),0!==l("techUpgrades").children.length&&(l("techUpgrades").style.display="block"),0!==l("vaultUpgrades").children.length&&(l("vaultUpgrades").style.display="block"))},t.textContent="Hide/Show Upgrades",e.appendChild(t);const o=document.createElement("a");o.className="option",o.onclick=function(){"grid"===l("products").style.display?l("products").style.display="none":l("products").style.display="grid"},o.textContent="Hide/Show Buildings",e.appendChild(o),l("store").insertBefore(e,l("store").childNodes[2])}(),function(){const e=document.createElement("link");e.id="CMFavicon",e.rel="shortcut icon",e.href="https://orteil.dashnet.org/cookieclicker/favicon.ico",document.getElementsByTagName("head")[0].appendChild(e)}(),Object.keys(Ht).forEach((e=>{!function(e,t,o){const n=document.createElement("div");n.id=e;const i=document.createElement("div");i.style.minWidth=o,i.style.marginBottom="4px";const a=document.createElement("div");a.style.textAlign="left",a.textContent=t,i.appendChild(a),n.appendChild(i),Ut[e]=n}(Ht[e][0],Ht[e][1],Ht[e][2])})),function(){const e=document.createElement("a");e.id="PopAllNormalWrinklerButton",e.textContent="Pop All Normal",e.className="option",e.onclick=function(){An()},e.onmouseout=function(){Game.tooltip.shouldHide=1},e.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("wb","PopAll")),"this"),Game.tooltip.wobble()},l("sectionLeftExtra").children[0].append(e);const t=document.createElement("a");t.id="PopFattestWrinklerButton",t.textContent="Pop Single Fattest",t.className="option",t.onclick=function(){null!==$e[1]&&(Game.wrinklers[$e[1]].hp=0)},t.onmouseout=function(){Game.tooltip.shouldHide=1},t.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("wb","PopFattest")),"this"),Game.tooltip.wobble()},l("sectionLeftExtra").children[0].append(t)}(),l("products").style.display="grid",l("storeBulk").style.gridRow="1/1",l("upgrades").style.display="flex",l("upgrades").style["flex-wrap"]="wrap",Object.keys(Game.Objects).forEach((e=>{const t=Game.Objects[e];null!==l(`product${t.id}`).onmouseover&&(w[e]=l(`product${t.id}`).onmouseover,l(`product${t.id}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("b",`${e}`)),"store"),Game.tooltip.wobble()})})),Game.canLumps()&&(s=l("lumps").onmouseover,l("lumps").onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("s","Lump")),"this"),Game.tooltip.wobble()}),h=Game.LoadMinigames,Game.LoadMinigames=function(){h(),Game.Objects.Farm.minigameLoaded&&(l("gardenTool-1").onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("ha","HarvestAllButton")),"this"),Game.tooltip.wobble()},Array.from(l("gardenPlot").children).forEach((e=>{const t=e.id.slice(-3);e.onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("p",[`${t[0]}`,`${t[2]}`])),"this"),Game.tooltip.wobble()}}))),Dn(),function(){if(Game.Objects.Temple.minigameLoaded){for(let e=0;e<11;e+=1)l(`templeGod${e}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("pag",e)),"this"),Game.tooltip.wobble()};for(let e=0;e<3;e+=1)l(`templeSlot${e}`).onmouseover=function(){Game.tooltip.dynamic=1,Game.tooltip.draw(this,(()=>jn("pas",[e,Game.Objects.Temple.minigame.slot[e]])),"this"),Game.tooltip.wobble()}}}(),Un()},Game.LoadMinigames(),l("backgroundLeftCanvas").onmouseover=function(){Rt=1},l("backgroundLeftCanvas").onmouseout=function(){Rt=0,Game.tooltip.hide(),Object.keys(Game.wrinklers).forEach((e=>{zt[e]=0}))},ti(),Un(),Game.CalculateGains(),Wn(),$t=Game.OnAscend,Game.prefs.popups?Game.Popup("Cookie Monster version 2.031.8 loaded!"):Game.Notify("Cookie Monster version 2.031.8 loaded!","","",1,1),Game.Win("Third-party")}const ni={init:function(){Pn=!0;let e=!0;Game.version!==Number("2.031")&&(e=confirm("Cookie Monster version 2.031.8 is meant for Game version 2.031. Loading a different version may cause errors. Do you still want to load Cookie Monster?")),e&&(oi(),Game.registerHook("click",_o),Game.registerHook("draw",Vo),Game.registerHook("logic",On),Pn=!1)},load:function(e){const t=JSON.parse(e);Sn(),void 0!==t.favouriteSettings&&(lo=t.favouriteSettings),Wn(t.settings),"2.031.8"!==t.version&&(Game.prefs.popups?Game.Popup("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!"):Game.Notify("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!","","",0,1))},save:xn};Game.registerMod("CookieMonster",ni)})()})(); //# sourceMappingURL=https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonsterDev.js.map \ No newline at end of file diff --git a/dist/CookieMonsterDev.js.map b/dist/CookieMonsterDev.js.map index 4cbe796a..9d0207bb 100644 --- a/dist/CookieMonsterDev.js.map +++ b/dist/CookieMonsterDev.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./node_modules/@eastdesire/jscolor/jscolor.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./src/Config/VariablesAndData.js","webpack:///./src/Config/Toggles/ToggleWrinklerButtons.js","webpack:///./src/Data/Scales.ts","webpack:///./src/Main/VariablesAndData.js","webpack:///./src/Disp/BeautifyAndFormatting/Beautify.js","webpack:///./src/Cache/VariablesAndData.js","webpack:///./src/Sim/VariablesAndData.js","webpack:///./src/Disp/VariablesAndData.js","webpack:///./src/Sim/ReplacedGameFunctions/SimAuraMult.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetSellMultiplier.js","webpack:///./src/Sim/ReplacedGameFunctions/SimEff.js","webpack:///./src/Sim/ReplacedGameFunctions/SimHas.js","webpack:///./src/Sim/ReplacedGameFunctions/SimHasGod.js","webpack:///./src/Sim/ReplacedGameFunctions/SimModifyBuidlingPrice.js","webpack:///./src/Sim/SimulationEvents/SellBuilding.js","webpack:///./src/Disp/BuildingsUpgrades/Buildings.js","webpack:///./src/Disp/BuildingsUpgrades/UpdateUpgradeSectionsHeight.js","webpack:///./src/Disp/BuildingsUpgrades/Upgrades.js","webpack:///./src/Disp/BeautifyAndFormatting/FormatTime.js","webpack:///./src/Disp/BeautifyAndFormatting/GetTimeColour.js","webpack:///./src/Disp/HelperFunctions/GetCPS.js","webpack:///./src/Disp/HelperFunctions/GetWrinkConfigBank.js","webpack:///./src/Disp/InfoBars/CreateDOMElements.js","webpack:///./src/Disp/InfoBars/BottomBar.js","webpack:///./src/Disp/HelperFunctions/UpdateBackground.js","webpack:///./src/Config/SpecificToggles.js","webpack:///./src/Cache/Dragon/CacheDragonAuras.js","webpack:///./src/Sim/InitializeData/InitAchievement.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetTieredCpsMult.js","webpack:///./src/Sim/InitializeData/InitialBuildingData.js","webpack:///./src/Sim/InitializeData/InitUpgrade.js","webpack:///./src/Sim/SimulationData/CopyData.js","webpack:///./src/Disp/Tooltips/CreateTooltip.js","webpack:///./src/Cache/PP/ColourOfPP.js","webpack:///./src/Cache/CPS/GetCPSBuffMult.js","webpack:///./src/Sim/SimulationData/SimWin.js","webpack:///./src/Sim/Calculations/CalculateGains.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetHeavenlyMultiplier.js","webpack:///./src/Data/Gamedata.ts","webpack:///./src/Sim/ReplacedGameFunctions/SimHasAchiev.js","webpack:///./src/Sim/Calculations/CheckOtherAchiev.js","webpack:///./src/Sim/SimulationEvents/BuyBuildingBonusIncome.js","webpack:///./src/Disp/HelperFunctions/CalculateGrimoireRefillTime.js","webpack:///./src/Config/Toggles/ToggleToolWarnPos.js","webpack:///./src/Disp/Tooltips/UpdateTooltips.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/Building.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/Upgrade.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/SugarLump.js","webpack:///./src/Disp/HelperFunctions/GetLumpColour.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/Grimoire.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/GardenPlots.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/HarvestAll.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/WrinklerButton.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/PantheonGods.js","webpack:///./src/Disp/Tooltips/TypesOfTooltips/Warnings.js","webpack:///./src/Disp/DrawHook.js","webpack:///./src/Disp/InfoBars/TimerBar.js","webpack:///./src/Disp/Tooltips/WrinklerTooltips.js","webpack:///./src/Disp/MenuSections/Refreshmenu.js","webpack:///./src/Main/ClickHook.js","webpack:///./src/Cache/CPS/AverageQueue.js","webpack:///./src/Cache/CPS/CPS.js","webpack:///./src/Cache/PP/Building.js","webpack:///./src/Cache/PP/PP.js","webpack:///./src/Cache/PP/Upgrade.js","webpack:///./src/Sim/SimulationEvents/BuyBuilding.js","webpack:///./src/Cache/PriceAndIncome/PriceAndIncome.js","webpack:///./src/Sim/SimulationEvents/BuyUpgrades.js","webpack:///./src/Cache/Stats/ChainCookies.js","webpack:///./src/Cache/Stats/HeavenlyChips.js","webpack:///./src/Cache/Stats/MissingUpgrades.js","webpack:///./src/Disp/MenuSections/Statistics/CreateMissingUpgrades.js","webpack:///./src/Cache/Stats/Reindeer.js","webpack:///./src/Cache/Stats/Stats.js","webpack:///./src/Cache/TillNextAchievement/AllAmountTillNextAchievement.js","webpack:///./src/Cache/TillNextAchievement/IndividualAmountTillNextAchievement.js","webpack:///./src/Cache/Wrinklers/Wrinklers.js","webpack:///./src/Cache/CacheInit.js","webpack:///./src/Data/SettingsDefault.ts","webpack:///./src/Config/CheckNotificationPermissions.js","webpack:///./src/Config/Toggles/ToggleBotBar.js","webpack:///./src/Disp/HelperFunctions/RefreshScale.js","webpack:///./src/Disp/TabTitle/FavIcon.js","webpack:///./src/Data/SettingClasses/BaseSetting.ts","webpack:///./src/Data/SettingClasses/SettingColours.ts","webpack:///./src/Data/SettingClasses/SettingInputNumber.ts","webpack:///./src/Data/SettingClasses/SettingStandard.ts","webpack:///./src/Data/SettingClasses/SettingVolume.ts","webpack:///./src/Data/SettingsData.js","webpack:///./src/Config/Toggles/ToggleDetailedTime.js","webpack:///./src/Config/Toggles/ToggleUpgradeBarAndColour.js","webpack:///./src/Config/Toggles/ToggleUpgradeBarFixedPos.js","webpack:///./src/Config/Toggles/ToggleGCTimer.js","webpack:///./src/Config/Toggles/ToggleSectionHideButtons.js","webpack:///./src/InitSaveLoad/save.js","webpack:///./src/Cache/Dragon/Dragon.js","webpack:///./src/Sim/SimulationEvents/GodChange.js","webpack:///./src/Sim/InitializeData/InitData.js","webpack:///./src/InitSaveLoad/Variables.js","webpack:///./src/Disp/Notifications/Flash.js","webpack:///./src/Disp/Notifications/Sound.js","webpack:///./src/Disp/Notifications/Notification.js","webpack:///./src/Main/LoopHook.js","webpack:///./src/Disp/HelperFunctions/UpdateAscendState.js","webpack:///./src/Cache/CPS/NoGoldSwitchCPS.js","webpack:///./src/Sim/Calculations/NoGoldenSwitchCalc.js","webpack:///./src/Cache/PantheonGods/CacheGods.js","webpack:///./src/Cache/CPS/SellChoEgg.js","webpack:///./src/Sim/SimulationEvents/SellBuildingForChoEgg.js","webpack:///./src/Cache/CacheLoop.js","webpack:///./src/Cache/CPS/CurrWrinklerCPS.js","webpack:///./src/Main/CheckStates/Ticker.js","webpack:///./src/Main/CheckStates/Season.js","webpack:///./src/Main/CheckStates/Garden.js","webpack:///./src/Main/CheckStates/Grimoire.js","webpack:///./src/Main/CheckStates/Wrinkler.js","webpack:///./src/Main/CheckStates/GoldenCookie.js","webpack:///./src/Disp/GoldenCookieTimers/GoldenCookieTimers.js","webpack:///./src/Disp/HelperFunctions/UpdateColours.js","webpack:///./src/Config/SaveLoadReload/SaveLoadReloadSettings.js","webpack:///./src/Disp/HelperFunctions/PopWrinklers.js","webpack:///./src/Disp/Tooltips/Tooltip.js","webpack:///./src/Main/ReplaceGameElements/TooltipGrimoire.js","webpack:///./src/Main/ReplaceGameElements/NativeGrimoire.js","webpack:///./src/Config/ToggleSetting.js","webpack:///./src/Disp/MenuSections/Statistics/CreateDOMElements.js","webpack:///./src/Disp/MenuSections/Statistics/AddStatsPage.js","webpack:///./src/Disp/MenuSections/Statistics/CreateStatsSections.js","webpack:///./src/Sim/SimulationEvents/ResetAscension.js","webpack:///./src/Disp/MenuSections/Statistics/CreateMissingAchievements.js","webpack:///./src/Data/Sectionheaders.ts","webpack:///./src/Disp/MenuSections/Settings/CreateHeader.js","webpack:///./src/Disp/MenuSections/Settings/CreateOption.js","webpack:///./src/Config/Toggles/ToggleFavourites.js","webpack:///./src/Disp/MenuSections/Prompt.js","webpack:///./src/Main/ReplaceGameFunctions/FixMouse.js","webpack:///./src/Main/ReplaceGameFunctions/ReplaceNative.js","webpack:///./src/Disp/Tooltips/PositionLocation.js","webpack:///./src/Main/ReplaceGameElements/TooltipUpgrades.js","webpack:///./src/Disp/Dragon/Dragon.js","webpack:///./src/Sim/SimulationEvents/AuraChange.js","webpack:///./src/Disp/MenuSections/AddMenus.js","webpack:///./src/Disp/MenuSections/Settings/SettingsPage.js","webpack:///./src/Disp/MenuSections/Info/InfoPage.js","webpack:///./src/Data/Moddata.ts","webpack:///./src/Disp/TabTitle/TabTitle.js","webpack:///./src/Disp/Tooltips/AscendButton.js","webpack:///./src/Main/Initialization.js","webpack:///./src/Disp/Initialization/CssArea.js","webpack:///./src/Disp/BuildingsUpgrades/UpgradeBar.js","webpack:///./src/Disp/Initialization/FlashScreen.js","webpack:///./src/Disp/Initialization/CreateSectionHideButtons.js","webpack:///./src/Disp/Initialization/CreateWrinklerButton.js","webpack:///./src/Disp/Initialization/UpdateBuildingUpgradeStyle.js","webpack:///./src/Main/ReplaceGameElements/Tooltips.js","webpack:///./src/Main/WrinklerArea/AddDetectArea.js","webpack:///./src/CookieMonster.js","webpack:///./src/InitSaveLoad/init.js","webpack:///./src/InitSaveLoad/load.js"],"names":["global","factory","module","exports","document","win","Error","window","this","BoxShadow","funcName","elm","jsc","jscolor","initialized","instances","readyQueue","register","addEventListener","pub","init","installBySelector","selector","rootNode","node","elms","querySelectorAll","matchClass","RegExp","lookupClass","i","length","dataOpts","m","undefined","type","toLowerCase","isColorAttrSupported","getDataAttr","className","match","targetElm","optsStr","console","warn","docsRef","opts","trim","parseOptionsStr","e","str","JSON","parse","eParse","looseJSON","Function","eEval","getInstances","inst","targetElement","push","createEl","tagName","el","createElement","setData","nodeOrSelector","sel","querySelector","isNode","val","Node","nodeType","nodeName","removeChildren","firstChild","removeChild","isTextInput","isButton","n","indexOf","isButtonEmpty","value","textContent","isPassiveEventSupported","supported","Object","defineProperty","get","removeEventListener","setAttribute","dataProp","obj","arguments","data","hasOwnProperty","prop","map","removeData","getData","setDefault","name","attrName","getAttribute","setDataAttr","_attachedGroupEvents","attachGroupEvent","groupName","evnt","func","detachGroupEvents","evt","preventDefault","returnValue","captureTarget","target","setCapture","_capturedTarget","releaseTarget","releaseCapture","triggerEvent","eventName","bubbles","cancelable","ev","Event","createEvent","initEvent","dispatchEvent","triggerInputEvent","eventKey","keys","9","13","27","code","keyCode","strList","replace","split","hasClass","classList","contains","addClass","classNames","add","removeClass","repl","remove","getCompStyle","getComputedStyle","currentStyle","setStyle","styles","important","reversible","priority","origStyle","setVal","style","setProperty","hexColor","r","g","b","Math","round","toString","substr","toUpperCase","hexaColor","a","rgbColor","rgbaColor","linearGradient","stdName","prefixes","helper","tryFunc","tryVal","background","getFuncName","Array","prototype","join","call","setBorderRadius","setBoxShadow","getElementPos","relativeToViewport","x","y","rect","getBoundingClientRect","left","top","viewPos","getViewPos","getElementSize","offsetWidth","offsetHeight","getAbsPointerPos","changedTouches","clientX","clientY","getRelPointerPos","targetRect","srcElement","doc","documentElement","pageXOffset","scrollLeft","clientLeft","pageYOffset","scrollTop","clientTop","getViewSize","innerWidth","clientWidth","innerHeight","clientHeight","RGB_HSV","min","v","max","h","HSV_RGB","s","u","floor","parseColorString","ret","rgba","format","parseInt","charAt","mR","mG","mB","mA","par","re","parseFloat","parsePaletteValue","mixed","vals","isArray","colors","color","containsTranparentColor","isAlphaFormat","scaleCanvasForHighDPR","canvas","dpr","devicePixelRatio","width","height","getContext","scale","genColorPreviewCanvas","separatorPos","specWidth","scaleForHighDPR","sepW","previewSeparator","sqSize","chessboardSize","sqColor1","chessboardColor1","sqColor2","chessboardColor2","cWidth","cHeight","ctx","fillStyle","fillRect","start","clearRect","lineWidth","beginPath","strokeStyle","moveTo","lineTo","stroke","genColorPreviewGradient","position","params","apply","redrawPosition","picker","owner","tp","vp","thisObj","fixed","c","ts","vs","pd","getPickerDims","ps","borderW","borderH","l","smartPosition","pp","positionValue","contractShadow","_drawPosition","vShadow","shadowBlur","wrap","boxS","shadow","shadowColor","w","controlBorderWidth","sliderSpace","getControlPadding","sliderSize","getSliderChannel","hasAlphaChannel","pal","getPaletteDims","padding","closeButton","buttonHeight","pW","pH","contentW","contentH","paddedW","paddedH","borderWidth","palette","cols","rows","cellW","cellH","sampleCount","_palette","paletteCols","ceil","paletteSpacing","paletteHeight","pointerBorderWidth","pointerThickness","getPadYChannel","mode","triggerCallback","callback","error","triggerGlobal","eventNames","trigger","_pointerMoveEvent","mouse","touch","_pointerEndEvent","_pointerOrigin","onDocumentKeyUp","tryHide","onWindowResize","onWindowScroll","onParentScroll","onDocumentMouseDown","showOnClick","disabled","show","onControlPointerStart","onPickerTouchStart","controlName","pointerType","registerDragEvents","offset","onDocumentPointerMove","onDocumentPointerEnd","parent","frameElement","ofs","abs","rel","channels","fromHSVA","setPad","setSld","setASld","onPaletteSampleClick","currentTarget","_setFormat","getFormat","paletteSetsAlpha","_paletteHasTransparency","fromRGBA","hideOnPaletteClick","hide","ofsX","ofsY","pointerAbs","xVal","yVal","fmt","createPadCanvas","draw","hGrad","createLinearGradient","addColorStop","vGrad","createSliderGradient","color1","color2","grad","createASliderGradient","hShadow","blur","spread","inset","flags","leaveValue","leaveAlpha","leavePreview","enumOpts","previewPosition","alphaChannel","deprecatedOpts","THIS","setOption","option","oldOpt","newOpt","setter","getOption","getter","drawPicker","_processParentElementsInDOM","box","boxB","pad","padB","padM","padCanvas","cross","crossBY","crossBX","crossLY","crossLX","sld","sldB","sldM","sldGrad","sldPtrS","sldPtrIB","sldPtrMB","sldPtrOB","asld","asldB","asldM","asldGrad","asldPtrS","asldPtrIB","asldPtrMB","asldPtrOB","btn","btnT","appendChild","passive","insetColors","outsetColor","p","displaySlider","displayAlphaSlider","pickerDims","crossOuterSize","crossSize","controlPadding","borderRadius","PI","clear","zIndex","border","borderColor","backgroundColor","opacity","controlBorderColor","cursor","instance","control","pointerBorderColor","pointerColor","overflow","display","sliderInnerSpace","innerHTML","chessboard","si","sampleColor","sampleCssColor","sc","sw","backgroundImage","toDataURL","backgroundRepeat","backgroundPosition","bottom","maxWidth","whiteSpace","buttonColor","font","textAlign","onmousedown","lineHeight","createTextNode","closeText","redrawPad","redrawSld","redrawASld","activeClassName","container","body","parentNode","yChannel","rgb1","rgb2","rgb","toHEXString","sldChannel","isPickerOwner","alpha","onChange","onInput","valueElement","alphaElement","previewElement","previewSize","previewPadding","required","hash","uppercase","forceStyle","hideOnLeave","minS","maxS","minV","maxV","minA","maxA","redraw","exposeColor","success","opt","channel","res","evs","callbackProp","isNaN","hsv","fromHSV","fromRGB","fromString","setPreviewElementBg","setValueElementValue","toHEXAString","toRGBString","toRGBAString","toGrayscale","toCanvas","toBackground","isLight","_currentFormat","processValueInput","processAlphaInput","colorStr","alphaVal","setAlphaElementValue","backgrounds","image","size","repeat","origin","preview","bg","sty","right","_parentElementsProcessed","compStyle","set__palette","options","presetsArr","preset","slice","pres","presets","nonProperties","test","valueElementOrigEvents","oninput","oldVal","initValue","initAlpha","install","shift","ready","triggerNow","installByClassName","JSColor","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","d","definition","key","o","enumerable","CMOptions","ToggleWrinklerButtons","WrinklerButtons","Game","elderWrath","metric","shortScale","shortScaleAbbreviated","LastModCount","TooltipLumpBackup","BackupGrimoireLaunch","BackupGrimoireLaunchMod","BackupGrimoireDraw","HasReplaceNativeGrimoireLaunch","HasReplaceNativeGrimoireDraw","LoadMinigames","LastSeasonPopupState","LastTickerFortuneState","LastGardenNextStep","LastGoldenCookieState","LastSpawnedGoldenCookieState","LastMagicBarFull","CurrSpawnedGoldenCookieState","LastWrinklerCount","TooltipBuildBackup","TooltipGrimoireBackup","TooltipUpgradeBackup","BackupFunctions","CycliusDateAtBeginLoop","Date","now","CenturyDateAtBeginLoop","num","floats","forced","decimals","ScaleDecimals","Infinity","Scale","Beautify","Number","isFinite","answer","ScaleCutoff","ScaleSeparator","toLocaleString","toExponential","exponential","AmountOfTenPowerThree","toFixed","log","CacheAverageCookiesFromClicks","CookiesDiff","WrinkDiff","WrinkFattestDiff","ChoEggDiff","ClicksDiff","HeavenlyChipsDiff","CacheLastCPSCheck","CacheLastCookies","CacheLastWrinkCookies","CacheLastWrinkFattestCookies","CacheLastClicks","CacheAverageGainBank","CacheAverageGainWrink","CacheAverageGainWrinkFattest","CacheAverageGainChoEgg","CacheAverageCPS","CacheLastHeavenlyCheck","CacheLastHeavenlyChips","CacheDoRemakeBuildPrices","CacheHadBuildAura","SimBuildingsOwned","SimUpgradesOwned","SimPledges","SimAchievementsOwned","SimHeavenlyPower","SimPrestige","SimDragonAura","SimDragonAura2","SimGod1","SimGod2","SimGod3","SimDoSims","SimEffs","SimCookiesPs","SimCookiesPsRaw","DispCSS","CacheDragonAura","CacheDragonAura2","CacheLastDragonLevel","CacheCostDragonUpgrade","CacheLucky","CacheLuckyReward","CacheLuckyWrathReward","CacheLuckyFrenzy","CacheLuckyRewardFrenzy","CacheLuckyWrathRewardFrenzy","CacheConjure","CacheConjureReward","CacheEdifice","CacheEdificeBuilding","CacheNoGoldSwitchCookiesPS","CacheDragonsFortuneMultAdjustment","CacheGoldenCookiesMult","CacheWrathCookiesMult","CacheHCPerSecond","CacheCentEgg","CacheSeaSpec","CacheLastChoEgg","CacheObjects1","CacheObjects10","CacheObjects100","CacheObjectsNextAchievement","CacheWrinklersTotal","CacheWrinklersNormal","CacheWrinklersFattest","CacheCurrWrinklerCPSMult","CacheCurrWrinklerCount","CacheUpgrades","CacheAverageClicks","CacheMissingUpgrades","CacheMissingUpgradesPrestige","CacheMissingUpgradesCookies","CacheChainRequired","CacheChainRequiredNext","CacheChainMaxReward","CacheChainWrathRequired","CacheChainWrathRequiredNext","CacheChainWrathMaxReward","CacheChainFrenzyRequired","CacheChainFrenzyRequiredNext","CacheChainFrenzyMaxReward","CacheChainFrenzyWrathRequired","CacheChainFrenzyWrathRequiredNext","CacheChainFrenzyWrathMaxReward","CacheRealCookiesEarned","CacheAvgCPSWithChoEgg","CacheSpawnedGoldenShimmer","CacheSeasonPopShimmer","CacheTimeTillNextPrestige","CacheMinPP","CachePPArray","CacheGoldenShimmersByID","CacheSellForChoEgg","CacheGods","0","1","2","3","4","5","6","7","8","10","SimObjects","SimUpgrades","SimAchievements","SimAuraMult","what","dragonAuras","SimGetSellMultiplier","giveBack","SimEff","def","SimHas","it","ascensionMode","pool","tier","bought","SimHasGod","hasGod","Temple","minigame","Objects","god","gods","id","SimModifyBuildingPrice","building","price","ModifiedPrice","hasBuff","fortune","minigameLoaded","godLvl","BuildingSell","build","basePrice","free","amount","noSim","noSimRes","toChange","startingAmount","moni","buyBulk","priceIncrease","modifyBuildingPrice","getSellMultiplier","ColourTextPre","ColourBackPre","ColourBlue","ColourGreen","ColourYellow","ColourOrange","ColourRed","ColourPurple","ColourGray","ColourPink","ColourBrown","ColoursOrdering","TooltipText","SimpleTooltipElements","CMLastAscendState","TooltipWrinklerArea","TooltipWrinkler","TooltipWrinklerBeingShown","CMSayTime","LastTargetBotBar","LastTargetBuildings","LastTargetTooltipBuilding","CookieTimes","ClickTimes","BuffColours","Frenzy","Clot","Dragonflight","TooltipPrice","TooltipBonusIncome","TooltipType","TooltipName","TooltipBonusMouse","LastAscendState","LastNumberOfTimers","GCTimers","Title","FavouriteSettings","UpdateBuildings","buyMode","BuildColour","forEach","removeProperty","SortBuildings","arr","k","sort","gridRow","UpdateUpgradeSectionsHeight","values","getElementsByClassName","section","UpgradesNeverCollapse","minHeight","includes","UpdateUpgrades","UpBarColour","blue","green","yellow","orange","red","purple","gray","UpgradesInStore","me","addedColour","j","childNodes","div","SortUpgrades","nameChecker","arr2","upgrade","findIndex","order","FormatTime","time","longFormat","formattedTime","TimeFormat","GetTimeColour","text","GetCPS","CPSMode","CalcWrink","cookiesPs","cpsSucked","wrinklers","GetWrinkConfigBank","CreateTimer","bars","timerBar","margin","fontSize","marginRight","verticalAlign","colorBar","borderTopRightRadius","borderBottomRightRadius","timer","marginLeft","CreateBotBarBuildingColumn","buildingName","bonus","header","substring","lastChild","paddingLeft","UpdateBotBar","BotBar","count","PPString","PPDisplayTime","timeColour","bulkPrice","cookies","UpdateBackground","Background","LeftBackground","DrawBackground","UpdateBotTimerBarPosition","TimerBar","TimerBarPos","ToggleTimerBar","CacheDragonAuras","dragonAura","dragonAura2","InitAchievement","achievementName","Achievements","you","SimGetTieredCpsMult","mult","tieredUpgrades","Tiers","special","synergies","syn","buildingTie1","buildingTie2","grandma","Grandma","misfortune","vanilla","InitialBuildingData","cps","magicCpS","ComputeCps","GrandmaSynergies","UpgradesByPool","kitten","Portal","baseCps","baseCPS","InitUpgrade","upgradeName","Upgrades","power","level","pow","CopyData","UpgradesOwned","pledges","AchievementsOwned","heavenlyPower","prestige","totalCookies","slot","won","TooltipCreateHeader","fontWeight","TooltipCreateCalculationSection","tooltip","income","marginBottom","click","production","ColourOfPP","PPSecondsLowerLimit","PPOnlyConsiderBuyable","GetCPSBuffMult","buffs","multCpS","SimWin","CalculateGains","effs","myEffs","ii","heavenlyMult","SimGetHeavenlyMultiplier","heralds","cookieUpgrades","buildMult","sin","santaLevel","milkProgress","milkMult","catMult","storedCps","eggMult","day","startDate","lumps","rawCookiesPs","CpsAchievements","threshold","shimmerTypes","golden","auraMult","bakeryName","goldenSwitchMult","upgrades","goldenCookieUpgrades","veilMult","runModHookOnValue","Fortunes","HalloCookies","ChristCookies","ValCookies","PlantDrops","SimHasAchiev","CheckOtherAchiev","grandmas","buildingsOwned","mathematician","base10","minAmount","ObjectsById","Cursor","hasAllHalloCook","hasAllChristCook","list","fortunes","BuyBuildingsBonusIncome","tieredAchievs","achievUnlock","lastAchievementsOwned","CalculateGrimoireRefillTime","currentMagic","maxMagic","targetMagic","magic","fps","ToggleToolWarnPos","ToolWarnPos","UpdateTooltips","tooltipBox","paddingBottom","TooltipBuildUpgrade","increase","productionAchievs","HasAchiev","achiev","nextProductionAchiev","ObjectsTillNext","AmountNeeded","PPOfAmount","PPFrag","Building","getPrice","bonusMouse","previousSibling","chocolate","Upgrade","TooltipLump","lumpType","lumpColour","lumpCurrentType","SugarLump","spellCost","getSpellCost","spellsById","TooltipGrim","magicM","recover","recoverColour","conjure","reward","seperator","loss","Grimoire","Farm","TooltipPlots","plot","mature","plantsById","plantName","GardenPlots","totalGain","mortal","tile","immortal","matureBase","HarvestAll","WrinklerReward","WrinklerButton","TooltipPantheon","GodID","cps1","cps2","cps3","PantheonGods","getElementById","TooltipWarn","create","boxId","labelTextFront","labelTextBack","deficitId","transition","labelDiv","labelSpan","deficitDiv","deficitSpan","ToolWarnUser","bonusIncomeUsed","ToolWarnBon","limitLucky","bonusNoFren","ToolWarnLucky","ToolWarnLuckyFrenzy","limitLuckyFrenzy","ToolWarnConjure","limitConjure","ToolWarnConjureFrenzy","limitConjureFrenzy","ToolWarnEdifice","children","Warnings","CMDrawHook","prefs","autosave","drawT","onMenu","Stats","innerText","sayTime","T","maxWidthTwoBar","maxWidthOneBar","numberOfTimers","spawned","Has","minTime","maxTime","TimerBarOverlay","season","reindeer","BuffTimerBars","classColour","UpdateTimerBar","TooltipWrink","showingTooltip","phase","selected","placeholder","wrinkler","minWidth","escape","CheckWrinklerTooltip","sucked","toSuck","UpdateWrinklerTooltip","UpStats","UpdateMenu","monospace","CMClickHook","addLatest","computedMouseCps","CMAvgQueue","maxLength","queue","newValue","timePeriod","reduce","CacheAvgCPS","currDate","choEggTotal","cookiesEarned","timeDiff","bankDiffAvg","wrinkDiffAvg","wrinkFattestDiffAvg","choEggDiffAvg","clicksDiffAvg","cookieClicks","cpsLength","AvgCPSHist","calcAverage","choEgg","HasUnlocked","AvgClicksHist","CacheColour","PPRigidelMode","getSumPrice","PPExcludeTop","CachePP","indexOfMin","CacheBuildingsPP","BuildingGetPrice","CacheBuildingIncome","result","CacheBuildingsPrices","CacheIncome","bonusIncome","unlocked","CountsAsUpgradeOwned","diffMouseCPS","multClick","out","MouseCps","BuyUpgradesBonusIncome","MaxChainCookieReward","digit","maxPayout","totalFromChain","nextMoni","nextRequired","chain","LN10","CacheChain","cpsBuffMult","CacheHeavenlyChipsPS","chipsOwned","HowMuchPrestige","cookiesReset","ascendNowToGet","heavenlyChipsDiffAvg","CacheAllMissingUpgrades","classes","noFrame","crates","icon","iconFunction","getDynamicTooltip","crateMissing","CacheSeasonSpec","CacheStatsCookies","CacheGoldenAndWrathCookiesMults","goldenMult","wrathMult","eff","AllAmountTillNextAchievement","TotalNeeded","tillNext","AchievementsAtStart","index","IndividualAmountTillNextAchievement","CacheWrinklers","InitCache","DetailedTime","UpgradeBarFixedPos","DragonAuraInfo","GrimoireBar","GCTimer","Favicon","HideSectionsButtons","TooltipAmor","TooltipAscendButton","MissingUpgrades","MissingAchievements","HeavenlyChipsTarget","ShowMissedGC","GeneralSound","GCNotification","GCFlash","ColourGCFlash","GCSound","GCVolume","GCSoundURL","FortuneNotification","FortuneFlash","ColourFortuneFlash","FortuneSound","FortuneVolume","FortuneSoundURL","SeaNotification","SeaFlash","ColourSeaFlash","SeaSound","SeaVolume","SeaSoundURL","GardFlash","ColourGardFlash","GardSound","GardVolume","GardSoundURL","MagicNotification","MagicFlash","ColourMagicFlash","MagicSound","MagicVolume","MagicSoundURL","WrinklerNotification","WrinklerFlash","ColourWrinklerFlash","WrinklerSound","WrinklerVolume","WrinklerSoundURL","WrinklerMaxNotification","WrinklerMaxFlash","ColourWrinklerMaxFlash","WrinklerMaxSound","WrinklerMaxVolume","WrinklerMaxSoundURL","BulkBuyBlock","Header","Favourite","Calculation","Notation","Colours","BarsDisplay","Tooltip","Statistics","Notification","NotificationGeneral","NotificationGC","NotificationFC","NotificationSea","NotificationGard","NotificationMagi","NotificationWrink","NotificationWrinkMax","Miscellaneous","Lucky","Chain","Spells","Garden","Prestige","Wrink","Sea","Misc","InfoTab","ToggleOnOff","checkNotificationPromise","requestPermission","then","ToggleBotBar","RefreshScale","BeautifyAll","RefreshStore","RebuildUpgrades","UpdateFavicon","wrath","href","Setting","group","SettingColours","desc","super","SettingInputNumber","label","SettingStandard","toggle","SettingVolume","insertBefore","UpBarColor","save","stringify","favouriteSettings","settings","version","CacheDragonCost","dragonLevel","dragonLevels","buy","replaceAll","cost","CalculateChangeGod","CurrentSlot","godsById","InitData","isInitializing","Flash","config","setTimeout","url","sndConfig","volConfig","sound","Audio","volume","play","CreateNotification","notifyConfig","title","message","visibilityState","badge","CMLoopHook","OnAscend","AscendTimer","mods","CachePantheonGods","sellTotal","Bank","marketGoods","goods","goodsVal","marketGood","stock","cookiesPsRawHighest","buildingsToSacrifice","highestBuilding","SellBuildingsForChoEgg","CacheSellAllForChoEgg","hasBuildAura","godMult","CacheCurrWrinklerCPS","cookiesToNext","HowManyCookiesReset","LoopCache","TickerEffect","shimmers","spawnLead","nextStep","CheckMagicMeter","CurrentWrinklers","getWrinklersMax","CheckWrinklerCount","cookie","fontFamily","onclick","pop","onmouseover","filter","webkitFilter","onmouseout","CreateGCTimer","transform","life","UpdateColours","SaveConfig","saveString","b64_to_utf8","unescape","localStorage","getItem","CookieMonsterSave","newSaveString","setItem","utf8_to_b64","LoadConfig","CMConfig","Colors","mod","PopAllNormalWrinklers","hp","CreateTooltip","buildPrice","amortizeAmount","storedTotalCps","globalCpsMult","crateTooltip","lumpTooltip","spellTooltip","tileTooltip","toolTooltip","godTooltip","slotTooltip","area","ReplaceTooltipGrimoire","dynamic","wobble","ReplaceNativeGrimoireDraw","magicBarTextL","ReplaceNativeGrimoire","launch","ReplaceNativeGrimoireLaunch","ToggleConfigVolume","ToggleHeader","StatsHeader","span","StatsListing","listingName","StatsMissDisp","theMissDisp","frag","createDocumentFragment","missing","AddMenuStats","stats","goldCookTooltip","luckyColour","luckyTime","luckyReqFrag","luckyReqSpan","luckyReqSmall","luckyColourFrenzy","luckyTimeFrenzy","luckyReqFrenFrag","luckyReqFrenSpan","luckyReqFrenSmall","luckySplit","luckyRewardMaxSpan","luckyRewardFrenzyMaxSpan","luckyCurBase","luckyCurSpan","chainColour","chainTime","chainReqFrag","chainReqSpan","chainReqSmall","chainWrathColour","chainWrathTime","chainWrathReqFrag","chainWrathReqSpan","chainWrathReqSmall","chainColourFrenzy","chainTimeFrenzy","chainReqFrenFrag","chainReqFrenSpan","chainReqFrenSmall","chainWrathColourFrenzy","chainWrathTimeFrenzy","chainWrathReqFrenFrag","chainWrathReqFrenSpan","chainWrathReqFrenSmall","chainCurMax","chainCur","chainCurWrath","conjureColour","conjureTime","conjureReqFrag","conjureReqSpan","conjureReqSmall","conjureFrenzyColour","conjureFrenzyCur","conjureFrenzyTime","conjureFrenzyReqFrag","conjureFrenzyReqSpan","conjureFrenzyReqSmall","bakeberryColour","bakeberryFrag","chocorootColour","chocorootFrag","queenbeetColour","queenbeetFrag","duketaterColour","duketaterFrag","missingPlantDrops","possiblePresMax","neededCook","cookiesNextFrag","cookiesNextSmall","heavenlyChips","HCTarget","CookiesTillTarget","resetBonus","newHeavenlyChips","curCPS","ResetCPS","ResetBonus","resetFrag","resetSmall","currentPrestige","willHave","willGet","delta7","next7Reset","next7Total","frag7","delta777","next777Reset","next777Total","frag777","delta777777","next777777Reset","next777777Total","frag777777","popAllFrag","popAllA","popFattestFrag","popFattestA","specDisp","missingHalloweenCookies","missingChristmasCookies","missingValentineCookies","missingNormalEggs","eggDrops","missingRareEggs","rareEggDrops","centEgg","failRateHalloween","dropRateMult","obtainedCookiesChance","failRateChristmas","dropRateEgg","StartingFailRate","failRateEgg","succesRateEgg","obtainedEggs","obtainedRareEggs","pNormal1","pRare1","pRedrop","calcSum","missedGoldenClicks","menuSection","prestigeUpgradesMissing","titlefrag","PrestigeUpgrades","normalUpgradesMissing","tech","nextSibling","cookieUpgradesMissing","achievs","parentElement","achievsCrate","AchievementsById","mouseDown","setOnCrate","tags","neuromancy","sesame","descFunc","tagsStr","CrateTooltipLockedAchievements","AddMissingAchievements","ConfigGroups","ConfigGroupsNotification","CreatePrefHeader","CreatePrefOption","FavStar","ele","ToggleFavouriteSetting","FavouriteSettingPlaceholder","CreateFavouriteStar","ToggleConfig","float","percent","slider","step","onchange","input","readOnly","inputPrompt","content","promptWrapL","promptL","PlaySound","promptAnchorL","darkenL","focus","promptOn","UpdatePrompt","CookieMonsterPrompt","outerHTML","ClosePrompt","innerSpan","FixMouseY","timerBarHeight","mouseY","ReplaceNative","drawMod","from","update","updateMod","warnOffset","tta","tt","UpdateTooltipLocation","UpdateWrinklers","UpdateSpecial","ClickCookie","ClickProduct","DescribeDragonAura","aura","bonusCPS","priceOfChange","CalculateChangeAura","timeToRecover","bonusCPSPercentage","div2","AddAuraInfo","ToggleSpecialMenu","on","shouldHide","AddDragonLevelUpTooltip","subGroup","subGroupObject","resDef","resDefBut","AddMenuPref","info","description","notes","menu","AddMenuInfo","AddMenu","detail","Logic","titleGC","titleFC","titleSP","addFC","addSP","lastIndexOf","spawn","UpdateTitle","ReplaceAscendTooltip","InitializeCookieMonster","head","borderTop","textShadow","table","tbody","firstCol","td","CreateBotBar","CMTimerBarGC","CMTimerBarRen","TimerBarBuffTimers","CreateTimerBar","UpgradeBar","legend","legendLine","CreateUpgradeBarLegend","upgradeNumber","CreateUpgradeBar","WhiteScreen","CreateFlashScreen","CreateSectionHideButtons","getElementsByTagName","CreateFavicon","CreateSimpleTooltip","append","CreateWrinklerButtons","canLumps","child","coords","ReplaceTooltipPantheon","popups","Popup","Notify","Win","CM","proceed","confirm","registerHook","load","registerMod"],"mappings":";8BAYA,SAAWA,EAAQC,GAElB,aAE4D,iBAAnBC,EAAOC,QAchDF,EAAQD,GAZPE,EAAOC,QAAUH,EAAOI,SACvBH,EAASD,GACT,SAAUK,GACT,IAAKA,EAAID,SACR,MA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1DC,EAAuB,CAClC,GACA,GACA,IACA,IACA,KACA,QACA,QACA,OACA,OACA,MACA,MACA,MACA,QACA,SACA,SACA,cACA,UACA,SACA,YACA,UACA,WACA,SACA,WACA,YACA,YACA,kBAIWC,EAAkC,CAC7C,GACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,KACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,KACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,KACA,OC3IK,IAAIC,EAEAC,EAGAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAnBAC,EAAqB,GAErBC,EAAwB,GACxBC,EAAuB,GAOvBC,EAAkB,GAalBC,EAAyBC,KAAKC,MAI9BC,EAAyBF,KAAKC,MCf1B,SAAS,EAASE,EAAKC,EAAQC,GAC5C,MAAMC,EAAWnC,EAAUoC,cAAgB,EAC3C,GAAIJ,IAAQK,IACV,MAAO,WAET,QAAmB,IAARL,EACT,MAAO,IAET,GAAwB,IAApBhC,EAAUsC,MACZ,OAAOX,EAAgBY,SAASP,EAAKC,GAEvC,GAAIO,OAAOC,SAAST,GAAM,CACxB,GAAIA,EAAM,EACR,MAAO,IAAI,EAASne,KAAKuN,IAAI4Q,MAE/B,IAAIU,EAAS,GACb,GAAY,IAARV,EACF,OAAOA,EAAIje,WAEb,GAAIie,EA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ACH,iGAGF7mC,KAAK8mC,OACH,gGACA,GACA,GACA,EACA,KFnBNzX,KAAI,IAGNrvB,KAAKqnC,YAAY,gBAAiBL,K","file":"CookieMonsterDev.js","sourcesContent":["/**\r\n * jscolor - JavaScript Color Picker\r\n *\r\n * @link http://jscolor.com\r\n * @license For open source use: GPLv3\r\n * For commercial use: JSColor Commercial License\r\n * @author Jan Odvarko - East Desire\r\n *\r\n * See usage examples at http://jscolor.com/examples/\r\n */\r\n\r\n\r\n(function (global, factory) {\r\n\r\n\t'use strict';\r\n\r\n\tif (typeof module === 'object' && typeof module.exports === 'object') {\r\n\t\t// Export jscolor as a module\r\n\t\tmodule.exports = global.document ?\r\n\t\t\tfactory (global) :\r\n\t\t\tfunction (win) {\r\n\t\t\t\tif (!win.document) {\r\n\t\t\t\t\tthrow new Error('jscolor needs a window with document');\r\n\t\t\t\t}\r\n\t\t\t\treturn factory(win);\r\n\t\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Default use (no module export)\r\n\tfactory(global);\r\n\r\n})(typeof window !== 'undefined' ? window : this, function (window) { // BEGIN factory\r\n\r\n// BEGIN jscolor code\r\n\r\n\r\n'use strict';\r\n\r\n\r\nvar jscolor = (function () { // BEGIN jscolor\r\n\r\nvar jsc = {\r\n\r\n\r\n\tinitialized : false,\r\n\r\n\tinstances : [], // created instances of jscolor\r\n\r\n\treadyQueue : [], // functions waiting to be called after init\r\n\r\n\r\n\tregister : function () {\r\n\t\tif (typeof window !== 'undefined' && window.document) {\r\n\t\t\twindow.document.addEventListener('DOMContentLoaded', jsc.pub.init, false);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tinstallBySelector : function (selector, rootNode) {\r\n\t\trootNode = rootNode ? jsc.node(rootNode) : window.document;\r\n\t\tif (!rootNode) {\r\n\t\t\tthrow new Error('Missing root node');\r\n\t\t}\r\n\r\n\t\tvar elms = rootNode.querySelectorAll(selector);\r\n\r\n\t\t// for backward compatibility with DEPRECATED installation/configuration using className\r\n\t\tvar matchClass = new RegExp('(^|\\\\s)(' + jsc.pub.lookupClass + ')(\\\\s*(\\\\{[^}]*\\\\})|\\\\s|$)', 'i');\r\n\r\n\t\tfor (var i = 0; i < elms.length; i += 1) {\r\n\r\n\t\t\tif (elms[i].jscolor && elms[i].jscolor instanceof jsc.pub) {\r\n\t\t\t\tcontinue; // jscolor already installed on this element\r\n\t\t\t}\r\n\r\n\t\t\tif (elms[i].type !== undefined && elms[i].type.toLowerCase() == 'color' && jsc.isColorAttrSupported) {\r\n\t\t\t\tcontinue; // skips inputs of type 'color' if supported by the browser\r\n\t\t\t}\r\n\r\n\t\t\tvar dataOpts, m;\r\n\r\n\t\t\tif (\r\n\t\t\t\t(dataOpts = jsc.getDataAttr(elms[i], 'jscolor')) !== null ||\r\n\t\t\t\t(elms[i].className && (m = elms[i].className.match(matchClass))) // installation using className (DEPRECATED)\r\n\t\t\t) {\r\n\t\t\t\tvar targetElm = elms[i];\r\n\r\n\t\t\t\tvar optsStr = '';\r\n\t\t\t\tif (dataOpts !== null) {\r\n\t\t\t\t\toptsStr = dataOpts;\r\n\r\n\t\t\t\t} else if (m) { // installation using className (DEPRECATED)\r\n\t\t\t\t\tconsole.warn('Installation using class name is DEPRECATED. Use data-jscolor=\"\" attribute instead.' + jsc.docsRef);\r\n\t\t\t\t\tif (m[4]) {\r\n\t\t\t\t\t\toptsStr = m[4];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar opts = null;\r\n\t\t\t\tif (optsStr.trim()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\topts = jsc.parseOptionsStr(optsStr);\r\n\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\tconsole.warn(e + '\\n' + optsStr);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnew jsc.pub(targetElm, opts);\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tconsole.warn(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tparseOptionsStr : function (str) {\r\n\t\tvar opts = null;\r\n\r\n\t\ttry {\r\n\t\t\topts = JSON.parse(str);\r\n\r\n\t\t} catch (eParse) {\r\n\t\t\tif (!jsc.pub.looseJSON) {\r\n\t\t\t\tthrow new Error('Could not parse jscolor options as JSON: ' + eParse);\r\n\t\t\t} else {\r\n\t\t\t\t// loose JSON syntax is enabled -> try to evaluate the options string as JavaScript object\r\n\t\t\t\ttry {\r\n\t\t\t\t\topts = (new Function ('var opts = (' + str + '); return typeof opts === \"object\" ? opts : {};'))();\r\n\t\t\t\t} catch (eEval) {\r\n\t\t\t\t\tthrow new Error('Could not evaluate jscolor options: ' + eEval);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn opts;\r\n\t},\r\n\r\n\r\n\tgetInstances : function () {\r\n\t\tvar inst = [];\r\n\t\tfor (var i = 0; i < jsc.instances.length; i += 1) {\r\n\t\t\t// if the targetElement still exists, the instance is considered \"alive\"\r\n\t\t\tif (jsc.instances[i] && jsc.instances[i].targetElement) {\r\n\t\t\t\tinst.push(jsc.instances[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn inst;\r\n\t},\r\n\r\n\r\n\tcreateEl : function (tagName) {\r\n\t\tvar el = window.document.createElement(tagName);\r\n\t\tjsc.setData(el, 'gui', true);\r\n\t\treturn el;\r\n\t},\r\n\r\n\r\n\tnode : function (nodeOrSelector) {\r\n\t\tif (!nodeOrSelector) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tif (typeof nodeOrSelector === 'string') {\r\n\t\t\t// query selector\r\n\t\t\tvar sel = nodeOrSelector;\r\n\t\t\tvar el = null;\r\n\t\t\ttry {\r\n\t\t\t\tel = window.document.querySelector(sel);\r\n\t\t\t} catch (e) {\r\n\t\t\t\tconsole.warn(e);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tif (!el) {\r\n\t\t\t\tconsole.warn('No element matches the selector: %s', sel);\r\n\t\t\t}\r\n\t\t\treturn el;\r\n\t\t}\r\n\r\n\t\tif (jsc.isNode(nodeOrSelector)) {\r\n\t\t\t// DOM node\r\n\t\t\treturn nodeOrSelector;\r\n\t\t}\r\n\r\n\t\tconsole.warn('Invalid node of type %s: %s', typeof nodeOrSelector, nodeOrSelector);\r\n\t\treturn null;\r\n\t},\r\n\r\n\r\n\t// See https://stackoverflow.com/questions/384286/\r\n\tisNode : function (val) {\r\n\t\tif (typeof Node === 'object') {\r\n\t\t\treturn val instanceof Node;\r\n\t\t}\r\n\t\treturn val && typeof val === 'object' && typeof val.nodeType === 'number' && typeof val.nodeName === 'string';\r\n\t},\r\n\r\n\r\n\tnodeName : function (node) {\r\n\t\tif (node && node.nodeName) {\r\n\t\t\treturn node.nodeName.toLowerCase();\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\r\n\tremoveChildren : function (node) {\r\n\t\twhile (node.firstChild) {\r\n\t\t\tnode.removeChild(node.firstChild);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tisTextInput : function (el) {\r\n\t\treturn el && jsc.nodeName(el) === 'input' && el.type.toLowerCase() === 'text';\r\n\t},\r\n\r\n\r\n\tisButton : function (el) {\r\n\t\tif (!el) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tvar n = jsc.nodeName(el);\r\n\t\treturn (\r\n\t\t\t(n === 'button') ||\r\n\t\t\t(n === 'input' && ['button', 'submit', 'reset'].indexOf(el.type.toLowerCase()) > -1)\r\n\t\t);\r\n\t},\r\n\r\n\r\n\tisButtonEmpty : function (el) {\r\n\t\tswitch (jsc.nodeName(el)) {\r\n\t\t\tcase 'input': return (!el.value || el.value.trim() === '');\r\n\t\t\tcase 'button': return (el.textContent.trim() === '');\r\n\t\t}\r\n\t\treturn null; // could not determine element's text\r\n\t},\r\n\r\n\r\n\t// See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n\tisPassiveEventSupported : (function () {\r\n\t\tvar supported = false;\r\n\r\n\t\ttry {\r\n\t\t\tvar opts = Object.defineProperty({}, 'passive', {\r\n\t\t\t\tget: function () { supported = true; }\r\n\t\t\t});\r\n\t\t\twindow.addEventListener('testPassive', null, opts);\r\n\t\t\twindow.removeEventListener('testPassive', null, opts);\r\n\t\t} catch (e) {}\r\n\r\n\t\treturn supported;\r\n\t})(),\r\n\r\n\r\n\tisColorAttrSupported : (function () {\r\n\t\tvar elm = window.document.createElement('input');\r\n\t\tif (elm.setAttribute) {\r\n\t\t\telm.setAttribute('type', 'color');\r\n\t\t\tif (elm.type.toLowerCase() == 'color') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t})(),\r\n\r\n\r\n\tdataProp : '_data_jscolor',\r\n\r\n\r\n\t// usage:\r\n\t// setData(obj, prop, value)\r\n\t// setData(obj, {prop:value, ...})\r\n\t//\r\n\tsetData : function () {\r\n\t\tvar obj = arguments[0];\r\n\r\n\t\tif (arguments.length === 3) {\r\n\t\t\t// setting a single property\r\n\t\t\tvar data = obj.hasOwnProperty(jsc.dataProp) ? obj[jsc.dataProp] : (obj[jsc.dataProp] = {});\r\n\t\t\tvar prop = arguments[1];\r\n\t\t\tvar value = arguments[2];\r\n\r\n\t\t\tdata[prop] = value;\r\n\t\t\treturn true;\r\n\r\n\t\t} else if (arguments.length === 2 && typeof arguments[1] === 'object') {\r\n\t\t\t// setting multiple properties\r\n\t\t\tvar data = obj.hasOwnProperty(jsc.dataProp) ? obj[jsc.dataProp] : (obj[jsc.dataProp] = {});\r\n\t\t\tvar map = arguments[1];\r\n\r\n\t\t\tfor (var prop in map) {\r\n\t\t\t\tif (map.hasOwnProperty(prop)) {\r\n\t\t\t\t\tdata[prop] = map[prop];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tthrow new Error('Invalid arguments');\r\n\t},\r\n\r\n\r\n\t// usage:\r\n\t// removeData(obj, prop, [prop...])\r\n\t//\r\n\tremoveData : function () {\r\n\t\tvar obj = arguments[0];\r\n\t\tif (!obj.hasOwnProperty(jsc.dataProp)) {\r\n\t\t\treturn true; // data object does not exist\r\n\t\t}\r\n\t\tfor (var i = 1; i < arguments.length; i += 1) {\r\n\t\t\tvar prop = arguments[i];\r\n\t\t\tdelete obj[jsc.dataProp][prop];\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\r\n\tgetData : function (obj, prop, setDefault) {\r\n\t\tif (!obj.hasOwnProperty(jsc.dataProp)) {\r\n\t\t\t// data object does not exist\r\n\t\t\tif (setDefault !== undefined) {\r\n\t\t\t\tobj[jsc.dataProp] = {}; // create data object\r\n\t\t\t} else {\r\n\t\t\t\treturn undefined; // no value to return\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar data = obj[jsc.dataProp];\r\n\r\n\t\tif (!data.hasOwnProperty(prop) && setDefault !== undefined) {\r\n\t\t\tdata[prop] = setDefault;\r\n\t\t}\r\n\t\treturn data[prop];\r\n\t},\r\n\r\n\r\n\tgetDataAttr : function (el, name) {\r\n\t\tvar attrName = 'data-' + name;\r\n\t\tvar attrValue = el.getAttribute(attrName);\r\n\t\treturn attrValue;\r\n\t},\r\n\r\n\r\n\tsetDataAttr : function (el, name, value) {\r\n\t\tvar attrName = 'data-' + name;\r\n\t\tel.setAttribute(attrName, value);\r\n\t},\r\n\r\n\r\n\t_attachedGroupEvents : {},\r\n\r\n\r\n\tattachGroupEvent : function (groupName, el, evnt, func) {\r\n\t\tif (!jsc._attachedGroupEvents.hasOwnProperty(groupName)) {\r\n\t\t\tjsc._attachedGroupEvents[groupName] = [];\r\n\t\t}\r\n\t\tjsc._attachedGroupEvents[groupName].push([el, evnt, func]);\r\n\t\tel.addEventListener(evnt, func, false);\r\n\t},\r\n\r\n\r\n\tdetachGroupEvents : function (groupName) {\r\n\t\tif (jsc._attachedGroupEvents.hasOwnProperty(groupName)) {\r\n\t\t\tfor (var i = 0; i < jsc._attachedGroupEvents[groupName].length; i += 1) {\r\n\t\t\t\tvar evt = jsc._attachedGroupEvents[groupName][i];\r\n\t\t\t\tevt[0].removeEventListener(evt[1], evt[2], false);\r\n\t\t\t}\r\n\t\t\tdelete jsc._attachedGroupEvents[groupName];\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tpreventDefault : function (e) {\r\n\t\tif (e.preventDefault) { e.preventDefault(); }\r\n\t\te.returnValue = false;\r\n\t},\r\n\r\n\r\n\tcaptureTarget : function (target) {\r\n\t\t// IE\r\n\t\tif (target.setCapture) {\r\n\t\t\tjsc._capturedTarget = target;\r\n\t\t\tjsc._capturedTarget.setCapture();\r\n\t\t}\r\n\t},\r\n\r\n\r\n\treleaseTarget : function () {\r\n\t\t// IE\r\n\t\tif (jsc._capturedTarget) {\r\n\t\t\tjsc._capturedTarget.releaseCapture();\r\n\t\t\tjsc._capturedTarget = null;\r\n\t\t}\r\n\t},\r\n\r\n\r\n\ttriggerEvent : function (el, eventName, bubbles, cancelable) {\r\n\t\tif (!el) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar ev = null;\r\n\r\n\t\tif (typeof Event === 'function') {\r\n\t\t\tev = new Event(eventName, {\r\n\t\t\t\tbubbles: bubbles,\r\n\t\t\t\tcancelable: cancelable\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t// IE\r\n\t\t\tev = window.document.createEvent('Event');\r\n\t\t\tev.initEvent(eventName, bubbles, cancelable);\r\n\t\t}\r\n\r\n\t\tif (!ev) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// so that we know that the event was triggered internally\r\n\t\tjsc.setData(ev, 'internal', true);\r\n\r\n\t\tel.dispatchEvent(ev);\r\n\t\treturn true;\r\n\t},\r\n\r\n\r\n\ttriggerInputEvent : function (el, eventName, bubbles, cancelable) {\r\n\t\tif (!el) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (jsc.isTextInput(el)) {\r\n\t\t\tjsc.triggerEvent(el, eventName, bubbles, cancelable);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\teventKey : function (ev) {\r\n\t\tvar keys = {\r\n\t\t\t9: 'Tab',\r\n\t\t\t13: 'Enter',\r\n\t\t\t27: 'Escape',\r\n\t\t};\r\n\t\tif (typeof ev.code === 'string') {\r\n\t\t\treturn ev.code;\r\n\t\t} else if (ev.keyCode !== undefined && keys.hasOwnProperty(ev.keyCode)) {\r\n\t\t\treturn keys[ev.keyCode];\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\r\n\tstrList : function (str) {\r\n\t\tif (!str) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\treturn str.replace(/^\\s+|\\s+$/g, '').split(/\\s+/);\r\n\t},\r\n\r\n\r\n\t// The className parameter (str) can only contain a single class name\r\n\thasClass : function (elm, className) {\r\n\t\tif (!className) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (elm.classList !== undefined) {\r\n\t\t\treturn elm.classList.contains(className);\r\n\t\t}\r\n\t\t// polyfill\r\n\t\treturn -1 != (' ' + elm.className.replace(/\\s+/g, ' ') + ' ').indexOf(' ' + className + ' ');\r\n\t},\r\n\r\n\r\n\t// The className parameter (str) can contain multiple class names separated by whitespace\r\n\taddClass : function (elm, className) {\r\n\t\tvar classNames = jsc.strList(className);\r\n\r\n\t\tif (elm.classList !== undefined) {\r\n\t\t\tfor (var i = 0; i < classNames.length; i += 1) {\r\n\t\t\t\telm.classList.add(classNames[i]);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// polyfill\r\n\t\tfor (var i = 0; i < classNames.length; i += 1) {\r\n\t\t\tif (!jsc.hasClass(elm, classNames[i])) {\r\n\t\t\t\telm.className += (elm.className ? ' ' : '') + classNames[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// The className parameter (str) can contain multiple class names separated by whitespace\r\n\tremoveClass : function (elm, className) {\r\n\t\tvar classNames = jsc.strList(className);\r\n\r\n\t\tif (elm.classList !== undefined) {\r\n\t\t\tfor (var i = 0; i < classNames.length; i += 1) {\r\n\t\t\t\telm.classList.remove(classNames[i]);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// polyfill\r\n\t\tfor (var i = 0; i < classNames.length; i += 1) {\r\n\t\t\tvar repl = new RegExp(\r\n\t\t\t\t'^\\\\s*' + classNames[i] + '\\\\s*|' +\r\n\t\t\t\t'\\\\s*' + classNames[i] + '\\\\s*$|' +\r\n\t\t\t\t'\\\\s+' + classNames[i] + '(\\\\s+)',\r\n\t\t\t\t'g'\r\n\t\t\t);\r\n\t\t\telm.className = elm.className.replace(repl, '$1');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tgetCompStyle : function (elm) {\r\n\t\tvar compStyle = window.getComputedStyle ? window.getComputedStyle(elm) : elm.currentStyle;\r\n\r\n\t\t// Note: In Firefox, getComputedStyle returns null in a hidden iframe,\r\n\t\t// that's why we need to check if the returned value is non-empty\r\n\t\tif (!compStyle) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\t\treturn compStyle;\r\n\t},\r\n\r\n\r\n\t// Note:\r\n\t// Setting a property to NULL reverts it to the state before it was first set\r\n\t// with the 'reversible' flag enabled\r\n\t//\r\n\tsetStyle : function (elm, styles, important, reversible) {\r\n\t\t// using '' for standard priority (IE10 apparently doesn't like value undefined)\r\n\t\tvar priority = important ? 'important' : '';\r\n\t\tvar origStyle = null;\r\n\r\n\t\tfor (var prop in styles) {\r\n\t\t\tif (styles.hasOwnProperty(prop)) {\r\n\t\t\t\tvar setVal = null;\r\n\r\n\t\t\t\tif (styles[prop] === null) {\r\n\t\t\t\t\t// reverting a property value\r\n\r\n\t\t\t\t\tif (!origStyle) {\r\n\t\t\t\t\t\t// get the original style object, but dont't try to create it if it doesn't exist\r\n\t\t\t\t\t\torigStyle = jsc.getData(elm, 'origStyle');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (origStyle && origStyle.hasOwnProperty(prop)) {\r\n\t\t\t\t\t\t// we have property's original value -> use it\r\n\t\t\t\t\t\tsetVal = origStyle[prop];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// setting a property value\r\n\r\n\t\t\t\t\tif (reversible) {\r\n\t\t\t\t\t\tif (!origStyle) {\r\n\t\t\t\t\t\t\t// get the original style object and if it doesn't exist, create it\r\n\t\t\t\t\t\t\torigStyle = jsc.getData(elm, 'origStyle', {});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!origStyle.hasOwnProperty(prop)) {\r\n\t\t\t\t\t\t\t// original property value not yet stored -> store it\r\n\t\t\t\t\t\t\torigStyle[prop] = elm.style[prop];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsetVal = styles[prop];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (setVal !== null) {\r\n\t\t\t\t\telm.style.setProperty(prop, setVal, priority);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\thexColor : function (r, g, b) {\r\n\t\treturn '#' + (\r\n\t\t\t('0' + Math.round(r).toString(16)).substr(-2) +\r\n\t\t\t('0' + Math.round(g).toString(16)).substr(-2) +\r\n\t\t\t('0' + Math.round(b).toString(16)).substr(-2)\r\n\t\t).toUpperCase();\r\n\t},\r\n\r\n\r\n\thexaColor : function (r, g, b, a) {\r\n\t\treturn '#' + (\r\n\t\t\t('0' + Math.round(r).toString(16)).substr(-2) +\r\n\t\t\t('0' + Math.round(g).toString(16)).substr(-2) +\r\n\t\t\t('0' + Math.round(b).toString(16)).substr(-2) +\r\n\t\t\t('0' + Math.round(a * 255).toString(16)).substr(-2)\r\n\t\t).toUpperCase();\r\n\t},\r\n\r\n\r\n\trgbColor : function (r, g, b) {\r\n\t\treturn 'rgb(' +\r\n\t\t\tMath.round(r) + ',' +\r\n\t\t\tMath.round(g) + ',' +\r\n\t\t\tMath.round(b) +\r\n\t\t')';\r\n\t},\r\n\r\n\r\n\trgbaColor : function (r, g, b, a) {\r\n\t\treturn 'rgba(' +\r\n\t\t\tMath.round(r) + ',' +\r\n\t\t\tMath.round(g) + ',' +\r\n\t\t\tMath.round(b) + ',' +\r\n\t\t\t(Math.round((a===undefined || a===null ? 1 : a) * 100) / 100) +\r\n\t\t')';\r\n\t},\r\n\r\n\r\n\tlinearGradient : (function () {\r\n\r\n\t\tfunction getFuncName () {\r\n\t\t\tvar stdName = 'linear-gradient';\r\n\t\t\tvar prefixes = ['', '-webkit-', '-moz-', '-o-', '-ms-'];\r\n\t\t\tvar helper = window.document.createElement('div');\r\n\r\n\t\t\tfor (var i = 0; i < prefixes.length; i += 1) {\r\n\t\t\t\tvar tryFunc = prefixes[i] + stdName;\r\n\t\t\t\tvar tryVal = tryFunc + '(to right, rgba(0,0,0,0), rgba(0,0,0,0))';\r\n\r\n\t\t\t\thelper.style.background = tryVal;\r\n\t\t\t\tif (helper.style.background) { // CSS background successfully set -> function name is supported\r\n\t\t\t\t\treturn tryFunc;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn stdName; // fallback to standard 'linear-gradient' without vendor prefix\r\n\t\t}\r\n\r\n\t\tvar funcName = getFuncName();\r\n\r\n\t\treturn function () {\r\n\t\t\treturn funcName + '(' + Array.prototype.join.call(arguments, ', ') + ')';\r\n\t\t};\r\n\r\n\t})(),\r\n\r\n\r\n\tsetBorderRadius : function (elm, value) {\r\n\t\tjsc.setStyle(elm, {'border-radius' : value || '0'});\r\n\t},\r\n\r\n\r\n\tsetBoxShadow : function (elm, value) {\r\n\t\tjsc.setStyle(elm, {'box-shadow': value || 'none'});\r\n\t},\r\n\r\n\r\n\tgetElementPos : function (e, relativeToViewport) {\r\n\t\tvar x=0, y=0;\r\n\t\tvar rect = e.getBoundingClientRect();\r\n\t\tx = rect.left;\r\n\t\ty = rect.top;\r\n\t\tif (!relativeToViewport) {\r\n\t\t\tvar viewPos = jsc.getViewPos();\r\n\t\t\tx += viewPos[0];\r\n\t\t\ty += viewPos[1];\r\n\t\t}\r\n\t\treturn [x, y];\r\n\t},\r\n\r\n\r\n\tgetElementSize : function (e) {\r\n\t\treturn [e.offsetWidth, e.offsetHeight];\r\n\t},\r\n\r\n\r\n\t// get pointer's X/Y coordinates relative to viewport\r\n\tgetAbsPointerPos : function (e) {\r\n\t\tvar x = 0, y = 0;\r\n\t\tif (typeof e.changedTouches !== 'undefined' && e.changedTouches.length) {\r\n\t\t\t// touch devices\r\n\t\t\tx = e.changedTouches[0].clientX;\r\n\t\t\ty = e.changedTouches[0].clientY;\r\n\t\t} else if (typeof e.clientX === 'number') {\r\n\t\t\tx = e.clientX;\r\n\t\t\ty = e.clientY;\r\n\t\t}\r\n\t\treturn { x: x, y: y };\r\n\t},\r\n\r\n\r\n\t// get pointer's X/Y coordinates relative to target element\r\n\tgetRelPointerPos : function (e) {\r\n\t\tvar target = e.target || e.srcElement;\r\n\t\tvar targetRect = target.getBoundingClientRect();\r\n\r\n\t\tvar x = 0, y = 0;\r\n\r\n\t\tvar clientX = 0, clientY = 0;\r\n\t\tif (typeof e.changedTouches !== 'undefined' && e.changedTouches.length) {\r\n\t\t\t// touch devices\r\n\t\t\tclientX = e.changedTouches[0].clientX;\r\n\t\t\tclientY = e.changedTouches[0].clientY;\r\n\t\t} else if (typeof e.clientX === 'number') {\r\n\t\t\tclientX = e.clientX;\r\n\t\t\tclientY = e.clientY;\r\n\t\t}\r\n\r\n\t\tx = clientX - targetRect.left;\r\n\t\ty = clientY - targetRect.top;\r\n\t\treturn { x: x, y: y };\r\n\t},\r\n\r\n\r\n\tgetViewPos : function () {\r\n\t\tvar doc = window.document.documentElement;\r\n\t\treturn [\r\n\t\t\t(window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0),\r\n\t\t\t(window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)\r\n\t\t];\r\n\t},\r\n\r\n\r\n\tgetViewSize : function () {\r\n\t\tvar doc = window.document.documentElement;\r\n\t\treturn [\r\n\t\t\t(window.innerWidth || doc.clientWidth),\r\n\t\t\t(window.innerHeight || doc.clientHeight),\r\n\t\t];\r\n\t},\r\n\r\n\r\n\t// r: 0-255\r\n\t// g: 0-255\r\n\t// b: 0-255\r\n\t//\r\n\t// returns: [ 0-360, 0-100, 0-100 ]\r\n\t//\r\n\tRGB_HSV : function (r, g, b) {\r\n\t\tr /= 255;\r\n\t\tg /= 255;\r\n\t\tb /= 255;\r\n\t\tvar n = Math.min(Math.min(r,g),b);\r\n\t\tvar v = Math.max(Math.max(r,g),b);\r\n\t\tvar m = v - n;\r\n\t\tif (m === 0) { return [ null, 0, 100 * v ]; }\r\n\t\tvar h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);\r\n\t\treturn [\r\n\t\t\t60 * (h===6?0:h),\r\n\t\t\t100 * (m/v),\r\n\t\t\t100 * v\r\n\t\t];\r\n\t},\r\n\r\n\r\n\t// h: 0-360\r\n\t// s: 0-100\r\n\t// v: 0-100\r\n\t//\r\n\t// returns: [ 0-255, 0-255, 0-255 ]\r\n\t//\r\n\tHSV_RGB : function (h, s, v) {\r\n\t\tvar u = 255 * (v / 100);\r\n\r\n\t\tif (h === null) {\r\n\t\t\treturn [ u, u, u ];\r\n\t\t}\r\n\r\n\t\th /= 60;\r\n\t\ts /= 100;\r\n\r\n\t\tvar i = Math.floor(h);\r\n\t\tvar f = i%2 ? h-i : 1-(h-i);\r\n\t\tvar m = u * (1 - s);\r\n\t\tvar n = u * (1 - s * f);\r\n\t\tswitch (i) {\r\n\t\t\tcase 6:\r\n\t\t\tcase 0: return [u,n,m];\r\n\t\t\tcase 1: return [n,u,m];\r\n\t\t\tcase 2: return [m,u,n];\r\n\t\t\tcase 3: return [m,n,u];\r\n\t\t\tcase 4: return [n,m,u];\r\n\t\t\tcase 5: return [u,m,n];\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tparseColorString : function (str) {\r\n\t\tvar ret = {\r\n\t\t\trgba: null,\r\n\t\t\tformat: null // 'hex' | 'hexa' | 'rgb' | 'rgba'\r\n\t\t};\r\n\r\n\t\tvar m;\r\n\r\n\t\tif (m = str.match(/^\\W*([0-9A-F]{3,8})\\W*$/i)) {\r\n\t\t\t// HEX notation\r\n\r\n\t\t\tif (m[1].length === 8) {\r\n\t\t\t\t// 8-char notation (= with alpha)\r\n\t\t\t\tret.format = 'hexa';\r\n\t\t\t\tret.rgba = [\r\n\t\t\t\t\tparseInt(m[1].substr(0,2),16),\r\n\t\t\t\t\tparseInt(m[1].substr(2,2),16),\r\n\t\t\t\t\tparseInt(m[1].substr(4,2),16),\r\n\t\t\t\t\tparseInt(m[1].substr(6,2),16) / 255\r\n\t\t\t\t];\r\n\r\n\t\t\t} else if (m[1].length === 6) {\r\n\t\t\t\t// 6-char notation\r\n\t\t\t\tret.format = 'hex';\r\n\t\t\t\tret.rgba = [\r\n\t\t\t\t\tparseInt(m[1].substr(0,2),16),\r\n\t\t\t\t\tparseInt(m[1].substr(2,2),16),\r\n\t\t\t\t\tparseInt(m[1].substr(4,2),16),\r\n\t\t\t\t\tnull\r\n\t\t\t\t];\r\n\r\n\t\t\t} else if (m[1].length === 3) {\r\n\t\t\t\t// 3-char notation\r\n\t\t\t\tret.format = 'hex';\r\n\t\t\t\tret.rgba = [\r\n\t\t\t\t\tparseInt(m[1].charAt(0) + m[1].charAt(0),16),\r\n\t\t\t\t\tparseInt(m[1].charAt(1) + m[1].charAt(1),16),\r\n\t\t\t\t\tparseInt(m[1].charAt(2) + m[1].charAt(2),16),\r\n\t\t\t\t\tnull\r\n\t\t\t\t];\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\tif (m = str.match(/^\\W*rgba?\\(([^)]*)\\)\\W*$/i)) {\r\n\t\t\t// rgb(...) or rgba(...) notation\r\n\r\n\t\t\tvar par = m[1].split(',');\r\n\t\t\tvar re = /^\\s*(\\d+|\\d*\\.\\d+|\\d+\\.\\d*)\\s*$/;\r\n\t\t\tvar mR, mG, mB, mA;\r\n\t\t\tif (\r\n\t\t\t\tpar.length >= 3 &&\r\n\t\t\t\t(mR = par[0].match(re)) &&\r\n\t\t\t\t(mG = par[1].match(re)) &&\r\n\t\t\t\t(mB = par[2].match(re))\r\n\t\t\t) {\r\n\t\t\t\tret.format = 'rgb';\r\n\t\t\t\tret.rgba = [\r\n\t\t\t\t\tparseFloat(mR[1]) || 0,\r\n\t\t\t\t\tparseFloat(mG[1]) || 0,\r\n\t\t\t\t\tparseFloat(mB[1]) || 0,\r\n\t\t\t\t\tnull\r\n\t\t\t\t];\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\tpar.length >= 4 &&\r\n\t\t\t\t\t(mA = par[3].match(re))\r\n\t\t\t\t) {\r\n\t\t\t\t\tret.format = 'rgba';\r\n\t\t\t\t\tret.rgba[3] = parseFloat(mA[1]) || 0;\r\n\t\t\t\t}\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\r\n\tparsePaletteValue : function (mixed) {\r\n\t\tvar vals = [];\r\n\r\n\t\tif (typeof mixed === 'string') { // input is a string of space separated color values\r\n\t\t\t// rgb() and rgba() may contain spaces too, so let's find all color values by regex\r\n\t\t\tmixed.replace(/#[0-9A-F]{3}([0-9A-F]{3})?|rgba?\\(([^)]*)\\)/ig, function (val) {\r\n\t\t\t\tvals.push(val);\r\n\t\t\t});\r\n\t\t} else if (Array.isArray(mixed)) { // input is an array of color values\r\n\t\t\tvals = mixed;\r\n\t\t}\r\n\r\n\t\t// convert all values into uniform color format\r\n\r\n\t\tvar colors = [];\r\n\r\n\t\tfor (var i = 0; i < vals.length; i++) {\r\n\t\t\tvar color = jsc.parseColorString(vals[i]);\r\n\t\t\tif (color) {\r\n\t\t\t\tcolors.push(color);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn colors;\r\n\t},\r\n\r\n\r\n\tcontainsTranparentColor : function (colors) {\r\n\t\tfor (var i = 0; i < colors.length; i++) {\r\n\t\t\tvar a = colors[i].rgba[3];\r\n\t\t\tif (a !== null && a < 1.0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\r\n\tisAlphaFormat : function (format) {\r\n\t\tswitch (format.toLowerCase()) {\r\n\t\tcase 'hexa':\r\n\t\tcase 'rgba':\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\r\n\t// Canvas scaling for retina displays\r\n\t//\r\n\t// adapted from https://www.html5rocks.com/en/tutorials/canvas/hidpi/\r\n\t//\r\n\tscaleCanvasForHighDPR : function (canvas) {\r\n\t\tvar dpr = window.devicePixelRatio || 1;\r\n\t\tcanvas.width *= dpr;\r\n\t\tcanvas.height *= dpr;\r\n\t\tvar ctx = canvas.getContext('2d');\r\n\t\tctx.scale(dpr, dpr);\r\n\t},\r\n\r\n\r\n\tgenColorPreviewCanvas : function (color, separatorPos, specWidth, scaleForHighDPR) {\r\n\r\n\t\tvar sepW = Math.round(jsc.pub.previewSeparator.length);\r\n\t\tvar sqSize = jsc.pub.chessboardSize;\r\n\t\tvar sqColor1 = jsc.pub.chessboardColor1;\r\n\t\tvar sqColor2 = jsc.pub.chessboardColor2;\r\n\r\n\t\tvar cWidth = specWidth ? specWidth : sqSize * 2;\r\n\t\tvar cHeight = sqSize * 2;\r\n\r\n\t\tvar canvas = jsc.createEl('canvas');\r\n\t\tvar ctx = canvas.getContext('2d');\r\n\r\n\t\tcanvas.width = cWidth;\r\n\t\tcanvas.height = cHeight;\r\n\t\tif (scaleForHighDPR) {\r\n\t\t\tjsc.scaleCanvasForHighDPR(canvas);\r\n\t\t}\r\n\r\n\t\t// transparency chessboard - background\r\n\t\tctx.fillStyle = sqColor1;\r\n\t\tctx.fillRect(0, 0, cWidth, cHeight);\r\n\r\n\t\t// transparency chessboard - squares\r\n\t\tctx.fillStyle = sqColor2;\r\n\t\tfor (var x = 0; x < cWidth; x += sqSize * 2) {\r\n\t\t\tctx.fillRect(x, 0, sqSize, sqSize);\r\n\t\t\tctx.fillRect(x + sqSize, sqSize, sqSize, sqSize);\r\n\t\t}\r\n\r\n\t\tif (color) {\r\n\t\t\t// actual color in foreground\r\n\t\t\tctx.fillStyle = color;\r\n\t\t\tctx.fillRect(0, 0, cWidth, cHeight);\r\n\t\t}\r\n\r\n\t\tvar start = null;\r\n\t\tswitch (separatorPos) {\r\n\t\t\tcase 'left':\r\n\t\t\t\tstart = 0;\r\n\t\t\t\tctx.clearRect(0, 0, sepW/2, cHeight);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'right':\r\n\t\t\t\tstart = cWidth - sepW;\r\n\t\t\t\tctx.clearRect(cWidth - (sepW/2), 0, sepW/2, cHeight);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif (start !== null) {\r\n\t\t\tctx.lineWidth = 1;\r\n\t\t\tfor (var i = 0; i < jsc.pub.previewSeparator.length; i += 1) {\r\n\t\t\t\tctx.beginPath();\r\n\t\t\t\tctx.strokeStyle = jsc.pub.previewSeparator[i];\r\n\t\t\t\tctx.moveTo(0.5 + start + i, 0);\r\n\t\t\t\tctx.lineTo(0.5 + start + i, cHeight);\r\n\t\t\t\tctx.stroke();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tcanvas: canvas,\r\n\t\t\twidth: cWidth,\r\n\t\t\theight: cHeight,\r\n\t\t};\r\n\t},\r\n\r\n\r\n\t// if position or width is not set => fill the entire element (0%-100%)\r\n\tgenColorPreviewGradient : function (color, position, width) {\r\n\t\tvar params = [];\r\n\r\n\t\tif (position && width) {\r\n\t\t\tparams = [\r\n\t\t\t\t'to ' + {'left':'right', 'right':'left'}[position],\r\n\t\t\t\tcolor + ' 0%',\r\n\t\t\t\tcolor + ' ' + width + 'px',\r\n\t\t\t\t'rgba(0,0,0,0) ' + (width + 1) + 'px',\r\n\t\t\t\t'rgba(0,0,0,0) 100%',\r\n\t\t\t];\r\n\t\t} else {\r\n\t\t\tparams = [\r\n\t\t\t\t'to right',\r\n\t\t\t\tcolor + ' 0%',\r\n\t\t\t\tcolor + ' 100%',\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\treturn jsc.linearGradient.apply(this, params);\r\n\t},\r\n\r\n\r\n\tredrawPosition : function () {\r\n\r\n\t\tif (!jsc.picker || !jsc.picker.owner) {\r\n\t\t\treturn; // picker is not shown\r\n\t\t}\r\n\r\n\t\tvar thisObj = jsc.picker.owner;\r\n\r\n\t\tvar tp, vp;\r\n\r\n\t\tif (thisObj.fixed) {\r\n\t\t\t// Fixed elements are positioned relative to viewport,\r\n\t\t\t// therefore we can ignore the scroll offset\r\n\t\t\ttp = jsc.getElementPos(thisObj.targetElement, true); // target pos\r\n\t\t\tvp = [0, 0]; // view pos\r\n\t\t} else {\r\n\t\t\ttp = jsc.getElementPos(thisObj.targetElement); // target pos\r\n\t\t\tvp = jsc.getViewPos(); // view pos\r\n\t\t}\r\n\r\n\t\tvar ts = jsc.getElementSize(thisObj.targetElement); // target size\r\n\t\tvar vs = jsc.getViewSize(); // view size\r\n\t\tvar pd = jsc.getPickerDims(thisObj);\r\n\t\tvar ps = [pd.borderW, pd.borderH]; // picker outer size\r\n\t\tvar a, b, c;\r\n\t\tswitch (thisObj.position.toLowerCase()) {\r\n\t\t\tcase 'left': a=1; b=0; c=-1; break;\r\n\t\t\tcase 'right':a=1; b=0; c=1; break;\r\n\t\t\tcase 'top': a=0; b=1; c=-1; break;\r\n\t\t\tdefault: a=0; b=1; c=1; break;\r\n\t\t}\r\n\t\tvar l = (ts[b]+ps[b])/2;\r\n\r\n\t\t// compute picker position\r\n\t\tif (!thisObj.smartPosition) {\r\n\t\t\tvar pp = [\r\n\t\t\t\ttp[a],\r\n\t\t\t\ttp[b]+ts[b]-l+l*c\r\n\t\t\t];\r\n\t\t} else {\r\n\t\t\tvar pp = [\r\n\t\t\t\t-vp[a]+tp[a]+ps[a] > vs[a] ?\r\n\t\t\t\t\t(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :\r\n\t\t\t\t\ttp[a],\r\n\t\t\t\t-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?\r\n\t\t\t\t\t(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :\r\n\t\t\t\t\t(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\tvar x = pp[a];\r\n\t\tvar y = pp[b];\r\n\t\tvar positionValue = thisObj.fixed ? 'fixed' : 'absolute';\r\n\t\tvar contractShadow =\r\n\t\t\t(pp[0] + ps[0] > tp[0] || pp[0] < tp[0] + ts[0]) &&\r\n\t\t\t(pp[1] + ps[1] < tp[1] + ts[1]);\r\n\r\n\t\tjsc._drawPosition(thisObj, x, y, positionValue, contractShadow);\r\n\t},\r\n\r\n\r\n\t_drawPosition : function (thisObj, x, y, positionValue, contractShadow) {\r\n\t\tvar vShadow = contractShadow ? 0 : thisObj.shadowBlur; // px\r\n\r\n\t\tjsc.picker.wrap.style.position = positionValue;\r\n\t\tjsc.picker.wrap.style.left = x + 'px';\r\n\t\tjsc.picker.wrap.style.top = y + 'px';\r\n\r\n\t\tjsc.setBoxShadow(\r\n\t\t\tjsc.picker.boxS,\r\n\t\t\tthisObj.shadow ?\r\n\t\t\t\tnew jsc.BoxShadow(0, vShadow, thisObj.shadowBlur, 0, thisObj.shadowColor) :\r\n\t\t\t\tnull);\r\n\t},\r\n\r\n\r\n\tgetPickerDims : function (thisObj) {\r\n\t\tvar w = 2 * thisObj.controlBorderWidth + thisObj.width;\r\n\t\tvar h = 2 * thisObj.controlBorderWidth + thisObj.height;\r\n\r\n\t\tvar sliderSpace = 2 * thisObj.controlBorderWidth + 2 * jsc.getControlPadding(thisObj) + thisObj.sliderSize;\r\n\r\n\t\tif (jsc.getSliderChannel(thisObj)) {\r\n\t\t\tw += sliderSpace;\r\n\t\t}\r\n\t\tif (thisObj.hasAlphaChannel()) {\r\n\t\t\tw += sliderSpace;\r\n\t\t}\r\n\r\n\t\tvar pal = jsc.getPaletteDims(thisObj, w);\r\n\r\n\t\tif (pal.height) {\r\n\t\t\th += pal.height + thisObj.padding;\r\n\t\t}\r\n\t\tif (thisObj.closeButton) {\r\n\t\t\th += 2 * thisObj.controlBorderWidth + thisObj.padding + thisObj.buttonHeight;\r\n\t\t}\r\n\r\n\t\tvar pW = w + (2 * thisObj.padding);\r\n\t\tvar pH = h + (2 * thisObj.padding);\r\n\r\n\t\treturn {\r\n\t\t\tcontentW: w,\r\n\t\t\tcontentH: h,\r\n\t\t\tpaddedW: pW,\r\n\t\t\tpaddedH: pH,\r\n\t\t\tborderW: pW + (2 * thisObj.borderWidth),\r\n\t\t\tborderH: pH + (2 * thisObj.borderWidth),\r\n\t\t\tpalette: pal,\r\n\t\t};\r\n\t},\r\n\r\n\r\n\tgetPaletteDims : function (thisObj, width) {\r\n\t\tvar cols = 0, rows = 0, cellW = 0, cellH = 0, height = 0;\r\n\t\tvar sampleCount = thisObj._palette ? thisObj._palette.length : 0;\r\n\r\n\t\tif (sampleCount) {\r\n\t\t\tcols = thisObj.paletteCols;\r\n\t\t\trows = cols > 0 ? Math.ceil(sampleCount / cols) : 0;\r\n\r\n\t\t\t// color sample's dimensions (includes border)\r\n\t\t\tcellW = Math.max(1, Math.floor((width - ((cols - 1) * thisObj.paletteSpacing)) / cols));\r\n\t\t\tcellH = thisObj.paletteHeight ? Math.min(thisObj.paletteHeight, cellW) : cellW;\r\n\t\t}\r\n\r\n\t\tif (rows) {\r\n\t\t\theight =\r\n\t\t\t\trows * cellH +\r\n\t\t\t\t(rows - 1) * thisObj.paletteSpacing;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tcols: cols,\r\n\t\t\trows: rows,\r\n\t\t\tcellW: cellW,\r\n\t\t\tcellH: cellH,\r\n\t\t\twidth: width,\r\n\t\t\theight: height,\r\n\t\t};\r\n\t},\r\n\r\n\r\n\tgetControlPadding : function (thisObj) {\r\n\t\treturn Math.max(\r\n\t\t\tthisObj.padding / 2,\r\n\t\t\t(2 * thisObj.pointerBorderWidth + thisObj.pointerThickness) - thisObj.controlBorderWidth\r\n\t\t);\r\n\t},\r\n\r\n\r\n\tgetPadYChannel : function (thisObj) {\r\n\t\tswitch (thisObj.mode.charAt(1).toLowerCase()) {\r\n\t\t\tcase 'v': return 'v'; break;\r\n\t\t}\r\n\t\treturn 's';\r\n\t},\r\n\r\n\r\n\tgetSliderChannel : function (thisObj) {\r\n\t\tif (thisObj.mode.length > 2) {\r\n\t\t\tswitch (thisObj.mode.charAt(2).toLowerCase()) {\r\n\t\t\t\tcase 's': return 's'; break;\r\n\t\t\t\tcase 'v': return 'v'; break;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\r\n\t// calls function specified in picker's property\r\n\ttriggerCallback : function (thisObj, prop) {\r\n\t\tif (!thisObj[prop]) {\r\n\t\t\treturn; // callback func not specified\r\n\t\t}\r\n\t\tvar callback = null;\r\n\r\n\t\tif (typeof thisObj[prop] === 'string') {\r\n\t\t\t// string with code\r\n\t\t\ttry {\r\n\t\t\t\tcallback = new Function (thisObj[prop]);\r\n\t\t\t} catch (e) {\r\n\t\t\t\tconsole.error(e);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// function\r\n\t\t\tcallback = thisObj[prop];\r\n\t\t}\r\n\r\n\t\tif (callback) {\r\n\t\t\tcallback.call(thisObj);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// Triggers a color change related event(s) on all picker instances.\r\n\t// It is possible to specify multiple events separated with a space.\r\n\ttriggerGlobal : function (eventNames) {\r\n\t\tvar inst = jsc.getInstances();\r\n\t\tfor (var i = 0; i < inst.length; i += 1) {\r\n\t\t\tinst[i].trigger(eventNames);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t_pointerMoveEvent : {\r\n\t\tmouse: 'mousemove',\r\n\t\ttouch: 'touchmove'\r\n\t},\r\n\t_pointerEndEvent : {\r\n\t\tmouse: 'mouseup',\r\n\t\ttouch: 'touchend'\r\n\t},\r\n\r\n\r\n\t_pointerOrigin : null,\r\n\t_capturedTarget : null,\r\n\r\n\r\n\tonDocumentKeyUp : function (e) {\r\n\t\tif (['Tab', 'Escape'].indexOf(jsc.eventKey(e)) !== -1) {\r\n\t\t\tif (jsc.picker && jsc.picker.owner) {\r\n\t\t\t\tjsc.picker.owner.tryHide();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonWindowResize : function (e) {\r\n\t\tjsc.redrawPosition();\r\n\t},\r\n\r\n\r\n\tonWindowScroll : function (e) {\r\n\t\tjsc.redrawPosition();\r\n\t},\r\n\r\n\r\n\tonParentScroll : function (e) {\r\n\t\t// hide the picker when one of the parent elements is scrolled\r\n\t\tif (jsc.picker && jsc.picker.owner) {\r\n\t\t\tjsc.picker.owner.tryHide();\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonDocumentMouseDown : function (e) {\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tif (target.jscolor && target.jscolor instanceof jsc.pub) { // clicked targetElement -> show picker\r\n\t\t\tif (target.jscolor.showOnClick && !target.disabled) {\r\n\t\t\t\ttarget.jscolor.show();\r\n\t\t\t}\r\n\t\t} else if (jsc.getData(target, 'gui')) { // clicked jscolor's GUI element\r\n\t\t\tvar control = jsc.getData(target, 'control');\r\n\t\t\tif (control) {\r\n\t\t\t\t// jscolor's control\r\n\t\t\t\tjsc.onControlPointerStart(e, target, jsc.getData(target, 'control'), 'mouse');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// mouse is outside the picker's controls -> hide the color picker!\r\n\t\t\tif (jsc.picker && jsc.picker.owner) {\r\n\t\t\t\tjsc.picker.owner.tryHide();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonPickerTouchStart : function (e) {\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tif (jsc.getData(target, 'control')) {\r\n\t\t\tjsc.onControlPointerStart(e, target, jsc.getData(target, 'control'), 'touch');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonControlPointerStart : function (e, target, controlName, pointerType) {\r\n\t\tvar thisObj = jsc.getData(target, 'instance');\r\n\r\n\t\tjsc.preventDefault(e);\r\n\t\tjsc.captureTarget(target);\r\n\r\n\t\tvar registerDragEvents = function (doc, offset) {\r\n\t\t\tjsc.attachGroupEvent('drag', doc, jsc._pointerMoveEvent[pointerType],\r\n\t\t\t\tjsc.onDocumentPointerMove(e, target, controlName, pointerType, offset));\r\n\t\t\tjsc.attachGroupEvent('drag', doc, jsc._pointerEndEvent[pointerType],\r\n\t\t\t\tjsc.onDocumentPointerEnd(e, target, controlName, pointerType));\r\n\t\t};\r\n\r\n\t\tregisterDragEvents(window.document, [0, 0]);\r\n\r\n\t\tif (window.parent && window.frameElement) {\r\n\t\t\tvar rect = window.frameElement.getBoundingClientRect();\r\n\t\t\tvar ofs = [-rect.left, -rect.top];\r\n\t\t\tregisterDragEvents(window.parent.window.document, ofs);\r\n\t\t}\r\n\r\n\t\tvar abs = jsc.getAbsPointerPos(e);\r\n\t\tvar rel = jsc.getRelPointerPos(e);\r\n\t\tjsc._pointerOrigin = {\r\n\t\t\tx: abs.x - rel.x,\r\n\t\t\ty: abs.y - rel.y\r\n\t\t};\r\n\r\n\t\tswitch (controlName) {\r\n\t\tcase 'pad':\r\n\t\t\t// if the value slider is at the bottom, move it up\r\n\t\t\tif (jsc.getSliderChannel(thisObj) === 'v' && thisObj.channels.v === 0) {\r\n\t\t\t\tthisObj.fromHSVA(null, null, 100, null);\r\n\t\t\t}\r\n\t\t\tjsc.setPad(thisObj, e, 0, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'sld':\r\n\t\t\tjsc.setSld(thisObj, e, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'asld':\r\n\t\t\tjsc.setASld(thisObj, e, 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tthisObj.trigger('input');\r\n\t},\r\n\r\n\r\n\tonDocumentPointerMove : function (e, target, controlName, pointerType, offset) {\r\n\t\treturn function (e) {\r\n\t\t\tvar thisObj = jsc.getData(target, 'instance');\r\n\t\t\tswitch (controlName) {\r\n\t\t\tcase 'pad':\r\n\t\t\t\tjsc.setPad(thisObj, e, offset[0], offset[1]);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'sld':\r\n\t\t\t\tjsc.setSld(thisObj, e, offset[1]);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'asld':\r\n\t\t\t\tjsc.setASld(thisObj, e, offset[1]);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tthisObj.trigger('input');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonDocumentPointerEnd : function (e, target, controlName, pointerType) {\r\n\t\treturn function (e) {\r\n\t\t\tvar thisObj = jsc.getData(target, 'instance');\r\n\t\t\tjsc.detachGroupEvents('drag');\r\n\t\t\tjsc.releaseTarget();\r\n\r\n\t\t\t// Always trigger changes AFTER detaching outstanding mouse handlers,\r\n\t\t\t// in case some color change that occured in user-defined onChange/onInput handler\r\n\t\t\t// intruded into current mouse events\r\n\t\t\tthisObj.trigger('input');\r\n\t\t\tthisObj.trigger('change');\r\n\t\t};\r\n\t},\r\n\r\n\r\n\tonPaletteSampleClick : function (e) {\r\n\t\tvar target = e.currentTarget;\r\n\t\tvar thisObj = jsc.getData(target, 'instance');\r\n\t\tvar color = jsc.getData(target, 'color');\r\n\r\n\t\t// when format is flexible, use the original format of this color sample\r\n\t\tif (thisObj.format.toLowerCase() === 'any') {\r\n\t\t\tthisObj._setFormat(color.format); // adapt format\r\n\t\t\tif (!jsc.isAlphaFormat(thisObj.getFormat())) {\r\n\t\t\t\tcolor.rgba[3] = 1.0; // when switching to a format that doesn't support alpha, set full opacity\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if this color doesn't specify alpha, use alpha of 1.0 (if applicable)\r\n\t\tif (color.rgba[3] === null) {\r\n\t\t\tif (thisObj.paletteSetsAlpha === true || (thisObj.paletteSetsAlpha === 'auto' && thisObj._paletteHasTransparency)) {\r\n\t\t\t\tcolor.rgba[3] = 1.0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthisObj.fromRGBA.apply(thisObj, color.rgba);\r\n\r\n\t\tthisObj.trigger('input');\r\n\t\tthisObj.trigger('change');\r\n\r\n\t\tif (thisObj.hideOnPaletteClick) {\r\n\t\t\tthisObj.hide();\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tsetPad : function (thisObj, e, ofsX, ofsY) {\r\n\t\tvar pointerAbs = jsc.getAbsPointerPos(e);\r\n\t\tvar x = ofsX + pointerAbs.x - jsc._pointerOrigin.x - thisObj.padding - thisObj.controlBorderWidth;\r\n\t\tvar y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.controlBorderWidth;\r\n\r\n\t\tvar xVal = x * (360 / (thisObj.width - 1));\r\n\t\tvar yVal = 100 - (y * (100 / (thisObj.height - 1)));\r\n\r\n\t\tswitch (jsc.getPadYChannel(thisObj)) {\r\n\t\tcase 's': thisObj.fromHSVA(xVal, yVal, null, null); break;\r\n\t\tcase 'v': thisObj.fromHSVA(xVal, null, yVal, null); break;\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tsetSld : function (thisObj, e, ofsY) {\r\n\t\tvar pointerAbs = jsc.getAbsPointerPos(e);\r\n\t\tvar y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.controlBorderWidth;\r\n\t\tvar yVal = 100 - (y * (100 / (thisObj.height - 1)));\r\n\r\n\t\tswitch (jsc.getSliderChannel(thisObj)) {\r\n\t\tcase 's': thisObj.fromHSVA(null, yVal, null, null); break;\r\n\t\tcase 'v': thisObj.fromHSVA(null, null, yVal, null); break;\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tsetASld : function (thisObj, e, ofsY) {\r\n\t\tvar pointerAbs = jsc.getAbsPointerPos(e);\r\n\t\tvar y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.controlBorderWidth;\r\n\t\tvar yVal = 1.0 - (y * (1.0 / (thisObj.height - 1)));\r\n\r\n\t\tif (yVal < 1.0) {\r\n\t\t\t// if format is flexible and the current format doesn't support alpha, switch to a suitable one\r\n\t\t\tvar fmt = thisObj.getFormat();\r\n\t\t\tif (thisObj.format.toLowerCase() === 'any' && !jsc.isAlphaFormat(fmt)) {\r\n\t\t\t\tthisObj._setFormat(fmt === 'hex' ? 'hexa' : 'rgba');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthisObj.fromHSVA(null, null, null, yVal);\r\n\t},\r\n\r\n\r\n\tcreatePadCanvas : function () {\r\n\r\n\t\tvar ret = {\r\n\t\t\telm: null,\r\n\t\t\tdraw: null\r\n\t\t};\r\n\r\n\t\tvar canvas = jsc.createEl('canvas');\r\n\t\tvar ctx = canvas.getContext('2d');\r\n\r\n\t\tvar drawFunc = function (width, height, type) {\r\n\t\t\tcanvas.width = width;\r\n\t\t\tcanvas.height = height;\r\n\r\n\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\tvar hGrad = ctx.createLinearGradient(0, 0, canvas.width, 0);\r\n\t\t\thGrad.addColorStop(0 / 6, '#F00');\r\n\t\t\thGrad.addColorStop(1 / 6, '#FF0');\r\n\t\t\thGrad.addColorStop(2 / 6, '#0F0');\r\n\t\t\thGrad.addColorStop(3 / 6, '#0FF');\r\n\t\t\thGrad.addColorStop(4 / 6, '#00F');\r\n\t\t\thGrad.addColorStop(5 / 6, '#F0F');\r\n\t\t\thGrad.addColorStop(6 / 6, '#F00');\r\n\r\n\t\t\tctx.fillStyle = hGrad;\r\n\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\tvar vGrad = ctx.createLinearGradient(0, 0, 0, canvas.height);\r\n\t\t\tswitch (type.toLowerCase()) {\r\n\t\t\tcase 's':\r\n\t\t\t\tvGrad.addColorStop(0, 'rgba(255,255,255,0)');\r\n\t\t\t\tvGrad.addColorStop(1, 'rgba(255,255,255,1)');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'v':\r\n\t\t\t\tvGrad.addColorStop(0, 'rgba(0,0,0,0)');\r\n\t\t\t\tvGrad.addColorStop(1, 'rgba(0,0,0,1)');\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tctx.fillStyle = vGrad;\r\n\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\t\t};\r\n\r\n\t\tret.elm = canvas;\r\n\t\tret.draw = drawFunc;\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\r\n\tcreateSliderGradient : function () {\r\n\r\n\t\tvar ret = {\r\n\t\t\telm: null,\r\n\t\t\tdraw: null\r\n\t\t};\r\n\r\n\t\tvar canvas = jsc.createEl('canvas');\r\n\t\tvar ctx = canvas.getContext('2d');\r\n\r\n\t\tvar drawFunc = function (width, height, color1, color2) {\r\n\t\t\tcanvas.width = width;\r\n\t\t\tcanvas.height = height;\r\n\r\n\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\tvar grad = ctx.createLinearGradient(0, 0, 0, canvas.height);\r\n\t\t\tgrad.addColorStop(0, color1);\r\n\t\t\tgrad.addColorStop(1, color2);\r\n\r\n\t\t\tctx.fillStyle = grad;\r\n\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\t\t};\r\n\r\n\t\tret.elm = canvas;\r\n\t\tret.draw = drawFunc;\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\r\n\tcreateASliderGradient : function () {\r\n\r\n\t\tvar ret = {\r\n\t\t\telm: null,\r\n\t\t\tdraw: null\r\n\t\t};\r\n\r\n\t\tvar canvas = jsc.createEl('canvas');\r\n\t\tvar ctx = canvas.getContext('2d');\r\n\r\n\t\tvar drawFunc = function (width, height, color) {\r\n\t\t\tcanvas.width = width;\r\n\t\t\tcanvas.height = height;\r\n\r\n\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\tvar sqSize = canvas.width / 2;\r\n\t\t\tvar sqColor1 = jsc.pub.chessboardColor1;\r\n\t\t\tvar sqColor2 = jsc.pub.chessboardColor2;\r\n\r\n\t\t\t// dark gray background\r\n\t\t\tctx.fillStyle = sqColor1;\r\n\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\tif (sqSize > 0) { // to avoid infinite loop\r\n\t\t\t\tfor (var y = 0; y < canvas.height; y += sqSize * 2) {\r\n\t\t\t\t\t// light gray squares\r\n\t\t\t\t\tctx.fillStyle = sqColor2;\r\n\t\t\t\t\tctx.fillRect(0, y, sqSize, sqSize);\r\n\t\t\t\t\tctx.fillRect(sqSize, y + sqSize, sqSize, sqSize);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar grad = ctx.createLinearGradient(0, 0, 0, canvas.height);\r\n\t\t\tgrad.addColorStop(0, color);\r\n\t\t\tgrad.addColorStop(1, 'rgba(0,0,0,0)');\r\n\r\n\t\t\tctx.fillStyle = grad;\r\n\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\t\t};\r\n\r\n\t\tret.elm = canvas;\r\n\t\tret.draw = drawFunc;\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\r\n\tBoxShadow : (function () {\r\n\t\tvar BoxShadow = function (hShadow, vShadow, blur, spread, color, inset) {\r\n\t\t\tthis.hShadow = hShadow;\r\n\t\t\tthis.vShadow = vShadow;\r\n\t\t\tthis.blur = blur;\r\n\t\t\tthis.spread = spread;\r\n\t\t\tthis.color = color;\r\n\t\t\tthis.inset = !!inset;\r\n\t\t};\r\n\r\n\t\tBoxShadow.prototype.toString = function () {\r\n\t\t\tvar vals = [\r\n\t\t\t\tMath.round(this.hShadow) + 'px',\r\n\t\t\t\tMath.round(this.vShadow) + 'px',\r\n\t\t\t\tMath.round(this.blur) + 'px',\r\n\t\t\t\tMath.round(this.spread) + 'px',\r\n\t\t\t\tthis.color\r\n\t\t\t];\r\n\t\t\tif (this.inset) {\r\n\t\t\t\tvals.push('inset');\r\n\t\t\t}\r\n\t\t\treturn vals.join(' ');\r\n\t\t};\r\n\r\n\t\treturn BoxShadow;\r\n\t})(),\r\n\r\n\r\n\tflags : {\r\n\t\tleaveValue : 1 << 0,\r\n\t\tleaveAlpha : 1 << 1,\r\n\t\tleavePreview : 1 << 2,\r\n\t},\r\n\r\n\r\n\tenumOpts : {\r\n\t\tformat: ['auto', 'any', 'hex', 'hexa', 'rgb', 'rgba'],\r\n\t\tpreviewPosition: ['left', 'right'],\r\n\t\tmode: ['hsv', 'hvs', 'hs', 'hv'],\r\n\t\tposition: ['left', 'right', 'top', 'bottom'],\r\n\t\talphaChannel: ['auto', true, false],\r\n\t\tpaletteSetsAlpha: ['auto', true, false],\r\n\t},\r\n\r\n\r\n\tdeprecatedOpts : {\r\n\t\t// : ( can be null)\r\n\t\t'styleElement': 'previewElement',\r\n\t\t'onFineChange': 'onInput',\r\n\t\t'overwriteImportant': 'forceStyle',\r\n\t\t'closable': 'closeButton',\r\n\t\t'insetWidth': 'controlBorderWidth',\r\n\t\t'insetColor': 'controlBorderColor',\r\n\t\t'refine': null,\r\n\t},\r\n\r\n\r\n\tdocsRef : ' ' + 'See https://jscolor.com/docs/',\r\n\r\n\r\n\t//\r\n\t// Usage:\r\n\t// var myPicker = new JSColor( [, ])\r\n\t//\r\n\t// (constructor is accessible via both 'jscolor' and 'JSColor' name)\r\n\t//\r\n\r\n\tpub : function (targetElement, opts) {\r\n\r\n\t\tvar THIS = this;\r\n\r\n\t\tif (!opts) {\r\n\t\t\topts = {};\r\n\t\t}\r\n\r\n\t\tthis.channels = {\r\n\t\t\tr: 255, // red [0-255]\r\n\t\t\tg: 255, // green [0-255]\r\n\t\t\tb: 255, // blue [0-255]\r\n\t\t\th: 0, // hue [0-360]\r\n\t\t\ts: 0, // saturation [0-100]\r\n\t\t\tv: 100, // value (brightness) [0-100]\r\n\t\t\ta: 1.0, // alpha (opacity) [0.0 - 1.0]\r\n\t\t};\r\n\r\n\t\t// General options\r\n\t\t//\r\n\t\tthis.format = 'auto'; // 'auto' | 'any' | 'hex' | 'hexa' | 'rgb' | 'rgba' - Format of the input/output value\r\n\t\tthis.value = undefined; // INITIAL color value in any supported format. To change it later, use method fromString(), fromHSVA(), fromRGBA() or channel()\r\n\t\tthis.alpha = undefined; // INITIAL alpha value. To change it later, call method channel('A', )\r\n\t\tthis.onChange = undefined; // called when color changes. Value can be either a function or a string with JS code.\r\n\t\tthis.onInput = undefined; // called repeatedly as the color is being changed, e.g. while dragging a slider. Value can be either a function or a string with JS code.\r\n\t\tthis.valueElement = undefined; // element that will be used to display and input the color value\r\n\t\tthis.alphaElement = undefined; // element that will be used to display and input the alpha (opacity) value\r\n\t\tthis.previewElement = undefined; // element that will preview the picked color using CSS background\r\n\t\tthis.previewPosition = 'left'; // 'left' | 'right' - position of the color preview in previewElement\r\n\t\tthis.previewSize = 32; // (px) width of the color preview displayed in previewElement\r\n\t\tthis.previewPadding = 8; // (px) space between color preview and content of the previewElement\r\n\t\tthis.required = true; // whether the associated text input must always contain a color value. If false, the input can be left empty.\r\n\t\tthis.hash = true; // whether to prefix the HEX color code with # symbol (only applicable for HEX format)\r\n\t\tthis.uppercase = true; // whether to show the HEX color code in upper case (only applicable for HEX format)\r\n\t\tthis.forceStyle = true; // whether to overwrite CSS style of the previewElement using !important flag\r\n\r\n\t\t// Color Picker options\r\n\t\t//\r\n\t\tthis.width = 181; // width of the color spectrum (in px)\r\n\t\tthis.height = 101; // height of the color spectrum (in px)\r\n\t\tthis.mode = 'HSV'; // 'HSV' | 'HVS' | 'HS' | 'HV' - layout of the color picker controls\r\n\t\tthis.alphaChannel = 'auto'; // 'auto' | true | false - if alpha channel is enabled, the alpha slider will be visible. If 'auto', it will be determined according to color format\r\n\t\tthis.position = 'bottom'; // 'left' | 'right' | 'top' | 'bottom' - position relative to the target element\r\n\t\tthis.smartPosition = true; // automatically change picker position when there is not enough space for it\r\n\t\tthis.showOnClick = true; // whether to show the picker when user clicks its target element\r\n\t\tthis.hideOnLeave = true; // whether to automatically hide the picker when user leaves its target element (e.g. upon clicking the document)\r\n\t\tthis.palette = []; // colors to be displayed in the palette, specified as an array or a string of space separated color values (in any supported format)\r\n\t\tthis.paletteCols = 10; // number of columns in the palette\r\n\t\tthis.paletteSetsAlpha = 'auto'; // 'auto' | true | false - if true, palette colors that don't specify alpha will set alpha to 1.0\r\n\t\tthis.paletteHeight = 16; // maximum height (px) of a row in the palette\r\n\t\tthis.paletteSpacing = 4; // distance (px) between color samples in the palette\r\n\t\tthis.hideOnPaletteClick = false; // when set to true, clicking the palette will also hide the color picker\r\n\t\tthis.sliderSize = 16; // px\r\n\t\tthis.crossSize = 8; // px\r\n\t\tthis.closeButton = false; // whether to display the Close button\r\n\t\tthis.closeText = 'Close';\r\n\t\tthis.buttonColor = 'rgba(0,0,0,1)'; // CSS color\r\n\t\tthis.buttonHeight = 18; // px\r\n\t\tthis.padding = 12; // px\r\n\t\tthis.backgroundColor = 'rgba(255,255,255,1)'; // CSS color\r\n\t\tthis.borderWidth = 1; // px\r\n\t\tthis.borderColor = 'rgba(187,187,187,1)'; // CSS color\r\n\t\tthis.borderRadius = 8; // px\r\n\t\tthis.controlBorderWidth = 1; // px\r\n\t\tthis.controlBorderColor = 'rgba(187,187,187,1)'; // CSS color\r\n\t\tthis.shadow = true; // whether to display a shadow\r\n\t\tthis.shadowBlur = 15; // px\r\n\t\tthis.shadowColor = 'rgba(0,0,0,0.2)'; // CSS color\r\n\t\tthis.pointerColor = 'rgba(76,76,76,1)'; // CSS color\r\n\t\tthis.pointerBorderWidth = 1; // px\r\n\t\tthis.pointerBorderColor = 'rgba(255,255,255,1)'; // CSS color\r\n\t\tthis.pointerThickness = 2; // px\r\n\t\tthis.zIndex = 5000;\r\n\t\tthis.container = undefined; // where to append the color picker (BODY element by default)\r\n\r\n\t\t// Experimental\r\n\t\t//\r\n\t\tthis.minS = 0; // min allowed saturation (0 - 100)\r\n\t\tthis.maxS = 100; // max allowed saturation (0 - 100)\r\n\t\tthis.minV = 0; // min allowed value (brightness) (0 - 100)\r\n\t\tthis.maxV = 100; // max allowed value (brightness) (0 - 100)\r\n\t\tthis.minA = 0.0; // min allowed alpha (opacity) (0.0 - 1.0)\r\n\t\tthis.maxA = 1.0; // max allowed alpha (opacity) (0.0 - 1.0)\r\n\r\n\r\n\t\t// Getter: option(name)\r\n\t\t// Setter: option(name, value)\r\n\t\t// option({name:value, ...})\r\n\t\t//\r\n\t\tthis.option = function () {\r\n\t\t\tif (!arguments.length) {\r\n\t\t\t\tthrow new Error('No option specified');\r\n\t\t\t}\r\n\r\n\t\t\tif (arguments.length === 1 && typeof arguments[0] === 'string') {\r\n\t\t\t\t// getting a single option\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn getOption(arguments[0]);\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tconsole.warn(e);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t} else if (arguments.length >= 2 && typeof arguments[0] === 'string') {\r\n\t\t\t\t// setting a single option\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (!setOption(arguments[0], arguments[1])) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tconsole.warn(e);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tthis.redraw(); // immediately redraws the picker, if it's displayed\r\n\t\t\t\tthis.exposeColor(); // in case some preview-related or format-related option was changed\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t} else if (arguments.length === 1 && typeof arguments[0] === 'object') {\r\n\t\t\t\t// setting multiple options\r\n\t\t\t\tvar opts = arguments[0];\r\n\t\t\t\tvar success = true;\r\n\t\t\t\tfor (var opt in opts) {\r\n\t\t\t\t\tif (opts.hasOwnProperty(opt)) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif (!setOption(opt, opts[opt])) {\r\n\t\t\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tconsole.warn(e);\r\n\t\t\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.redraw(); // immediately redraws the picker, if it's displayed\r\n\t\t\t\tthis.exposeColor(); // in case some preview-related or format-related option was changed\r\n\t\t\t\treturn success;\r\n\t\t\t}\r\n\r\n\t\t\tthrow new Error('Invalid arguments');\r\n\t\t}\r\n\r\n\r\n\t\t// Getter: channel(name)\r\n\t\t// Setter: channel(name, value)\r\n\t\t//\r\n\t\tthis.channel = function (name, value) {\r\n\t\t\tif (typeof name !== 'string') {\r\n\t\t\t\tthrow new Error('Invalid value for channel name: ' + name);\r\n\t\t\t}\r\n\r\n\t\t\tif (value === undefined) {\r\n\t\t\t\t// getting channel value\r\n\t\t\t\tif (!this.channels.hasOwnProperty(name.toLowerCase())) {\r\n\t\t\t\t\tconsole.warn('Getting unknown channel: ' + name);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\treturn this.channels[name.toLowerCase()];\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// setting channel value\r\n\t\t\t\tvar res = false;\r\n\t\t\t\tswitch (name.toLowerCase()) {\r\n\t\t\t\t\tcase 'r': res = this.fromRGBA(value, null, null, null); break;\r\n\t\t\t\t\tcase 'g': res = this.fromRGBA(null, value, null, null); break;\r\n\t\t\t\t\tcase 'b': res = this.fromRGBA(null, null, value, null); break;\r\n\t\t\t\t\tcase 'h': res = this.fromHSVA(value, null, null, null); break;\r\n\t\t\t\t\tcase 's': res = this.fromHSVA(null, value, null, null); break;\r\n\t\t\t\t\tcase 'v': res = this.fromHSVA(null, null, value, null); break;\r\n\t\t\t\t\tcase 'a': res = this.fromHSVA(null, null, null, value); break;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tconsole.warn('Setting unknown channel: ' + name);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (res) {\r\n\t\t\t\t\tthis.redraw(); // immediately redraws the picker, if it's displayed\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\t// Triggers given input event(s) by:\r\n\t\t// - executing on callback specified as picker's option\r\n\t\t// - triggering standard DOM event listeners attached to the value element\r\n\t\t//\r\n\t\t// It is possible to specify multiple events separated with a space.\r\n\t\t//\r\n\t\tthis.trigger = function (eventNames) {\r\n\t\t\tvar evs = jsc.strList(eventNames);\r\n\t\t\tfor (var i = 0; i < evs.length; i += 1) {\r\n\t\t\t\tvar ev = evs[i].toLowerCase();\r\n\r\n\t\t\t\t// trigger a callback\r\n\t\t\t\tvar callbackProp = null;\r\n\t\t\t\tswitch (ev) {\r\n\t\t\t\t\tcase 'input': callbackProp = 'onInput'; break;\r\n\t\t\t\t\tcase 'change': callbackProp = 'onChange'; break;\r\n\t\t\t\t}\r\n\t\t\t\tif (callbackProp) {\r\n\t\t\t\t\tjsc.triggerCallback(this, callbackProp);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// trigger standard DOM event listeners on the value element\r\n\t\t\t\tjsc.triggerInputEvent(this.valueElement, ev, true, true);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\t// h: 0-360\r\n\t\t// s: 0-100\r\n\t\t// v: 0-100\r\n\t\t// a: 0.0-1.0\r\n\t\t//\r\n\t\tthis.fromHSVA = function (h, s, v, a, flags) { // null = don't change\r\n\t\t\tif (h === undefined) { h = null; }\r\n\t\t\tif (s === undefined) { s = null; }\r\n\t\t\tif (v === undefined) { v = null; }\r\n\t\t\tif (a === undefined) { a = null; }\r\n\r\n\t\t\tif (h !== null) {\r\n\t\t\t\tif (isNaN(h)) { return false; }\r\n\t\t\t\tthis.channels.h = Math.max(0, Math.min(360, h));\r\n\t\t\t}\r\n\t\t\tif (s !== null) {\r\n\t\t\t\tif (isNaN(s)) { return false; }\r\n\t\t\t\tthis.channels.s = Math.max(0, Math.min(100, this.maxS, s), this.minS);\r\n\t\t\t}\r\n\t\t\tif (v !== null) {\r\n\t\t\t\tif (isNaN(v)) { return false; }\r\n\t\t\t\tthis.channels.v = Math.max(0, Math.min(100, this.maxV, v), this.minV);\r\n\t\t\t}\r\n\t\t\tif (a !== null) {\r\n\t\t\t\tif (isNaN(a)) { return false; }\r\n\t\t\t\tthis.channels.a = this.hasAlphaChannel() ?\r\n\t\t\t\t\tMath.max(0, Math.min(1, this.maxA, a), this.minA) :\r\n\t\t\t\t\t1.0; // if alpha channel is disabled, the color should stay 100% opaque\r\n\t\t\t}\r\n\r\n\t\t\tvar rgb = jsc.HSV_RGB(\r\n\t\t\t\tthis.channels.h,\r\n\t\t\t\tthis.channels.s,\r\n\t\t\t\tthis.channels.v\r\n\t\t\t);\r\n\t\t\tthis.channels.r = rgb[0];\r\n\t\t\tthis.channels.g = rgb[1];\r\n\t\t\tthis.channels.b = rgb[2];\r\n\r\n\t\t\tthis.exposeColor(flags);\r\n\t\t\treturn true;\r\n\t\t};\r\n\r\n\r\n\t\t// r: 0-255\r\n\t\t// g: 0-255\r\n\t\t// b: 0-255\r\n\t\t// a: 0.0-1.0\r\n\t\t//\r\n\t\tthis.fromRGBA = function (r, g, b, a, flags) { // null = don't change\r\n\t\t\tif (r === undefined) { r = null; }\r\n\t\t\tif (g === undefined) { g = null; }\r\n\t\t\tif (b === undefined) { b = null; }\r\n\t\t\tif (a === undefined) { a = null; }\r\n\r\n\t\t\tif (r !== null) {\r\n\t\t\t\tif (isNaN(r)) { return false; }\r\n\t\t\t\tr = Math.max(0, Math.min(255, r));\r\n\t\t\t}\r\n\t\t\tif (g !== null) {\r\n\t\t\t\tif (isNaN(g)) { return false; }\r\n\t\t\t\tg = Math.max(0, Math.min(255, g));\r\n\t\t\t}\r\n\t\t\tif (b !== null) {\r\n\t\t\t\tif (isNaN(b)) { return false; }\r\n\t\t\t\tb = Math.max(0, Math.min(255, b));\r\n\t\t\t}\r\n\t\t\tif (a !== null) {\r\n\t\t\t\tif (isNaN(a)) { return false; }\r\n\t\t\t\tthis.channels.a = this.hasAlphaChannel() ?\r\n\t\t\t\t\tMath.max(0, Math.min(1, this.maxA, a), this.minA) :\r\n\t\t\t\t\t1.0; // if alpha channel is disabled, the color should stay 100% opaque\r\n\t\t\t}\r\n\r\n\t\t\tvar hsv = jsc.RGB_HSV(\r\n\t\t\t\tr===null ? this.channels.r : r,\r\n\t\t\t\tg===null ? this.channels.g : g,\r\n\t\t\t\tb===null ? this.channels.b : b\r\n\t\t\t);\r\n\t\t\tif (hsv[0] !== null) {\r\n\t\t\t\tthis.channels.h = Math.max(0, Math.min(360, hsv[0]));\r\n\t\t\t}\r\n\t\t\tif (hsv[2] !== 0) { // fully black color stays black through entire saturation range, so let's not change saturation\r\n\t\t\t\tthis.channels.s = Math.max(0, this.minS, Math.min(100, this.maxS, hsv[1]));\r\n\t\t\t}\r\n\t\t\tthis.channels.v = Math.max(0, this.minV, Math.min(100, this.maxV, hsv[2]));\r\n\r\n\t\t\t// update RGB according to final HSV, as some values might be trimmed\r\n\t\t\tvar rgb = jsc.HSV_RGB(this.channels.h, this.channels.s, this.channels.v);\r\n\t\t\tthis.channels.r = rgb[0];\r\n\t\t\tthis.channels.g = rgb[1];\r\n\t\t\tthis.channels.b = rgb[2];\r\n\r\n\t\t\tthis.exposeColor(flags);\r\n\t\t\treturn true;\r\n\t\t};\r\n\r\n\r\n\t\t// DEPRECATED. Use .fromHSVA() instead\r\n\t\t//\r\n\t\tthis.fromHSV = function (h, s, v, flags) {\r\n\t\t\tconsole.warn('fromHSV() method is DEPRECATED. Using fromHSVA() instead.' + jsc.docsRef);\r\n\t\t\treturn this.fromHSVA(h, s, v, null, flags);\r\n\t\t};\r\n\r\n\r\n\t\t// DEPRECATED. Use .fromRGBA() instead\r\n\t\t//\r\n\t\tthis.fromRGB = function (r, g, b, flags) {\r\n\t\t\tconsole.warn('fromRGB() method is DEPRECATED. Using fromRGBA() instead.' + jsc.docsRef);\r\n\t\t\treturn this.fromRGBA(r, g, b, null, flags);\r\n\t\t};\r\n\r\n\r\n\t\tthis.fromString = function (str, flags) {\r\n\t\t\tif (!this.required && str.trim() === '') {\r\n\t\t\t\t// setting empty string to an optional color input\r\n\t\t\t\tthis.setPreviewElementBg(null);\r\n\t\t\t\tthis.setValueElementValue('');\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tvar color = jsc.parseColorString(str);\r\n\t\t\tif (!color) {\r\n\t\t\t\treturn false; // could not parse\r\n\t\t\t}\r\n\t\t\tif (this.format.toLowerCase() === 'any') {\r\n\t\t\t\tthis._setFormat(color.format); // adapt format\r\n\t\t\t\tif (!jsc.isAlphaFormat(this.getFormat())) {\r\n\t\t\t\t\tcolor.rgba[3] = 1.0; // when switching to a format that doesn't support alpha, set full opacity\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.fromRGBA(\r\n\t\t\t\tcolor.rgba[0],\r\n\t\t\t\tcolor.rgba[1],\r\n\t\t\t\tcolor.rgba[2],\r\n\t\t\t\tcolor.rgba[3],\r\n\t\t\t\tflags\r\n\t\t\t);\r\n\t\t\treturn true;\r\n\t\t};\r\n\r\n\r\n\t\tthis.toString = function (format) {\r\n\t\t\tif (format === undefined) {\r\n\t\t\t\tformat = this.getFormat(); // format not specified -> use the current format\r\n\t\t\t}\r\n\t\t\tswitch (format.toLowerCase()) {\r\n\t\t\t\tcase 'hex': return this.toHEXString(); break;\r\n\t\t\t\tcase 'hexa': return this.toHEXAString(); break;\r\n\t\t\t\tcase 'rgb': return this.toRGBString(); break;\r\n\t\t\t\tcase 'rgba': return this.toRGBAString(); break;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\r\n\t\tthis.toHEXString = function () {\r\n\t\t\treturn jsc.hexColor(\r\n\t\t\t\tthis.channels.r,\r\n\t\t\t\tthis.channels.g,\r\n\t\t\t\tthis.channels.b\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis.toHEXAString = function () {\r\n\t\t\treturn jsc.hexaColor(\r\n\t\t\t\tthis.channels.r,\r\n\t\t\t\tthis.channels.g,\r\n\t\t\t\tthis.channels.b,\r\n\t\t\t\tthis.channels.a\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis.toRGBString = function () {\r\n\t\t\treturn jsc.rgbColor(\r\n\t\t\t\tthis.channels.r,\r\n\t\t\t\tthis.channels.g,\r\n\t\t\t\tthis.channels.b\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis.toRGBAString = function () {\r\n\t\t\treturn jsc.rgbaColor(\r\n\t\t\t\tthis.channels.r,\r\n\t\t\t\tthis.channels.g,\r\n\t\t\t\tthis.channels.b,\r\n\t\t\t\tthis.channels.a\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis.toGrayscale = function () {\r\n\t\t\treturn (\r\n\t\t\t\t0.213 * this.channels.r +\r\n\t\t\t\t0.715 * this.channels.g +\r\n\t\t\t\t0.072 * this.channels.b\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis.toCanvas = function () {\r\n\t\t\treturn jsc.genColorPreviewCanvas(this.toRGBAString()).canvas;\r\n\t\t};\r\n\r\n\r\n\t\tthis.toDataURL = function () {\r\n\t\t\treturn this.toCanvas().toDataURL();\r\n\t\t};\r\n\r\n\r\n\t\tthis.toBackground = function () {\r\n\t\t\treturn jsc.pub.background(this.toRGBAString());\r\n\t\t};\r\n\r\n\r\n\t\tthis.isLight = function () {\r\n\t\t\treturn this.toGrayscale() > 255 / 2;\r\n\t\t};\r\n\r\n\r\n\t\tthis.hide = function () {\r\n\t\t\tif (isPickerOwner()) {\r\n\t\t\t\tdetachPicker();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.show = function () {\r\n\t\t\tdrawPicker();\r\n\t\t};\r\n\r\n\r\n\t\tthis.redraw = function () {\r\n\t\t\tif (isPickerOwner()) {\r\n\t\t\t\tdrawPicker();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.getFormat = function () {\r\n\t\t\treturn this._currentFormat;\r\n\t\t};\r\n\r\n\r\n\t\tthis._setFormat = function (format) {\r\n\t\t\tthis._currentFormat = format.toLowerCase();\r\n\t\t};\r\n\r\n\r\n\t\tthis.hasAlphaChannel = function () {\r\n\t\t\tif (this.alphaChannel === 'auto') {\r\n\t\t\t\treturn (\r\n\t\t\t\t\tthis.format.toLowerCase() === 'any' || // format can change on the fly (e.g. from hex to rgba), so let's consider the alpha channel enabled\r\n\t\t\t\t\tjsc.isAlphaFormat(this.getFormat()) || // the current format supports alpha channel\r\n\t\t\t\t\tthis.alpha !== undefined || // initial alpha value is set, so we're working with alpha channel\r\n\t\t\t\t\tthis.alphaElement !== undefined // the alpha value is redirected, so we're working with alpha channel\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.alphaChannel; // the alpha channel is explicitly set\r\n\t\t};\r\n\r\n\r\n\t\tthis.processValueInput = function (str) {\r\n\t\t\tif (!this.fromString(str)) {\r\n\t\t\t\t// could not parse the color value - let's just expose the current color\r\n\t\t\t\tthis.exposeColor();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.processAlphaInput = function (str) {\r\n\t\t\tif (!this.fromHSVA(null, null, null, parseFloat(str))) {\r\n\t\t\t\t// could not parse the alpha value - let's just expose the current color\r\n\t\t\t\tthis.exposeColor();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.exposeColor = function (flags) {\r\n\t\t\tvar colorStr = this.toString();\r\n\t\t\tvar fmt = this.getFormat();\r\n\r\n\t\t\t// reflect current color in data- attribute\r\n\t\t\tjsc.setDataAttr(this.targetElement, 'current-color', colorStr);\r\n\r\n\t\t\tif (!(flags & jsc.flags.leaveValue) && this.valueElement) {\r\n\t\t\t\tif (fmt === 'hex' || fmt === 'hexa') {\r\n\t\t\t\t\tif (!this.uppercase) { colorStr = colorStr.toLowerCase(); }\r\n\t\t\t\t\tif (!this.hash) { colorStr = colorStr.replace(/^#/, ''); }\r\n\t\t\t\t}\r\n\t\t\t\tthis.setValueElementValue(colorStr);\r\n\t\t\t}\r\n\r\n\t\t\tif (!(flags & jsc.flags.leaveAlpha) && this.alphaElement) {\r\n\t\t\t\tvar alphaVal = Math.round(this.channels.a * 100) / 100;\r\n\t\t\t\tthis.setAlphaElementValue(alphaVal);\r\n\t\t\t}\r\n\r\n\t\t\tif (!(flags & jsc.flags.leavePreview) && this.previewElement) {\r\n\t\t\t\tvar previewPos = null; // 'left' | 'right' (null -> fill the entire element)\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\tjsc.isTextInput(this.previewElement) || // text input\r\n\t\t\t\t\t(jsc.isButton(this.previewElement) && !jsc.isButtonEmpty(this.previewElement)) // button with text\r\n\t\t\t\t) {\r\n\t\t\t\t\tpreviewPos = this.previewPosition;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.setPreviewElementBg(this.toRGBAString());\r\n\t\t\t}\r\n\r\n\t\t\tif (isPickerOwner()) {\r\n\t\t\t\tredrawPad();\r\n\t\t\t\tredrawSld();\r\n\t\t\t\tredrawASld();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.setPreviewElementBg = function (color) {\r\n\t\t\tif (!this.previewElement) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar position = null; // color preview position: null | 'left' | 'right'\r\n\t\t\tvar width = null; // color preview width: px | null = fill the entire element\r\n\t\t\tif (\r\n\t\t\t\tjsc.isTextInput(this.previewElement) || // text input\r\n\t\t\t\t(jsc.isButton(this.previewElement) && !jsc.isButtonEmpty(this.previewElement)) // button with text\r\n\t\t\t) {\r\n\t\t\t\tposition = this.previewPosition;\r\n\t\t\t\twidth = this.previewSize;\r\n\t\t\t}\r\n\r\n\t\t\tvar backgrounds = [];\r\n\r\n\t\t\tif (!color) {\r\n\t\t\t\t// there is no color preview to display -> let's remove any previous background image\r\n\t\t\t\tbackgrounds.push({\r\n\t\t\t\t\timage: 'none',\r\n\t\t\t\t\tposition: 'left top',\r\n\t\t\t\t\tsize: 'auto',\r\n\t\t\t\t\trepeat: 'no-repeat',\r\n\t\t\t\t\torigin: 'padding-box',\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\t// CSS gradient for background color preview\r\n\t\t\t\tbackgrounds.push({\r\n\t\t\t\t\timage: jsc.genColorPreviewGradient(\r\n\t\t\t\t\t\tcolor,\r\n\t\t\t\t\t\tposition,\r\n\t\t\t\t\t\twidth ? width - jsc.pub.previewSeparator.length : null\r\n\t\t\t\t\t),\r\n\t\t\t\t\tposition: 'left top',\r\n\t\t\t\t\tsize: 'auto',\r\n\t\t\t\t\trepeat: position ? 'repeat-y' : 'repeat',\r\n\t\t\t\t\torigin: 'padding-box',\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// data URL of generated PNG image with a gray transparency chessboard\r\n\t\t\t\tvar preview = jsc.genColorPreviewCanvas(\r\n\t\t\t\t\t'rgba(0,0,0,0)',\r\n\t\t\t\t\tposition ? {'left':'right', 'right':'left'}[position] : null,\r\n\t\t\t\t\twidth,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t\tbackgrounds.push({\r\n\t\t\t\t\timage: 'url(\\'' + preview.canvas.toDataURL() + '\\')',\r\n\t\t\t\t\tposition: (position || 'left') + ' top',\r\n\t\t\t\t\tsize: preview.width + 'px ' + preview.height + 'px',\r\n\t\t\t\t\trepeat: position ? 'repeat-y' : 'repeat',\r\n\t\t\t\t\torigin: 'padding-box',\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tvar bg = {\r\n\t\t\t\timage: [],\r\n\t\t\t\tposition: [],\r\n\t\t\t\tsize: [],\r\n\t\t\t\trepeat: [],\r\n\t\t\t\torigin: [],\r\n\t\t\t};\r\n\t\t\tfor (var i = 0; i < backgrounds.length; i += 1) {\r\n\t\t\t\tbg.image.push(backgrounds[i].image);\r\n\t\t\t\tbg.position.push(backgrounds[i].position);\r\n\t\t\t\tbg.size.push(backgrounds[i].size);\r\n\t\t\t\tbg.repeat.push(backgrounds[i].repeat);\r\n\t\t\t\tbg.origin.push(backgrounds[i].origin);\r\n\t\t\t}\r\n\r\n\t\t\t// set previewElement's background-images\r\n\t\t\tvar sty = {\r\n\t\t\t\t'background-image': bg.image.join(', '),\r\n\t\t\t\t'background-position': bg.position.join(', '),\r\n\t\t\t\t'background-size': bg.size.join(', '),\r\n\t\t\t\t'background-repeat': bg.repeat.join(', '),\r\n\t\t\t\t'background-origin': bg.origin.join(', '),\r\n\t\t\t};\r\n\t\t\tjsc.setStyle(this.previewElement, sty, this.forceStyle);\r\n\r\n\r\n\t\t\t// set/restore previewElement's padding\r\n\t\t\tvar padding = {\r\n\t\t\t\tleft: null,\r\n\t\t\t\tright: null,\r\n\t\t\t};\r\n\t\t\tif (position) {\r\n\t\t\t\tpadding[position] = (this.previewSize + this.previewPadding) + 'px';\r\n\t\t\t}\r\n\r\n\t\t\tvar sty = {\r\n\t\t\t\t'padding-left': padding.left,\r\n\t\t\t\t'padding-right': padding.right,\r\n\t\t\t};\r\n\t\t\tjsc.setStyle(this.previewElement, sty, this.forceStyle, true);\r\n\t\t};\r\n\r\n\r\n\t\tthis.setValueElementValue = function (str) {\r\n\t\t\tif (this.valueElement) {\r\n\t\t\t\tif (jsc.nodeName(this.valueElement) === 'input') {\r\n\t\t\t\t\tthis.valueElement.value = str;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.valueElement.innerHTML = str;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.setAlphaElementValue = function (str) {\r\n\t\t\tif (this.alphaElement) {\r\n\t\t\t\tif (jsc.nodeName(this.alphaElement) === 'input') {\r\n\t\t\t\t\tthis.alphaElement.value = str;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.alphaElement.innerHTML = str;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis._processParentElementsInDOM = function () {\r\n\t\t\tif (this._parentElementsProcessed) { return; }\r\n\t\t\tthis._parentElementsProcessed = true;\r\n\r\n\t\t\tvar elm = this.targetElement;\r\n\t\t\tdo {\r\n\t\t\t\t// If the target element or one of its parent nodes has fixed position,\r\n\t\t\t\t// then use fixed positioning instead\r\n\t\t\t\tvar compStyle = jsc.getCompStyle(elm);\r\n\t\t\t\tif (compStyle.position && compStyle.position.toLowerCase() === 'fixed') {\r\n\t\t\t\t\tthis.fixed = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (elm !== this.targetElement) {\r\n\t\t\t\t\t// Ensure to attach onParentScroll only once to each parent element\r\n\t\t\t\t\t// (multiple targetElements can share the same parent nodes)\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// Note: It's not just offsetParents that can be scrollable,\r\n\t\t\t\t\t// that's why we loop through all parent nodes\r\n\t\t\t\t\tif (!jsc.getData(elm, 'hasScrollListener')) {\r\n\t\t\t\t\t\telm.addEventListener('scroll', jsc.onParentScroll, false);\r\n\t\t\t\t\t\tjsc.setData(elm, 'hasScrollListener', true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} while ((elm = elm.parentNode) && jsc.nodeName(elm) !== 'body');\r\n\t\t};\r\n\r\n\r\n\t\tthis.tryHide = function () {\r\n\t\t\tif (this.hideOnLeave) {\r\n\t\t\t\tthis.hide();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.set__palette = function (val) {\r\n\t\t\tthis.palette = val;\r\n\t\t\tthis._palette = jsc.parsePaletteValue(val);\r\n\t\t\tthis._paletteHasTransparency = jsc.containsTranparentColor(this._palette);\r\n\t\t};\r\n\r\n\r\n\t\tfunction setOption (option, value) {\r\n\t\t\tif (typeof option !== 'string') {\r\n\t\t\t\tthrow new Error('Invalid value for option name: ' + option);\r\n\t\t\t}\r\n\r\n\t\t\t// enum option\r\n\t\t\tif (jsc.enumOpts.hasOwnProperty(option)) {\r\n\t\t\t\tif (typeof value === 'string') { // enum string values are case insensitive\r\n\t\t\t\t\tvalue = value.toLowerCase();\r\n\t\t\t\t}\r\n\t\t\t\tif (jsc.enumOpts[option].indexOf(value) === -1) {\r\n\t\t\t\t\tthrow new Error('Option \\'' + option + '\\' has invalid value: ' + value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// deprecated option\r\n\t\t\tif (jsc.deprecatedOpts.hasOwnProperty(option)) {\r\n\t\t\t\tvar oldOpt = option;\r\n\t\t\t\tvar newOpt = jsc.deprecatedOpts[option];\r\n\t\t\t\tif (newOpt) {\r\n\t\t\t\t\t// if we have a new name for this option, let's log a warning and use the new name\r\n\t\t\t\t\tconsole.warn('Option \\'%s\\' is DEPRECATED, using \\'%s\\' instead.' + jsc.docsRef, oldOpt, newOpt);\r\n\t\t\t\t\toption = newOpt;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// new name not available for the option\r\n\t\t\t\t\tthrow new Error('Option \\'' + option + '\\' is DEPRECATED');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar setter = 'set__' + option;\r\n\r\n\t\t\tif (typeof THIS[setter] === 'function') { // a setter exists for this option\r\n\t\t\t\tTHIS[setter](value);\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t} else if (option in THIS) { // option exists as a property\r\n\t\t\t\tTHIS[option] = value;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tthrow new Error('Unrecognized configuration option: ' + option);\r\n\t\t}\r\n\r\n\r\n\t\tfunction getOption (option) {\r\n\t\t\tif (typeof option !== 'string') {\r\n\t\t\t\tthrow new Error('Invalid value for option name: ' + option);\r\n\t\t\t}\r\n\r\n\t\t\t// deprecated option\r\n\t\t\tif (jsc.deprecatedOpts.hasOwnProperty(option)) {\r\n\t\t\t\tvar oldOpt = option;\r\n\t\t\t\tvar newOpt = jsc.deprecatedOpts[option];\r\n\t\t\t\tif (newOpt) {\r\n\t\t\t\t\t// if we have a new name for this option, let's log a warning and use the new name\r\n\t\t\t\t\tconsole.warn('Option \\'%s\\' is DEPRECATED, using \\'%s\\' instead.' + jsc.docsRef, oldOpt, newOpt);\r\n\t\t\t\t\toption = newOpt;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// new name not available for the option\r\n\t\t\t\t\tthrow new Error('Option \\'' + option + '\\' is DEPRECATED');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar getter = 'get__' + option;\r\n\r\n\t\t\tif (typeof THIS[getter] === 'function') { // a getter exists for this option\r\n\t\t\t\treturn THIS[getter](value);\r\n\r\n\t\t\t} else if (option in THIS) { // option exists as a property\r\n\t\t\t\treturn THIS[option];\r\n\t\t\t}\r\n\r\n\t\t\tthrow new Error('Unrecognized configuration option: ' + option);\r\n\t\t}\r\n\r\n\r\n\t\tfunction detachPicker () {\r\n\t\t\tjsc.removeClass(THIS.targetElement, jsc.pub.activeClassName);\r\n\t\t\tjsc.picker.wrap.parentNode.removeChild(jsc.picker.wrap);\r\n\t\t\tdelete jsc.picker.owner;\r\n\t\t}\r\n\r\n\r\n\t\tfunction drawPicker () {\r\n\r\n\t\t\t// At this point, when drawing the picker, we know what the parent elements are\r\n\t\t\t// and we can do all related DOM operations, such as registering events on them\r\n\t\t\t// or checking their positioning\r\n\t\t\tTHIS._processParentElementsInDOM();\r\n\r\n\t\t\tif (!jsc.picker) {\r\n\t\t\t\tjsc.picker = {\r\n\t\t\t\t\towner: null, // owner picker instance\r\n\t\t\t\t\twrap : jsc.createEl('div'),\r\n\t\t\t\t\tbox : jsc.createEl('div'),\r\n\t\t\t\t\tboxS : jsc.createEl('div'), // shadow area\r\n\t\t\t\t\tboxB : jsc.createEl('div'), // border\r\n\t\t\t\t\tpad : jsc.createEl('div'),\r\n\t\t\t\t\tpadB : jsc.createEl('div'), // border\r\n\t\t\t\t\tpadM : jsc.createEl('div'), // mouse/touch area\r\n\t\t\t\t\tpadCanvas : jsc.createPadCanvas(),\r\n\t\t\t\t\tcross : jsc.createEl('div'),\r\n\t\t\t\t\tcrossBY : jsc.createEl('div'), // border Y\r\n\t\t\t\t\tcrossBX : jsc.createEl('div'), // border X\r\n\t\t\t\t\tcrossLY : jsc.createEl('div'), // line Y\r\n\t\t\t\t\tcrossLX : jsc.createEl('div'), // line X\r\n\t\t\t\t\tsld : jsc.createEl('div'), // slider\r\n\t\t\t\t\tsldB : jsc.createEl('div'), // border\r\n\t\t\t\t\tsldM : jsc.createEl('div'), // mouse/touch area\r\n\t\t\t\t\tsldGrad : jsc.createSliderGradient(),\r\n\t\t\t\t\tsldPtrS : jsc.createEl('div'), // slider pointer spacer\r\n\t\t\t\t\tsldPtrIB : jsc.createEl('div'), // slider pointer inner border\r\n\t\t\t\t\tsldPtrMB : jsc.createEl('div'), // slider pointer middle border\r\n\t\t\t\t\tsldPtrOB : jsc.createEl('div'), // slider pointer outer border\r\n\t\t\t\t\tasld : jsc.createEl('div'), // alpha slider\r\n\t\t\t\t\tasldB : jsc.createEl('div'), // border\r\n\t\t\t\t\tasldM : jsc.createEl('div'), // mouse/touch area\r\n\t\t\t\t\tasldGrad : jsc.createASliderGradient(),\r\n\t\t\t\t\tasldPtrS : jsc.createEl('div'), // slider pointer spacer\r\n\t\t\t\t\tasldPtrIB : jsc.createEl('div'), // slider pointer inner border\r\n\t\t\t\t\tasldPtrMB : jsc.createEl('div'), // slider pointer middle border\r\n\t\t\t\t\tasldPtrOB : jsc.createEl('div'), // slider pointer outer border\r\n\t\t\t\t\tpal : jsc.createEl('div'), // palette\r\n\t\t\t\t\tbtn : jsc.createEl('div'),\r\n\t\t\t\t\tbtnT : jsc.createEl('span'), // text\r\n\t\t\t\t};\r\n\r\n\t\t\t\tjsc.picker.pad.appendChild(jsc.picker.padCanvas.elm);\r\n\t\t\t\tjsc.picker.padB.appendChild(jsc.picker.pad);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossBY);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossBX);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossLY);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossLX);\r\n\t\t\t\tjsc.picker.padB.appendChild(jsc.picker.cross);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.padB);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.padM);\r\n\r\n\t\t\t\tjsc.picker.sld.appendChild(jsc.picker.sldGrad.elm);\r\n\t\t\t\tjsc.picker.sldB.appendChild(jsc.picker.sld);\r\n\t\t\t\tjsc.picker.sldB.appendChild(jsc.picker.sldPtrOB);\r\n\t\t\t\tjsc.picker.sldPtrOB.appendChild(jsc.picker.sldPtrMB);\r\n\t\t\t\tjsc.picker.sldPtrMB.appendChild(jsc.picker.sldPtrIB);\r\n\t\t\t\tjsc.picker.sldPtrIB.appendChild(jsc.picker.sldPtrS);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.sldB);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.sldM);\r\n\r\n\t\t\t\tjsc.picker.asld.appendChild(jsc.picker.asldGrad.elm);\r\n\t\t\t\tjsc.picker.asldB.appendChild(jsc.picker.asld);\r\n\t\t\t\tjsc.picker.asldB.appendChild(jsc.picker.asldPtrOB);\r\n\t\t\t\tjsc.picker.asldPtrOB.appendChild(jsc.picker.asldPtrMB);\r\n\t\t\t\tjsc.picker.asldPtrMB.appendChild(jsc.picker.asldPtrIB);\r\n\t\t\t\tjsc.picker.asldPtrIB.appendChild(jsc.picker.asldPtrS);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.asldB);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.asldM);\r\n\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.pal);\r\n\r\n\t\t\t\tjsc.picker.btn.appendChild(jsc.picker.btnT);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.btn);\r\n\r\n\t\t\t\tjsc.picker.boxB.appendChild(jsc.picker.box);\r\n\t\t\t\tjsc.picker.wrap.appendChild(jsc.picker.boxS);\r\n\t\t\t\tjsc.picker.wrap.appendChild(jsc.picker.boxB);\r\n\r\n\t\t\t\tjsc.picker.wrap.addEventListener('touchstart', jsc.onPickerTouchStart,\r\n\t\t\t\t\tjsc.isPassiveEventSupported ? {passive: false} : false);\r\n\t\t\t}\r\n\r\n\t\t\tvar p = jsc.picker;\r\n\r\n\t\t\tvar displaySlider = !!jsc.getSliderChannel(THIS);\r\n\t\t\tvar displayAlphaSlider = THIS.hasAlphaChannel();\r\n\t\t\tvar pickerDims = jsc.getPickerDims(THIS);\r\n\t\t\tvar crossOuterSize = (2 * THIS.pointerBorderWidth + THIS.pointerThickness + 2 * THIS.crossSize);\r\n\t\t\tvar controlPadding = jsc.getControlPadding(THIS);\r\n\t\t\tvar borderRadius = Math.min(\r\n\t\t\t\tTHIS.borderRadius,\r\n\t\t\t\tMath.round(THIS.padding * Math.PI)); // px\r\n\t\t\tvar padCursor = 'crosshair';\r\n\r\n\t\t\t// wrap\r\n\t\t\tp.wrap.className = 'jscolor-picker-wrap';\r\n\t\t\tp.wrap.style.clear = 'both';\r\n\t\t\tp.wrap.style.width = pickerDims.borderW + 'px';\r\n\t\t\tp.wrap.style.height = pickerDims.borderH + 'px';\r\n\t\t\tp.wrap.style.zIndex = THIS.zIndex;\r\n\r\n\t\t\t// picker\r\n\t\t\tp.box.className = 'jscolor-picker';\r\n\t\t\tp.box.style.width = pickerDims.paddedW + 'px';\r\n\t\t\tp.box.style.height = pickerDims.paddedH + 'px';\r\n\t\t\tp.box.style.position = 'relative';\r\n\r\n\t\t\t// picker shadow\r\n\t\t\tp.boxS.className = 'jscolor-picker-shadow';\r\n\t\t\tp.boxS.style.position = 'absolute';\r\n\t\t\tp.boxS.style.left = '0';\r\n\t\t\tp.boxS.style.top = '0';\r\n\t\t\tp.boxS.style.width = '100%';\r\n\t\t\tp.boxS.style.height = '100%';\r\n\t\t\tjsc.setBorderRadius(p.boxS, borderRadius + 'px');\r\n\r\n\t\t\t// picker border\r\n\t\t\tp.boxB.className = 'jscolor-picker-border';\r\n\t\t\tp.boxB.style.position = 'relative';\r\n\t\t\tp.boxB.style.border = THIS.borderWidth + 'px solid';\r\n\t\t\tp.boxB.style.borderColor = THIS.borderColor;\r\n\t\t\tp.boxB.style.background = THIS.backgroundColor;\r\n\t\t\tjsc.setBorderRadius(p.boxB, borderRadius + 'px');\r\n\r\n\t\t\t// IE hack:\r\n\t\t\t// If the element is transparent, IE will trigger the event on the elements under it,\r\n\t\t\t// e.g. on Canvas or on elements with border\r\n\t\t\tp.padM.style.background = 'rgba(255,0,0,.2)';\r\n\t\t\tp.sldM.style.background = 'rgba(0,255,0,.2)';\r\n\t\t\tp.asldM.style.background = 'rgba(0,0,255,.2)';\r\n\r\n\t\t\tp.padM.style.opacity =\r\n\t\t\tp.sldM.style.opacity =\r\n\t\t\tp.asldM.style.opacity =\r\n\t\t\t\t'0';\r\n\r\n\t\t\t// pad\r\n\t\t\tp.pad.style.position = 'relative';\r\n\t\t\tp.pad.style.width = THIS.width + 'px';\r\n\t\t\tp.pad.style.height = THIS.height + 'px';\r\n\r\n\t\t\t// pad - color spectrum (HSV and HVS)\r\n\t\t\tp.padCanvas.draw(THIS.width, THIS.height, jsc.getPadYChannel(THIS));\r\n\r\n\t\t\t// pad border\r\n\t\t\tp.padB.style.position = 'absolute';\r\n\t\t\tp.padB.style.left = THIS.padding + 'px';\r\n\t\t\tp.padB.style.top = THIS.padding + 'px';\r\n\t\t\tp.padB.style.border = THIS.controlBorderWidth + 'px solid';\r\n\t\t\tp.padB.style.borderColor = THIS.controlBorderColor;\r\n\r\n\t\t\t// pad mouse area\r\n\t\t\tp.padM.style.position = 'absolute';\r\n\t\t\tp.padM.style.left = 0 + 'px';\r\n\t\t\tp.padM.style.top = 0 + 'px';\r\n\t\t\tp.padM.style.width = (THIS.padding + 2 * THIS.controlBorderWidth + THIS.width + controlPadding) + 'px';\r\n\t\t\tp.padM.style.height = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';\r\n\t\t\tp.padM.style.cursor = padCursor;\r\n\t\t\tjsc.setData(p.padM, {\r\n\t\t\t\tinstance: THIS,\r\n\t\t\t\tcontrol: 'pad',\r\n\t\t\t})\r\n\r\n\t\t\t// pad cross\r\n\t\t\tp.cross.style.position = 'absolute';\r\n\t\t\tp.cross.style.left =\r\n\t\t\tp.cross.style.top =\r\n\t\t\t\t'0';\r\n\t\t\tp.cross.style.width =\r\n\t\t\tp.cross.style.height =\r\n\t\t\t\tcrossOuterSize + 'px';\r\n\r\n\t\t\t// pad cross border Y and X\r\n\t\t\tp.crossBY.style.position =\r\n\t\t\tp.crossBX.style.position =\r\n\t\t\t\t'absolute';\r\n\t\t\tp.crossBY.style.background =\r\n\t\t\tp.crossBX.style.background =\r\n\t\t\t\tTHIS.pointerBorderColor;\r\n\t\t\tp.crossBY.style.width =\r\n\t\t\tp.crossBX.style.height =\r\n\t\t\t\t(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';\r\n\t\t\tp.crossBY.style.height =\r\n\t\t\tp.crossBX.style.width =\r\n\t\t\t\tcrossOuterSize + 'px';\r\n\t\t\tp.crossBY.style.left =\r\n\t\t\tp.crossBX.style.top =\r\n\t\t\t\t(Math.floor(crossOuterSize / 2) - Math.floor(THIS.pointerThickness / 2) - THIS.pointerBorderWidth) + 'px';\r\n\t\t\tp.crossBY.style.top =\r\n\t\t\tp.crossBX.style.left =\r\n\t\t\t\t'0';\r\n\r\n\t\t\t// pad cross line Y and X\r\n\t\t\tp.crossLY.style.position =\r\n\t\t\tp.crossLX.style.position =\r\n\t\t\t\t'absolute';\r\n\t\t\tp.crossLY.style.background =\r\n\t\t\tp.crossLX.style.background =\r\n\t\t\t\tTHIS.pointerColor;\r\n\t\t\tp.crossLY.style.height =\r\n\t\t\tp.crossLX.style.width =\r\n\t\t\t\t(crossOuterSize - 2 * THIS.pointerBorderWidth) + 'px';\r\n\t\t\tp.crossLY.style.width =\r\n\t\t\tp.crossLX.style.height =\r\n\t\t\t\tTHIS.pointerThickness + 'px';\r\n\t\t\tp.crossLY.style.left =\r\n\t\t\tp.crossLX.style.top =\r\n\t\t\t\t(Math.floor(crossOuterSize / 2) - Math.floor(THIS.pointerThickness / 2)) + 'px';\r\n\t\t\tp.crossLY.style.top =\r\n\t\t\tp.crossLX.style.left =\r\n\t\t\t\tTHIS.pointerBorderWidth + 'px';\r\n\r\n\r\n\t\t\t// slider\r\n\t\t\tp.sld.style.overflow = 'hidden';\r\n\t\t\tp.sld.style.width = THIS.sliderSize + 'px';\r\n\t\t\tp.sld.style.height = THIS.height + 'px';\r\n\r\n\t\t\t// slider gradient\r\n\t\t\tp.sldGrad.draw(THIS.sliderSize, THIS.height, '#000', '#000');\r\n\r\n\t\t\t// slider border\r\n\t\t\tp.sldB.style.display = displaySlider ? 'block' : 'none';\r\n\t\t\tp.sldB.style.position = 'absolute';\r\n\t\t\tp.sldB.style.left = (THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + 2 * controlPadding) + 'px';\r\n\t\t\tp.sldB.style.top = THIS.padding + 'px';\r\n\t\t\tp.sldB.style.border = THIS.controlBorderWidth + 'px solid';\r\n\t\t\tp.sldB.style.borderColor = THIS.controlBorderColor;\r\n\r\n\t\t\t// slider mouse area\r\n\t\t\tp.sldM.style.display = displaySlider ? 'block' : 'none';\r\n\t\t\tp.sldM.style.position = 'absolute';\r\n\t\t\tp.sldM.style.left = (THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + controlPadding) + 'px';\r\n\t\t\tp.sldM.style.top = 0 + 'px';\r\n\t\t\tp.sldM.style.width = (\r\n\t\t\t\t\t(THIS.sliderSize + 2 * controlPadding + 2 * THIS.controlBorderWidth) +\r\n\t\t\t\t\t(displayAlphaSlider ? 0 : Math.max(0, THIS.padding - controlPadding)) // remaining padding to the right edge\r\n\t\t\t\t) + 'px';\r\n\t\t\tp.sldM.style.height = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';\r\n\t\t\tp.sldM.style.cursor = 'default';\r\n\t\t\tjsc.setData(p.sldM, {\r\n\t\t\t\tinstance: THIS,\r\n\t\t\t\tcontrol: 'sld',\r\n\t\t\t});\r\n\r\n\t\t\t// slider pointer inner and outer border\r\n\t\t\tp.sldPtrIB.style.border =\r\n\t\t\tp.sldPtrOB.style.border =\r\n\t\t\t\tTHIS.pointerBorderWidth + 'px solid ' + THIS.pointerBorderColor;\r\n\r\n\t\t\t// slider pointer outer border\r\n\t\t\tp.sldPtrOB.style.position = 'absolute';\r\n\t\t\tp.sldPtrOB.style.left = -(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';\r\n\t\t\tp.sldPtrOB.style.top = '0';\r\n\r\n\t\t\t// slider pointer middle border\r\n\t\t\tp.sldPtrMB.style.border = THIS.pointerThickness + 'px solid ' + THIS.pointerColor;\r\n\r\n\t\t\t// slider pointer spacer\r\n\t\t\tp.sldPtrS.style.width = THIS.sliderSize + 'px';\r\n\t\t\tp.sldPtrS.style.height = jsc.pub.sliderInnerSpace + 'px';\r\n\r\n\r\n\t\t\t// alpha slider\r\n\t\t\tp.asld.style.overflow = 'hidden';\r\n\t\t\tp.asld.style.width = THIS.sliderSize + 'px';\r\n\t\t\tp.asld.style.height = THIS.height + 'px';\r\n\r\n\t\t\t// alpha slider gradient\r\n\t\t\tp.asldGrad.draw(THIS.sliderSize, THIS.height, '#000');\r\n\r\n\t\t\t// alpha slider border\r\n\t\t\tp.asldB.style.display = displayAlphaSlider ? 'block' : 'none';\r\n\t\t\tp.asldB.style.position = 'absolute';\r\n\t\t\tp.asldB.style.left = (\r\n\t\t\t\t\t(THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + controlPadding) +\r\n\t\t\t\t\t(displaySlider ? (THIS.sliderSize + 3 * controlPadding + 2 * THIS.controlBorderWidth) : 0)\r\n\t\t\t\t) + 'px';\r\n\t\t\tp.asldB.style.top = THIS.padding + 'px';\r\n\t\t\tp.asldB.style.border = THIS.controlBorderWidth + 'px solid';\r\n\t\t\tp.asldB.style.borderColor = THIS.controlBorderColor;\r\n\r\n\t\t\t// alpha slider mouse area\r\n\t\t\tp.asldM.style.display = displayAlphaSlider ? 'block' : 'none';\r\n\t\t\tp.asldM.style.position = 'absolute';\r\n\t\t\tp.asldM.style.left = (\r\n\t\t\t\t\t(THIS.padding + THIS.width + 2 * THIS.controlBorderWidth + controlPadding) +\r\n\t\t\t\t\t(displaySlider ? (THIS.sliderSize + 2 * controlPadding + 2 * THIS.controlBorderWidth) : 0)\r\n\t\t\t\t) + 'px';\r\n\t\t\tp.asldM.style.top = 0 + 'px';\r\n\t\t\tp.asldM.style.width = (\r\n\t\t\t\t\t(THIS.sliderSize + 2 * controlPadding + 2 * THIS.controlBorderWidth) +\r\n\t\t\t\t\tMath.max(0, THIS.padding - controlPadding) // remaining padding to the right edge\r\n\t\t\t\t) + 'px';\r\n\t\t\tp.asldM.style.height = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';\r\n\t\t\tp.asldM.style.cursor = 'default';\r\n\t\t\tjsc.setData(p.asldM, {\r\n\t\t\t\tinstance: THIS,\r\n\t\t\t\tcontrol: 'asld',\r\n\t\t\t})\r\n\r\n\t\t\t// alpha slider pointer inner and outer border\r\n\t\t\tp.asldPtrIB.style.border =\r\n\t\t\tp.asldPtrOB.style.border =\r\n\t\t\t\tTHIS.pointerBorderWidth + 'px solid ' + THIS.pointerBorderColor;\r\n\r\n\t\t\t// alpha slider pointer outer border\r\n\t\t\tp.asldPtrOB.style.position = 'absolute';\r\n\t\t\tp.asldPtrOB.style.left = -(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';\r\n\t\t\tp.asldPtrOB.style.top = '0';\r\n\r\n\t\t\t// alpha slider pointer middle border\r\n\t\t\tp.asldPtrMB.style.border = THIS.pointerThickness + 'px solid ' + THIS.pointerColor;\r\n\r\n\t\t\t// alpha slider pointer spacer\r\n\t\t\tp.asldPtrS.style.width = THIS.sliderSize + 'px';\r\n\t\t\tp.asldPtrS.style.height = jsc.pub.sliderInnerSpace + 'px';\r\n\r\n\r\n\t\t\t// palette\r\n\t\t\tp.pal.className = 'jscolor-palette';\r\n\t\t\tp.pal.style.display = pickerDims.palette.rows ? 'block' : 'none';\r\n\t\t\tp.pal.style.position = 'absolute';\r\n\t\t\tp.pal.style.left = THIS.padding + 'px';\r\n\t\t\tp.pal.style.top = (2 * THIS.controlBorderWidth + 2 * THIS.padding + THIS.height) + 'px';\r\n\r\n\t\t\t// palette's color samples\r\n\r\n\t\t\tp.pal.innerHTML = '';\r\n\r\n\t\t\tvar chessboard = jsc.genColorPreviewCanvas('rgba(0,0,0,0)');\r\n\r\n\t\t\tvar si = 0; // color sample's index\r\n\t\t\tfor (var r = 0; r < pickerDims.palette.rows; r++) {\r\n\t\t\t\tfor (var c = 0; c < pickerDims.palette.cols && si < THIS._palette.length; c++, si++) {\r\n\t\t\t\t\tvar sampleColor = THIS._palette[si];\r\n\t\t\t\t\tvar sampleCssColor = jsc.rgbaColor.apply(null, sampleColor.rgba);\r\n\r\n\t\t\t\t\tvar sc = jsc.createEl('div'); // color sample's color\r\n\t\t\t\t\tsc.style.width = (pickerDims.palette.cellW - 2 * THIS.controlBorderWidth) + 'px';\r\n\t\t\t\t\tsc.style.height = (pickerDims.palette.cellH - 2 * THIS.controlBorderWidth) + 'px';\r\n\t\t\t\t\tsc.style.backgroundColor = sampleCssColor;\r\n\r\n\t\t\t\t\tvar sw = jsc.createEl('div'); // color sample's wrap\r\n\t\t\t\t\tsw.className = 'jscolor-palette-sample';\r\n\t\t\t\t\tsw.style.display = 'block';\r\n\t\t\t\t\tsw.style.position = 'absolute';\r\n\t\t\t\t\tsw.style.left = (\r\n\t\t\t\t\t\t\tpickerDims.palette.cols <= 1 ? 0 :\r\n\t\t\t\t\t\t\tMath.round(10 * (c * ((pickerDims.contentW - pickerDims.palette.cellW) / (pickerDims.palette.cols - 1)))) / 10\r\n\t\t\t\t\t\t) + 'px';\r\n\t\t\t\t\tsw.style.top = (r * (pickerDims.palette.cellH + THIS.paletteSpacing)) + 'px';\r\n\t\t\t\t\tsw.style.border = THIS.controlBorderWidth + 'px solid';\r\n\t\t\t\t\tsw.style.borderColor = THIS.controlBorderColor;\r\n\t\t\t\t\tsw.style.cursor = 'pointer';\r\n\t\t\t\t\tif (sampleColor.rgba[3] !== null && sampleColor.rgba[3] < 1.0) { // only create chessboard background if the sample has transparency\r\n\t\t\t\t\t\tsw.style.backgroundImage = 'url(\\'' + chessboard.canvas.toDataURL() + '\\')';\r\n\t\t\t\t\t\tsw.style.backgroundRepeat = 'repeat';\r\n\t\t\t\t\t\tsw.style.backgroundPosition = 'center center';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjsc.setData(sw, {\r\n\t\t\t\t\t\tinstance: THIS,\r\n\t\t\t\t\t\tcontrol: 'palette-sample',\r\n\t\t\t\t\t\tcolor: sampleColor,\r\n\t\t\t\t\t})\r\n\t\t\t\t\tsw.addEventListener('click', jsc.onPaletteSampleClick, false);\r\n\t\t\t\t\tsw.appendChild(sc);\r\n\t\t\t\t\tp.pal.appendChild(sw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t// the Close button\r\n\t\t\tfunction setBtnBorder () {\r\n\t\t\t\tvar insetColors = THIS.controlBorderColor.split(/\\s+/);\r\n\t\t\t\tvar outsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];\r\n\t\t\t\tp.btn.style.borderColor = outsetColor;\r\n\t\t\t}\r\n\t\t\tvar btnPadding = 15; // px\r\n\t\t\tp.btn.className = 'jscolor-btn-close';\r\n\t\t\tp.btn.style.display = THIS.closeButton ? 'block' : 'none';\r\n\t\t\tp.btn.style.position = 'absolute';\r\n\t\t\tp.btn.style.left = THIS.padding + 'px';\r\n\t\t\tp.btn.style.bottom = THIS.padding + 'px';\r\n\t\t\tp.btn.style.padding = '0 ' + btnPadding + 'px';\r\n\t\t\tp.btn.style.maxWidth = (pickerDims.contentW - 2 * THIS.controlBorderWidth - 2 * btnPadding) + 'px';\r\n\t\t\tp.btn.style.overflow = 'hidden';\r\n\t\t\tp.btn.style.height = THIS.buttonHeight + 'px';\r\n\t\t\tp.btn.style.whiteSpace = 'nowrap';\r\n\t\t\tp.btn.style.border = THIS.controlBorderWidth + 'px solid';\r\n\t\t\tsetBtnBorder();\r\n\t\t\tp.btn.style.color = THIS.buttonColor;\r\n\t\t\tp.btn.style.font = '12px sans-serif';\r\n\t\t\tp.btn.style.textAlign = 'center';\r\n\t\t\tp.btn.style.cursor = 'pointer';\r\n\t\t\tp.btn.onmousedown = function () {\r\n\t\t\t\tTHIS.hide();\r\n\t\t\t};\r\n\t\t\tp.btnT.style.lineHeight = THIS.buttonHeight + 'px';\r\n\t\t\tp.btnT.innerHTML = '';\r\n\t\t\tp.btnT.appendChild(window.document.createTextNode(THIS.closeText));\r\n\r\n\t\t\t// reposition the pointers\r\n\t\t\tredrawPad();\r\n\t\t\tredrawSld();\r\n\t\t\tredrawASld();\r\n\r\n\t\t\t// If we are changing the owner without first closing the picker,\r\n\t\t\t// make sure to first deal with the old owner\r\n\t\t\tif (jsc.picker.owner && jsc.picker.owner !== THIS) {\r\n\t\t\t\tjsc.removeClass(jsc.picker.owner.targetElement, jsc.pub.activeClassName);\r\n\t\t\t}\r\n\r\n\t\t\t// Set a new picker owner\r\n\t\t\tjsc.picker.owner = THIS;\r\n\r\n\t\t\t// The redrawPosition() method needs picker.owner to be set, that's why we call it here,\r\n\t\t\t// after setting the owner\r\n\t\t\tif (THIS.container === window.document.body) {\r\n\t\t\t\tjsc.redrawPosition();\r\n\t\t\t} else {\r\n\t\t\t\tjsc._drawPosition(THIS, 0, 0, 'relative', false);\r\n\t\t\t}\r\n\r\n\t\t\tif (p.wrap.parentNode !== THIS.container) {\r\n\t\t\t\tTHIS.container.appendChild(p.wrap);\r\n\t\t\t}\r\n\r\n\t\t\tjsc.addClass(THIS.targetElement, jsc.pub.activeClassName);\r\n\t\t}\r\n\r\n\r\n\t\tfunction redrawPad () {\r\n\t\t\t// redraw the pad pointer\r\n\t\t\tvar yChannel = jsc.getPadYChannel(THIS);\r\n\t\t\tvar x = Math.round((THIS.channels.h / 360) * (THIS.width - 1));\r\n\t\t\tvar y = Math.round((1 - THIS.channels[yChannel] / 100) * (THIS.height - 1));\r\n\t\t\tvar crossOuterSize = (2 * THIS.pointerBorderWidth + THIS.pointerThickness + 2 * THIS.crossSize);\r\n\t\t\tvar ofs = -Math.floor(crossOuterSize / 2);\r\n\t\t\tjsc.picker.cross.style.left = (x + ofs) + 'px';\r\n\t\t\tjsc.picker.cross.style.top = (y + ofs) + 'px';\r\n\r\n\t\t\t// redraw the slider\r\n\t\t\tswitch (jsc.getSliderChannel(THIS)) {\r\n\t\t\tcase 's':\r\n\t\t\t\tvar rgb1 = jsc.HSV_RGB(THIS.channels.h, 100, THIS.channels.v);\r\n\t\t\t\tvar rgb2 = jsc.HSV_RGB(THIS.channels.h, 0, THIS.channels.v);\r\n\t\t\t\tvar color1 = 'rgb(' +\r\n\t\t\t\t\tMath.round(rgb1[0]) + ',' +\r\n\t\t\t\t\tMath.round(rgb1[1]) + ',' +\r\n\t\t\t\t\tMath.round(rgb1[2]) + ')';\r\n\t\t\t\tvar color2 = 'rgb(' +\r\n\t\t\t\t\tMath.round(rgb2[0]) + ',' +\r\n\t\t\t\t\tMath.round(rgb2[1]) + ',' +\r\n\t\t\t\t\tMath.round(rgb2[2]) + ')';\r\n\t\t\t\tjsc.picker.sldGrad.draw(THIS.sliderSize, THIS.height, color1, color2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'v':\r\n\t\t\t\tvar rgb = jsc.HSV_RGB(THIS.channels.h, THIS.channels.s, 100);\r\n\t\t\t\tvar color1 = 'rgb(' +\r\n\t\t\t\t\tMath.round(rgb[0]) + ',' +\r\n\t\t\t\t\tMath.round(rgb[1]) + ',' +\r\n\t\t\t\t\tMath.round(rgb[2]) + ')';\r\n\t\t\t\tvar color2 = '#000';\r\n\t\t\t\tjsc.picker.sldGrad.draw(THIS.sliderSize, THIS.height, color1, color2);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// redraw the alpha slider\r\n\t\t\tjsc.picker.asldGrad.draw(THIS.sliderSize, THIS.height, THIS.toHEXString());\r\n\t\t}\r\n\r\n\r\n\t\tfunction redrawSld () {\r\n\t\t\tvar sldChannel = jsc.getSliderChannel(THIS);\r\n\t\t\tif (sldChannel) {\r\n\t\t\t\t// redraw the slider pointer\r\n\t\t\t\tvar y = Math.round((1 - THIS.channels[sldChannel] / 100) * (THIS.height - 1));\r\n\t\t\t\tjsc.picker.sldPtrOB.style.top = (y - (2 * THIS.pointerBorderWidth + THIS.pointerThickness) - Math.floor(jsc.pub.sliderInnerSpace / 2)) + 'px';\r\n\t\t\t}\r\n\r\n\t\t\t// redraw the alpha slider\r\n\t\t\tjsc.picker.asldGrad.draw(THIS.sliderSize, THIS.height, THIS.toHEXString());\r\n\t\t}\r\n\r\n\r\n\t\tfunction redrawASld () {\r\n\t\t\tvar y = Math.round((1 - THIS.channels.a) * (THIS.height - 1));\r\n\t\t\tjsc.picker.asldPtrOB.style.top = (y - (2 * THIS.pointerBorderWidth + THIS.pointerThickness) - Math.floor(jsc.pub.sliderInnerSpace / 2)) + 'px';\r\n\t\t}\r\n\r\n\r\n\t\tfunction isPickerOwner () {\r\n\t\t\treturn jsc.picker && jsc.picker.owner === THIS;\r\n\t\t}\r\n\r\n\r\n\t\tfunction onValueKeyDown (ev) {\r\n\t\t\tif (jsc.eventKey(ev) === 'Enter') {\r\n\t\t\t\tif (THIS.valueElement) {\r\n\t\t\t\t\tTHIS.processValueInput(THIS.valueElement.value);\r\n\t\t\t\t}\r\n\t\t\t\tTHIS.tryHide();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfunction onAlphaKeyDown (ev) {\r\n\t\t\tif (jsc.eventKey(ev) === 'Enter') {\r\n\t\t\t\tif (THIS.alphaElement) {\r\n\t\t\t\t\tTHIS.processAlphaInput(THIS.alphaElement.value);\r\n\t\t\t\t}\r\n\t\t\t\tTHIS.tryHide();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfunction onValueChange (ev) {\r\n\t\t\tif (jsc.getData(ev, 'internal')) {\r\n\t\t\t\treturn; // skip if the event was internally triggered by jscolor\r\n\t\t\t}\r\n\r\n\t\t\tvar oldVal = THIS.valueElement.value;\r\n\r\n\t\t\tTHIS.processValueInput(THIS.valueElement.value); // this might change the value\r\n\r\n\t\t\tjsc.triggerCallback(THIS, 'onChange');\r\n\r\n\t\t\tif (THIS.valueElement.value !== oldVal) {\r\n\t\t\t\t// value was additionally changed -> let's trigger the change event again, even though it was natively dispatched\r\n\t\t\t\tjsc.triggerInputEvent(THIS.valueElement, 'change', true, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfunction onAlphaChange (ev) {\r\n\t\t\tif (jsc.getData(ev, 'internal')) {\r\n\t\t\t\treturn; // skip if the event was internally triggered by jscolor\r\n\t\t\t}\r\n\r\n\t\t\tvar oldVal = THIS.alphaElement.value;\r\n\r\n\t\t\tTHIS.processAlphaInput(THIS.alphaElement.value); // this might change the value\r\n\r\n\t\t\tjsc.triggerCallback(THIS, 'onChange');\r\n\r\n\t\t\t// triggering valueElement's onChange (because changing alpha changes the entire color, e.g. with rgba format)\r\n\t\t\tjsc.triggerInputEvent(THIS.valueElement, 'change', true, true);\r\n\r\n\t\t\tif (THIS.alphaElement.value !== oldVal) {\r\n\t\t\t\t// value was additionally changed -> let's trigger the change event again, even though it was natively dispatched\r\n\t\t\t\tjsc.triggerInputEvent(THIS.alphaElement, 'change', true, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfunction onValueInput (ev) {\r\n\t\t\tif (jsc.getData(ev, 'internal')) {\r\n\t\t\t\treturn; // skip if the event was internally triggered by jscolor\r\n\t\t\t}\r\n\r\n\t\t\tif (THIS.valueElement) {\r\n\t\t\t\tTHIS.fromString(THIS.valueElement.value, jsc.flags.leaveValue);\r\n\t\t\t}\r\n\r\n\t\t\tjsc.triggerCallback(THIS, 'onInput');\r\n\r\n\t\t\t// triggering valueElement's onInput\r\n\t\t\t// (not needed, it was dispatched normally by the browser)\r\n\t\t}\r\n\r\n\r\n\t\tfunction onAlphaInput (ev) {\r\n\t\t\tif (jsc.getData(ev, 'internal')) {\r\n\t\t\t\treturn; // skip if the event was internally triggered by jscolor\r\n\t\t\t}\r\n\r\n\t\t\tif (THIS.alphaElement) {\r\n\t\t\t\tTHIS.fromHSVA(null, null, null, parseFloat(THIS.alphaElement.value), jsc.flags.leaveAlpha);\r\n\t\t\t}\r\n\r\n\t\t\tjsc.triggerCallback(THIS, 'onInput');\r\n\r\n\t\t\t// triggering valueElement's onInput (because changing alpha changes the entire color, e.g. with rgba format)\r\n\t\t\tjsc.triggerInputEvent(THIS.valueElement, 'input', true, true);\r\n\t\t}\r\n\r\n\r\n\t\t// let's process the DEPRECATED 'options' property (this will be later removed)\r\n\t\tif (jsc.pub.options) {\r\n\t\t\t// let's set custom default options, if specified\r\n\t\t\tfor (var opt in jsc.pub.options) {\r\n\t\t\t\tif (jsc.pub.options.hasOwnProperty(opt)) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsetOption(opt, jsc.pub.options[opt]);\r\n\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\tconsole.warn(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t// let's apply configuration presets\r\n\t\t//\r\n\t\tvar presetsArr = [];\r\n\r\n\t\tif (opts.preset) {\r\n\t\t\tif (typeof opts.preset === 'string') {\r\n\t\t\t\tpresetsArr = opts.preset.split(/\\s+/);\r\n\t\t\t} else if (Array.isArray(opts.preset)) {\r\n\t\t\t\tpresetsArr = opts.preset.slice(); // slice() to clone\r\n\t\t\t} else {\r\n\t\t\t\tconsole.warn('Unrecognized preset value');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// always use the 'default' preset. If it's not listed, append it to the end.\r\n\t\tif (presetsArr.indexOf('default') === -1) {\r\n\t\t\tpresetsArr.push('default');\r\n\t\t}\r\n\r\n\t\t// let's apply the presets in reverse order, so that should there be any overlapping options,\r\n\t\t// the formerly listed preset will override the latter\r\n\t\tfor (var i = presetsArr.length - 1; i >= 0; i -= 1) {\r\n\t\t\tvar pres = presetsArr[i];\r\n\t\t\tif (!pres) {\r\n\t\t\t\tcontinue; // preset is empty string\r\n\t\t\t}\r\n\t\t\tif (!jsc.pub.presets.hasOwnProperty(pres)) {\r\n\t\t\t\tconsole.warn('Unknown preset: %s', pres);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (var opt in jsc.pub.presets[pres]) {\r\n\t\t\t\tif (jsc.pub.presets[pres].hasOwnProperty(opt)) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsetOption(opt, jsc.pub.presets[pres][opt]);\r\n\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\tconsole.warn(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t// let's set specific options for this color picker\r\n\t\tvar nonProperties = [\r\n\t\t\t// these options won't be set as instance properties\r\n\t\t\t'preset',\r\n\t\t];\r\n\t\tfor (var opt in opts) {\r\n\t\t\tif (opts.hasOwnProperty(opt)) {\r\n\t\t\t\tif (nonProperties.indexOf(opt) === -1) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsetOption(opt, opts[opt]);\r\n\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\tconsole.warn(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t//\r\n\t\t// Install the color picker on chosen element(s)\r\n\t\t//\r\n\r\n\r\n\t\t// Determine picker's container element\r\n\t\tif (this.container === undefined) {\r\n\t\t\tthis.container = window.document.body; // default container is BODY element\r\n\r\n\t\t} else { // explicitly set to custom element\r\n\t\t\tthis.container = jsc.node(this.container);\r\n\t\t}\r\n\r\n\t\tif (!this.container) {\r\n\t\t\tthrow new Error('Cannot instantiate color picker without a container element');\r\n\t\t}\r\n\r\n\r\n\t\t// Fetch the target element\r\n\t\tthis.targetElement = jsc.node(targetElement);\r\n\r\n\t\tif (!this.targetElement) {\r\n\t\t\t// temporarily customized error message to help with migrating from versions prior to 2.2\r\n\t\t\tif (typeof targetElement === 'string' && /^[a-zA-Z][\\w:.-]*$/.test(targetElement)) {\r\n\t\t\t\t// targetElement looks like valid ID\r\n\t\t\t\tvar possiblyId = targetElement;\r\n\t\t\t\tthrow new Error('If \\'' + possiblyId + '\\' is supposed to be an ID, please use \\'#' + possiblyId + '\\' or any valid CSS selector.');\r\n\t\t\t}\r\n\r\n\t\t\tthrow new Error('Cannot instantiate color picker without a target element');\r\n\t\t}\r\n\r\n\t\tif (this.targetElement.jscolor && this.targetElement.jscolor instanceof jsc.pub) {\r\n\t\t\tthrow new Error('Color picker already installed on this element');\r\n\t\t}\r\n\r\n\r\n\t\t// link this instance with the target element\r\n\t\tthis.targetElement.jscolor = this;\r\n\t\tjsc.addClass(this.targetElement, jsc.pub.className);\r\n\r\n\t\t// register this instance\r\n\t\tjsc.instances.push(this);\r\n\r\n\r\n\t\t// if target is BUTTON\r\n\t\tif (jsc.isButton(this.targetElement)) {\r\n\r\n\t\t\tif (this.targetElement.type.toLowerCase() !== 'button') {\r\n\t\t\t\t// on buttons, always force type to be 'button', e.g. in situations the target